|
LDMX Software
|
Digitization processor for the silicon strip tracker. More...
#include <DigitizationProcessor.h>
Public Member Functions | |
| DigitizationProcessor (const std::string &name, framework::Process &process) | |
| void | onProcessStart () override |
| Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
| void | configure (framework::config::Parameters ¶meters) override |
| Callback for the EventProcessor to configure itself from the given set of parameters. | |
| void | onNewRun (const ldmx::RunHeader &header) override |
| Before the run starts (but after the conditions are configured) set up the random seeds for this run. | |
| void | produce (framework::Event &event) override |
| Process the event and put new data products into it. | |
| std::vector< ldmx::Measurement > | digitizeHits (const std::vector< ldmx::SimTrackerHit > &sim_hits, std::vector< ldmx::RawSiStripHit > *raw_hits=nullptr) |
| Digitize a collection of SimTrackerHits into Measurements. | |
| bool | mergeSimHits (const std::vector< ldmx::SimTrackerHit > &sim_hits, std::vector< ldmx::SimTrackerHit > &merged_hits) |
| bool | mergeHits (const std::vector< ldmx::SimTrackerHit > &sihits, std::vector< ldmx::SimTrackerHit > &mergedHits) |
Public Member Functions inherited from tracking::reco::TrackingGeometryUser | |
| TrackingGeometryUser (const std::string &name, framework::Process &p) | |
Public Member Functions inherited from framework::Producer | |
| Producer (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual void | process (Event &event) final |
| Processing an event for a Producer is calling produce. | |
Public Member Functions inherited from framework::EventProcessor | |
| DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &) | |
| declare that we have a factory for this class | |
| EventProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~EventProcessor ()=default |
| Class destructor. | |
| virtual void | beforeNewRun (ldmx::RunHeader &run_header) |
| Callback for Producers to add parameters to the run header before conditions are initialized. | |
| virtual void | onFileOpen (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
| virtual void | onFileClose (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
| virtual void | onProcessEnd () |
| Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
| template<class T > | |
| const T & | getCondition (const std::string &condition_name) |
| Access a conditions object for the current event. | |
| TDirectory * | getHistoDirectory () |
| Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples. | |
| void | setStorageHint (framework::StorageControl::Hint hint) |
| Mark the current event as having the given storage control hint from this module_. | |
| void | setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString) |
| Mark the current event as having the given storage control hint from this module and the given purpose string. | |
| int | getLogFrequency () const |
| Get the current logging frequency from the process. | |
| int | getRunNumber () const |
| Get the run number from the process. | |
| std::string | getName () const |
| Get the processor name. | |
| void | createHistograms (const std::vector< framework::config::Parameters > &histos) |
| Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create. | |
Private Member Functions | |
| void | buildLorentzCache () |
Private Attributes | |
| std::string | hit_collection_ |
| Input hit collection to digitize. | |
| std::string | out_collection_ |
| Output measurement collection name. | |
| double | min_e_dep_ |
| Minimum energy deposition cut [MeV]. | |
| int | track_id_ |
| Select a particular track ID (-1 = accept all). | |
| bool | merge_hits_ {false} |
| Merge sim hits on the same sensor before digitizing. | |
| bool | do_smearing_ {true} |
| Flag to enable/disable smearing in Mode 0. | |
| double | sigma_u_ {0} |
| u-direction smearing sigma [mm]. | |
| double | sigma_v_ {0} |
| v-direction smearing sigma [mm]. | |
| bool | use_charge_digitization_ {false} |
| If true, use the full SiStripDigitizer instead of simple smearing. | |
| tracking::digitization::SiStripDigitizer::SensorParams | sensor_params_ |
| Parameters forwarded to SiStripDigitizer. | |
| std::unique_ptr< tracking::digitization::SiStripDigitizer > | strip_digitizer_ |
| The charge digitizer (constructed in onProcessStart). | |
| std::string | out_raw_collection_ {""} |
| Output raw hit collection name (empty = don't save raw hits). | |
| std::unique_ptr< tracking::digitization::PulseShape > | pulse_shape_ |
| The constructed pulse shape (created in onProcessStart). | |
| bool | use_lorentz_ {true} |
| If false, skip Lorentz angle calculation and drift carriers straight (equivalent to zero magnetic field perpendicular to the sensor normal). | |
| std::string | field_map_ {""} |
| Path to the magnetic field map file. | |
| std::unordered_map< unsigned int, std::pair< double, double > > | lorentz_tan_cache_ |
| Per-layer cached Lorentz tangents: layer_id → {tan_electron, tan_hole}. | |
| std::string | tracker_hit_passname_ |
| Input collection pass name. | |
| std::string | dump_geo_csv_ {""} |
| If non-empty, write a CSV of all ACTS surface transforms to this path. | |
| std::default_random_engine | generator_ |
| std::shared_ptr< std::normal_distribution< float > > | normal_ |
Additional Inherited Members | |
Protected Member Functions inherited from tracking::reco::TrackingGeometryUser | |
| const Acts::GeometryContext & | geometryContext () |
| const Acts::MagneticFieldContext & | magneticFieldContext () |
| const Acts::CalibrationContext & | calibrationContext () |
| const geo::TrackersTrackingGeometry & | geometry () |
| void | loadBField (const std::string &path, const std::vector< double > &map_offset={0., 0., 0.}) |
Load the interpolated B-field map from path and cache it. | |
| void | loadBField (const std::vector< double > &map_offset={0., 0., 0.}) |
| Load B-field from the path recorded in the detector GDML. | |
| std::shared_ptr< Acts::MagneticFieldProvider > | bField () const |
| Return the loaded B-field provider. | |
Protected Member Functions inherited from framework::EventProcessor | |
| void | abortEvent () |
| Abort the event immediately. | |
Protected Attributes inherited from framework::EventProcessor | |
| HistogramPool | histograms_ |
| helper object for making and filling histograms | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Digitization processor for the silicon strip tracker.
Two modes are available, selected by the use_charge_digitization parameter:
Mode 0 (default, use_charge_digitization = false): Simple Gaussian smearing of the local coordinates. Fast and sufficient for most studies. Resolution set by sigma_u / sigma_v.
Mode 1 (use_charge_digitization = true): Realistic charge digitization. The track segment through the sensor is divided into sub-segments; each creates electron-hole pairs (N = Edep / E_pair). Thermal diffusion during drift spreads the charge as a Gaussian across strips. Electronic noise is added and a threshold is applied; the surviving strip cluster is clustered by a charge-weighted centroid to produce the local U measurement.
Definition at line 50 of file DigitizationProcessor.h.
| tracking::reco::DigitizationProcessor::DigitizationProcessor | ( | const std::string & | name, |
| framework::Process & | process ) |
Definition at line 12 of file DigitizationProcessor.cxx.
|
private |
Definition at line 138 of file DigitizationProcessor.cxx.
|
overridevirtual |
Callback for the EventProcessor to configure itself from the given set of parameters.
The parameters a processor has access to are the member variables of the python class in the sequence that has class_name equal to the EventProcessor class name.
For an example, look at MyProcessor.
| parameters | Parameters for configuration. |
Reimplemented from framework::EventProcessor.
Definition at line 86 of file DigitizationProcessor.cxx.
References framework::config::Parameters::get().
| std::vector< ldmx::Measurement > tracking::reco::DigitizationProcessor::digitizeHits | ( | const std::vector< ldmx::SimTrackerHit > & | sim_hits, |
| std::vector< ldmx::RawSiStripHit > * | raw_hits = nullptr ) |
Digitize a collection of SimTrackerHits into Measurements.
Operates in either smearing mode or full charge-digitization mode depending on the use_charge_digitization configuration flag.
| sim_hits | The collection of SimTrackerHits to digitize. |
| raw_hits | If non-null and charge digitization is active, filled with one RawSiStripHit per above-threshold readout strip. |
Definition at line 324 of file DigitizationProcessor.cxx.
References ldmx::Measurement::getGlobalPosition(), ldmx::Measurement::setGlobalPosition(), ldmx::Measurement::setLayerID(), ldmx::Measurement::setLocalCovariance(), ldmx::Measurement::setLocalPosition(), and ldmx::Measurement::setTruthU().
| bool tracking::reco::DigitizationProcessor::mergeHits | ( | const std::vector< ldmx::SimTrackerHit > & | sihits, |
| std::vector< ldmx::SimTrackerHit > & | mergedHits ) |
Definition at line 225 of file DigitizationProcessor.cxx.
| bool tracking::reco::DigitizationProcessor::mergeSimHits | ( | const std::vector< ldmx::SimTrackerHit > & | sim_hits, |
| std::vector< ldmx::SimTrackerHit > & | merged_hits ) |
Definition at line 281 of file DigitizationProcessor.cxx.
|
overridevirtual |
Before the run starts (but after the conditions are configured) set up the random seeds for this run.
| [in] | header | RunHeader for this run, unused |
Reimplemented from framework::EventProcessor.
Definition at line 186 of file DigitizationProcessor.cxx.
References framework::RandomNumberSeedService::CONDITIONS_OBJECT_NAME.
|
overridevirtual |
Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms.
Reimplemented from framework::EventProcessor.
Definition at line 16 of file DigitizationProcessor.cxx.
References tracking::digitization::PulseShape::make().
|
overridevirtual |
Process the event and put new data products into it.
| event | The Event to process. |
Implements framework::Producer.
Definition at line 194 of file DigitizationProcessor.cxx.
|
private |
Flag to enable/disable smearing in Mode 0.
Definition at line 106 of file DigitizationProcessor.h.
|
private |
If non-empty, write a CSV of all ACTS surface transforms to this path.
Definition at line 150 of file DigitizationProcessor.h.
|
private |
Path to the magnetic field map file.
Empty = use fixed configured tangents.
Definition at line 136 of file DigitizationProcessor.h.
|
private |
Definition at line 152 of file DigitizationProcessor.h.
|
private |
Input hit collection to digitize.
Definition at line 91 of file DigitizationProcessor.h.
|
private |
Per-layer cached Lorentz tangents: layer_id → {tan_electron, tan_hole}.
Definition at line 139 of file DigitizationProcessor.h.
|
private |
Merge sim hits on the same sensor before digitizing.
Definition at line 100 of file DigitizationProcessor.h.
|
private |
Minimum energy deposition cut [MeV].
Definition at line 96 of file DigitizationProcessor.h.
|
private |
Definition at line 153 of file DigitizationProcessor.h.
|
private |
Output measurement collection name.
Definition at line 93 of file DigitizationProcessor.h.
|
private |
Output raw hit collection name (empty = don't save raw hits).
Definition at line 124 of file DigitizationProcessor.h.
|
private |
The constructed pulse shape (created in onProcessStart).
Definition at line 126 of file DigitizationProcessor.h.
|
private |
Parameters forwarded to SiStripDigitizer.
Definition at line 118 of file DigitizationProcessor.h.
|
private |
|
private |
|
private |
The charge digitizer (constructed in onProcessStart).
Definition at line 120 of file DigitizationProcessor.h.
|
private |
Select a particular track ID (-1 = accept all).
Definition at line 98 of file DigitizationProcessor.h.
|
private |
Input collection pass name.
Definition at line 147 of file DigitizationProcessor.h.
|
private |
If true, use the full SiStripDigitizer instead of simple smearing.
Definition at line 116 of file DigitizationProcessor.h.
|
private |
If false, skip Lorentz angle calculation and drift carriers straight (equivalent to zero magnetic field perpendicular to the sensor normal).
Definition at line 133 of file DigitizationProcessor.h.