Skip to content

Commit

Permalink
Merge pull request cms-sw#32371 from ianna/dd4hep-evaluate-tracker-pa…
Browse files Browse the repository at this point in the history
…rameters-v1

[DD4hep] evaluate all numeric parameters in tracker detector description
  • Loading branch information
cmsbuild authored Dec 2, 2020
2 parents aa368a5 + 5677282 commit 2f11ea5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 43 deletions.
62 changes: 31 additions & 31 deletions Geometry/TrackerCommonData/data/PhaseI/trackerStructureTopology.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd">
<DDDefinition>

<SpecParSection label="spec-pars2.xml">

Expand Down Expand Up @@ -271,7 +271,7 @@
</SpecPar>


<SpecPar name="TrackerAPVNumber6Par">
<SpecPar name="TrackerAPVNumber6Par" eval="true">
<PartSelector path="//TIBActiveRphi0" />
<PartSelector path="//TIBActiveSter0" />
<PartSelector path="//TIDModule0RphiActive" />
Expand All @@ -288,7 +288,7 @@
<Parameter name="SiliconAPVNumber" value="6"/>
</SpecPar>

<SpecPar name="TrackerAPVNumber4Par">
<SpecPar name="TrackerAPVNumber4Par" eval="true">
<PartSelector path="//TIBActiveRphi2" />
<PartSelector path="//TIDModule2RphiActive" />
<PartSelector path="//TOBActiveRphi0" />
Expand All @@ -301,123 +301,123 @@
<Parameter name="SiliconAPVNumber" value="4"/>
</SpecPar>

<SpecPar name="PixelROCRowsPar_L0">
<SpecPar name="PixelROCRowsPar_L0" eval="true">
<PartSelector path="//PixelBarrelActiveFull0" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>
<SpecPar name="PixelROCRowsPar_L1">
<SpecPar name="PixelROCRowsPar_L1" eval="true">
<PartSelector path="//PixelBarrelActiveFull1" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>
<SpecPar name="PixelROCRowsPar_L2">
<SpecPar name="PixelROCRowsPar_L2" eval="true">
<PartSelector path="//PixelBarrelActiveFull2" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>
<SpecPar name="PixelROCRowsPar_L3">
<SpecPar name="PixelROCRowsPar_L3" eval="true">
<PartSelector path="//PixelBarrelActiveFull3" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>

<SpecPar name="PixelROCRowsPar_D1">
<SpecPar name="PixelROCRowsPar_D1" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>
<SpecPar name="PixelROCRowsPar_D2">
<SpecPar name="PixelROCRowsPar_D2" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>
<SpecPar name="PixelROCRowsPar_D3">
<SpecPar name="PixelROCRowsPar_D3" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCRows" value="80"/>
</SpecPar>

<SpecPar name="PixelROCColsPar_L0">
<SpecPar name="PixelROCColsPar_L0" eval="true">
<PartSelector path="//PixelBarrelActiveFull0" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>
<SpecPar name="PixelROCColsPar_L1">
<SpecPar name="PixelROCColsPar_L1" eval="true">
<PartSelector path="//PixelBarrelActiveFull1" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>
<SpecPar name="PixelROCColsPar_L2">
<SpecPar name="PixelROCColsPar_L2" eval="true">
<PartSelector path="//PixelBarrelActiveFull2" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>
<SpecPar name="PixelROCColsPar_L3">
<SpecPar name="PixelROCColsPar_L3" eval="true">
<PartSelector path="//PixelBarrelActiveFull3" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>

<SpecPar name="PixelROCColsPar_D1">
<SpecPar name="PixelROCColsPar_D1" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>
<SpecPar name="PixelROCColsPar_D2">
<SpecPar name="PixelROCColsPar_D2" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>
<SpecPar name="PixelROCColsPar_D3">
<SpecPar name="PixelROCColsPar_D3" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROCCols" value="52"/>
</SpecPar>

<SpecPar name="PixelROC_XPar_L0">
<SpecPar name="PixelROC_XPar_L0" eval="true">
<PartSelector path="//PixelBarrelActiveFull0" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>

<SpecPar name="PixelROC_XPar_L1">
<SpecPar name="PixelROC_XPar_L1" eval="true">
<PartSelector path="//PixelBarrelActiveFull1" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>
<SpecPar name="PixelROC_XPar_L2">
<SpecPar name="PixelROC_XPar_L2" eval="true">
<PartSelector path="//PixelBarrelActiveFull2" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>
<SpecPar name="PixelROC_XPar_L3">
<SpecPar name="PixelROC_XPar_L3" eval="true">
<PartSelector path="//PixelBarrelActiveFull3" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>

<SpecPar name="PixelROC_XPar_D1">
<SpecPar name="PixelROC_XPar_D1" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>
<SpecPar name="PixelROC_XPar_D2">
<SpecPar name="PixelROC_XPar_D2" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>
<SpecPar name="PixelROC_XPar_D3">
<SpecPar name="PixelROC_XPar_D3" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_X" value="2"/>
</SpecPar>

<SpecPar name="PixelROC_YPar_L0">
<SpecPar name="PixelROC_YPar_L0" eval="true">
<PartSelector path="//PixelBarrelActiveFull0" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
<SpecPar name="PixelROC_YPar_L1">
<SpecPar name="PixelROC_YPar_L1" eval="true">
<PartSelector path="//PixelBarrelActiveFull1" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
<SpecPar name="PixelROC_YPar_L2">
<SpecPar name="PixelROC_YPar_L2" eval="true">
<PartSelector path="//PixelBarrelActiveFull2" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
<SpecPar name="PixelROC_YPar_L3">
<SpecPar name="PixelROC_YPar_L3" eval="true">
<PartSelector path="//PixelBarrelActiveFull3" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>

<SpecPar name="PixelROC_YPar_D1">
<SpecPar name="PixelROC_YPar_D1" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
<SpecPar name="PixelROC_YPar_D2">
<SpecPar name="PixelROC_YPar_D2" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
<SpecPar name="PixelROC_YPar_D3">
<SpecPar name="PixelROC_YPar_D3" eval="true">
<PartSelector path="//.*:PixelForwardSensor" />
<Parameter name="PixelROC_Y" value="8"/>
</SpecPar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,18 @@ void TrackerGeomBuilderFromGeometricDet::buildPixel(

tracker->setOffsetDU(GeomDetEnumerators::subDetGeom[det]);

for (auto i : gdv) {
for (auto const& i : gdv) {
std::string const& detName = i->name();
if (thePixelDetTypeMap.find(detName) == thePixelDetTypeMap.end()) {
std::unique_ptr<const Bounds> bounds(i->bounds());

PixelTopology* t = PixelTopologyBuilder().build(&*bounds,
PixelTopology* t = PixelTopologyBuilder().build(bounds.get(),
upgradeGeometry,
i->pixROCRows(),
i->pixROCCols(),
(int)i->pixROCRows(),
(int)i->pixROCCols(),
BIG_PIX_PER_ROC_X,
BIG_PIX_PER_ROC_Y,
i->pixROCx(),
i->pixROCy());
(int)i->pixROCx(),
(int)i->pixROCy());

thePixelDetTypeMap[detName] = new PixelGeomDetType(t, detName, det);
tracker->addType(thePixelDetTypeMap[detName]);
Expand All @@ -203,11 +202,11 @@ void TrackerGeomBuilderFromGeometricDet::buildSilicon(std::vector<const Geometri

tracker->setOffsetDU(GeomDetEnumerators::subDetGeom[det]);

for (auto i : gdv) {
for (auto const& i : gdv) {
std::string const& detName = i->name();
if (theStripDetTypeMap.find(detName) == theStripDetTypeMap.end()) {
std::unique_ptr<const Bounds> bounds(i->bounds());
StripTopology* t = StripTopologyBuilder().build(&*bounds, i->siliconAPVNum(), part);
StripTopology* t = StripTopologyBuilder().build(bounds.get(), i->siliconAPVNum(), part);
theStripDetTypeMap[detName] = new StripGeomDetType(t, detName, det, i->stereo());
tracker->addType(theStripDetTypeMap[detName]);
}
Expand Down
8 changes: 5 additions & 3 deletions Geometry/TrackerNumberingBuilder/src/GeometricDet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ GeometricDet::GeometricDet(cms::DDFilteredView* fv, GeometricEnumType type)
rot_(fv->rotation()),
shape_(fv->shape()),
params_(computeLegacyShapeParameters(shape_, fv->solid())),
radLength_(fv->get<double>("TrackerRadLength")),
xi_(fv->get<double>("TrackerXi")),
pixROCRows_(fv->get<double>("PixelROCRows")),
pixROCCols_(fv->get<double>("PixelROCCols")),
pixROCx_(fv->get<double>("PixelROC_X")),
Expand All @@ -115,7 +113,11 @@ GeometricDet::GeometricDet(cms::DDFilteredView* fv, GeometricEnumType type)
isLowerSensor_(fv->get<std::string_view>("TrackerLowerDetectors") == strue),
isUpperSensor_(fv->get<std::string_view>("TrackerUpperDetectors") == strue),
siliconAPVNum_(fv->get<double>("SiliconAPVNumber")),
isFromDD4hep_(true) {}
isFromDD4hep_(true) {
fv->findSpecPar("TrackerRadLength", "TrackerXi");
radLength_ = fv->getNextValue("TrackerRadLength");
xi_ = fv->getNextValue("TrackerXi");
}

/*
Constructor from persistent version (DB).
Expand Down

0 comments on commit 2f11ea5

Please sign in to comment.