Go Back to: C++ Manual General Site
LDMX.Ecal package¶
Submodules¶
LDMX.Ecal.digi module¶
Package to configure the ECal digitization pipeline
All classes are derived versions of LDMX.Framework.ldmxcfg.Producer with helpful member functions.
Two module-wide parameters are defined.
- LDMX.Ecal.digi.n_kelectrons_per_mip¶
Number of thousand e-h pairs created for each MIP in 0.5mm thick Si
- Type:
float
- LDMX.Ecal.digi.mip_si_energy¶
Energy [MeV] of a single MIP on average in 0.5mm thick Si
- Type:
float
- class LDMX.Ecal.digi.EcalDigiProducer(instance_name: str = 'EcalDigiProducer', histograms: list[Histogram] = <factory>, hgcroc: HgcrocEmulator = <factory>, mev: float = 2.8497115384615386, avg_readout_threshold: float = 0.828125, avg_pedestal: float = 0.78125, avg_noise_rms: float = 0.009375, zero_suppression: bool = True, input_coll_name: str = 'EcalSimHits', input_pass_name: str = '', digi_coll_name: str = 'EcalDigis')¶
Bases:
ProcessorConfiguration for EcalDigiProducer
- hgcroc¶
Configuration for the chip emulator
- Type:
- mev¶
Conversion between energy [MeV] and voltage [mV] Depends on silicon thickness in simulation relative to the 0.5mm thickness that the physical constants were derived from. Default uses a silicon thickness of 0.4mm
- Type:
float
- avg_readout_threshold¶
Average readout threshold for all channels [mV], for noise emulation
- Type:
float
- avg_pedestal¶
Average pedestal for all channels [mV], for noise emulation
- Type:
float
- avg_noise_rms¶
Average noise RMS for all channels [mV], for noise emulation in empty channels Default is too optimistic, but need to mimic old noise model
- Type:
float
- zero_suppresion¶
Should we suppress pure noise “hits” below readout threshold?
- Type:
bool
- input_coll_name¶
Name of simulated ecal hits to digitize
- Type:
str
- input_pass_name¶
Name of pass to digitize
- Type:
str
- digi_coll_name¶
Output name of digis put into event bus
- Type:
str
- avg_noise_rms: float = 0.009375¶
- avg_pedestal: float = 0.78125¶
- avg_readout_threshold: float = 0.828125¶
- class_name: str = 'ecal::EcalDigiProducer'¶
- digi_coll_name: str = 'EcalDigis'¶
- hgcroc: HgcrocEmulator¶
- input_coll_name: str = 'EcalSimHits'¶
- input_pass_name: str = ''¶
- instance_name: str = 'EcalDigiProducer'¶
- mev: float = 2.8497115384615386¶
- module_name: str = 'Ecal'¶
- zero_suppression: bool = True¶
- class LDMX.Ecal.digi.EcalRecProducer(instance_name: str = 'EcalRecProducer', histograms: list[Histogram] = <factory>, layer_weights: list[float] = <factory>, second_order_energy_correction: float = 1.0909884355225834, mip_si_energy: float = 0.13, charge_per_mip: float = 5.9274000000000004, clock_cycle: float = 25.0, digi_coll_name: str = 'EcalDigis', digi_pass_name: str = '', sim_hit_coll_name: str = 'EcalSimHits', sim_hit_pass_name: str = '', rec_hit_coll_name: str = 'EcalRecHits')¶
Bases:
ProcessorConfiguration for the EcalRecProducer
The layer weights and second order energy correction change when the ECal geometry changes, so we have setup various options for the different possible ECal geometries and their associated layer weights.
- mip_si_energy¶
Copied from module-wide mip_si_energy [MeV]
- Type:
float
- charge_per_mip float
Copied from module-wide charge_per_mip [fC]
- clock_cycle¶
Time for one DAQ clock cycle to pass [ns]
- Type:
float
- digi_coll_name¶
Name of digi collection
- Type:
str
- digi_pass_name¶
Name of digi pass
- Type:
str
- sim_hit_coll_name¶
Name of sim collection to check for pure noise hit ID
- Type:
str
- sim_hit_pass_name¶
Name of sim pass
- Type:
str
- rec_hit_coll_name¶
Name of output collection
- Type:
str
- second_order_energy_correction¶
Correction to weighted energy, default to v15 geometry
- Type:
float
- layer_weights¶
Weighting factors depending on layer index, default to v15 geometry
- Type:
list of floats
- charge_per_mip: float = 5.9274000000000004¶
- class_name: str = 'ecal::EcalRecProducer'¶
- clock_cycle: float = 25.0¶
- digi_coll_name: str = 'EcalDigis'¶
- digi_pass_name: str = ''¶
- instance_name: str = 'EcalRecProducer'¶
- layer_weights: list[float]¶
- mip_si_energy: float = 0.13¶
- module_name: str = 'Ecal'¶
- rec_hit_coll_name: str = 'EcalRecHits'¶
- static reduced_v2(**kwargs)¶
Generated for the reduced v2 geometry
TODO: The secondOrderEnergyCorrection for this geometry has yet to be calculated, so unity is being used as a placeholder.
- second_order_energy_correction: float = 1.0909884355225834¶
- sim_hit_coll_name: str = 'EcalSimHits'¶
- sim_hit_pass_name: str = ''¶
- static v12(**kwargs)¶
These layerWeights and energy correction were calculated for the v12 geometry.
The second order energy correction is determined by comparing the mean of 1M single 4GeV electron events with 4GeV.
- static v14(**kwargs)¶
Generated for the v14 geometry
The secondOrderEnergyCorrection is deteremined by generating 1M single 4GeV or 8GeV electron events shot directly into the front of the ECal from immediately upstream. The mean of the resulting total recon energy is found by fitting a two-sided normal distribution (one mean, a low and high deviation) to the histogram.
- static v15(**kwargs)¶
Generated for the v15 geometry
The secondOrderEnergyCorrection is deteremined by generating 1M single 4GeV or 8GeV electron events shot directly into the front of the ECal from immediately upstream. The mean of the resulting total recon energy is found by fitting a two-sided normal distribution (one mean, a low and high deviation) to the histogram.
- static v2(**kwargs)¶
These layerWeights and energy correction were calculated at least before v3 geometry.
The second order energy correction is determined by comparing the mean of 1M single 4GeV electron events with 4GeV.
- static v9(**kwargs)¶
These layerWeights and energy correction were calculated for the v9 geometry.
The second order energy correction is determined by comparing the mean of 1M single 4GeV electron events with 4GeV.
- LDMX.Ecal.digi.calculate_energy_to_voltage_conversion(si_thickness: float)¶
calculate the conversion from a simulated energy [MeV] to voltage [mV]
- energy [MeV] * (thousand electrons per MIP)
(charge per thousand electrons fC)
(avg pad capacitance pF = 1/20)
( 1 MIP / energy [MeV] )
= voltage [mV]
this leads to ~ 470 mV/MeV or ~6.8 MeV maximum hit (if 320 fC is max ADC range)
- Parameters:
si_thickness (float) – thickness of silicon sensitive layers in mm
- LDMX.Ecal.digi.charge_per_mip = 5.9274000000000004¶
in fC, convering number of electrons to charge
- LDMX.Ecal.digi.ecal_hgcroc_emulator()¶
Get an HGCROC emulator configured for the ECal specifically
This sets the pulse shape parameters to the ones from a fit to a test readout of an ECal module and then thresholds to the default construction using 37k electrons as the number of electrons per MIP.
- LDMX.Ecal.digi.mip_si_energy = 0.13¶
in MeV, corresponds to ~3.5 eV per e-h pair
derived from 0.5mm thick Si
- LDMX.Ecal.digi.n_kelectrons_per_mip = 37.0¶
thousand e-h pairs created per MIP
derived from 0.5mm thick Si
LDMX.Ecal.ecal_clusters module¶
Configuration for the EcalClusterProducer
Examples
from LDMX.Ecal.ecalClusters import ecalClusters p.sequence.append( ecalClusters )
- class LDMX.Ecal.ecal_clusters.EcalClusterProducer(instance_name: str = 'EcalClusterProducer', histograms: list[Histogram] = <factory>, rec_hit_coll_name: str = 'EcalRecHits', rec_hit_pass_name: str = '', cluster_coll_name: str = 'EcalClusters', cutoff: float = 10.0, seed_threshold: float = 100.0, algo_name: str = 'MyClusterAlgo', algo_coll_name: str = 'ClusterAlgoResult', clue: bool = True, nbr_of_layers: int = 1, dc: float = 5.0, rhoc: float = 550.0, deltac: float = 10.0, deltao: float = 40.0, reclustering: bool = False)¶
Bases:
ProcessorConfigure the clustering
- rec_hit_coll_name¶
name of input rec hits to use for cluster
- Type:
str
- rec_hit_pass_name¶
name of pass of rec hits to use
- Type:
str
- cluster_coll_name¶
name of output collection of clusters
- Type:
str
- cutoff¶
not clue, minimum rec energy threshold to consider for clustering
- Type:
float
- seed_threshold¶
not clue, minimum rec energy threshold to consider as a seed
- Type:
float
- algo_name¶
not clue, name of algorithm used to calculate “distance”
- Type:
str
- algo_coll_name¶
not clue, output collection to store algorithm information
- Type:
str
- clue¶
enable using the CLUE algorithm instead of default
- Type:
bool
- nbr_of_layers¶
number of layers to perform CLUE on if equals 1 (default), collapse all hits inot the same z-dimension
- Type:
int
- dc¶
cutoff distance in calculation of local desnity only used if nbr_of_layers > 1
- Type:
float
- rhoc¶
minimum seed energy (aka maximum outlier energy) not used when nbr_of_layers > 1
- Type:
float
- deltac¶
minimum seed separation not used when nbr_of_layers > 1
- Type:
float
- deltao¶
minimum outlier separation
- Type:
float
- recluster¶
recluster merged clusters or not No reclustering leads to more undercounting reclustering leads to more overcounting
- Type:
bool
- algo_coll_name: str = 'ClusterAlgoResult'¶
- algo_name: str = 'MyClusterAlgo'¶
- class_name: str = 'ecal::EcalClusterProducer'¶
- clue: bool = True¶
- cluster_coll_name: str = 'EcalClusters'¶
- cutoff: float = 10.0¶
- dc: float = 5.0¶
- deltac: float = 10.0¶
- deltao: float = 40.0¶
- instance_name: str = 'EcalClusterProducer'¶
- module_name: str = 'Ecal'¶
- nbr_of_layers: int = 1¶
- rec_hit_coll_name: str = 'EcalRecHits'¶
- rec_hit_pass_name: str = ''¶
- reclustering: bool = False¶
- rhoc: float = 550.0¶
- seed_threshold: float = 100.0¶
LDMX.Ecal.ecal_detector_map module¶
Conditions object providers for a mapping between ecal electronics IDs and detector IDs
- class LDMX.Ecal.ecal_detector_map.EcalDetectorMap(cell_map: str, motherboard_map: str, layer_map: str, want_d2e: bool = False, tag_name: str = '')¶
Bases:
ConditionsObjectProviderThe COP that maps between Electronic and Detector IDs.
The mapping is defined in three ‘tiers’.
cell - Each cell of a module has specific ROC elink and channel
motherboard - Each module has a specific ROC elink and polarfire
layer - Each layer has specific daq optical link
So three CSV tables are necessary for providing this mapping. We can’t have multiple different detector maps during a single run, so this class is meant to be a singleton.
- cell_map: str¶
- class_name: str = 'ecal::EcalDetectorMap'¶
- layer_map: str¶
- module_name: str = 'Ecal'¶
- motherboard_map: str¶
- object_name: str = 'EcalDetectorMap'¶
- tag_name: str = ''¶
- want_d2e: bool = False¶
LDMX.Ecal.ecal_geometry module¶
ConditionsProvider for EcalGeometry and other Ecal geometry-related aspects
- class LDMX.Ecal.ecal_geometry.EcalGeometryProvider(geometries: list[EcalGeometry] = <factory>, tag_name: str = '')¶
Bases:
ConditionsObjectProviderProvider that provides access to Ecal geometry (ecal::EcalGeometry)
- Parameters:
tag_name (str) – tag for generator of information
- EcalGeometry¶
Actual class providing precision cellular layout in Ecal
- Type:
- __instance¶
Singleton instance of this object
- Type:
- class_name: str = 'ecal::EcalGeometryProvider'¶
- geometries: list[EcalGeometry]¶
- get_instance()¶
Get the single instance of the EcalGeometryProvider
- Returns:
Single instance of the provider
- Return type:
- module_name: str = 'Ecal'¶
- object_name: str = 'EcalGeometry'¶
- tag_name: str = ''¶
- class LDMX.Ecal.ecal_geometry.EcalTriggerGeometryProvider(tag_name: str = '')¶
Bases:
ConditionsObjectProviderProvider that provides access to Ecal geometry (ldmx::EcalGeometry)
- Parameters:
tag_name (str) – tag for generator of information
- __instance¶
Singleton instance of this object
- class_name: str = 'ecal::EcalTriggerGeometryProvider'¶
- get_instance()¶
Get the single instance of the EcalTriggerGeometryProvider
- Returns:
Single instance of the provider
- Return type:
- module_name: str = 'Ecal'¶
- object_name: str = 'EcalTriggerGeometry'¶
- tag_name: str = ''¶
LDMX.Ecal.ecal_hardcoded_conditions module¶
Package to provide hard-coded conditions sources for Ecal reconstruction and simulation
- LDMX.Ecal.ecal_hardcoded_conditions.EcalTrigPrimConditionsHardcode¶
Provides a table of integer conditions for ecal trigger primitives producer
- Type:
simple_csv_integer_table_provider
- LDMX.Ecal.ecal_hardcoded_conditions.EcalReconConditionsHardcode¶
Provides a table of double conditions for ecal precision reconstruction
- Type:
simple_csv_double_table_provider
LDMX.Ecal.ecal_trig_digi module¶
Package to configure the ECal trigger digitization
- class LDMX.Ecal.ecal_trig_digi.EcalTrigPrimDigiProducer(instance_name: str = 'EcalTrigPrimDigiProducer', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, digi_coll_name: str = 'EcalDigis', digi_pass_name: str = '')¶
Bases:
Processor- class_name: str = 'ecal::EcalTrigPrimDigiProducer'¶
- digi_coll_name: str = 'EcalDigis'¶
- digi_pass_name: str = ''¶
- instance_name: str = 'EcalTrigPrimDigiProducer'¶
- module_name: str = 'Ecal'¶
LDMX.Ecal.ecal_wab_rec_processor module¶
Configuration for reconstructing WABs in the Ecal
- class LDMX.Ecal.ecal_wab_rec_processor.EcalWABRecProcessor(instance_name: str = 'EcalWABRecProcessor', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, sp_pass_name: str = '', collection_name: str = 'EcalWABRec', rec_coll_name: str = 'EcalRecHits', rec_pass_name: str = '', track_coll_name: str = 'LinearRecoilTracks', track_pass_name: str = '', sim_particles_passname: str = '')¶
Bases:
Processor- class_name: str = 'ecal::EcalWABRecProcessor'¶
- collection_name: str = 'EcalWABRec'¶
- instance_name: str = 'EcalWABRecProcessor'¶
- module_name: str = 'Ecal'¶
- rec_coll_name: str = 'EcalRecHits'¶
- rec_pass_name: str = ''¶
- sim_particles_passname: str = ''¶
- sp_pass_name: str = ''¶
- track_coll_name: str = 'LinearRecoilTracks'¶
- track_pass_name: str = ''¶
LDMX.Ecal.make_path module¶
Helpful python configuration functions for getting the path to installed data files.
- This file was configured by cmake for the installation of ldmx-sw at
/home/runner/work/ldmx-sw/ldmx-sw/install
- LDMX.Ecal.make_path.make_bdt_path(bdt_name)¶
Get the full path to the installed BDT files
Exits entire python script if file does not exist.
- Parameters:
bdt_name (str) – Name of BDT file to make path for (no extension)
- Returns:
full path to installed data file
- Return type:
str
Examples
ecal_veto.bdt_file = make_bdt_path( ‘gabrielle’ )
- LDMX.Ecal.make_path.make_roc_path(roc_name)¶
Get the full path to the RoC csv file
Exits entire python script if file does not exist.
- Parameters:
roc_name (str) – Name of RoC file to make path for (no extension)
- Returns:
full path to installed data file
- Return type:
str
Examples
ecal_veto.roc_file = make_roc_path( ‘RoC_v14_8gev’ )
LDMX.Ecal.vetos module¶
- class LDMX.Ecal.vetos.EcalMipProcessor(instance_name: str = 'EcalMipTrackingProcessor', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, num_ecal_layers: int = 32, linreg_radius: float = 35.0, ecal_collection_name: str = 'EcalVeto', ecal_pass_name: str = '', mip_collection_name: str = 'EcalTrajectoryInfo', mip_pass_name: str = '', mip_result_name: str = 'EcalMipInfo')¶
Bases:
Processor- class_name: str = 'ecal::EcalMipTrackingProcessor'¶
- ecal_collection_name: str = 'EcalVeto'¶
- ecal_pass_name: str = ''¶
- instance_name: str = 'EcalMipTrackingProcessor'¶
- linreg_radius: float = 35.0¶
- mip_collection_name: str = 'EcalTrajectoryInfo'¶
- mip_pass_name: str = ''¶
- mip_result_name: str = 'EcalMipInfo'¶
- module_name: str = 'Ecal'¶
- num_ecal_layers: int = 32¶
- class LDMX.Ecal.vetos.EcalPnetVetoProcessor(instance_name: str = 'EcalPnetVetoProcessor', histograms: list[Histogram] = <factory>, model_path: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/particle_net_ecal_v10.onnx', disc_cut: float = 0.65, collection_name: str = 'EcalPnetVeto', rec_coll_name: str = 'EcalRecHits', ecal_rec_hits_passname: str = '', ecal_sp_coll_name: str = 'EcalScoringPlaneHits', ecal_sp_hits_passname: str = '', track_collection: str = 'RecoilTracksClean', track_pass_name: str = '', recoil_from_tracking: bool = True)¶
Bases:
ProcessorConfiguration for ParticleNet Ecal Veto
ParticleNet trained on v14 geometry ecalPN + signal
- class_name: str = 'ecal::EcalPnetVetoProcessor'¶
- collection_name: str = 'EcalPnetVeto'¶
- disc_cut: float = 0.65¶
- ecal_rec_hits_passname: str = ''¶
- ecal_sp_coll_name: str = 'EcalScoringPlaneHits'¶
- ecal_sp_hits_passname: str = ''¶
- instance_name: str = 'EcalPnetVetoProcessor'¶
- model_path: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/particle_net_ecal_v10.onnx'¶
- module_name: str = 'Ecal'¶
- rec_coll_name: str = 'EcalRecHits'¶
- recoil_from_tracking: bool = True¶
- track_collection: str = 'RecoilTracksClean'¶
- track_pass_name: str = ''¶
- class LDMX.Ecal.vetos.EcalVetoProcessor(instance_name: str = 'EcalVetoProcessor', histograms: list[LDMX.Framework._histogram.Histogram] = <factory>, num_ecal_layers: int = 32, verbose: bool = False, feature_list_name: str = 'input', bdt_file: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/segmip.onnx', roc_file: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/RoC_v14_8gev.csv', beam_energy: float = 8000.0, disc_cut: float = 0.99741, ecal_sp_coll_name: str = 'EcalScoringPlaneHits', target_sp_coll_name: str = 'TargetScoringPlaneHits', sp_pass_name: str = '', sim_particles_coll_name: str = 'SimParticles', sim_particles_passname: str = '', collection_name: str = 'EcalVeto', rec_coll_name: str = 'EcalRecHits', rec_pass_name: str = '', recoil_from_tracking: bool = True, track_collection: str = 'RecoilTracksClean', track_pass_name: str = '', inverse_skim: bool = False)¶
Bases:
Processor- bdt_file: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/segmip.onnx'¶
- beam_energy: float = 8000.0¶
- class_name: str = 'ecal::EcalVetoProcessor'¶
- collection_name: str = 'EcalVeto'¶
- disc_cut: float = 0.99741¶
- ecal_sp_coll_name: str = 'EcalScoringPlaneHits'¶
- feature_list_name: str = 'input'¶
- instance_name: str = 'EcalVetoProcessor'¶
- inverse_skim: bool = False¶
- module_name: str = 'Ecal'¶
- num_ecal_layers: int = 32¶
- rec_coll_name: str = 'EcalRecHits'¶
- rec_pass_name: str = ''¶
- recoil_from_tracking: bool = True¶
- roc_file: str = '/home/runner/work/ldmx-sw/ldmx-sw/install/data/Ecal/RoC_v14_8gev.csv'¶
- sim_particles_coll_name: str = 'SimParticles'¶
- sim_particles_passname: str = ''¶
- sp_pass_name: str = ''¶
- target_sp_coll_name: str = 'TargetScoringPlaneHits'¶
- track_collection: str = 'RecoilTracksClean'¶
- track_pass_name: str = ''¶
- verbose: bool = False¶