LDMX Software
hcal::HcalRecProducer Class Reference

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.
 
NtupleManagerntuple_ {NtupleManager::getInstance()}
 Manager for any ntuples.
 
logging::logger theLog_
 The logger for this EventProcessor.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HcalRecProducer()

hcal::HcalRecProducer::HcalRecProducer ( const std::string & name,
framework::Process & process )

Constructor.

Definition at line 17 of file HcalRecProducer.cxx.

19 : Producer(name, process) {}
Producer(const std::string &name, Process &process)
Class constructor.

Member Function Documentation

◆ configure()

void hcal::HcalRecProducer::configure ( framework::config::Parameters & ps)
overridevirtual

Grabs configure parameters from the python config file.

Reimplemented from framework::EventProcessor.

Definition at line 21 of file HcalRecProducer.cxx.

21 {
22 // collection names
23 digiCollName_ = ps.getParameter<std::string>("digiCollName");
24 digiPassName_ = ps.getParameter<std::string>("digiPassName");
25 simHitCollName_ = ps.getParameter<std::string>("simHitCollName");
26 simHitPassName_ = ps.getParameter<std::string>("simHitPassName");
27 recHitCollName_ = ps.getParameter<std::string>("recHitCollName");
28
29 // parameters
30 mip_energy_ = ps.getParameter<double>("mip_energy");
31 pe_per_mip_ = ps.getParameter<double>("pe_per_mip");
32 clock_cycle_ = ps.getParameter<double>("clock_cycle");
33 voltage_per_mip_ = ps.getParameter<double>("voltage_per_mip");
34 attlength_ = ps.getParameter<double>("attenuationLength");
35 nADCs_ = ps.getParameter<int>("nADCs");
36
37 // configuring corrections graphs derived on the fly
38 // TODO: maybe we should save these as a graph instead?
39 rateUpSlope_ = ps.getParameter<double>("rateUpSlope");
40 timeUpSlope_ = ps.getParameter<double>("timeUpSlope");
41 rateDnSlope_ = ps.getParameter<double>("rateDnSlope");
42 timeDnSlope_ = ps.getParameter<double>("timeDnSlope");
43 timePeak_ = ps.getParameter<double>("timePeak");
45 TF1("pulseFunc",
46 "[0]*((1.0+exp([1]*(-[2]+[3])))*(1.0+exp([5]*(-[6]+[3]))))/"
47 "((1.0+exp([1]*(x-[2]+[3]-[4])))*(1.0+exp([5]*(x-[6]+[3]-[4]))))",
48 (double)nADCs_ * clock_cycle_ * -1, (double)nADCs_ * clock_cycle_);
49 pulseFunc_.FixParameter(1, rateUpSlope_);
50 pulseFunc_.FixParameter(2, timeUpSlope_);
51 pulseFunc_.FixParameter(3, timePeak_);
52 pulseFunc_.FixParameter(5, rateDnSlope_);
53 pulseFunc_.FixParameter(6, timeDnSlope_);
54 pulseFunc_.FixParameter(4, 0);
55 pulseFunc_.FixParameter(0, 1);
56
57 // build amplitude correction (Ampl[t-1]/Ampl[t]) with pulse-shape
58 int n = 0;
59 for (double t = -clock_cycle_; t < clock_cycle_; t += 0.01) {
60 double ampl_t = pulseFunc_.Eval(t);
61 double ampl_tm1 = pulseFunc_.Eval(t - clock_cycle_);
62 if (ampl_tm1 > ampl_t) continue;
63 correctionAmpl_.SetPoint(n, ampl_tm1 / ampl_t, ampl_t);
64 if (n == 0) minAmplFraction_ = ampl_tm1 / ampl_t;
65 n++;
66 }
67
68 // build TOA timewalk correction with pulse-shape
69 double toaThreshold = ps.getParameter<double>("avgToaThreshold");
70 double gain = ps.getParameter<double>("avgGain");
71 double pedestal = ps.getParameter<double>("avgPedestal");
72 n = 0;
73 for (double ampl = toaThreshold + 0.1; ampl < 10000; ampl += 0.01) {
74 pulseFunc_.FixParameter(0, ampl);
75 double ampl_t = gain * pedestal + pulseFunc_.Eval(0);
76 double toa =
77 fabs(pulseFunc_.GetX(toaThreshold, (double)nADCs_ * clock_cycle_ * -1,
78 (double)nADCs_ * clock_cycle_));
79 correctionTOA_.SetPoint(n, ampl_t, toa);
80 if (n == 0) minAmpl_ = ampl_t;
81 n++;
82 }
83 correctionTOA_.SetBit(TGraph::kIsSortedX);
84}
TGraph correctionTOA_
Correction to the measured TOA relative to the peak.
double minAmplFraction_
Minimum amplitude fraction to apply amplitude correction.
double clock_cycle_
Length of clock cycle [ns].
double voltage_per_mip_
Voltage by average MIP.
TGraph correctionAmpl_
Correction to the pulse's measured amplitude at the peak.
double timeUpSlope_
Time of Up Slope relative to Pulse Shape Fit [ns].
std::string recHitCollName_
output hit collection name
std::string digiPassName_
Digi Pass Name to use as input.
double timeDnSlope_
Time of Down Slope relative to Pulse Shape Fit [ns].
double rateUpSlope_
Rate of Up Slope in Pulse Shape [1/ns].
std::string simHitCollName_
simhit collection name
int nADCs_
Depth of ADC buffer.
double minAmpl_
Minimum amplitude to apply TOA correction.
double timePeak_
Time of Peak relative to pulse shape fit [ns].
double mip_energy_
Energy [MeV] deposited by a MIP.
double attlength_
Strip attenuation length [m].
std::string simHitPassName_
simhit pass name
TF1 pulseFunc_
Pulse function.
double pe_per_mip_
PEs per MIP.
double rateDnSlope_
Rate of Down Slope in Pulse Shape [1/ns].
std::string digiCollName_
Digi Collection Name to use as input.

References attlength_, clock_cycle_, correctionAmpl_, correctionTOA_, digiCollName_, digiPassName_, minAmpl_, minAmplFraction_, mip_energy_, nADCs_, pe_per_mip_, pulseFunc_, rateDnSlope_, rateUpSlope_, recHitCollName_, simHitCollName_, simHitPassName_, timeDnSlope_, timePeak_, timeUpSlope_, and voltage_per_mip_.

◆ getTOA()

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.

88 {
89 // get toa relative to the startBX
90 double toaRelStartBX(0.), maxMeas{0.};
91 int toaSample(0), maxSample(0), iADC(0);
92 for (int i_sample{0}; i_sample < digi.size(); i_sample++) {
93 auto sample{digi.at(i_sample)};
94 if (sample.toa() > 0) {
95 toaRelStartBX = sample.toa() * (clock_cycle_ / 1024); // ns
96 // find in which ADC sample the TOA was taken
97 toaSample = iADC;
98 }
99 if ((sample.adc_t() - pedestal) > maxMeas) {
100 maxMeas = (sample.adc_t() - pedestal);
101 maxSample = iADC;
102 }
103 iADC++;
104 }
105
106 // time w.r.t to the peak
107 double toa = (maxSample - toaSample) * clock_cycle_ - toaRelStartBX;
108
109 // time w.r.t to the SOI
110 toa += ((int)iSOI - maxSample) * clock_cycle_;
111
112 return toa;
113}
HgcrocDigiCollection::Sample at(unsigned int i_sample) const
get the sample at a specific index in the digi

References ldmx::HgcrocDigiCollection::HgcrocDigi::at(), and clock_cycle_.

Referenced by produce().

◆ produce()

void hcal::HcalRecProducer::produce ( framework::Event & event)
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.

115 {
116 // get the Hcal Geometry
117 const auto& hcalGeometry = getCondition<ldmx::HcalGeometry>(
119
120 // get the reconstruction parameters
121 const auto& the_conditions{
123
124 std::vector<ldmx::HcalHit> hcalRecHits;
125 auto hcalDigis =
127 int numDigiHits = hcalDigis.getNumDigis();
128
129 // get sample of interest index
130 unsigned int iSOI = hcalDigis.getSampleOfInterestIndex();
131
132 // loop through digis
133 int iDigi = 0;
134 while (iDigi < numDigiHits) {
135 auto digi_posend = hcalDigis.getDigi(iDigi);
136
137 // ID from first digi sample (which should be in positive end)
138 ldmx::HcalDigiID id_posend(digi_posend.id());
139 ldmx::HcalID id(id_posend.section(), id_posend.layer(), id_posend.strip());
140
141 // position from ID
142 auto position = hcalGeometry.getStripCenterPosition(id);
143 double half_total_width =
144 hcalGeometry.getHalfTotalWidth(id.section(), id.layer());
145 double ecal_dx = hcalGeometry.getEcalDx();
146 double ecal_dy = hcalGeometry.getEcalDy();
147
148 // compute distance to the end of the bar
149 // for back Hcal, we take the half of the bar
150 // for side Hcal, we take the length of the bar (2*half-width)-Ecal_dxy as
151 // an approximation
152 float distance_posend, distance_negend, distance_ecal;
153 if (id.section() == ldmx::HcalID::HcalSection::BACK) {
154 distance_posend = half_total_width;
155 distance_negend = half_total_width;
156 } else {
157 if ((id.section() == ldmx::HcalID::HcalSection::TOP) ||
158 (id.section() == ldmx::HcalID::HcalSection::BOTTOM))
159 distance_ecal = ecal_dx;
160 else
161 distance_ecal = ecal_dy;
162 distance_posend = 2 * half_total_width - distance_ecal / 2.;
163 distance_negend = distance_ecal / 2.;
164 }
165
166 // get the estimated voltage and time from digi samples
167 double voltage(0.);
168 double voltage_min(0.);
169 double hitTime(0.);
170
171 double amplT(0.);
172 double amplT_posend(0.), amplTm1_posend(0.);
173 double amplT_negend(0.), amplTm1_negend(0.);
174
175 // Check if the bar is oriented in X or Y
176 const auto orientation{hcalGeometry.getScintillatorOrientation(id)};
177 int orientation_int = static_cast<int>(orientation);
178
179 // double readout
180 if (id.section() == ldmx::HcalID::HcalSection::BACK) {
181 auto digi_negend = hcalDigis.getDigi(iDigi + 1);
182 ldmx::HcalDigiID id_negend(digi_negend.id());
183
184 double voltage_posend, voltage_negend;
185 if (digi_posend.isTOT()) {
186 voltage_posend =
187 (digi_posend.tot() - the_conditions.totCalib(id_posend, 0)) *
188 the_conditions.totCalib(id_posend, 1);
189 voltage_negend =
190 (digi_negend.tot() - the_conditions.totCalib(id_negend, 0)) *
191 the_conditions.totCalib(id_negend, 1);
192 } else {
193 amplT_posend =
194 digi_posend.soi().adc_t() - the_conditions.adcPedestal(id_posend);
195 amplTm1_posend =
196 digi_posend.soi().adc_tm1() - the_conditions.adcPedestal(id_posend);
197 amplT_negend =
198 digi_negend.soi().adc_t() - the_conditions.adcPedestal(id_negend);
199 amplTm1_negend =
200 digi_negend.soi().adc_tm1() - the_conditions.adcPedestal(id_negend);
201
202 // correct amplitude (amplitude fractions from both ends need to be
203 // above the boundary of the correction)
204 if (amplTm1_posend / amplT_posend > minAmplFraction_ &&
205 amplTm1_negend / amplT_negend > minAmplFraction_) {
206 amplT_posend *= correctionAmpl_.Eval(amplTm1_posend / amplT_posend);
207 amplT_negend *= correctionAmpl_.Eval(amplTm1_negend / amplT_negend);
208 }
209
210 // set voltage
211 voltage_posend = amplT_posend * the_conditions.adcGain(id_posend, 0);
212 voltage_negend = amplT_negend * the_conditions.adcGain(id_negend, 0);
213 }
214
215 // get TOA
216 double TOA_posend =
217 getTOA(digi_posend, the_conditions.adcPedestal(id_posend), iSOI);
218 double TOA_negend =
219 getTOA(digi_negend, the_conditions.adcPedestal(id_negend), iSOI);
220
221 // get sign of position along the bar
222 int position_bar_sign = (TOA_posend - TOA_negend) > 0 ? 1 : -1;
223
224 // correct TOA
225 // amplitudes from both ends need to be above the boundary of the
226 // correction otherwise, one TOA gets corrected and the other does not,
227 // which results in a large TOA difference and an out-of-bounds position
228 if (amplT_posend > minAmpl_ && amplT_negend > minAmpl_) {
229 TOA_posend = correctionTOA_.Eval(amplT_posend) - TOA_posend;
230 TOA_negend = correctionTOA_.Eval(amplT_negend) - TOA_negend;
231 }
232
233 // get x(y) coordinate from TOA measurement = (dt*v/2)
234 // if time_posend < time_negend: position is positive
235 // velocity of light in polystyrene, n = 1.6 = c/v
236 double v = 299.792 / 1.6;
237 double position_bar =
238 position_bar_sign * fabs(TOA_posend - TOA_negend) * v / 2;
239
240 // reverse voltage attenuation
241 // if position along the bar is positive, then the positive end will have
242 // less attenuation than the negative end
243 // NOTE: For now, reverse attenuation is not applied to the energy
244 // deposited since both ends of the bar are summed.
245 double att_posend =
246 exp(-1. * ((distance_posend - position_bar) / 1000.) / attlength_);
247 double att_negend =
248 exp(-1. * ((distance_negend + position_bar) / 1000.) / attlength_);
249
250 // set voltage as the sum of both bars
251 voltage = (voltage_posend + voltage_negend);
252 voltage_min = std::min(voltage_posend, voltage_negend);
253
254 // set amplitude as the average of both bars (reverse attenuated)
255 amplT = (amplT_posend / att_posend + amplT_negend / att_negend) / 2;
256
257 // set position along the bar
258 if (orientation ==
259 ldmx::HcalGeometry::ScintillatorOrientation::horizontal) {
260 position.SetX(position_bar);
261 } else {
262 position.SetY(position_bar);
263 }
264
265 // set hit time
266 // TODO: does this need to revert shift because of propagation of light in
267 // polysterene?
268 hitTime = fabs(TOA_posend + TOA_negend) / 2; // ns
269
270 iDigi += 2;
271 } // end double readout loop
272 else { // single readout
273
274 double voltage_i;
275 if (digi_posend.isTOT()) {
276 // TOT - number of clock ticks that pulse was over threshold
277 // this is related to the amplitude of the pulse approximately through a
278 // linear drain rate the amplitude of the pulse is related to the energy
279 // deposited
280
281 // convert the time over threshold into a total energy deposited in the
282 // bar (time over threshold [ns] - pedestal) * gain
283
284 voltage_i = (digi_posend.tot() - the_conditions.totCalib(id_posend)) *
285 the_conditions.totCalib(id_posend);
286
287 } else {
288 // ADC mode of readout
289 // ADC - voltage measurement at a specific time of the pulse
290 amplT_posend =
291 digi_posend.soi().adc_t() - the_conditions.adcPedestal(id_posend);
292 amplTm1_posend =
293 digi_posend.soi().adc_tm1() - the_conditions.adcPedestal(id_posend);
294 voltage_i = amplT_posend * the_conditions.adcGain(id_posend);
295 }
296
297 // reverse voltage attenuation
298 // for now, assume that position along the bar is the half_total_width
299 double distance_end =
300 id_posend.isNegativeEnd() ? distance_negend : distance_posend;
301 double att = exp(-1. * ((distance_end - fabs(half_total_width)) / 1000.) /
302 attlength_);
303
304 // set voltage
305 voltage = voltage_i;
306 voltage_min = voltage_i;
307
308 // set amplitude (reverse attenuated)
309 amplT = amplT_posend / att;
310
311 // get TOA
312 double TOA =
313 getTOA(digi_posend, the_conditions.adcPedestal(id_posend), iSOI);
314
315 // correct TOA
316 TOA = correctionTOA_.Eval(amplT) - TOA;
317
318 // set hit time
319 hitTime = TOA; // ns
320
321 iDigi++;
322 } // end single readout loop
323
324 double num_mips_equivalent = voltage / voltage_per_mip_;
325 double energy_deposited = num_mips_equivalent * mip_energy_;
326
327 // reconstructed energy in the layer (approximate)
328 // TODO: need to incorporate corrections if necessary
345 double reconstructed_energy = energy_deposited;
346
347 int PEs = num_mips_equivalent * pe_per_mip_;
348 int minPEs = (voltage_min / voltage_per_mip_) * pe_per_mip_;
349
350 // copy over information to rec hit structure in new collection
351 ldmx::HcalHit recHit;
352 recHit.setID(id.raw());
353 recHit.setXPos(position.X());
354 recHit.setYPos(position.Y());
355 recHit.setZPos(position.Z());
356 recHit.setSection(id.section());
357 recHit.setStrip(id.strip());
358 recHit.setLayer(id.layer());
359 recHit.setPE(PEs);
360 recHit.setMinPE(minPEs);
361 recHit.setAmplitude((amplT / voltage_per_mip_) * mip_energy_);
362 recHit.setEnergy(reconstructed_energy);
363 recHit.setTime(hitTime);
364 recHit.setOrientation(orientation_int);
365 hcalRecHits.push_back(recHit);
366 }
367
369 // hcal sim hits exist ==> label which hits are real and which are pure
370 // noise
371 auto hcalSimHits{event.getCollection<ldmx::SimCalorimeterHit>(
373 std::set<int> real_hits;
374 for (auto const& sim_hit : hcalSimHits) real_hits.insert(sim_hit.getID());
375 for (auto& hit : hcalRecHits)
376 hit.setNoise(real_hits.find(hit.getID()) == real_hits.end());
377 }
378
379 // add collection to event bus
380 event.add(recHitCollName_, hcalRecHits);
381}
const T & getCondition(const std::string &condition_name)
Access a conditions object for the current event.
bool exists(const std::string &name, const std::string &passName="", bool unique=true) const
Check for the existence of an object or collection with the given name and pass name in the event.
Definition Event.cxx:92
double getTOA(const ldmx::HgcrocDigiCollection::HgcrocDigi digi, double pedestal, unsigned int iSOI) const
Gets Time of Arrival with respect to the SOI.
static const std::string CONDITIONS_NAME
the name of the HcalReconConditions table (must match python registration name)
void setYPos(float ypos)
Set the Y position of the hit [mm].
void setID(int id)
Set the detector ID.
void setZPos(float zpos)
Set the Z position of the hit [mm].
void setXPos(float xpos)
Set the X position of the hit [mm].
void setTime(float time)
Set the time of the hit [ns].
void setAmplitude(float amplitude)
Set the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sam...
void setEnergy(float energy)
Set the calorimetric energy of the hit, corrected for sampling factors [MeV].
Extension of HcalAbstractID providing access to HCal digi information.
Definition HcalDigiID.h:13
static constexpr const char * CONDITIONS_OBJECT_NAME
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry....
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:24
void setSection(int section)
Set the section for this hit.
Definition HcalHit.h:166
void setMinPE(float minpe)
Set the minimum number of photoelectrons estimated for this hit.
Definition HcalHit.h:160
void setOrientation(int orientation)
Set if the bar is orientied in X / Y / Z meanig 0 / 1 / 2, respectively.
Definition HcalHit.h:234
void setStrip(int strip)
Set the strip for this hit.
Definition HcalHit.h:178
void setLayer(int layer)
Set the layer for this hit.
Definition HcalHit.h:172
void setPE(float pe)
Set the number of photoelectrons estimated for this hit.
Definition HcalHit.h:153
Implements detector ids for HCal subdetector.
Definition HcalID.h:19
Represents a collection of the digi hits readout by an HGCROC.
unsigned int getNumDigis() const
Get total number of digis.
Stores simulated calorimeter hit information.

References attlength_, hcal::HcalReconConditions::CONDITIONS_NAME, ldmx::HcalGeometry::CONDITIONS_OBJECT_NAME, correctionAmpl_, correctionTOA_, digiCollName_, digiPassName_, framework::Event::exists(), framework::EventProcessor::getCondition(), 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::setOrientation(), 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_.

Member Data Documentation

◆ attlength_

double hcal::HcalRecProducer::attlength_
private

Strip attenuation length [m].

Definition at line 105 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ clock_cycle_

double hcal::HcalRecProducer::clock_cycle_
private

Length of clock cycle [ns].

Definition at line 99 of file HcalRecProducer.h.

Referenced by configure(), and getTOA().

◆ correctionAmpl_

TGraph hcal::HcalRecProducer::correctionAmpl_
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().

◆ correctionTOA_

TGraph hcal::HcalRecProducer::correctionTOA_
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().

◆ digiCollName_

std::string hcal::HcalRecProducer::digiCollName_
private

Digi Collection Name to use as input.

Definition at line 78 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ digiPassName_

std::string hcal::HcalRecProducer::digiPassName_
private

Digi Pass Name to use as input.

Definition at line 81 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ minAmpl_

double hcal::HcalRecProducer::minAmpl_
private

Minimum amplitude to apply TOA correction.

Definition at line 133 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ minAmplFraction_

double hcal::HcalRecProducer::minAmplFraction_
private

Minimum amplitude fraction to apply amplitude correction.

Definition at line 130 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ mip_energy_

double hcal::HcalRecProducer::mip_energy_
private

Energy [MeV] deposited by a MIP.

Definition at line 93 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ nADCs_

int hcal::HcalRecProducer::nADCs_
private

Depth of ADC buffer.

Definition at line 136 of file HcalRecProducer.h.

Referenced by configure().

◆ pe_per_mip_

double hcal::HcalRecProducer::pe_per_mip_
private

PEs per MIP.

Definition at line 96 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ pulseFunc_

TF1 hcal::HcalRecProducer::pulseFunc_
mutableprivate

Pulse function.

Definition at line 108 of file HcalRecProducer.h.

Referenced by configure().

◆ rateDnSlope_

double hcal::HcalRecProducer::rateDnSlope_
private

Rate of Down Slope in Pulse Shape [1/ns].

Definition at line 145 of file HcalRecProducer.h.

Referenced by configure().

◆ rateUpSlope_

double hcal::HcalRecProducer::rateUpSlope_
private

Rate of Up Slope in Pulse Shape [1/ns].

Definition at line 139 of file HcalRecProducer.h.

Referenced by configure().

◆ recHitCollName_

std::string hcal::HcalRecProducer::recHitCollName_
private

output hit collection name

Definition at line 90 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ simHitCollName_

std::string hcal::HcalRecProducer::simHitCollName_
private

simhit collection name

Definition at line 84 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ simHitPassName_

std::string hcal::HcalRecProducer::simHitPassName_
private

simhit pass name

Definition at line 87 of file HcalRecProducer.h.

Referenced by configure(), and produce().

◆ timeDnSlope_

double hcal::HcalRecProducer::timeDnSlope_
private

Time of Down Slope relative to Pulse Shape Fit [ns].

Definition at line 148 of file HcalRecProducer.h.

Referenced by configure().

◆ timePeak_

double hcal::HcalRecProducer::timePeak_
private

Time of Peak relative to pulse shape fit [ns].

Definition at line 151 of file HcalRecProducer.h.

Referenced by configure().

◆ timeUpSlope_

double hcal::HcalRecProducer::timeUpSlope_
private

Time of Up Slope relative to Pulse Shape Fit [ns].

Definition at line 142 of file HcalRecProducer.h.

Referenced by configure().

◆ voltage_per_mip_

double hcal::HcalRecProducer::voltage_per_mip_
private

Voltage by average MIP.

Definition at line 102 of file HcalRecProducer.h.

Referenced by configure(), and produce().


The documentation for this class was generated from the following files: