Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
<?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">
    

<ConstantsSection label="pixfwd.xml" eval="true">
 <Constant name="RootRadius"     value="[pixfwdCylinder:CylindersOuterRmax]"/>
 <Constant name="RootHalfLength" value="[pixfwdCylinder:CylindersOuterLength]/2.+ [pixfwdCylinder:CylindersEndFlangeLength]/2."/>

 <Constant name="AnchorZ"        value="0.*mm"/>
 <Constant name="ZPixelForward"  value="291.*mm"/>
 <Constant name="RootStartZ"     value="-4*mm"/> <!-- makes FPix and BPix envelopes touch each other. If you change this, check also the PixelBarrel volume -->
 <Constant name="RootMidZ1"      value="[cms:TrackLumiZ1]-[ZPixelForward]"/>
 <Constant name="RootMidZ2"      value="[cms:TrackLumiZ2]-[ZPixelForward]"/>
 <Constant name="RootMidZ3"      value="[cms:TrackBeamZ1]-[ZPixelForward]"/>
 <Constant name="RootEndZ"       value="2*[RootHalfLength]"/>

 <Constant name="Disk1Z"         value="[pixfwdDisks:DiskHalfWidth]"/>
 <Constant name="Disk2Z"         value="[Disk1Z]+75.0*mm"/>
 <Constant name="Disk3Z"         value="[Disk2Z]+95.0*mm"/>

 <Constant name="ZCylinder"      value="[AnchorZ]"/>

 <Constant name="FlexCableDiskRmin" value="[pixfwdSupportRingParameters:InnerDiskOuterRingCFRMax]"/>
 <Constant name="FlexCableDiskRmax" value="165.*mm"/>
 <Constant name="FlexCableDiskHalfThickness" value="0.15*mm"/>

</ConstantsSection>

<SolidSection label="pixfwd.xml">
 <Polycone name="PixelForwardZplus" startPhi="0*deg" deltaPhi="360*deg" >
 <ZSection z="[RootStartZ]"  rMin="[cms:TrackBeamR1]"  rMax="[RootRadius]"/>
 <ZSection z="[RootMidZ1]"   rMin="[cms:TrackBeamR11]" rMax="[RootRadius]"/>
 <ZSection z="[RootMidZ1]"   rMin="[cms:TrackLumiR1]"  rMax="[RootRadius]"/>
 <ZSection z="[RootMidZ2]"   rMin="[cms:TrackLumiR1]"  rMax="[RootRadius]"/>
 <ZSection z="[RootMidZ2]"   rMin="[cms:TrackBeamR11]" rMax="[RootRadius]"/>
 <ZSection z="[RootMidZ3]"   rMin="[cms:TrackBeamR12]" rMax="[RootRadius]"/>
 <ZSection z="[RootEndZ]"    rMin="[cms:TrackBeamR2]"  rMax="[RootRadius]"/>
 </Polycone>
 <Polycone name="PixelForwardZminus" startPhi="0*deg" deltaPhi="360*deg" >
 <ZSection z="-[RootEndZ]"    rMin="[cms:TrackBeamR2]"  rMax="[RootRadius]"/>
 <ZSection z="-[RootMidZ3]"   rMin="[cms:TrackBeamR12]" rMax="[RootRadius]"/>
 <ZSection z="-[RootMidZ2]"   rMin="[cms:TrackBeamR11]" rMax="[RootRadius]"/>
 <ZSection z="-[RootMidZ2]"   rMin="[cms:TrackLumiR1]"  rMax="[RootRadius]"/>
 <ZSection z="-[RootMidZ1]"   rMin="[cms:TrackLumiR1]"  rMax="[RootRadius]"/>
 <ZSection z="-[RootMidZ1]"   rMin="[cms:TrackBeamR11]" rMax="[RootRadius]"/>
 <ZSection z="-[RootStartZ]"  rMin="[cms:TrackBeamR1]"  rMax="[RootRadius]"/>
 </Polycone>
  
</SolidSection>
 
<LogicalPartSection label="pixfwd.xml">
 <LogicalPart name="PixelForwardZplus" category="envelope">
  <rSolid name="PixelForwardZplus"/>
  <rMaterial name="materials:Air"/>
 </LogicalPart>
 <LogicalPart name="PixelForwardZminus" category="envelope">
  <rSolid name="PixelForwardZminus"/>
  <rMaterial name="materials:Air"/>
 </LogicalPart>

</LogicalPartSection>

<!-- Position disks inside root -->

<PosPartSection label="pixfwd.xml">

  <PosPart copyNumber="1">
    <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZplus"/>
    <Translation x="0." y="0." z="[AnchorZ]+[Disk1Z]"/>
  </PosPart>
  <PosPart copyNumber="1">
    <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZminus"/>
    <Translation x="0." y="0." z="-[AnchorZ]-[Disk1Z]"/>
  </PosPart>

  <PosPart copyNumber="2">
    <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZplus"/>
    <Translation x="0." y="0." z="[AnchorZ]+[Disk2Z]"/>
  </PosPart>
  <PosPart copyNumber="2">
    <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZminus"/>
    <Translation x="0." y="0." z="-[AnchorZ]-[Disk2Z]"/>
  </PosPart>

  <PosPart copyNumber="3">
    <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZplus"/>
    <Translation x="0." y="0." z="[AnchorZ]+[Disk3Z]" />
  </PosPart>
  <PosPart copyNumber="3">
    <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdDisks:PixelForwardDiskZminus"/>
    <Translation x="0." y="0." z="-[AnchorZ]-[Disk3Z]" />
  </PosPart>

  <PosPart copyNumber="1">
    <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdCylinder:PixelForwardServiceCylinder"/>
    <Translation x="0." y="0." z="0."/>
  </PosPart>
  <PosPart copyNumber="1">
    <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdCylinder:PixelForwardServiceCylinder"/>
    <Translation x="0." y="0." z="0."/>
    <rRotation name="pixfwdCommon:Y180" />
  </PosPart>

  <PosPart copyNumber="1">
  <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdCylinder:PixelForwardCylinderEndFlange"/>
    <Translation x="0." y="0." z="[pixfwd:ZCylinder]+[pixfwdCylinder:CylindersOuterLength]+[pixfwdCylinder:CylindersEndFlangeLength]/2."/>
    <rRotation name="pixfwdCylinder:EndFlangeRot1"/>
  </PosPart>
  <PosPart copyNumber="2">
    <rParent name="pixfwd:PixelForwardZplus"/>
    <rChild name="pixfwdCylinder:PixelForwardCylinderEndFlange"/>
    <Translation x="0." y="0." z="[pixfwd:ZCylinder]+[pixfwdCylinder:CylindersOuterLength]+[pixfwdCylinder:CylindersEndFlangeLength]/2."/>
    <rRotation name="pixfwdCylinder:EndFlangeRot2"/>
  </PosPart>

  <PosPart copyNumber="1">
  <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdCylinder:PixelForwardCylinderEndFlange"/>
    <Translation x="0." y="0." z="-[pixfwd:ZCylinder]-[pixfwdCylinder:CylindersOuterLength]-[pixfwdCylinder:CylindersEndFlangeLength]/2."/>
    <rRotation name="pixfwdCylinder:EndFlangeRot1"/>
  </PosPart>
  <PosPart copyNumber="2">
    <rParent name="pixfwd:PixelForwardZminus"/>
    <rChild name="pixfwdCylinder:PixelForwardCylinderEndFlange"/>
    <Translation x="0." y="0." z="-[pixfwd:ZCylinder]-[pixfwdCylinder:CylindersOuterLength]-[pixfwdCylinder:CylindersEndFlangeLength]/2."/>
    <rRotation name="pixfwdCylinder:EndFlangeRot2"/>
  </PosPart>

</PosPartSection>
    
</DDDefinition>