Skip to content

Commit

Permalink
Backport al Geometry related files - xml and code for the corrected R…
Browse files Browse the repository at this point in the history
…un3 geometry
  • Loading branch information
Sunanda committed Jan 18, 2022
1 parent 2211742 commit 14dae1f
Show file tree
Hide file tree
Showing 19 changed files with 4,379 additions and 2 deletions.
98 changes: 98 additions & 0 deletions Geometry/ForwardCommonData/data/bcm1f/2021/v1/bcm1f.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0"?>
<DDDefinition>
<ConstantsSection label="bcm1f">
<!-- dimensions of the bcm1f volume -->
<Constant name="Bcm1Z1" value="1.803*m"/>
<Constant name="Bcm1Z2" value="1.900*m"/>
<Constant name="Bcm1fZ" value="([Bcm1Z2]+[Bcm1Z1])/2"/> <!-- z position of the centre of bcm1f volume wrt to CMS -->
<Constant name="Bcm1fThickness" value="([Bcm1Z2]-[Bcm1Z1])"/>
<Constant name="Bcm1fInnerRadius" value="[cms:TrackBeamR12]"/>
<Constant name="Bcm1fOuterRadius" value="[cms:TrackLumiR1]"/>
<!-- dimensions of the diamonds -->
<Constant name="DiamondLX" value="5.0*mm"/>
<Constant name="DiamondLY" value="5.0*mm"/>
<Constant name="DiamondLZ" value="0.5*mm"/>
<Constant name="DiamondZ" value="1814*mm"/> <!-- z position of the centre of the diamond wrt CMS -->
<!-- dimensions of the effective (metallised) sensitive area -->
<Constant name="SensorLX" value="[DiamondLX]*0.95"/>
<Constant name="SensorLY" value="[DiamondLY]*0.95/2"/>
<Constant name="SensorLZ" value="[DiamondLZ]"/>
<Constant name="SensorGap" value="0.01*mm"/>
<Constant name="SensorShift" value="[SensorLY]/2+[SensorGap]/2"/>
<!-- location of the sensors in rho-z with respect to CMS (0,0,0) -->
<Constant name="SensorRho" value="70.5*mm"/>
<Constant name="SensorZ" value="[DiamondZ]"/>
</ConstantsSection>

<!-- Create geometrical shapes -->
<SolidSection label="bcm1f">
<Tubs name="BCM1F" rMin="[Bcm1fInnerRadius]" rMax="[Bcm1fOuterRadius]" dz="[Bcm1fThickness]/2" startPhi="0*deg" deltaPhi="360*deg"/>
<Box name="BCM1FDiamond" dx="[DiamondLX]/2" dy="[DiamondLY]/2" dz="[DiamondLZ]/2"/>
<Box name="BCM1FSensor" dx="[SensorLX]/2" dy="[SensorLY]/2" dz="[SensorLZ]/2"/>
</SolidSection>

<!-- Define the materials of the geometrical shapes -->
<LogicalPartSection label="bcm1f">

<LogicalPart name="BCM1F" category="unspecified">
<rSolid name="BCM1F"/>
<rMaterial name="materials:Air"/>
</LogicalPart>

<LogicalPart name="BCM1FDiamond" category="unspecified">
<rSolid name="BCM1FDiamond"/>
<rMaterial name="materials:Diamond"/>
</LogicalPart>

<LogicalPart name="BCM1FSensor" category="unspecified">
<rSolid name="BCM1FSensor"/>
<rMaterial name="materials:Diamond"/>
</LogicalPart>

</LogicalPartSection>

<!-- Position -->
<PosPartSection label="bcm1f">

<!-- Planes -->
<PosPart copyNumber="1">
<rParent name="pltbcm:PLTBCM"/>
<rChild name="bcm1f:BCM1F"/>
<rRotation name="rotations:000D"/>
<Translation x="0*fm" y="0*fm" z="[Bcm1fZ]-[pltbcm:PltBcmZ]"/>
</PosPart>

<!-- Diamonds -->
<Algorithm name="global:DDAngular">
<rParent name="bcm1f:BCM1F"/>
<String name="ChildName" value="bcm1f:BCM1FDiamond"/>
<Numeric name="StartCopyNo" value="1"/>
<Numeric name="IncrCopyNo" value="1"/>
<Numeric name="N" value="12"/>
<Numeric name="Radius" value="[SensorRho]"/>
<Numeric name="StartAngle" value="120*deg"/>
<Numeric name="RangeAngle" value="360*deg"/>
<Vector name="Center" type="numeric" nEntries="3"> 0, 0, ([DiamondZ]-[Bcm1fZ]) </Vector>
<Vector name="RotateSolid" type="numeric" nEntries="36">
0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg,
0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg,
0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg
</Vector>
</Algorithm>

<!-- Sensors -->
<PosPart copyNumber="1">
<rParent name="bcm1f:BCM1FDiamond"/>
<rChild name="bcm1f:BCM1FSensor"/>
<rRotation name="rotations:000D"/>
<Translation x="0*fm" y="-[SensorShift]" z="0*fm"/>
</PosPart>
<PosPart copyNumber="2">
<rParent name="bcm1f:BCM1FDiamond"/>
<rChild name="bcm1f:BCM1FSensor"/>
<rRotation name="rotations:000D"/>
<Translation x="0*fm" y="[SensorShift]" z="0*fm"/>
</PosPart>
</PosPartSection>

</DDDefinition>
168 changes: 168 additions & 0 deletions Geometry/ForwardCommonData/data/plt/2021/v1/plt.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<?xml version="1.0"?>
<DDDefinition>

<!-- Author: Steven M. Kaplan -->

<!-- Declare constants used in the PLT DDL -->
<ConstantsSection label="plt" eval="true">
<Constant name = "pltTilt" value = "1.57*deg" />

<Constant name = "SiPlane0RtoCenter" value = "49.9*mm" />
<Constant name = "SiPlane1RtoCenter" value = "51.*mm" />
<Constant name = "SiPlane2RtoCenter" value = "52.1*mm" />

<Constant name = "SiPlane0ZtoCenter" value = "1726.9*mm" />
<Constant name = "SiPlane1ZtoCenter" value = "1764.6*mm" />
<Constant name = "SiPlane2ZtoCenter" value = "1802.3*mm" />

<Constant name = "ROCWidthX" value = "8.0*mm" />
<Constant name = "ROCWidthY" value = "10.5*mm" />
<Constant name = "SiThkZ" value = "0.30*mm" />

<Constant name = "TelWidthX" value = "[ROCWidthX]" />
<Constant name = "TelWidthY" value = "[ROCWidthY]+2.2*mm" />
<Constant name = "TelWidthZ" value = "[SiPlane2ZtoCenter]-[SiPlane0ZtoCenter]+[SiThkZ]" />
<Constant name = "PLTMinR" value = "[cms:TrackBeamR12]" />
<Constant name = "PLTMaxR" value = "[cms:TrackLumiR1]" />

<Constant name = "NumberOfRows" value = "80" />
<Constant name = "NumberOfColumns" value = "52" />
<Constant name = "PixelRowWidth" value = "0.1*mm" />
<Constant name = "PixelColumnWidth" value = "0.15*mm" />
<Constant name = "ActiveAreaColumnWidth" value = "[PixelColumnWidth]*[NumberOfColumns]" />
<Constant name = "ActiveAreaRowWidth" value = "[PixelRowWidth]*[NumberOfRows]" />

</ConstantsSection>

<!-- Declare PLT component Solids -->
<SolidSection label="plt">

<Box name="PLTSensorPlane" dx="[ROCWidthX]/2." dy="[ROCWidthY]/2." dz="[SiThkZ]/2." />

<Tubs name="PLT" startPhi="0.0*deg" deltaPhi="360*deg" rMin="[PLTMinR]" rMax="[PLTMaxR]" dz="[TelWidthZ]/2."/>

<Box name="Telescope" dx="[TelWidthX]/2." dy="[TelWidthY]/2." dz="[TelWidthZ]/2." />

<Box name="PLTPixel" dx="[PixelColumnWidth]/2." dy="[PixelRowWidth]/2." dz="[SiThkZ]/2." />

<Box name="PLTSensorRow" dx="[ActiveAreaColumnWidth]/2." dy="[PixelRowWidth]/2." dz="[SiThkZ]/2." />

</SolidSection>

<!-- Define the Physical PLT Solids, i.e. the Logical Parts -->
<LogicalPartSection label="plt">
<LogicalPart name="PLT" category="unspecified">
<rSolid name="PLT"/>
<rMaterial name="materials:Vacuum"/>
</LogicalPart>

<LogicalPart name="Telescope" category="unspecified">
<rSolid name="Telescope"/>
<rMaterial name="materials:Vacuum"/>
</LogicalPart>

<LogicalPart name="PLTSensorPlane" category="unspecified">
<rSolid name="PLTSensorPlane"/>
<rMaterial name="materials:Vacuum"/>
</LogicalPart>

<LogicalPart name="PLTSensorRow" category="unspecified">
<rSolid name="PLTSensorRow"/>
<rMaterial name="materials:Vacuum"/>
</LogicalPart>

<LogicalPart name="PLTPixel" category="unspecified">
<rSolid name="PLTPixel"/>
<rMaterial name="materials:Silicon"/>
</LogicalPart>

</LogicalPartSection>

<!-- Position the Silicon in the telescope and copy the telescope to have 8 of them. Take this amalgamation of 8 telescopes then copy it into the PLTBCM volume-->
<PosPartSection label="plt">
<!-- Copy the pixels into a row to form the columns -->
<Algorithm name="global:DDLinear">
<rParent name="plt:PLTSensorRow"/>
<String name="ChildName" value="plt:PLTPixel"/>
<Numeric name="StartCopyNo" value="0"/>
<Numeric name="IncrCopyNo" value="1"/>
<Numeric name="N" value="[NumberOfColumns]"/>
<Numeric name="Delta" value="[PixelColumnWidth]"/>
<Vector name="Base" type="numeric" nEntries="3"> -[ActiveAreaColumnWidth]/2.+[PixelColumnWidth]/2.,0.*mm,0.*mm </Vector>
<Numeric name="Theta" value="90*deg"/>
<Numeric name="Phi" value="0.*deg"/>
</Algorithm>
<!-- Copy the rows to form the sensor plane! -->
<Algorithm name="global:DDLinear">
<rParent name="plt:PLTSensorPlane"/>
<String name="ChildName" value="plt:PLTSensorRow"/>
<Numeric name="StartCopyNo" value="0"/>
<Numeric name="IncrCopyNo" value="1"/>
<Numeric name="N" value="[NumberOfRows]"/>
<Numeric name="Delta" value="[PixelRowWidth]"/>
<Vector name="Base" type="numeric" nEntries="3"> 0.*mm,-[ROCWidthY]/2.+[ActiveAreaRowWidth]-([PixelRowWidth]/2.),0.*mm </Vector>
<Numeric name="Theta" value="90*deg"/>
<Numeric name="Phi" value="-90.*deg"/>
</Algorithm>
<!-- Copy the three sensor planes into the telescope-->
<PosPart copyNumber="0">
<rParent name="plt:Telescope"/>
<rChild name="plt:PLTSensorPlane"/>
<Translation x="0.*mm" y="-[TelWidthY]/2.+[ROCWidthY]/2." z="-[TelWidthZ]/2.+[SiThkZ]/2." />
<rRotation name="rotations:000D" />
</PosPart>

<PosPart copyNumber="1">
<rParent name="plt:Telescope"/>
<rChild name="plt:PLTSensorPlane"/>
<Translation x="0.*mm" y="-[TelWidthY]/2.+[ROCWidthY]/2.+1.1*mm" z="0.*mm" />
<rRotation name="rotations:000D" />
</PosPart>

<PosPart copyNumber="2">
<rParent name="plt:Telescope"/>
<rChild name="plt:PLTSensorPlane"/>
<Translation x="0.*mm" y="-[TelWidthY]/2.+[ROCWidthY]/2.+2.2*mm" z="[TelWidthZ]/2.-[SiThkZ]/2" />
<rRotation name="rotations:000D" />
</PosPart>
<!-- Copy the PLT into the PLTBCM volume -->
<!-- NOTE: The 2mm shift is due to the new tracker volume to make the plt planes positioned in |z| correctly.-->
<PosPart copyNumber="1">
<rParent name="pltbcm:PLTBCM"/>
<rChild name="plt:PLT"/>
<Translation x="0.*mm" y="0.*mm" z="[SiPlane1ZtoCenter]-[pltbcm:PltBcmZ]-2.*mm" />
<rRotation name="rotations:000D"/>
</PosPart>

<!-- Old positioning without PLTBCM volume
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="PLT"/>
<Translation x="0.*mm" y="0.*mm" z="[SiPlane1ZtoCenter]" />
<rRotation name="rotations:000D"/>
</PosPart>
<PosPart copyNumber="0">
<rParent name="cms:CMSE"/>
<rChild name="PLT"/>
<Translation x="0.*mm" y="0.*mm" z="-[SiPlane1ZtoCenter]" />
<rRotation name="rotations:180D"/>
</PosPart> -->
<!-- Copy the telescopes into the PLT volume starting with phi=112.5 degrees. RotateSolid vector gives correct orientation of the planes-->
<Algorithm name="global:DDAngular">
<rParent name="plt:PLT"/>
<String name="ChildName" value="plt:Telescope"/>
<Numeric name="StartCopyNo" value="0"/>
<Numeric name="IncrCopyNo" value="1"/>
<Numeric name="N" value="8"/>
<Numeric name="Radius" value="[SiPlane1RtoCenter]"/>
<Numeric name="StartAngle" value="112.5*deg"/>
<Numeric name="RangeAngle" value="360*deg"/>
<Vector name="Center" type="numeric" nEntries="3"> 0, 0, 0 </Vector>
<Vector name="RotateSolid" type="numeric" nEntries="24"> 0.*deg, 0.*deg, -90.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg, 0.*deg </Vector>
</Algorithm>

</PosPartSection>

</DDDefinition>
42 changes: 42 additions & 0 deletions Geometry/ForwardCommonData/data/pltbcm/2021/v1/pltbcm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<DDDefinition>
<ConstantsSection label="pltbcm">
<!-- PLT-BCM volume constants -->
<Constant name="PltBcmZ1" value="1.700*m"/>
<Constant name="PltBcmZ2" value="1.900*m"/>
<Constant name="PltBcmZ" value="([PltBcmZ2]+[PltBcmZ1])/2"/>
<Constant name="PltBcmDZ" value="([PltBcmZ2]-[PltBcmZ1])/2"/>
<Constant name="PltBcmInnerRadius" value="[cms:TrackBeamR12]"/>
<Constant name="PltBcmOuterRadius" value="[cms:TrackLumiR1]"/>
</ConstantsSection>

<!-- Create geometrical shapes of volumes-->
<SolidSection label="pltbcm">
<Tubs name="PLTBCM" rMin="[PltBcmInnerRadius]" rMax="[PltBcmOuterRadius]" dz="[PltBcmDZ]" startPhi="0*deg" deltaPhi="360*deg"/>
</SolidSection>

<!-- Define the materials of the geometrical shapes -->
<LogicalPartSection label="pltbcm">
<LogicalPart name="PLTBCM" category="unspecified">
<rSolid name="PLTBCM"/>
<rMaterial name="materials:Air"/>
</LogicalPart>
</LogicalPartSection>

<!-- Position -->
<PosPartSection label="pltbcm">
<!-- Volumes in -Z and +Z -->
<PosPart copyNumber="1">
<rParent name="pixfwd:PixelForwardZplus"/>
<rChild name="pltbcm:PLTBCM"/>
<rRotation name="rotations:000D"/>
<Translation x="0*fm" y="0*fm" z="([PltBcmZ]-[pixfwd:ZPixelForward])"/>
</PosPart>
<PosPart copyNumber="2">
<rParent name="pixfwd:PixelForwardZminus"/>
<rChild name="pltbcm:PLTBCM"/>
<rRotation name="pixfwdCommon:Y180"/>
<Translation x="0*fm" y="0*fm" z="-([PltBcmZ]-[pixfwd:ZPixelForward])"/>
</PosPart>
</PosPartSection>
</DDDefinition>
5 changes: 3 additions & 2 deletions Geometry/ForwardCommonData/plugins/dd4hep/DDBHMAngular.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
parent.placeVolume(child, jj + 1, dd4hep::Transform3D(rot, tran));
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("ForwardGeom") << "DDBHMAngular test: " << child.name() << " number " << jj + 1
<< " positioned in " << parent.name() << " at " << tran << " with " << rot;
<< " positioned in " << parent.name() << " at " << tran << " with " << rotMat
<< " : " << rot;
#endif
}
return 1;
}

// first argument is the type from the xml file
DECLARE_DDCMS_DETELEMENT(DDCMS_forward_DDBHMAngular, algorithm)
DECLARE_DDCMS_DETELEMENT(DDCMS_bhmalgo_DDBHMAngular, algorithm)
17 changes: 17 additions & 0 deletions Geometry/GEMGeometryBuilder/data/GEMSpecs/2021/v1/GEMSpecs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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">
<SpecParSection label="GEMSpecs.xml">
<SpecPar name="nStripsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nPadsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
<SpecPar name="dPhiGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="dPhi" value="10.15*deg"/>
</SpecPar>
</SpecParSection>
</DDDefinition>
29 changes: 29 additions & 0 deletions Geometry/GEMGeometryBuilder/data/GEMSpecs/2021/v2/GEMSpecs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<DDDefinition>
<SpecParSection label="GEMSpecs.xml">
<SpecPar name="nStripsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nStripsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nStrips" value="384"/>
</SpecPar>
<SpecPar name="nPadsGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="nPads" value="192"/>
</SpecPar>
<SpecPar name="nPadsGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="nPads" value="384"/>
</SpecPar>
<SpecPar name="dPhiGE11" eval="true">
<PartSelector path="//GHA1.."/>
<Parameter name="dPhi" value="10.15*deg"/>
</SpecPar>
<SpecPar name="dPhiGE21" eval="true">
<PartSelector path="//GHA2.."/>
<Parameter name="dPhi" value="20.30*deg"/>
</SpecPar>
</SpecParSection>
</DDDefinition>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?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">
<SpecParSection label="GEMSpecsFilter.xml">
<SpecPar name="MuonGEMTree">
<PartSelector path="//GEMBox11L"/>
<PartSelector path="//GSAX11L"/>
<PartSelector path="//GEMBox11S"/>
<PartSelector path="//GSAX11S"/>
<PartSelector path="//GHA1..*"/>
<Parameter name="MuStructure" value="MuonEndCapGEM"/>
</SpecPar>
</SpecParSection>
</DDDefinition>
Loading

0 comments on commit 14dae1f

Please sign in to comment.