Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7443ded
Partially working; correct .pt file; inference runs. Phi conditioning…
peter-mckeown Sep 11, 2023
e60ce8c
Two Angle BIBAE correct conditioning and placement in all regions. Pe…
peter-mckeown Sep 22, 2023
ceb766b
First adjustments to incorporate cylindrical readout mesh in DDML. St…
peter-mckeown Mar 22, 2024
a89c32e
Get to run with fully sensitive calorimeter (proxy for parallel world…
peter-mckeown May 3, 2024
4809e95
correct cylindrical readout transformations in the barrel. Implementa…
peter-mckeown May 6, 2024
c56a8d3
Correct inference in the endcap.
peter-mckeown May 7, 2024
0b28617
Calo_CLD initial commit
Aug 6, 2024
fc2c18d
add models
Aug 7, 2024
89b2b2f
minor changes
Aug 7, 2024
757fc5c
add nograd to fix memory leak
Aug 12, 2024
73d1b73
change to capital C in region name for CLD
Aug 13, 2024
ecdde2e
change inference inputs from MC direction
Aug 13, 2024
45538c2
add edm4hep analysis folder
Aug 13, 2024
9fc868b
add observables for edm4hep analysis
Aug 13, 2024
f0d2871
add hit to mesh
Aug 14, 2024
0023446
update gitignore
peter-mckeown Oct 22, 2024
6689219
Adopt clearer naming convention for CaloDiT model and some formatting
peter-mckeown Oct 22, 2024
b5f1396
Load from HDF5 file in parallel worlds
peter-mckeown Nov 25, 2024
14bad40
Necessary adjustments for using custom SD and correcting z placement
peter-mckeown Nov 25, 2024
65e7ea9
Correct fast hit placement into sensitive slices for CLD
peter-mckeown Nov 28, 2024
5854fce
Correct naming of members for older versions of ONNX
peter-mckeown Jan 20, 2025
484656d
Add support for older versions of HDF5 (< V 1.14)
peter-mckeown Jan 20, 2025
10e1f33
Tidy up Custom SD for Parallel Worlds and add distilled CaloDiT
peter-mckeown Feb 27, 2025
b484cf8
Add support for cylindrical barrel geometry and ALLEGRO
peter-mckeown Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/install/
/build/

*.h5
*.root
*.slcio
*.tga
*.log
# model binary files
models/*.pt
/models/*.onnx

# Local directories for geometry
/CLIC_local/CLIC/*
/FCCee_local/FCCee/*
/k4geo_fully_sensitive/*
/ODDxml/*
/edm4hep_analysis/*
12 changes: 12 additions & 0 deletions CLILC_local/CLIC/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###################################################################################################
#
# lcgeo
#
# CLIC detector model(s) based on DD4hep & Geant4
#
# F.Gaede, DESY, 2014
# D.Protopopescu, Glasgow, 2014
#
###################################################################################################

This directory holds the XML (and other) CLIC-specific configurations.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<lccdd>
<!-- Definition of global dictionary constants -->
<define>
</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="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>
<comment>Beampipe</comment>

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

<!-- &A Z1 Z2 RIn1 RIn2 ROut1 ROut2 Material -->
<section type="Center" start="0*mm" end="CentralBeamPipe_zmax" rMin1="29.4*mm" rMin2="29.4*mm" rMax1="CentralBeamPipe_rmax" rMax2="CentralBeamPipe_rmax" material="Beryllium" name="VertexInner"/>

</detector>
</detectors>
</lccdd>
248 changes: 248 additions & 0 deletions CLILC_local/CLIC/compact/CLIC_debug_tracking/CLIC_debug_tracking.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">

<info name="CLIC_o2_v04"
title="CLIC detector model option 2 version 04"
author="Marko Petric"
url="https://twiki.cern.ch/twiki/bin/view/CLIC/NewCLIC"
status="development"
version="$Id: 2015-1-4 marko.petric@cern.ch $">
<comment>The compact format for the CLIC Detector design</comment>
</info>

<includes>
<gdmlFile ref="elements.xml"/>
<gdmlFile ref="materials.xml"/>
</includes>

<define>
<constant name="world_side" value="30000*mm"/>
<constant name="world_x" value="world_side"/>
<constant name="world_y" value="world_side"/>
<constant name="world_z" value="world_side"/>

<constant name="CrossingAngle" value="0.020*rad"/>


<constant name="DetID_NOTUSED" value=" 0"/>

<constant name="DetID_VXD_Barrel" value=" 1"/>
<constant name="DetID_VXD_Endcap" value=" 2"/>

<constant name="DetID_IT_Barrel" value=" 3"/>
<constant name="DetID_IT_Endcap" value=" 4"/>

<constant name="DetID_OT_Barrel" value=" 5"/>
<constant name="DetID_OT_Endcap" value=" 6"/>

<constant name="DetID_ECal_Barrel" value=" 20"/>
<constant name="DetID_ECal_Endcap" value=" 29"/>
<constant name="DetID_ECal_Plug" value=" 21"/>

<constant name="DetID_HCAL_Barrel" value=" 10"/>
<constant name="DetID_HCAL_Endcap" value=" 11"/>
<constant name="DetID_HCAL_Ring" value=" 12"/>

<constant name="DetID_Yoke_Barrel" value=" 13"/>
<constant name="DetID_Yoke_Endcap" value=" 14"/>

<constant name="DetID_LumiCal" value=" 15"/>
<constant name="DetID_BeamCal" value=" 16"/>

<constant name="CentralBeamPipe_zmax" value="308.*mm"/>
<constant name="CentralBeamPipe_rmax" value="30.0*mm"/>
<constant name="ConeBeamPipe_zmax" value="2080*mm"/>
<constant name="ConeBeamPipe_rmax" value="240.0*mm"/>
<constant name="BigBeamPipe_zmax" value="2530*mm"/>
<constant name="BeamPipe_end" value="12500*mm"/>



<!-- ################### ENVELOPE PARAMETERS ######################################################## -->

<comment> suggested naming convention:

main parameters:

DET_inner_radius : inner radius of tube like envelope ( inscribed cylinder )
DET_outer_radius : outer radius of tube like envelope ( circumscribed cylinder )
DET_half_length : half length along z axis
DET_min_z : smallest absolute value on z-axis
DET_max_z : largest absolute value on z-axis
DET_inner_symmetry : number of sides on the inside ( 0 for tube )
DET_outer_symmetry : number of sides on the inside ( 0 for tube )
DET_inner_phi0 : optional rotation of the inner polygon ( in r-phi plane )
DET_outer_phi0 : optional rotation of the outer polygon ( in r-phi plane )

additional parameters for cutting away volumes/shapes use one of the above with a number
appended and/or an extra specifiaction such as cone ( for a cut away cone )

DET_inner_radius_1
DET_outer_radius_2
DET_cone_min_z
DET_cone_max_z

</comment>

<constant name="env_safety" value="0.1*mm"/>

<constant name="Vertex_inner_radius" value="30*mm"/>
<constant name="Vertex_outer_radius" value="111*mm"/>
<constant name="Vertex_half_length" value="260*mm"/>

<constant name="InnerTracker_inner_radius" value="61*mm"/>
<constant name="InnerTracker_outer_radius" value="580*mm"/>
<constant name="InnerTracker_half_length" value="2345*mm"/>

<constant name="OuterTracker_inner_radius" value="580*mm"/>
<constant name="OuterTracker_outer_radius" value="1500*mm - 0.1*mm"/> <!-- to avoid overlap with CaloFace-->
<constant name="OuterTracker_half_length" value="2345*mm"/>

<constant name="ECalBarrel_inner_radius" value="1500*mm"/>
<constant name="ECalBarrel_outer_radius" value="1659*mm"/>
<constant name="ECalBarrel_half_length" value="2250*mm"/>
<constant name="ECalBarrel_symmetry" value="12"/>

<constant name="ECalEndcap_inner_radius" value="410*mm"/>
<constant name="ECalEndcap_outer_radius" value="1700*mm"/>
<constant name="ECalEndcap_min_z" value="2350*mm"/>
<constant name="ECalEndcap_max_z" value="2509*mm"/>
<constant name="ECalEndcap_outer_symmetry" value="12"/>
<constant name="ECalEndcap_inner_symmetry" value="12"/>

<constant name="ECalPlug_inner_radius" value="260*mm"/>
<constant name="ECalPlug_outer_radius" value="380*mm"/>
<constant name="ECalPlug_min_z" value="2350*mm"/>
<constant name="ECalPlug_max_z" value="2509*mm"/>
<constant name="ECalPlug_outer_symmetry" value="12"/>
<constant name="ECalPlug_inner_symmetry" value="12"/>

<constant name="HCalBarrel_inner_radius" value="1697*mm"/>
<constant name="HCalBarrel_outer_radius" value="3287*mm"/>
<constant name="HCalBarrel_half_length" value="2250*mm"/>
<constant name="HCalBarrel_symmetry" value="12"/>

<constant name="HCalEndcap_inner_radius" value="250*mm"/>
<constant name="HCalEndcap_outer_radius" value="3203*mm"/>
<constant name="HCalEndcap_min_z" value="2539*mm"/>
<constant name="HCalEndcap_max_z" value="4129*mm"/>
<constant name="HCalEndcap_symmetry" value="12"/>
<constant name="HCalEndcap_zcutout" value="200*mm"/>
<constant name="HCalEndcap_rcutout" value="180*mm"/>

<constant name="HCalRing_inner_radius" value="1730*mm"/>
<constant name="HCalRing_outer_radius" value="HCalEndcap_outer_radius"/>
<constant name="HCalRing_min_z" value="2400*mm"/>
<constant name="HCalRing_max_z" value="2539*mm"/>
<constant name="HCalRing_symmetry" value="12"/>

<constant name="Solenoid_inner_radius" value="3440*mm"/>
<constant name="Solenoid_outer_radius" value="4192*mm"/>
<constant name="Solenoid_half_length" value="4129*mm"/>
<constant name="Solenoid_Coil_half_length" value="3900*mm"/>
<constant name="Solenoid_Coil_radius" value="3778*mm"/>

<constant name="YokeBarrel_inner_radius" value="4418*mm"/>
<constant name="YokeBarrel_outer_radius" value="7004*mm"/>
<constant name="YokeBarrel_half_length" value="4129*mm"/>
<constant name="YokeBarrel_symmetry" value="12"/>

<constant name="YokeEndcap_inner_radius" value="630*mm"/>
<constant name="YokeEndcap_outer_radius" value="7004*mm"/>
<constant name="YokeEndcap_min_z" value="4179*mm"/>
<constant name="YokeEndcap_max_z" value="5179*mm"/>
<constant name="YokeEndcap_outer_symmetry" value="12"/>
<constant name="YokeEndcap_inner_symmetry" value="0"/>

<constant name="LumiCal_inner_radius" value="100*mm"/>
<constant name="LumiCal_outer_radius" value="340*mm"/>
<constant name="LumiCal_min_z" value="2539*mm"/>
<constant name="LumiCal_max_z" value="2714*mm"/>
<constant name="LumiCal_dz" value="(LumiCal_max_z-LumiCal_min_z)/2.0"/>

<constant name="BeamCal_inner_radius" value="32*mm"/>
<constant name="BeamCal_outer_radius" value="150*mm"/>
<constant name="BeamCal_min_z" value="3181*mm"/>
<constant name="BeamCal_max_z" value="3441*mm"/>
<constant name="BeamCal_dz" value="(BeamCal_max_z-BeamCal_min_z)/2.0"/>

<constant name="Kicker_inner_radius" value="4*mm"/>
<constant name="Kicker_outer_radius" value="25*mm"/>
<constant name="Kicker_min_z" value="3480*mm"/>
<constant name="Kicker_max_z" value="3780*mm"/>

<constant name="BPM_inner_radius" value="36*mm"/>
<constant name="BPM_outer_radius" value="55*mm"/>
<constant name="BPM_min_z" value="3790*mm"/>
<constant name="BPM_max_z" value="3880*mm"/>


<constant name="tracker_region_zmax" value="OuterTracker_half_length"/>
<constant name="tracker_region_rmax" value="OuterTracker_outer_radius"/>
</define>

<limits>
<limitset name="cal_limits">
<limit name="step_length_max" particles="*" value="5.0" unit="mm" />
</limitset>
<limitset name="SiTrackerBarrelRegionLimitSet">
<limit name="step_length_max" particles="*" value="5.0" unit="mm" />
<limit name="track_length_max" particles="*" value="5.0" unit="mm" />
<limit name="time_max" particles="*" value="5.0" unit="ns" />
<limit name="ekin_min" particles="*" value="0.01" unit="MeV" />
<limit name="range_min" particles="*" value="5.0" unit="mm" />
</limitset>
</limits>
<regions>
<region name="SiTrackerBarrelRegion" eunit="MeV" lunit="mm" cut="0.001" threshold="0.001">
<limitsetref name="SiTrackerBarrelRegionLimitSet"/>
</region>
</regions>



<display>
<vis name="VXDVis" alpha="1.0" r="0.2" g="0.2" b="0.2" showDaughters="true" visible="true"/>
<vis name="ITVis" alpha="1.0" r="0.54" g="0.43" b="0.04" showDaughters="true" visible="true"/>
<vis name="OTVis" alpha="1.0" r="0.8" g="0.8" b="0.4" showDaughters="true" visible="true"/>
<vis name="ECALVis" alpha="1.0" r="0.2" g="0.6" b="0" showDaughters="true" visible="true"/>
<vis name="HCALVis" alpha="1.0" r="0.078" g="0.01176" b="0.588" showDaughters="true" visible="true"/>
<vis name="SOLVis" alpha="1.0" r="0.4" g="0.4" b="0.4" showDaughters="true" visible="true"/>
<vis name="YOKEVis" alpha="1.0" r="0.6" g="0.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="LCALVis" alpha="1.0" r="0.35" g="0.0" b="0.47" showDaughters="true" visible="true"/>
<vis name="BCALVis" alpha="1.0" r="0.0" g="0.4" b="0.4" showDaughters="true" visible="true"/>
<vis name="KICKVis" alpha="1.0" r="1.0" g="0.498" b="0.0" showDaughters="true" visible="true"/>
<vis name="BPMVis" alpha="1.0" r="0.25" g="0.88" b="0.81" showDaughters="true" visible="true"/>
<vis name="SupportVis" alpha="1" r="0.2" g="0.2" b="0.2" showDaughters="false" visible="true"/>
<vis name="RedVis" alpha="1.0" r="1" g="0" b="0" showDaughters="true" visible="true"/>
<vis name="BlueVis" alpha="1.0" r="0" g="0" b="1" showDaughters="true" visible="true"/>
</display>

<include ref="Materials_v01.xml"/>

<include ref="Beampipe_o1_v01_02.xml"/>
<include ref="Vertex_o2_v04_01.xml"/>
<include ref="InnerTracker_o2_v03_01.xml"/>
<include ref="OuterTracker_o2_v03_01.xml"/>

<include ref="ECalBarrel_o2_v01_01.xml"/>
<include ref="ECalEndcap_o2_v01_01.xml"/>
<include ref="ECalPlug_o1_v01_01.xml"/>


<plugins>
<plugin name="InstallSurfaceManager"/>
</plugins>

<fields>
<field name="GlobalSolenoid" type="solenoid"
inner_field="4.0*tesla"
outer_field="-1.5*tesla"
zmax="Solenoid_Coil_half_length"
outer_radius="Solenoid_Coil_radius">
</field>
</fields>

</lccdd>

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<lccdd>

<!-- Definition of the readout segmentation -->
<define>
<constant name="ECal_cell_size" value="5.1*mm"/>
</define>

<readouts>
<readout name="ECalBarrelCollection">
<segmentation type="CartesianGridXY" grid_size_x="ECal_cell_size" grid_size_y="ECal_cell_size" />
<id>system:5,side:2,module:8,stave:4,layer:9,submodule:4,x:32:-16,y:-16</id>
</readout>
</readouts>

<!-- Definitions of visualization attributes -->
<display>
<vis name="ECalStaveVis" alpha="1.0" r="0.0" g="0.8" b="1.0" showDaughters="true" visible="true"/>
<vis name="ECalLayerVis" alpha="1.0" r="0.8" g="0.8" b="0.0" showDaughters="true" visible="true"/>
<vis name="ECalSensitiveVis" alpha="1.0" r="0.7" g="0.3" b="0.0" showDaughters="false" visible="true"/>
<vis name="ECalAbsorberVis" alpha="1.0" r="0.4" g="0.4" b="0.0" showDaughters="false" visible="true"/>
<vis name="ECalEndcapVis" alpha="1.0" r="0.77" g="0.74" b="0.86" showDaughters="true" visible="true"/>
<vis name="HiddenEnvelope" alpha="0.0" r="1.0" g="1.0" b="1.0" showDaughters="true" visible="false"/>
<vis name="CompositeVis" alpha="1.0" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/>
</display>

<detectors>
<detector name="ECalBarrel" type="GenericCalBarrel_o1_v01" id="DetID_ECal_Barrel" readout="ECalBarrelCollection" vis="ECALVis" gap="0.*cm">

<comment>EM Calorimeter Barrel</comment>

<envelope vis="ECALVis">
<shape type="PolyhedraRegular" numsides="ECalBarrel_symmetry" rmin="ECalBarrel_inner_radius" rmax="ECalBarrel_outer_radius" dz="2.*ECalBarrel_half_length" material="Air"/>
<!-- Radii definitions as in http://cern.ch/go/r9mZ -->
<rotation x="0*deg" y="0*deg" z="90*deg-180*deg/ECalBarrel_symmetry"/>
</envelope>

<dimensions numsides="ECalBarrel_symmetry" rmin="ECalBarrel_inner_radius" z="ECalBarrel_half_length*2" />
<staves vis="ECalStaveVis" />
<layer repeat="17" vis="ECalLayerVis">
<slice material = "TungstenDens24" thickness = "2.40*mm" vis="ECalAbsorberVis" radiator="yes"/>
<slice material = "Air" thickness = "0.25*mm" vis="InvisibleNoDaughters"/><!-- fiber -->
<slice material = "GroundOrHVMix" thickness = "0.10*mm" vis="ECalAbsorberVis"/>
<slice material = "Silicon" thickness = "0.50*mm" sensitive="yes" limits="cal_limits" vis="ECalSensitiveVis"/>
<slice material = "Air" thickness = "0.10*mm" vis="InvisibleNoDaughters"/><!-- glue -->
<slice material = "siPCBMix" thickness = "0.80*mm" vis="ECalAbsorberVis"/>
<slice material = "Air" thickness = "0.25*mm" vis="InvisibleNoDaughters"/>
</layer>
<layer repeat="8" vis="ECalLayerVis">
<slice material = "TungstenDens24" thickness = "4.80*mm" vis="ECalAbsorberVis" radiator="yes"/>
<slice material = "Air" thickness = "0.25*mm" vis="InvisibleNoDaughters"/><!-- fiber -->
<slice material = "GroundOrHVMix" thickness = "0.10*mm" vis="ECalAbsorberVis"/>
<slice material = "Silicon" thickness = "0.50*mm" sensitive="yes" limits="cal_limits" vis="ECalSensitiveVis"/>
<slice material = "Air" thickness = "0.10*mm" vis="InvisibleNoDaughters"/><!-- glue -->
<slice material = "siPCBMix" thickness = "0.80*mm" vis="ECalAbsorberVis"/>
<slice material = "Air" thickness = "0.25*mm" vis="InvisibleNoDaughters"/>
</layer>

</detector>
</detectors>

<plugins>
<plugin name="DD4hep_CaloFaceBarrelSurfacePlugin">
<argument value="ECalBarrel"/>
<argument value="length=2.*ECalBarrel_half_length" />
<argument value="radius=ECalBarrel_inner_radius" />
<argument value="phi0=0" />
<argument value="symmetry=ECalBarrel_symmetry"/>
<argument value="systemID=DetID_ECal_Barrel"/>
</plugin>
</plugins>


</lccdd>





Loading