Belle II Software development
ECLDigitCalibratorModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9/* Own header. */
10#include <ecl/modules/eclDigitCalibration/ECLDigitCalibratorModule.h>
11
12/* ECL headers. */
13#include <ecl/dataobjects/ECLCalDigit.h>
14#include <ecl/dataobjects/ECLDigit.h>
15#include <ecl/dataobjects/ECLDsp.h>
16#include <ecl/dataobjects/ECLPureCsIInfo.h>
17#include <ecl/dbobjects/ECLCrystalCalib.h>
18#include <ecl/digitization/EclConfiguration.h>
19#include <ecl/utility/utilityFunctions.h>
20#include <ecl/dataobjects/ECLElementNumbers.h>
21
22/* Basf2 headers. */
23#include <framework/core/Environment.h>
24#include <framework/gearbox/Unit.h>
25#include <framework/geometry/B2Vector3.h>
26#include <framework/logging/Logger.h>
27#include <framework/utilities/FileSystem.h>
28#include <mdst/dataobjects/EventLevelClusteringInfo.h>
29#include <framework/datastore/RelationArray.h>
30
31/* ROOT headers. */
32#include <TFile.h>
33#include <TH1F.h>
34
35/* C++ headers. */
36#include <unordered_map>
37
38using namespace std;
39using namespace Belle2;
40using namespace ECL;
41
42//-----------------------------------------------------------------
43// Register the Modules
44//-----------------------------------------------------------------
45REG_MODULE(ECLDigitCalibrator);
46REG_MODULE(ECLDigitCalibratorPureCsI);
47
48//-----------------------------------------------------------------
49// Implementation
50//-----------------------------------------------------------------
51
52// constructor
54 m_calibrationCrystalEnergy("ECLCrystalEnergy"),
55 m_calibrationCrystalElectronicsTime("ECLCrystalElectronicsTime"),
56 m_calibrationCrystalTimeOffset("ECLCrystalTimeOffset"),
57 m_calibrationCrateTimeOffset("ECLCrateTimeOffset"),
58 m_calibrationCrystalFlightTime("ECLCrystalFlightTime"),
62{
63 // Set module properties
64 setDescription("Applies digit energy, time and time-resolution calibration to each ECL digit. Counts number of out-of-time background digits to determine the event-by-event background level.");
65 addParam("backgroundEnergyCut", m_backgroundEnergyCut, "Energy cut used to count background digits", 7.0 * Belle2::Unit::MeV);
66 addParam("backgroundTimingCut", m_backgroundTimingCut, "Timing cut used to count background digits", 110.0 * Belle2::Unit::ns);
67 addParam("fileBackgroundName", m_fileBackgroundName, "Background filename.",
68 FileSystem::findFile("/data/ecl/background_norm.root"));
69 addParam("simulatePure", m_simulatePure, "Flag to simulate pure CsI option", false);
70
71 // Parallel processing certification
73
74 m_averageBG = 0;
75 m_pol2Max = 0.0;
77}
78
79// destructor
83
84// initialize calibration
102
103// callback calibration
105 std::vector<float>& constantsUnc)
106{
107 constants = cal->getCalibVector();
108 constantsUnc = cal->getCalibUncVector();
109}
110
111// initialize
113{
114 // mdst dataobjects
115 // This object is registered by few packages. Let's be agnostic about the
116 // execution order of the modules: the first package run registers the module
120
121 // Register Digits, CalDigits and their relation in datastore
122 m_eclDigits.isRequired(eclDigitArrayName());
123 m_eclCalDigits.registerInDataStore(eclCalDigitArrayName());
124 m_eclCalDigits.registerRelationTo(m_eclDigits);
125 m_eclDsps.isRequired(eclDspArrayName());
126
127 // initialize calibration
129
130 // initialize time resolution (not yet from the database)
131 // read the Background correction factors (for full background)
132 m_fileBackground = new TFile(m_fileBackgroundName.c_str(), "READ");
133 if (!m_fileBackground)
134 B2FATAL("Could not find file: " << m_fileBackgroundName);
135 m_th1fBackground = dynamic_cast<TH1F*>(m_fileBackground->Get("background"));
136 if (!m_th1fBackground)
137 B2FATAL("Could not find m_th1fBackground");
138
139 // average BG value from m_th1fBackground
140 m_averageBG = m_th1fBackground->Integral() / m_th1fBackground->GetEntries();
141
142 // get maximum position ("x") of 2-order pol background for t99
143 if (fabs(c_pol2Var3) > 1e-12) {
145 } else {
146 m_pol2Max = 0.;
147 }
148
150}
151
152// begin run
154{
155 // Check if any of the calibration constants have changed
156 if (m_calibrationCrystalElectronics.hasChanged()) {
159 } else
160 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrystalElectronics for current run!");
161 }
162
163 if (m_calibrationCrystalEnergy.hasChanged()) {
166 } else
167 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrystalEnergy for current run!");
168 }
169
170 if (m_calibrationCrystalElectronicsTime.hasChanged()) {
174 } else
175 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrystalElectronicsTime for current run!");
176 }
177
178 if (m_calibrationCrystalTimeOffset.hasChanged()) {
181 } else
182 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrystalTimeOffset for current run!");
183 }
184
185 if (m_calibrationCrateTimeOffset.hasChanged()) {
188 } else
189 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrateTimeOffset for current run!");
190 }
191
192 if (m_calibrationCrystalFlightTime.hasChanged()) {
195 } else
196 B2ERROR("ECLDigitCalibratorModule::beginRun - Couldn't find m_calibrationCrystalFlightTime for current run!");
197 }
198}
199
200// event
202{
203 // In this module, we set a relation between each ECLCalDigit and the corresponidng ECLDigit
204 // addRelationTo is, unfortunately, pretty expensive: instead of calling the function
205 // we add the relations using directly the RelationArray object
206 RelationArray calDigitsToDigits(m_eclCalDigits, m_eclDigits);
207
208 // Look-up table to get a ECLDsp from the corresponding cellID
209 std::array < const ECLDsp*, ECLElementNumbers::c_NCrystals + 1 > dspFromCellId{};
210 for (const auto& eclDsp : m_eclDsps) {
211 int cellId = eclDsp.getCellId();
212 dspFromCellId[cellId] = &eclDsp;
213 }
214
215 // Loop over the input array
216 for (int index = 0; index < m_eclDigits.getEntries(); ++index) {
217 const ECLDigit& aECLDigit = *m_eclDigits[index];
218
219 bool is_pure_csi = 0;
220
221 // append an ECLCalDigit to the storearray
222 const auto aECLCalDigit = m_eclCalDigits.appendNew();
223
224 // set a relation to the ECLDigit
225 calDigitsToDigits.add(index, index);
226
227 // get the cell id from the ECLDigit as identifier
228 const int cellid = aECLDigit.getCellId();
229
230 // check that the cell id is valid
231 if (cellid < 1 or cellid > c_nCrystals) {
232 B2FATAL("ECLDigitCalibrationModule::event():" << cellid << " out of range!");
233 }
234
235 // perform the digit energy calibration: E = A * Ce * Cs
236 const int amplitude = aECLDigit.getAmp();
237 double calibratedEnergy = 0;
238
239 if (m_simulatePure) {
240 if (aECLDigit.getRelated<ECLPureCsIInfo>(eclPureCsIInfoArrayName()) != nullptr) {
241 if (aECLDigit.getRelated<ECLPureCsIInfo>(eclPureCsIInfoArrayName())->getPureCsI())
242 is_pure_csi = 1;
243 }
244 }
245
246 if (is_pure_csi) {
247 calibratedEnergy = amplitude * m_pureCsIEnergyCalib;
248 } else {
249 calibratedEnergy = amplitude * v_calibrationCrystalElectronics[cellid - 1] * v_calibrationCrystalEnergy[cellid - 1];
250 }
251 if (calibratedEnergy < 0.0)
252 calibratedEnergy = 0.0;
253
254 // perform the digit timing calibration: t = c * (tfit - Te - Ts)
255 const int time = aECLDigit.getTimeFit();
256 const int quality = aECLDigit.getQuality();
257 double calibratedTime = c_timeForFitFailed;
258 if (quality == 1) {
259 aECLCalDigit->addStatus(ECLCalDigit::c_IsFailedFit); // this is used to flag failed fits
260 } else {
261 // only calibrate digit time if we have a good waveform fit
262 if (is_pure_csi) {
263 calibratedTime = m_pureCsITimeCalib * m_timeInverseSlope * (time - v_calibrationCrystalElectronicsTime[cellid - 1] -
266 } else {
267 calibratedTime = m_timeInverseSlope * (time - v_calibrationCrystalElectronicsTime[cellid - 1] -
269 v_calibrationCrateTimeOffset[cellid - 1]) -
271 }
272
273 // For data, apply a correction to the time as a function of the signal amplitude. Correction determined from a fit.
274 // No correction for MC
275 B2DEBUG(35, "cellid = " << cellid << ", m_isMC = " << m_isMC);
276
277 if (!m_isMC) {
278 double energyTimeShift = ECLTimeUtil->energyDependentTimeOffsetElectronic(amplitude * v_calibrationCrystalElectronics[cellid - 1]) *
280 B2DEBUG(35, "cellid = " << cellid << ", amplitude = " << amplitude << ", corrected amplitude = " << amplitude*
281 v_calibrationCrystalElectronics[cellid - 1] << ", time before t(E) shift = " << calibratedTime << ", t(E) shift = " <<
282 energyTimeShift << " ns");
283 calibratedTime -= energyTimeShift;
284 }
285 }
286
287 B2DEBUG(35, "cellid = " << cellid << ", amplitude = " << amplitude << ", calibrated energy = " << calibratedEnergy);
288 B2DEBUG(35, "cellid = " << cellid << ", time = " << time << ", calibratedTime = " << calibratedTime);
289
290 // Calibrating offline fit results
291 const ECLDsp* aECLDsp = dspFromCellId[cellid];
292 aECLCalDigit->setTwoComponentChi2(-1);
293 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonHadron, -1);
294 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonHadronBackgroundPhoton, -1);
295 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonDiodeCrossing, -1);
296 aECLCalDigit->setTwoComponentTotalEnergy(-1);
297 aECLCalDigit->setTwoComponentHadronEnergy(-1);
298 aECLCalDigit->setTwoComponentDiodeEnergy(-1);
299 // copy online fit quality from ECLDigit
300 const int online_quality = aECLDigit.getQuality();
301 if (online_quality == 1) {
302 aECLCalDigit->addStatus(ECLCalDigit::c_OnlineFitQuality1);
303 } else if (online_quality == 2) {
304 aECLCalDigit->addStatus(ECLCalDigit::c_OnlineFitQuality2);
305 } else if (online_quality == 3) {
306 aECLCalDigit->addStatus(ECLCalDigit::c_OnlineFitQuality3);
307 } else if (online_quality == 0) {
308 aECLCalDigit->addStatus(ECLCalDigit::c_OnlineFitQuality0);
309 }
310
311 if (aECLDsp) {
312 // require ECLDigit to have offline waveform
313 if (aECLDsp->getTwoComponentChi2() > 0) {
314 // require offline waveform to have offline fit result
315
316 const double calibratedTwoComponentTotalEnergy = aECLDsp->getTwoComponentTotalAmp() * v_calibrationCrystalElectronics[cellid - 1] *
317 v_calibrationCrystalEnergy[cellid - 1];
318 const double calibratedTwoComponentHadronEnergy = aECLDsp->getTwoComponentHadronAmp() * v_calibrationCrystalElectronics[cellid -
319 1] *
320 v_calibrationCrystalEnergy[cellid - 1];
321 const double calibratedTwoComponentDiodeEnergy = aECLDsp->getTwoComponentDiodeAmp() * v_calibrationCrystalElectronics[cellid - 1] *
322 v_calibrationCrystalEnergy[cellid - 1];
323 const double twoComponentChi2 = aECLDsp->getTwoComponentChi2();
324 const ECLDsp::TwoComponentFitType twoComponentFitType = aECLDsp->getTwoComponentFitType();
325
326 aECLCalDigit->setTwoComponentTotalEnergy(calibratedTwoComponentTotalEnergy);
327 aECLCalDigit->setTwoComponentHadronEnergy(calibratedTwoComponentHadronEnergy);
328 aECLCalDigit->setTwoComponentDiodeEnergy(calibratedTwoComponentDiodeEnergy);
329 aECLCalDigit->setTwoComponentChi2(twoComponentChi2);
330 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonHadron, aECLDsp->getTwoComponentSavedChi2(ECLDsp::photonHadron));
331 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonHadronBackgroundPhoton,
333 aECLCalDigit->setTwoComponentSavedChi2(ECLDsp::photonDiodeCrossing, aECLDsp->getTwoComponentSavedChi2(ECLDsp::photonDiodeCrossing));
334 aECLCalDigit->setTwoComponentFitType(twoComponentFitType);
335 }
336 }
337
338 // fill the ECLCalDigit with the cell id, the calibrated information and calibration status
339 aECLCalDigit->setCellId(cellid);
340
341 aECLCalDigit->setEnergy(calibratedEnergy);
342 aECLCalDigit->addStatus(ECLCalDigit::c_IsEnergyCalibrated);
343
344 aECLCalDigit->setTime(calibratedTime);
345 aECLCalDigit->addStatus(ECLCalDigit::c_IsTimeCalibrated);
346 }
347
348 // determine background level
349 const int bgCount = determineBackgroundECL();
350
351 // set the t99 (time resolution)
352 for (auto& aECLCalDigit : m_eclCalDigits) {
353
354 // perform the time resolution calibration
355 const double t99 = getT99(aECLCalDigit.getCellId(),
356 aECLCalDigit.getEnergy(),
357 aECLCalDigit.hasStatus(ECLCalDigit::c_IsFailedFit),
358 bgCount); // calibrated time resolution
359 aECLCalDigit.setTimeResolution(t99);
360
361 if (t99 == c_timeResolutionForFitFailed) {
362 aECLCalDigit.addStatus(ECLCalDigit::c_IsFailedTimeResolution);
363 }
364
365 aECLCalDigit.addStatus(ECLCalDigit::c_IsTimeResolutionCalibrated);
366 }
367}
368
369// end run
373
374// terminate
378
379// Time resolution calibration
380double ECLDigitCalibratorModule::getT99(const int cellid, const double energy, const bool fitfailed, const int bgcount) const
381{
382
383 // if this digit is calibrated to the trigger time, we set the resolution to 'very bad' (to be discussed)
384 if (fitfailed)
386
387 // Get the background level [MeV / mus]
388 const double bglevel = TMath::Min((double)bgcount / (double)c_nominalBG * m_th1fBackground->GetBinContent(cellid) / m_averageBG,
389 m_pol2Max); // c_nominalBG = 183 for actual version of digitizer, m_averageBG is about 2 MeV/ mus
390
391 // Get p1 as function of background level
392 const double p1 = c_pol2Var1 + c_pol2Var2 * bglevel + c_pol2Var3 * bglevel * bglevel;
393
394 // inverse energy in 1/MeV
395 double einv = 0.;
396 if (energy > 1e-12)
397 einv = 1. / (energy / Belle2::Unit::MeV);
398
399 // calculate t99 using the inverse energy and p1 (p0 is zero)
400 double t99 = p1 * einv;
401
402 // for high energies we fix t99 to 3.5ns
403 if (t99 < c_minT99)
404 t99 = c_minT99;
405
406 B2DEBUG(35, "ECLDigitCalibratorModule::getCalibratedTimeResolution: dose = " << m_th1fBackground->GetBinContent(
407 cellid)
408 << ", bglevel = " << bglevel << ", cellid = " << cellid << ", t99 = " << t99 << ", energy = " << energy / Belle2::Unit::MeV);
409
410 return t99;
411}
412
413// Determine background level by event by counting out-of-time digits above threshold.
415{
416 // EventLevelClustering counters
417 using regionCounter = std::unordered_map<ECL::DetectorRegion, uint>;
418
419 regionCounter outOfTimeCount{{ECL::DetectorRegion::FWD, 0},
420 {ECL::DetectorRegion::BRL, 0},
421 {ECL::DetectorRegion::BWD, 0}};
422
423 // Loop over the input array
424 for (auto& aECLCalDigit : m_eclCalDigits) {
425 if ((abs(aECLCalDigit.getTime()) >= m_backgroundTimingCut) and (aECLCalDigit.getEnergy() >= m_backgroundEnergyCut)) {
426 // Get detector region
427 // Do not rely on the geometry here, since it's pretty expensive: let's rely on the dedicated convenient function
428 // from the ECLElementNumbers class
429 const int cellId = aECLCalDigit.getCellId();
430 const ECL::DetectorRegion detectorRegion =
431 ECLElementNumbers::isBarrel(cellId) ? ECL::DetectorRegion::BRL :
432 (ECLElementNumbers::isBackward(cellId) ? ECL::DetectorRegion::BWD :
433 ECL::DetectorRegion::FWD);
434
435 // Count out of time digits per region
436 ++outOfTimeCount.at(detectorRegion);
437 }
438 }
439
440 // Save EventLevelClusteringInfo
443 }
444
445 m_eventLevelClusteringInfo->setNECLCalDigitsOutOfTimeFWD(outOfTimeCount.at(ECL::DetectorRegion::FWD));
446 m_eventLevelClusteringInfo->setNECLCalDigitsOutOfTimeBarrel(outOfTimeCount.at(ECL::DetectorRegion::BRL));
447 m_eventLevelClusteringInfo->setNECLCalDigitsOutOfTimeBWD(outOfTimeCount.at(ECL::DetectorRegion::BWD));
448
449 B2DEBUG(35, "ECLDigitCalibratorModule::determineBackgroundECL found " << outOfTimeCount.at(ECL::DetectorRegion::FWD) << ", " <<
450 outOfTimeCount.at(ECL::DetectorRegion::BRL) << ", " << outOfTimeCount.at(ECL::DetectorRegion::BWD) <<
451 " out of time digits in FWD, BRL, BWD");
452
453 return m_eventLevelClusteringInfo->getNECLCalDigitsOutOfTime();
454}
Class for accessing objects in the database.
Definition DBObjPtr.h:21
double m_pureCsITimeCalib
conversion factor from eclPureCsIDigitizer to ns.
const double c_pol2Var2
2-order fit for p1.
virtual const char * eventLevelClusteringInfoName() const
Name of the EventLevelClusteringInfo.
StoreArray< ECLDsp > m_eclDsps
storearray ECLDsp
virtual const char * eclPureCsIInfoArrayName() const
Name of the ECL pure CsI Information.
DBObjPtr< ECLCrystalCalib > m_calibrationCrateTimeOffset
single crate time calibration offset (per crystal)
double m_pureCsITimeOffset
ad-hoc offset correction for pureCsI timing/
TH1F * m_th1fBackground
Background histogram.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalElectronics
single crystal electronics calibration
const double c_minT99
The minimum t99.
virtual void initialize() override
Initialize variables.
std::vector< float > v_calibrationCrystalElectronicsUnc
single crystal electronics calibration as vector uncertainty
std::string m_fileBackgroundName
Background filename.
std::vector< float > v_calibrationCrateTimeOffsetUnc
single crate time calibration offset as vector uncertainty (per crystal)
std::vector< float > v_calibrationCrystalElectronicsTimeUnc
single crystal time calibration offset electronics as vector uncertainty
virtual void event() override
event per event.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalEnergy
single crystal energy calibration
bool m_isMC
Flag to keep track if we run on MC or not.
virtual void endRun() override
end run.
double getT99(const int cellid, const double energy, const bool fitfailed, const int bgcount) const
t99%.
virtual void terminate() override
terminate.
const double c_pol2Var1
2-order fit for p1 Var1 + Var2*bg + Var3*bg^2.
StoreArray< ECLDigit > m_eclDigits
storearray ECLDigit
virtual const char * eclDspArrayName() const
Name of the ECLDsp.
const double c_timeResolutionForFitFailed
Time resolution for failed fits".
std::vector< float > v_calibrationCrystalElectronicsTime
single crystal time calibration offset electronics as vector
std::vector< float > v_calibrationCrystalFlightTime
single crystal time calibration TOF as vector
void callbackCalibration(DBObjPtr< ECLCrystalCalib > &cal, std::vector< float > &constants, std::vector< float > &constantsUnc)
reads calibration constants
std::unique_ptr< Belle2::ECL::ECLTimingUtilities > ECLTimeUtil
ECL timing tools.
void initializeCalibration()
reads calibration constants, performs checks, put them into a vector
std::vector< float > v_calibrationCrystalEnergy
single crystal energy calibration as vector
std::vector< float > v_calibrationCrystalEnergyUnc
single crystal energy calibration as vector uncertainty
virtual void beginRun() override
begin run.
const double c_pol2Var3
2-order fit for p1.
std::vector< float > v_calibrationCrateTimeOffset
single crate time calibration offset as vector (per crystal)
const double c_timeForFitFailed
Time for failed fits".
int determineBackgroundECL()
count out of time digits to determine baclground levels
double m_timeInverseSlope
Time calibration inverse slope "a".
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalTimeOffset
single crystal time calibration offset
double m_backgroundTimingCut
Timing window for background level counting.
std::vector< float > v_calibrationCrystalElectronics
single crystal electronics calibration as vector
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalElectronicsTime
single crystal time calibration offset electronics
double m_pureCsIEnergyCalib
conversion factor from ADC counts to GeV.
const int c_nCrystals
Number of ECL crystals.
std::vector< float > v_calibrationCrystalTimeOffset
single crystal time calibration offset as vector
virtual const char * eclDigitArrayName() const
Name of the ECLDigit.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalFlightTime
single crystal time calibration TOF
double m_averageBG
Average dose per crystal calculated from m_th1dBackground.
double m_pol2Max
Maximum of p1 2-order fit to limit values.
std::vector< float > v_calibrationCrystalFlightTimeUnc
single crystal time calibration TOF as vector uncertainty
virtual const char * eclCalDigitArrayName() const
Name of the ECLCalDigit.
double m_backgroundEnergyCut
Energy cut for background level counting.
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
event level clustering info
StoreArray< ECLCalDigit > m_eclCalDigits
storearray ECLCalDigit
const int c_nominalBG
Number of out of time digits at BGx1.0.
std::vector< float > v_calibrationCrystalTimeOffsetUnc
single crystal time calibration offset as vector uncertainty
bool m_simulatePure
Flag to set pure CsI simulation option.
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition ECLDigit.h:25
int getAmp() const
Get Fitting Amplitude.
Definition ECLDigit.h:102
int getQuality() const
Get Fitting Quality.
Definition ECLDigit.h:112
int getCellId() const
Get Cell ID.
Definition ECLDigit.h:97
int getTimeFit() const
Get Fitting Time.
Definition ECLDigit.h:107
Class to store ECL ShaperDSP waveform ADC data.
Definition ECLDsp.h:25
double getTwoComponentHadronAmp() const
get two comp hadron amp
Definition ECLDsp.h:136
double getTwoComponentSavedChi2(TwoComponentFitType FitTypeIn) const
get two comp chi2 for a fit type see enum TwoComponentFitType in ECLDsp.h for description of fit type...
Definition ECLDsp.h:152
TwoComponentFitType
Offline two component fit type.
Definition ECLDsp.h:29
@ photonHadronBackgroundPhoton
photon + hadron template + pile-up photon fit
Definition ECLDsp.h:32
@ photonDiodeCrossing
photon + diode template fit
Definition ECLDsp.h:33
@ photonHadron
photon + hadron template fit
Definition ECLDsp.h:31
double getTwoComponentTotalAmp() const
get two comp total amp
Definition ECLDsp.h:131
double getTwoComponentChi2() const
get two comp chi2
Definition ECLDsp.h:146
TwoComponentFitType getTwoComponentFitType() const
get two comp fit type
Definition ECLDsp.h:171
double getTwoComponentDiodeAmp() const
get two comp diode amp
Definition ECLDsp.h:141
void setTwoComponentChi2(double input)
Set two comp chi2.
Definition ECLDsp.h:82
Class to store ECL crystal type relation to ECLDigit for the simulation pure CsI upgrade option fille...
static double getRF()
See m_rf.
bool isMC() const
Do we have generated, not real data?
static Environment & Instance()
Static method to get a reference to the Environment instance.
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition Module.h:80
Low-level class to create/modify relations between StoreArrays.
void add(index_type from, index_type to, weight_type weight=1.0)
Add a new element to the relation.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
static const double MeV
[megaelectronvolt]
Definition Unit.h:114
static const double ns
Standard of [time].
Definition Unit.h:48
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
bool isBarrel(int cellId)
Check whether the crystal is in barrel ECL.
bool isBackward(int cellId)
Check whether the crystal is in backward ECL.
Abstract base class for different kinds of events.
STL namespace.