LDMX Software
|
Performs basic HCal reconstruction. More...
#include <HcalRecProducer.h>
Public Member Functions | |
HcalRecProducer (const std::string &name, framework::Process &process) | |
Constructor. | |
virtual | ~HcalRecProducer ()=default |
Destructor. | |
void | configure (framework::config::Parameters &) override |
Grabs configure parameters from the python config file. | |
double | getTOA (const ldmx::HgcrocDigiCollection::HgcrocDigi digi, double pedestal, unsigned int iSOI) const |
Gets Time of Arrival with respect to the SOI. | |
void | produce (framework::Event &event) override |
Produce HcalHits and put them into the event bus using the HcalDigis as input. | |
Public Member Functions inherited from framework::Producer | |
Producer (const std::string &name, Process &process) | |
Class constructor. | |
virtual void | beforeNewRun (ldmx::RunHeader &header) |
Handle allowing producers to modify run headers before the run begins. | |
Public Member Functions inherited from framework::EventProcessor | |
EventProcessor (const std::string &name, Process &process) | |
Class constructor. | |
virtual | ~EventProcessor () |
Class destructor. | |
virtual void | onNewRun (const ldmx::RunHeader &runHeader) |
Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
virtual void | onFileOpen (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
virtual void | onFileClose (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
virtual void | onProcessStart () |
Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
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 Attributes | |
std::string | digiCollName_ |
Digi Collection Name to use as input. | |
std::string | digiPassName_ |
Digi Pass Name to use as input. | |
std::string | simHitCollName_ |
simhit collection name | |
std::string | simHitPassName_ |
simhit pass name | |
std::string | recHitCollName_ |
output hit collection name | |
double | mip_energy_ |
Energy [MeV] deposited by a MIP. | |
double | pe_per_mip_ |
PEs per MIP. | |
double | clock_cycle_ |
Length of clock cycle [ns]. | |
double | voltage_per_mip_ |
Voltage by average MIP. | |
double | attlength_ |
Strip attenuation length [m]. | |
TF1 | pulseFunc_ |
Pulse function. | |
TGraph | correctionAmpl_ |
Correction to the pulse's measured amplitude at the peak. | |
TGraph | correctionTOA_ |
Correction to the measured TOA relative to the peak. | |
double | minAmplFraction_ |
Minimum amplitude fraction to apply amplitude correction. | |
double | minAmpl_ |
Minimum amplitude to apply TOA correction. | |
int | nADCs_ |
Depth of ADC buffer. | |
double | rateUpSlope_ |
Rate of Up Slope in Pulse Shape [1/ns]. | |
double | timeUpSlope_ |
Time of Up Slope relative to Pulse Shape Fit [ns]. | |
double | rateDnSlope_ |
Rate of Down Slope in Pulse Shape [1/ns]. | |
double | timeDnSlope_ |
Time of Down Slope relative to Pulse Shape Fit [ns]. | |
double | timePeak_ |
Time of Peak relative to pulse shape fit [ns]. | |
Additional Inherited Members | |
Static Public Member Functions inherited from framework::EventProcessor | |
static void | declare (const std::string &classname, int classtype, EventProcessorMaker *) |
Internal function which is part of the PluginFactory machinery. | |
Static Public Attributes inherited from framework::Producer | |
static const int | CLASSTYPE {1} |
Constant used to track EventProcessor types by the PluginFactory. | |
Protected Member Functions inherited from framework::EventProcessor | |
void | abortEvent () |
Abort the event immediately. | |
Protected Attributes inherited from framework::EventProcessor | |
HistogramHelper | histograms_ |
Interface class for making and filling histograms. | |
NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
Manager for any ntuples. | |
logging::logger | theLog_ |
The logger for this EventProcessor. | |
Performs basic HCal reconstruction.
Reconstruction is done from the HcalDigi samples. Some hard-coded parameters are used for position and energy calculation.
Definition at line 43 of file HcalRecProducer.h.
hcal::HcalRecProducer::HcalRecProducer | ( | const std::string & | name, |
framework::Process & | process | ||
) |
Constructor.
Definition at line 17 of file HcalRecProducer.cxx.
|
overridevirtual |
Grabs configure parameters from the python config file.
Reimplemented from framework::EventProcessor.
Definition at line 21 of file HcalRecProducer.cxx.
References attlength_, clock_cycle_, correctionAmpl_, correctionTOA_, digiCollName_, digiPassName_, framework::config::Parameters::getParameter(), minAmpl_, minAmplFraction_, mip_energy_, nADCs_, pe_per_mip_, pulseFunc_, rateDnSlope_, rateUpSlope_, recHitCollName_, simHitCollName_, simHitPassName_, timeDnSlope_, timePeak_, timeUpSlope_, and voltage_per_mip_.
double hcal::HcalRecProducer::getTOA | ( | const ldmx::HgcrocDigiCollection::HgcrocDigi | digi, |
double | pedestal, | ||
unsigned int | iSOI | ||
) | const |
Gets Time of Arrival with respect to the SOI.
Definition at line 86 of file HcalRecProducer.cxx.
References ldmx::HgcrocDigiCollection::HgcrocDigi::at(), clock_cycle_, and ldmx::HgcrocDigiCollection::Sample::toa().
Referenced by produce().
|
overridevirtual |
Produce HcalHits and put them into the event bus using the HcalDigis as input.
This function unfolds the digi samples taken by the HGC ROC and reconstructs their energy using knowledge of how the chip operates and the position using HcalGeometry.
Simple calculation of sampling fraction: Thickness per layer: scintillator (0.2cm) + steel (0.25cm) Radiation length and nuclear interaction length: scintillator: X0 = 41.31cm, Lambda = 77.07cm https://pdg.lbl.gov/2017/AtomicNuclearProperties/HTML/polystyrene.html steel X0 = 1.757cm, Lambda = 16.77cm https://pdg.lbl.gov/2012/AtomicNuclearProperties/HTML_PAGES/026.html Prob of EM interaction (e.g. pi0): thickness/X0*100 = (0.2/41.31)/ ((0.2/41.31)
(0.25/1.757)) ~ 3.3% Prob of Had interaction (e.g. pi+/pi-): = (0.2/77.07)/ ((0.2/77.07) + (0.25/16.77)) ~ 15% Then e.g. for neutron assuming 1/3 pi0 and 2/3 pi+/- composition: sampling fraction ~ (1/3)*3.3.% + (2/3)*15% ~ 11% energy of neutron = energy_deposited / 0.11;
NOTE: For now, sampling fraction is not applied.
Implements framework::Producer.
Definition at line 115 of file HcalRecProducer.cxx.
References attlength_, hcal::HcalReconConditions::CONDITIONS_NAME, ldmx::HcalGeometry::CONDITIONS_OBJECT_NAME, correctionAmpl_, correctionTOA_, digiCollName_, digiPassName_, framework::Event::exists(), ldmx::HgcrocDigiCollection::getNumDigis(), getTOA(), ldmx::HcalDigiID::isNegativeEnd(), ldmx::HcalDigiID::layer(), minAmpl_, minAmplFraction_, mip_energy_, pe_per_mip_, recHitCollName_, ldmx::HcalDigiID::section(), ldmx::CalorimeterHit::setAmplitude(), ldmx::CalorimeterHit::setEnergy(), ldmx::CalorimeterHit::setID(), ldmx::HcalHit::setLayer(), ldmx::HcalHit::setMinPE(), ldmx::HcalHit::setPE(), ldmx::HcalHit::setSection(), ldmx::HcalHit::setStrip(), ldmx::CalorimeterHit::setTime(), ldmx::CalorimeterHit::setXPos(), ldmx::CalorimeterHit::setYPos(), ldmx::CalorimeterHit::setZPos(), simHitCollName_, simHitPassName_, ldmx::HcalDigiID::strip(), and voltage_per_mip_.
|
private |
Strip attenuation length [m].
Definition at line 105 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Length of clock cycle [ns].
Definition at line 99 of file HcalRecProducer.h.
Referenced by configure(), and getTOA().
|
mutableprivate |
Correction to the pulse's measured amplitude at the peak.
The correction is calculated by comparing the amplitude at the sample time (T) over its correct value (1.0) with the ratio between sample T and sample T+25ns.
Definition at line 116 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
mutableprivate |
Correction to the measured TOA relative to the peak.
This corrects for the time-walk effect where the time that the front edge of the pulse crosses the TOA threshold walks higher in time as the pulse's amplitude gets smaller. The correction is calculated by comparing the TOA measured relative to the peak (i.e. the time at which the pulse crosses the TOA threshold) with the amplitude at the sample time (T) over its correct value (1.0).
Definition at line 127 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Digi Collection Name to use as input.
Definition at line 78 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Digi Pass Name to use as input.
Definition at line 81 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Minimum amplitude to apply TOA correction.
Definition at line 133 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Minimum amplitude fraction to apply amplitude correction.
Definition at line 130 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Energy [MeV] deposited by a MIP.
Definition at line 93 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
|
private |
PEs per MIP.
Definition at line 96 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
mutableprivate |
|
private |
Rate of Down Slope in Pulse Shape [1/ns].
Definition at line 145 of file HcalRecProducer.h.
Referenced by configure().
|
private |
Rate of Up Slope in Pulse Shape [1/ns].
Definition at line 139 of file HcalRecProducer.h.
Referenced by configure().
|
private |
output hit collection name
Definition at line 90 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
simhit collection name
Definition at line 84 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
simhit pass name
Definition at line 87 of file HcalRecProducer.h.
Referenced by configure(), and produce().
|
private |
Time of Down Slope relative to Pulse Shape Fit [ns].
Definition at line 148 of file HcalRecProducer.h.
Referenced by configure().
|
private |
Time of Peak relative to pulse shape fit [ns].
Definition at line 151 of file HcalRecProducer.h.
Referenced by configure().
|
private |
Time of Up Slope relative to Pulse Shape Fit [ns].
Definition at line 142 of file HcalRecProducer.h.
Referenced by configure().
|
private |
Voltage by average MIP.
Definition at line 102 of file HcalRecProducer.h.
Referenced by configure(), and produce().