Skip to content

Commit

Permalink
namespace should be trac_ following legacy convention. Modify test.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargasa committed Jul 29, 2019
1 parent 3a888d0 commit b192dad
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Expand Up @@ -26,6 +26,7 @@

<IncludeSection>
<Include ref="DetectorDescription/DDCMS/data/testDDPixFwdDiskAlgo.xml"/>
<Include ref="Geometry/TrackerCommonData/data/PhaseI/PixelForward/pixfwdDisks.xml"/>
<Include ref="DetectorDescription/DDCMS/data/materials.xml"/>
</IncludeSection>

Expand Down
43 changes: 31 additions & 12 deletions DetectorDescription/DDCMS/data/testDDPixFwdDiskAlgo.xml
@@ -1,28 +1,40 @@
<?xml version="1.0"?>
<!--
taken from Geometry/TrackerCommonData/data/PhaseI/PixelForward/pixfwdInnerDisk1.xml
-->
<DDDefinition>

<SolidSection>
<Box name="MotherOfAllBoxes" dx="10*m" dy="10*m" dz="10*m"/>
<Box name="AnotherBox" dx="1*m" dy="1*m" dz="1*m"/>
<Box name="ChildVolume" dx="10*m" dy="10*m" dz="10*m"/>
</SolidSection>

<LogicalPartSection>
<LogicalPart name="MotherOfAllBoxes">
<rMaterial name="materials:Air"/>
<rSolid name="MotherOfAllBoxes"/>
</LogicalPart>
<LogicalPart name="AnotherBox">
<LogicalPart name="ChildVolume">
<rMaterial name="materials:Air"/>
<rSolid name="AnotherBox"/>
<rSolid name="ChildVolume"/>
</LogicalPart>
</LogicalPartSection>
<RotationSection>
<Rotation name="180D" thetaX="90*deg" phiX="180*deg" thetaY="90*deg" phiY="90*deg" thetaZ="180*deg" phiZ="0*deg"/>
</RotationSection>
<Algorithm name="tracker:DDPixFwdDisk">

<ConstantsSection label="pixfwdInnerDisk1.xml" eval="true">
<Constant name="InnerRingRMin" value="37.5*mm"/>
<Constant name="InnerRingRMax" value="[InnerRingRMin]+2.0*mm"/>
<Constant name="InnerRingCFRMin" value="[InnerRingRMax]"/>
<Constant name="InnerRingCFRMax" value="[InnerRingCFRMin]+0.5*mm"/>
<Constant name="InnerRingHalfWidth" value="15.0*mm"/>
<Constant name="InnerRingZ" value="[pixfwdDisks:DiskHalfWidth]-[InnerRingHalfWidth]"/>
<Constant name="OuterRingRMax" value="116.6*mm"/>
<Constant name="OuterRingRMin" value="[OuterRingRMax]-2.00*mm"/>
<Constant name="OuterRingCFRMax" value="[OuterRingRMin]"/>
<Constant name="OuterRingCFRMin" value="[OuterRingCFRMax]-0.5*mm"/>
<Constant name="OuterRingHalfWidth" value="14*mm"/>
<Constant name="OuterRingZ" value="[pixfwdDisks:DiskHalfWidth]-[OuterRingHalfWidth]"/>
</ConstantsSection>

<Algorithm name="track:DDPixFwdDiskAlgo">
<rParent name="testDDPixFwdDiskAlgo:MotherOfAllBoxes"/>
<String name="ChildName" value="testDDPixFwdDiskAlgo:AnotherBox"/>
<String name="ChildName" value="testDDPixFwdDiskAlgo:ChildVolume"/>
<Numeric name="StartCopyNo" value="0"/>
<Numeric name="NumberOfBlades" value="22"/>
<Numeric name="BladeAngle" value="20*deg"/>
Expand All @@ -34,14 +46,21 @@
7.12*mm, 2.62*mm, -1.88*mm, -6.38*mm, -10.88*mm,
11.62*mm, 7.12*mm, 2.62*mm, -1.88*mm, -6.38*mm, -10.88*mm
</Vector>

<Numeric name="AnchorRadius" value="78.7*mm"/>
<String name="RotationName" value="180D"/>
<String name="RotationName" value="pixfwdInnerDisk1:PixInner"/>
<String name="FlagString" value="YYYYYYYYYYYYYYYYYYYYYY"/>
</Algorithm>

<PosPartSection label="">
<PosPart copyNumber="2">
<rParent name=":world_volume"/>
<rChild name="MotherOfAllBoxes"/>
</PosPart>
<PosPart copyNumber="100">
<rParent name="MotherOfAllBoxes"/>
<rChild name="testDDPixFwdDiskAlgo:ChildVolume"/>
</PosPart>
</PosPartSection>

</DDDefinition>
2 changes: 1 addition & 1 deletion DetectorDescription/DDCMS/plugins/DDPixFwdDiskAlgo.cc
Expand Up @@ -126,4 +126,4 @@ static long algorithm(dd4hep::Detector& /* description */,
return cms::s_executed;
}

DECLARE_DDCMS_DETELEMENT(DDCMS_tracker_DDPixFwdDisk, algorithm)
DECLARE_DDCMS_DETELEMENT(DDCMS_track_DDPixFwdDiskAlgo, algorithm)
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/python/testDDPixFwdDiskAlgo.py
Expand Up @@ -38,11 +38,11 @@

process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
confGeomXMLFiles = cms.FileInPath('DetectorDescription/DDCMS/data/cms-test-ddpixfwddisk-algo.xml'),
appendToDataLabel = cms.string('TestPixFwdDisk')
appendToDataLabel = cms.string('testDDPixFwdDiskAlgo')
)

process.testDump = cms.EDAnalyzer("DDTestDumpFile",
DDDetector = cms.ESInputTag('','TestPixFwdDisk')
DDDetector = cms.ESInputTag('','testDDPixFwdDiskAlgo')
)

process.p = cms.Path(process.testDump)

0 comments on commit b192dad

Please sign in to comment.