Skip to content

Commit

Permalink
Lightweight implementation of IDEA drift chamber (#330)
Browse files Browse the repository at this point in the history
* New implementation of DCH, based on excel spreadsheet

* refactor fill of DCH database

* remove legacy comment

* compact file added

* new parameters added

* Twisted tube as layer envelope ready
to be replaced by hyperboloid

* layer shape is now hyperboloid

* interlayer spacing for geometry safety is reduced to 1 nm
overlap test passes

* segmentation in phi works
overlap tests pass

* Stereo (twist) angle sign is now taken into account

* DCH materials detailed in a dedicated XML file
Detector constructor takes material from DCH material file

* Sense wire added
overlap tests pass

* staggering in phi placement of cells for alternating layers

* thickness of wires added to XML file

* Central field wire added
overlap tests pass

* update geometry tree comment
added todo note

* field wires 123 placed properly
overlap test passes

* field wires 45 in place
overlap test passes :)

* stagering of cells changed from 0.5 to 0.25 phi aperture

* vessel and gas mat/vis given via XML

* wire configuration now via XML
overlap test pass

* setup wire thickness in the XML

* old commented block deleted
overlap tests pass

* increase version number, keep option 1

* increase version number, keep option 1

* remove old file

* superlayer bitfield added

* fix bug, bitfield superlayer number is now calculated properly

* bitfield superlayer starts now at zero, not one

* rename DCH XML file

* lcgeo test added: DCH o1 v02 overlap test

* tracker README expanded

* Start new version of IDEA detector

* refactor DCH_info class. static members removed

* refactor inner and outer radius variable names, suffix _z0 removed

* comment added

* Missing units... Good catch by Brieuc :)

* variable name for guard wire radii are renamed for clarity

* IDEA compact README updated

* Add note that is based on the geometry version "IDEA231026"

* comments about wires added

* Central field wire, side field wire, sense wire have independent material definition

* pi

* Replace retrieving of global parameters from dsc with Setters

* Protection against neg. parameters added in Fill_DCH_info_database fcn

* Replace retrieving of global parameters from dsc with Setters

* Replace retrieving of global parameters from dsc with Setters

* Replace retrieving of global parameters from dsc with Setters
DCH_info is now independent of the dsc file

* remove condition for debuging

* refactor, use method to calculate the superlayer

* dummy space where the extension lives refactored,
to be changed for dd4hep::rec::

* refactor constexpr PI and TWOPI

* operator << added to class DCH_info

* class DCH_info renamed into DCH_info_struct, placed within dd4hep::rec::
the corresponding DetectorData wraper is called now DCH_info

* data extension added

* data extension changed from local object to pointer
so the destructor is not invoked twice

* separate data extension class from detector constructor
ready to be upstreamed to DD4hep

* comment fixed, thanks Andre!

* refactor DCH_info, prefix dch_ removed from members

* refactor aliases for length/angle

* use alias for super/layer numbering

* add region and limitset to DCH

* Vessel and gas geometry parameters completely moved to DectDimensions file

* Staggering in phi confirmed by expert

* aesthetics

* Fix typo of variable that set radius of outer ring of guard wires
Guard wires are not yet implemented, but data is stored in data extension

* readout bitfield changed; now layer bitfield corresponds to layer within the superlayer

* refactor global variables in XML

* comments added

* remove reference to excel table from DCH_info documentation

* inner and outer R walls are redefined

* radial walls ready, bulk material of endcap to be implemented...

* endcap bulk material defined to be equivalent to 5%X0

* rename DCH o2 to v2 consistently

* rename vessel endcap parameters

* wire material is now a mix of coating+core

* comment fix

* debugGeometry tag added to DCH detector constructor
used in overlap test

* update readme

* build wires of DCH for IDEA v3

* add a test of the whole IDEA_o1_v03 please

* remove legacy file

* make inline only functions not defined within the class-type
functions defined within the class are marked as inline by default

* comment fix

* fix readme

* formated as CLD readme

* enable other subdetectors

* comment typo fixed

* IDEA o1 v03 main compact file is now mirrored from latest v02

* add the following compact files to the IDEA_o1_v03 folder: Solenoid_o1_v01.xml, EndPlateAbsorber_o1_v01.xml

* Add detector dimensions

* use DDRec/include/DCH_info.h

* IDEA v3 material compact file updated

* exclude this new detector in case data extension header file is missing

* Andre fix: cmake macro CHECK_INCLUDE_FILE_CXX now checks for data extension header file
  • Loading branch information
atolosadelgado authored May 15, 2024
1 parent ca423a0 commit 0998713
Show file tree
Hide file tree
Showing 17 changed files with 3,764 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ if(NOT K4GEO_USE_LCIO)
message(STATUS "Use of LCIO is DISABLED, some detectors that depend on LCIO will not be built: ${lcio_sources}")
endif()

include(CheckIncludeFileCXX)
set(CMAKE_REQUIRED_LIBRARIES DD4hep::DDRec)
CHECK_INCLUDE_FILE_CXX(DDRec/DCH_info.h DCH_INFO_H_EXIST)
set(CMAKE_REQUIRED_LIBRARIES)
set(FILES_DEPENDINGON_DCH_INFO_H "DriftChamber_o1_v02.cpp" )

if(NOT DCH_INFO_H_EXIST)
list(FILTER sources EXCLUDE REGEX "${FILES_DEPENDINGON_DCH_INFO_H}")
message(WARNING "Subdetector ${FILES_DEPENDINGON_DCH_INFO_H} will not be built because header file ${DCH_INFO_H} was not found")
endif()

file(GLOB G4sources
./plugins/TPCSDAction.cpp
./plugins/CaloPreShowerSDAction.cpp
Expand Down
36 changes: 36 additions & 0 deletions FCCee/IDEA/compact/IDEA_o1_v03/BeamInstrumentation_o1_v01.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<lccdd>

<info name="FCCee"
title="FCCee Beam instrumentation: taken correspoding to CLD: BeamInstrumentation_o3_v02_fitShield.xml"
author="from ILCSOFT/lcgeo/FCCee/compact/FCCee_o1_v04"
url="no"
status="development"
version="1.0">
<comment>COmpensating and screening solenoids for FCCee</comment>
</info>


<detectors>
<comment>Beampipe Instrumentation</comment>

<detector name="CompSol" type="DD4hep_Mask_o1_v01" insideTrackingVolume="true" vis="CompSolVis">
<parameter crossingangle="CrossingAngle" />
<envelope vis="CoilVis">
<shape type="Assembly"/>
</envelope>
<section type="Center" start="CompSol_min_z" end="QD0_min_z" rMin1="103*mm" rMin2="180*mm" rMax1="123*mm" rMax2="200*mm" material="SolenoidMixture" name="CompSol" />
</detector>

<detector name="ScreenSol" type="DD4hep_Mask_o1_v01" insideTrackingVolume="true" vis="ScreenSolVis">
<parameter crossingangle="CrossingAngle" />
<envelope vis="CoilVis">
<shape type="Assembly"/>
</envelope>

<section type="Center" start="QD0_min_z" end="QD0_min_z+5*cm" rMin1="SeparatedBeamPipe_rmax+1*mm+5*cm" rMin2="SeparatedBeamPipe_rmax+1*mm+5*cm" rMax1="200*mm" rMax2="200*mm" material="SolenoidMixture" name="CompSol" />

<section type="Center" start="QD0_min_z+5*cm" end="QD0_max_z" rMin1="180*mm" rMin2="180*mm" rMax1="200*mm" rMax2="200*mm" material="SolenoidMixture" name="CompSol" />
</detector>

</detectors>
</lccdd>
158 changes: 158 additions & 0 deletions FCCee/IDEA/compact/IDEA_o1_v03/Beampipe_o4_v05.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<lccdd>

<info name="FCCee"
title="FCCee low impedance Beam pipe with small radius"
author="Andre Sailer"
url="no"
status="development"
version="1.0">
<comment>A beampipe for FCCee detector based on CLD</comment>
</info>

<!-- Definition of global dictionary constants -->
<define>
<!-- Definition of global dictionary constants -->
<constant name="beampipegoldwidth" value="BeamPipeGoldWidth"/>
<constant name="beampipegoldtolerance" value="BeamPipeGoldTolerance"/>
</define>

<!-- Definition of the used visualization attributes -->
<display>
<vis name="BeamPipeVis" alpha="0.0" r="0.0" g="1.0" b="0.0" showDaughters="true" visible="false"/>
<vis name="GoldCoatingVis" alpha="0.0" r="0.0" g="1.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="TubeVis" alpha="1.0" r="1.0" g="0.7" b="0.5" showDaughters="true" visible="true"/>
<vis name="VacVis" alpha="1.0" r="1.0" g="1.0" b="1.0" showDaughters="true" visible="false"/>
</display>

<detectors>

<!-- ;radius calculator lisp
(+ 12.0 (* (/ (- 28.9 12.0) (- 1190.0 90.0)) (- 110.0 90.0) ) )
-->
<comment>Part of beampipe made of AlBeMet162 and Paraffin flow</comment>

<detector name="BeBeampipe" type="DD4hep_Beampipe_o1_v01" insideTrackingVolume="true" nocore="true" vis="BeamPipeVis">
<parameter crossingangle="CrossingAngle" />
<envelope vis="BlueVis">
<shape type="Assembly"/>
</envelope>
<!-- central section made of two walls of 0.35 mm albemet and liquid paraffin in the middle -->
<section type="Center" start="0*mm" end="CentralBeamPipe_zmax" rMin1="CentralBeamPipe_rmax" rMin2="CentralBeamPipe_rmax" rMax1="CentralBeamPipe_rmax+BPWWall" rMax2="CentralBeamPipe_rmax+BPWWall" material="AlBeMet162" name="VertexInnerAlb" />
<section type="Center" start="0*mm" end="CentralBeamPipe_zmax" rMin1="CentralBeamPipe_rmax+BPWWall" rMin2="CentralBeamPipe_rmax+BPWWall" rMax1="CentralBeamPipe_rmax+BPWWall+BPWCool" rMax2="CentralBeamPipe_rmax+BPWWall+BPWCool" material="LiquidNDecane" name="VertexParaffin" />
<section type="Center" start="0*mm" end="CentralBeamPipe_zmax" rMin1="CentralBeamPipe_rmax+BPWWall+BPWCool" rMin2="CentralBeamPipe_rmax+BPWWall+BPWCool" rMax1="CentralBeamPipe_rmax+2*BPWWall+BPWCool" rMax2="CentralBeamPipe_rmax+2*BPWWall+BPWCool" material="AlBeMet162" name="VertexOuterAlb" />
<section type="Center" start="CentralBeamPipe_zmax" end="SeparatedBeamPipe_z" rMin1="CentralBeamPipe_rmax" rMin2="ConeBeamPipe_Rmax" rMax1="CentralBeamPipe_rmax+BeamPipeWidthFirstCone" rMax2="ConeBeamPipe_Rmax+BeamPipeWidthFirstCone" material="AlBeMet162" name="AlBeMet162" />

</detector>

<detector name="BeamPipe" type="DD4hep_Beampipe_o1_v01" insideTrackingVolume="true" vis="BeamPipeVis" >
<envelope vis="BlueVis">
<shape type="Assembly"/>
</envelope>
<parameter crossingangle="CrossingAngle" />

<!-- &A Z1 Z2 RIn1 RIn2 ROut1 ROut2 Material -->

<comment>Golden foil in the inner part of the Be beampipe</comment>

<section type="Center" start="0*mm" end="CentralBeamPipe_zmax" rMin1="CentralBeamPipe_rmax-(beampipegoldwidth+beampipegoldtolerance)" rMin2="CentralBeamPipe_rmax-(beampipegoldwidth+beampipegoldtolerance)" rMax1="CentralBeamPipe_rmax-beampipegoldtolerance" rMax2="CentralBeamPipe_rmax-beampipegoldtolerance" material="Gold" name="VertexInnerGold" />

<section type="Center" start="CentralBeamPipe_zmax" end="SeparatedBeamPipe_z" rMin1="CentralBeamPipe_rmax-(beampipegoldwidth+beampipegoldtolerance)" rMin2="ConeBeamPipe_Rmax-(beampipegoldwidth+beampipegoldtolerance)" rMax1="CentralBeamPipe_rmax-beampipegoldtolerance" rMax2="ConeBeamPipe_Rmax-beampipegoldtolerance" material="Gold" name="ConicalChamberGold" />

<section type="PunchedCenter" start="SeparatedBeamPipe_z" end="SeparatedBeamPipe_z+3*mm" rMin1="SeparatedBeamPipe_rmax" rMin2="SeparatedBeamPipe_rmax" rMax1="ConeBeamPipe_Rmax+BeamPipeWidthFirstCone" rMax2="ConeBeamPipe_Rmax+BeamPipeWidthFirstCone" material="Copper" name="SplitVacChambers"/>

<section type="DnstreamClippedFront" start="SeparatedBeamPipe_z+3.0*mm" end="6000*mm" rMin1="SeparatedBeamPipe_rmax" rMin2="SeparatedBeamPipe_rmax" rMax1="SeparatedBeamPipe_rmax+1*mm" rMax2="SeparatedBeamPipe_rmax+1*mm" material="Copper" name="DownStreamBeamPipe_1"/>


<section type="UpstreamClippedFront" start="SeparatedBeamPipe_z+3.0*mm" end="MiddleOfSRMask_z -3*cm" rMin1="SeparatedBeamPipe_rmax" rMin2="SeparatedBeamPipe_rmax" rMax1="SeparatedBeamPipe_rmax+1*mm" rMax2="SeparatedBeamPipe_rmax+1*mm" material="Copper" name="UpStreamBeamPipe_1"/>

<section type="Upstream" start="MiddleOfSRMask_z -3*cm" end="MiddleOfSRMask_z -1*cm" rMin1="SeparatedBeamPipe_rmax" rMax1="SeparatedBeamPipe_rmax+1*mm" rMin2="SeparatedBeamPipe_rmax-SynchRadMaskSize" rMax2="SeparatedBeamPipe_rmax+0.01*mm - SynchRadMaskSize" material="Copper" name="UpStreamBeamPipe_2" />

<section type="Upstream" start="MiddleOfSRMask_z -1*cm" end="MiddleOfSRMask_z +1*cm" rMin1="SeparatedBeamPipe_rmax-SynchRadMaskSize" rMax1="SeparatedBeamPipe_rmax+0.01*mm - SynchRadMaskSize" rMin2="SeparatedBeamPipe_rmax-SynchRadMaskSize" rMax2="SeparatedBeamPipe_rmax+0.01*mm - SynchRadMaskSize" material="Copper" name="UpStreamBeamPipe_3" />

<section type="Upstream" start="MiddleOfSRMask_z +1*cm" end="MiddleOfSRMask_z +3*cm" rMin1="SeparatedBeamPipe_rmax-SynchRadMaskSize" rMax1="SeparatedBeamPipe_rmax+0.01*mm - SynchRadMaskSize" rMin2="SeparatedBeamPipe_rmax" rMax2="SeparatedBeamPipe_rmax+1*mm" material="Copper" name="UpStreamBeamPipe_4" />

<section type="Upstream" start="MiddleOfSRMask_z +3*cm" end="6000*mm" rMin1="SeparatedBeamPipe_rmax" rMin2="SeparatedBeamPipe_rmax" rMax1="SeparatedBeamPipe_rmax+1*mm" rMax2="SeparatedBeamPipe_rmax+1*mm" material="Copper" name="UpStreamBeamPipe_5" />

</detector>

<!-- 2020.04.08 : Synch Radiation mask (symmetyric in phi for the while) -->

<comment>Synch Radiation mask inside the beam-pipe, at z = 2.1 m </comment>
<detector name="SynchRadMask" type="DD4hep_Mask_o1_v01" insideTrackingVolume="true" vis="TantalumVis" >
<parameter crossingangle="CrossingAngle" />

<section type="Upstream" start="MiddleOfSRMask_z -3*cm" end="MiddleOfSRMask_z -1*cm" rMin1="SeparatedBeamPipe_rmax +1*mm + mask_epsilon" rMax1="SeparatedBeamPipe_rmax+1*mm +2*mask_epsilon" rMin2="SeparatedBeamPipe_rmax +0.01*mm -SynchRadMaskSize + mask_epsilon" rMax2="SeparatedBeamPipe_rmax+1*mm +2* mask_epsilon" material="Tungsten" name="UpStreamBeamPipe_SRmask_1" />

<section type="Upstream" start="MiddleOfSRMask_z -1*cm" end="MiddleOfSRMask_z +1*cm" rMin1="SeparatedBeamPipe_rmax +0.01*mm -SynchRadMaskSize + mask_epsilon" rMax1="SeparatedBeamPipe_rmax+1*mm +2*mask_epsilon " rMin2="SeparatedBeamPipe_rmax +0.01*mm -SynchRadMaskSize + mask_epsilon" rMax2="SeparatedBeamPipe_rmax+1*mm + 2*mask_epsilon" material="Tungsten" name="UpStreamBeamPipe_SRmask_2" />

<section type="Upstream" start="MiddleOfSRMask_z +1*cm" end="MiddleOfSRMask_z +3*cm" rMin1="SeparatedBeamPipe_rmax +0.01*mm -SynchRadMaskSize +mask_epsilon" rMax1="SeparatedBeamPipe_rmax+1*mm + 2*mask_epsilon" rMin2="SeparatedBeamPipe_rmax +1*mm + mask_epsilon" rMax2="SeparatedBeamPipe_rmax+1*mm +2*mask_epsilon" material="Tungsten" name="UpStreamBeamPipe_SRmask_3" />

</detector>

<comment>Full Cone Tungsten Shield</comment>
<detector name="BeamPipeShield" type="DD4hep_Mask_o1_v01" insideTrackingVolume="true" vis="TantalumVis" >
<parameter crossingangle="CrossingAngle" />

<comment>Beampipe Shield (APS: WHAT????? +18 cm (??plus??) as solenoid is now closer to IP) </comment>
<section type="PunchedCenter"
start="SeparatedBeamPipe_z + 5*mm" end="QD0_min_z + 18*cm"
rMin1="SeparatedBeamPipe_rmax + BeamPipeWidth + 0.1*mm"
rMin2="SeparatedBeamPipe_rmax + BeamPipeWidth + 0.1*mm "
rMax1="SeparatedBeamPipe_rmax + (SeparatedBeamPipe_z + 5*mm) * 0.015 + BeamPipeWidth + 0.1*mm + BeamPipeTantalShieldWidth"
rMax2="SeparatedBeamPipe_rmax + (QD0_min_z + 18*cm) * 0.015 + BeamPipeWidth + 0.1*mm + BeamPipeTantalShieldWidth"
material="Tungsten" name="TaShield" />

</detector>


<comment>Asymmetric Tungsten Shield no Rotation</comment>

<detector name="BeamPipeShield_noRot" type="DD4hep_Mask_o1_v01" insideTrackingVolume="true" vis="TantalumVis" >
<parameter crossingangle="CrossingAngle" rotationX="true"/>

<section type="Center"
start="500*mm" end="LumiCal_max_z + 4.9*mm"
rMin1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (500.0*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMin2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMax1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (500.0*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + TopFillerShieldWidth"
rMax2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + BeamPipeTantalShieldWidth"
phi1="326*degree"
phi2="34*degree"
material="Tungsten" name="TaShieldTopPart" />

<comment>was 370. Add 0.1*mm so that rmax1 is larger than rmin1 </comment>
<section type="Center"
start="330*mm" end="500*mm"
rMin1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (330*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMin2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (500*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMax1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (330*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + 0.1*mm"
rMax2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (500*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + TopFillerShieldWidth"
phi1="326*degree"
phi2="34*degree"
material="Tungsten" name="TaShieldTopPart2" />

<comment>one degree less, to fit lumical window</comment>
<section type="Center"
start="600*mm" end="LumiCal_max_z + 4.9*mm"
rMin1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (600*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMin2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMax1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (600*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + SideFillerShieldWidth"
rMax2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + BeamPipeTantalShieldWidth"
phi1="34*degree"
phi2="70*degree"
material="Tungsten" name="TaShieldFiller1" />

<section type="Center"
start="600*mm" end="LumiCal_max_z + 4.9*mm"
rMin1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (600*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMin2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm"
rMax1="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (600*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + SideFillerShieldWidth"
rMax2="CentralBeamPipe_rmax + BeamPipeWidthFirstCone + (LumiCal_max_z + 4.9*mm - CentralBeamPipe_zmax) * BeamPipeConeHalfAngle + 0.1*mm + BeamPipeTantalShieldWidth"
phi1="291*degree"
phi2="326*degree"
material="Tungsten" name="TaShieldFiller2" />

</detector>

</detectors>
</lccdd>
Loading

0 comments on commit 0998713

Please sign in to comment.