Belle II Software  release-08-01-10
KLMTimeAlgorithm.h
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 #pragma once
10 
11 /* KLM headers. */
12 #include <klm/bklm/geometry/GeometryPar.h>
13 #include <klm/dataobjects/KLMChannelIndex.h>
14 #include <klm/dataobjects/KLMElementNumbers.h>
15 #include <klm/dbobjects/KLMTimeCableDelay.h>
16 #include <klm/dbobjects/KLMTimeConstants.h>
17 #include <klm/dbobjects/KLMTimeResolution.h>
18 #include <klm/eklm/geometry/GeometryData.h>
19 
20 /* Basf2 headers. */
21 #include <calibration/CalibrationAlgorithm.h>
22 
23 /* ROOT headers. */
24 #include <Math/MinimizerOptions.h>
25 #include <TF1.h>
26 #include <TGraphErrors.h>
27 #include <TH1F.h>
28 #include <TH1I.h>
29 #include <TH2F.h>
30 #include <TProfile.h>
31 
32 namespace Belle2 {
42 
43  public:
44 
48  struct Event {
49 
51  double t0 = 0;
52 
54  double flyTime = 0;
55 
57  double recTime = 0;
58 
60  double dist = 0;
61 
63  double diffDistX = 0;
64 
66  double diffDistY = 0;
67 
69  double diffDistZ = 0;
70 
72  double eDep = 0;
73 
75  double nPE = 0;
76 
78  int channelId = 0;
79 
81  bool inRPC = 0;
82 
84  bool isFlipped = 0;
85 
89  double time()
90  {
91  return recTime - flyTime;
92  }
93 
94  };
95 
100 
101  /* Not enough data. */
102  c_NotEnoughData = 0,
103 
104  /* Failed fit. */
105  c_FailedFit = 1,
106 
107  /* Successful calibration. */
108  c_SuccessfulCalibration = 2,
109 
110  };
111 
116 
121 
125  void setDebug()
126  {
127  m_debug = true;
128  }
129 
135  void setMC(bool mc)
136  {
137  m_mc = mc;
138  }
139 
143  void useEvtT0()
144  {
145  m_useEventT0 = true;
146  }
147 
151  void setMinimalDigitNumber(int minimalDigitNumber)
152  {
153  m_MinimalDigitNumber = minimalDigitNumber;
154  }
155 
161  void setLowerLimit(int counts)
162  {
163  m_lower_limit_counts = counts;
164  }
165 
169  void saveHist();
170 
175  double esti_timeShift(const KLMChannelIndex& klmChannel);
176 
181  std::pair<int, double> tS_upperStrip(const KLMChannelIndex& klmChannel);
182 
187  std::pair<int, double> tS_lowerStrip(const KLMChannelIndex& klmChannel);
188 
193  double esti_timeRes(const KLMChannelIndex& klmChannel);
194 
199  std::pair<int, double> tR_upperStrip(const KLMChannelIndex& klmChannel);
200 
205  std::pair<int, double> tR_lowerStrip(const KLMChannelIndex& klmChannel);
206 
207 
208  protected:
209 
213  virtual EResult calibrate() override;
214 
215  private:
216 
220  void setupDatabase();
221 
229 
233  void createHistograms();
234 
260  TProfile* profileRpcPhi, TProfile* profileRpcZ,
261  TProfile* profileBKLMScintillatorPhi, TProfile* profileBKLMScintillatorZ,
262  TProfile* profileEKLMScintillatorPlane1,
263  TProfile* profileEKLMScintillatorPlane2, bool fill2dHistograms);
264 
271  void timeDistance2dFit(
272  const std::vector< std::pair<KLMChannelNumber, unsigned int> >& channels,
273  double& delay, double& delayError);
274 
279  std::map<KLMChannelNumber, std::vector<struct Event> > m_evts;
280 
285  std::map<KLMChannelNumber, int> m_cFlag;
286 
288  std::map<KLMChannelNumber, double> m_timeShift;
289 
291  std::map<KLMChannelNumber, double> m_timeRes;
292 
294  std::map<KLMChannelNumber, double> m_time_channel;
295 
297  std::map<KLMChannelNumber, double> m_etime_channel;
298 
300  std::map<KLMChannelNumber, double> m_ctime_channel;
301 
303  std::map<KLMChannelNumber, double> mc_etime_channel;
304 
306  double m_LowerTimeBoundaryRPC = -10.0;
307 
309  double m_UpperTimeBoundaryRPC = 10.0;
310 
313 
316 
319 
322 
325 
328 
331 
334 
337 
340 
342  double m_time_channelAvg_rpc = 0.0;
343 
346 
350 
354 
358 
362 
365 
368 
372 
376 
380 
384 
386  int m_MinimalDigitNumber = 100000000;
387 
390 
393 
396 
399 
402 
404  ROOT::Math::MinimizerOptions m_minimizerOptions;
405 
408 
414 
417 
419  bool m_debug = false;
420 
422  bool m_mc = false;
423 
425  bool m_useEventT0 = true;
426 
428  TH1I* h_calibrated = nullptr;
429 
431  TH1I* hc_calibrated = nullptr;
432 
434  TH1F* h_diff = nullptr;
435 
436  /* Monitor graphs of peak value of time distribution for each channel. */
437 
439  TGraphErrors* gre_time_channel_rpc = nullptr;
440 
442  TGraphErrors* gre_time_channel_scint = nullptr;
443 
445  TGraphErrors* gre_time_channel_scint_end = nullptr;
446 
447  /* Monitor graphs of peak value of calibrated time distribution for each channel. */
448 
450  TGraphErrors* gre_ctime_channel_rpc = nullptr;
451 
453  TGraphErrors* gre_ctime_channel_scint = nullptr;
454 
456  TGraphErrors* gre_ctime_channel_scint_end = nullptr;
457 
458  /* Monitor graphs of calibration constant value of each channel. */
459 
461  TGraph* gr_timeShift_channel_rpc = nullptr;
462 
464  TGraph* gr_timeShift_channel_scint = nullptr;
465 
468 
469  /* Monitor graphs of calibrated time resolution value of each channel. */
470 
472  TGraph* gr_timeRes_channel_rpc = nullptr;
473 
475  TGraph* gr_timeRes_channel_scint = nullptr;
476 
478  TGraph* gr_timeRes_channel_scint_end = nullptr;
479 
480  /* Profiles used for effective light speed estimation. */
481 
483  TProfile* m_ProfileRpcPhi = nullptr;
484 
486  TProfile* m_ProfileRpcZ = nullptr;
487 
489  TProfile* m_ProfileBKLMScintillatorPhi = nullptr;
490 
492  TProfile* m_ProfileBKLMScintillatorZ = nullptr;
493 
495  TProfile* m_ProfileEKLMScintillatorPlane1 = nullptr;
496 
498  TProfile* m_ProfileEKLMScintillatorPlane2 = nullptr;
499 
500  /* Profiles of time versus distance (after fit). */
501 
503  TProfile* m_Profile2RpcPhi = nullptr;
504 
506  TProfile* m_Profile2RpcZ = nullptr;
507 
509  TProfile* m_Profile2BKLMScintillatorPhi = nullptr;
510 
512  TProfile* m_Profile2BKLMScintillatorZ = nullptr;
513 
515  TProfile* m_Profile2EKLMScintillatorPlane1 = nullptr;
516 
518  TProfile* m_Profile2EKLMScintillatorPlane2 = nullptr;
519 
520  /*
521  * Histograms of global time distribution used for effective light speed
522  * estimation.
523  */
524 
526  TH1F* h_time_rpc_tc = nullptr;
527 
529  TH1F* h_time_scint_tc = nullptr;
530 
532  TH1F* h_time_scint_tc_end = nullptr;
533 
534  /* Histograms of global time distribution before calibration. */
535 
537  TH1F* h_time_rpc = nullptr;
538 
540  TH1F* h_time_scint = nullptr;
541 
543  TH1F* h_time_scint_end = nullptr;
544 
545  /* Histograms of global time distribution after calibration. */
546 
548  TH1F* hc_time_rpc = nullptr;
549 
551  TH1F* hc_time_scint = nullptr;
552 
554  TH1F* hc_time_scint_end = nullptr;
555 
556  /*
557  * Histograms of time distribution for forward (backward)
558  * before calibration.
559  */
560 
562  TH1F* h_timeF_rpc[2] = {nullptr};
563 
565  TH1F* h_timeF_scint[2] = {nullptr};
566 
568  TH1F* h_timeF_scint_end[2] = {nullptr};
569 
570  /*
571  * Histograms of time distribution for forward (backward)
572  * after calibration.
573  */
574 
576  TH1F* hc_timeF_rpc[2] = {nullptr};
577 
579  TH1F* hc_timeF_scint[2] = {nullptr};
580 
582  TH1F* hc_timeF_scint_end[2] = {nullptr};
583 
584  /*
585  * Histograms of time dependent on sector for forward (backward)
586  * before calibration.
587  */
588 
590  TH2F* h2_timeF_rpc[2] = {nullptr};
591 
593  TH2F* h2_timeF_scint[2] = {nullptr};
594 
596  TH2F* h2_timeF_scint_end[2] = {nullptr};
597 
598  /*
599  * Histograms of time dependent on sector for forward (backward)
600  * after calibration.
601  */
602 
604  TH2F* h2c_timeF_rpc[2] = {nullptr};
605 
607  TH2F* h2c_timeF_scint[2] = {nullptr};
608 
610  TH2F* h2c_timeF_scint_end[2] = {nullptr};
611 
612  /* Histograms of time distribution for sectors before calibration. */
613 
615  TH1F* h_timeFS_rpc[2][8] = {{nullptr}};
616 
618  TH1F* h_timeFS_scint[2][8] = {{nullptr}};
619 
621  TH1F* h_timeFS_scint_end[2][4] = {{nullptr}};
622 
623  /* Histograms of time distribution for sectors after calibration. */
624 
626  TH1F* hc_timeFS_rpc[2][8] = {{nullptr}};
627 
629  TH1F* hc_timeFS_scint[2][8] = {{nullptr}};
630 
632  TH1F* hc_timeFS_scint_end[2][4] = {{nullptr}};
633 
634  /*
635  * Histograms of time distribution dependent on layer of sectors
636  * before calibration.
637  */
638 
640  TH2F* h2_timeFS[2][8] = {{nullptr}};
641 
643  TH2F* h2_timeFS_end[2][4] = {{nullptr}};
644 
645  /*
646  * Histograms of time distribution dependent on layer of sectors
647  * after calibration.
648  */
649 
651  TH2F* h2c_timeFS[2][8] = {{nullptr}};
652 
654  TH2F* h2c_timeFS_end[2][4] = {{nullptr}};
655 
656  /* Histograms of time distribution of one layer before calibration. */
657 
659  TH1F* h_timeFSL[2][8][15] = {{{nullptr}}};
660 
662  TH1F* h_timeFSL_end[2][4][14] = {{{nullptr}}};
663 
664  /* Histograms of time distribution of one layer after calibration. */
665 
667  TH1F* hc_timeFSL[2][8][15] = {{{nullptr}}};
668 
670  TH1F* hc_timeFSL_end[2][4][14] = {{{nullptr}}};
671 
672  /* Histograms of time distribution of one plane before calibration. */
673 
675  TH1F* h_timeFSLP[2][8][15][2] = {{{{nullptr}}}};
676 
678  TH1F* h_timeFSLP_end[2][4][14][2] = {{{{nullptr}}}};
679 
680  /* Histograms of time distribution of one plane after calibration. */
681 
683  TH1F* hc_timeFSLP[2][8][15][2] = {{{{nullptr}}}};
684 
686  TH1F* hc_timeFSLP_end[2][4][14][2] = {{{{nullptr}}}};
687 
688  /*
689  * Histograms of time distribution dependent on channels
690  * before calibration.
691  */
692 
694  TH2F* h2_timeFSLP[2][8][15][2] = {{{{nullptr}}}};
695 
697  TH2F* h2_timeFSLP_end[2][4][14][2] = {{{{nullptr}}}};
698 
699  /*
700  * Histograms of time distribution dependent on channels
701  * after calibration.
702  */
703 
705  TH2F* h2c_timeFSLP[2][8][15][2] = {{{{nullptr}}}};
706 
708  TH2F* h2c_timeFSLP_end[2][4][14][2] = {{{{nullptr}}}};
709 
710  /* Histograms of time distribution of each channel before calibration. */
711 
713  TH1F* h_timeFSLPC_tc[2][8][15][2][54] = {{{{{nullptr}}}}};
714 
716  TH1F* h_timeFSLPC[2][8][15][2][54] = {{{{{nullptr}}}}};
717 
719  TH2F* m_HistTimeLengthBKLM[2][8][15][2][54] = {{{{{nullptr}}}}};
720 
722  TH1F* h_timeFSLPC_tc_end[2][4][14][2][75] = {{{{{nullptr}}}}};
723 
725  TH1F* h_timeFSLPC_end[2][4][14][2][75] = {{{{{nullptr}}}}};
726 
728  TH2F* m_HistTimeLengthEKLM[2][4][14][2][75] = {{{{{nullptr}}}}};
729 
730  /* Histograms of time distribution of each channel after calibration. */
731 
733  TH1F* hc_timeFSLPC[2][8][15][2][54] = {{{{{nullptr}}}}};
734 
736  TH1F* hc_timeFSLPC_end[2][4][14][2][75] = {{{{{nullptr}}}}};
737 
738  /* Formulas used for fitting. */
739 
741  TF1* fcn_pol1 = nullptr;
742 
744  TF1* fcn_const = nullptr;
745 
747  TF1* fcn_gaus = nullptr;
748 
750  TF1* fcn_land = nullptr;
751 
753  TFile* m_outFile = nullptr;
754 
755  };
756 
758 }
759 
Base class for calibration algorithms.
EResult
The result of calibration.
EKLM geometry data.
Definition: GeometryData.h:38
KLM channel index.
KLM element numbers.
KLM time calibration algorithm.
TProfile * m_Profile2EKLMScintillatorPlane2
For EKLM scintillator plane2.
double mc_etime_channelAvg_rpc
Calibrated central value error of the global time distribution (BKLM RPC part).
TH2F * m_HistTimeLengthEKLM[2][4][14][2][75]
Two-dimensional distributions of time versus propagation length.
TH1F * h_timeFSLPC_tc[2][8][15][2][54]
BKLM part, used for effective light speed estimation.
TH2F * h2c_timeF_scint_end[2]
EKLM part.
TH1F * h_timeFSLPC_tc_end[2][4][14][2][75]
EKLM part, used for effective light speed estimation.
KLMTimeResolution * m_timeResolution
DBObject of time resolution.
TH1F * h_time_scint_tc_end
EKLM part.
void createHistograms()
Create histograms.
TGraphErrors * gre_time_channel_scint
BKLM Scintillator.
double m_LowerTimeBoundaryCalibratedScintilltorsEKLM
Lower time boundary for EKLM scintillators (calibrated data).
double m_LowerTimeBoundaryScintilltorsEKLM
Lower time boundary for EKLM scintillators.
TH1F * h_timeFSL[2][8][15]
BKLM part.
TH1F * hc_timeFSLPC_end[2][4][14][2][75]
EKLM part.
TH1F * hc_timeFSL_end[2][4][14]
EKLM part.
TH1F * h_timeFSLP_end[2][4][14][2]
EKLM part.
TGraph * gr_timeRes_channel_rpc
BKLM RPC.
TH1F * hc_timeFSLP_end[2][4][14][2]
EKLM part.
TH1F * h_timeFSLP[2][8][15][2]
BKLM part.
TH1F * hc_timeF_scint_end[2]
EKLM part.
std::map< KLMChannelNumber, double > m_timeShift
Shift values of each channel.
TH1F * h_time_scint
BKLM scintillator part.
double m_time_channelAvg_scint
Central value of the global time distribution (BKLM scintillator part).
TH1F * hc_timeFS_scint_end[2][4]
EKLM part.
double esti_timeRes(const KLMChannelIndex &klmChannel)
Estimate value of calibration constant for calibrated channels.
double m_UpperTimeBoundaryCalibratedRPC
Upper time boundary for RPC (calibrated data).
double m_ctime_channelAvg_rpc
Calibrated central value of the global time distribution (BKLM RPC part).
KLMTimeConstants * m_timeConstants
DBObject of time cost on some parts of the detector.
void setupDatabase()
Setup the database.
double m_LowerTimeBoundaryCalibratedScintilltorsBKLM
Lower time boundary for BKLM scintillators (calibrated data).
void setMinimalDigitNumber(int minimalDigitNumber)
Set minimal digit number (total).
double m_UpperTimeBoundaryCalibratedScintilltorsBKLM
Upper time boundary for BKLM scintillators (calibrated data).
TH1F * hc_timeFS_scint[2][8]
BKLM scintillator part.
std::map< KLMChannelNumber, double > m_time_channel
Time distribution central value of each channel.
double m_ctime_channelAvg_scint_end
Calibrated central value of the global time distribution (EKLM scintillator part).
CalibrationAlgorithm::EResult readCalibrationData()
Read calibration data.
TGraph * gr_timeShift_channel_scint_end
EKLM.
TGraph * gr_timeRes_channel_scint
BKLM scintillator.
TH1F * hc_timeF_scint[2]
BKLM scintillator part.
TH1F * h_timeFS_scint[2][8]
BKLM scintillator part.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
std::pair< int, double > tR_upperStrip(const KLMChannelIndex &klmChannel)
Tracing avaiable channels with increasing strip number.
TH1F * hc_timeF_rpc[2]
BKLM RPC part.
TH2F * h2c_timeFS_end[2][4]
EKLM part.
TH1F * h_timeFSLPC_end[2][4][14][2][75]
EKLM part.
const EKLM::GeometryData * m_EKLMGeometry
EKLM geometry data.
TGraphErrors * gre_ctime_channel_scint_end
EKLM.
TProfile * m_Profile2BKLMScintillatorPhi
For BKLM scintillator phi plane.
TH1F * hc_time_scint_end
EKLM part.
TGraphErrors * gre_time_channel_scint_end
EKLM.
TH2F * h2_timeFSLP[2][8][15][2]
BKLM part.
TGraph * gr_timeShift_channel_scint
BKLM scintillator.
double m_time_channelAvg_scint_end
Central value of the global time distribution (EKLM scintillator part).
TProfile * m_Profile2EKLMScintillatorPlane1
For EKLM scintillator plane1.
TH1F * hc_timeFS_rpc[2][8]
BKLM RPC part.
void fillTimeDistanceProfiles(TProfile *profileRpcPhi, TProfile *profileRpcZ, TProfile *profileBKLMScintillatorPhi, TProfile *profileBKLMScintillatorZ, TProfile *profileEKLMScintillatorPlane1, TProfile *profileEKLMScintillatorPlane2, bool fill2dHistograms)
Fill profiles of time versus distance.
TFile * m_outFile
Output file.
double esti_timeShift(const KLMChannelIndex &klmChannel)
Estimate value of calibration constant for uncalibrated channels.
std::pair< int, double > tS_upperStrip(const KLMChannelIndex &klmChannel)
Tracing avaiable channels with increasing strip number.
TH1F * hc_timeFSLP[2][8][15][2]
BKLM part.
TGraphErrors * gre_ctime_channel_rpc
BKLM RPC.
void saveHist()
Save histograms to file.
const bklm::GeometryPar * m_BKLMGeometry
BKLM geometry data.
TH2F * h2c_timeFSLP[2][8][15][2]
BKLM part.
double m_ctime_channelAvg_scint
Calibrated central value of the global time distribution (BKLM scintillator part).
TF1 * fcn_const
Const function.
TProfile * m_Profile2RpcZ
For BKLM RPC z plane.
TH1F * h_timeFSLPC[2][8][15][2][54]
BKLM part.
void setDebug()
Turn on debug mode (prints histograms and output running log).
TH2F * m_HistTimeLengthBKLM[2][8][15][2][54]
Two-dimensional distributions of time versus propagation length.
TH2F * h2_timeFSLP_end[2][4][14][2]
EKLM part.
TH1I * hc_calibrated
Calibration statistics for each channel.
void timeDistance2dFit(const std::vector< std::pair< KLMChannelNumber, unsigned int > > &channels, double &delay, double &delayError)
Two-dimensional fit for individual channels.
TGraph * gr_timeRes_channel_scint_end
EKLM.
TH1I * h_calibrated
Calibration statistics for each channel.
TProfile * m_ProfileBKLMScintillatorZ
For BKLM scintillator z plane.
TH1F * h_time_rpc_tc
BKLM RPC part.
TH1F * h_time_scint_end
EKLM part.
TH2F * h2c_timeF_scint[2]
BKLM scintillator part.
TF1 * fcn_pol1
Pol1 function.
double m_etime_channelAvg_scint_end
Central value error of the global time distribution (EKLM scintillator part).
TH1F * hc_time_rpc
BKLM RPC part.
double mc_etime_channelAvg_scint
Calibrated central value error of the global time distribution (BKLM scintillator part).
TH2F * h2c_timeFSLP_end[2][4][14][2]
EKLM part.
double mc_etime_channelAvg_scint_end
Calibrated central value error of the global time distribution (EKLM scintillator part).
TH2F * h2_timeF_scint_end[2]
EKLM part.
void useEvtT0()
Use event T0 as the initial time point or not.
double m_UpperTimeBoundaryScintilltorsBKLM
Upper time boundary for BKLM scintillators.
TF1 * fcn_gaus
Gaussian function.
TH1F * h_timeF_rpc[2]
BKLM RPC part.
TProfile * m_ProfileBKLMScintillatorPhi
For BKLM scintillator phi plane.
TH1F * hc_time_scint
BKLM scintillator part.
TH2F * h2_timeFS[2][8]
BKLM part.
double m_etime_channelAvg_scint
Central value error of the global time distribution (BKLM scintillator part).
double m_UpperTimeBoundaryCalibratedScintilltorsEKLM
Upper time boundary for BKLM scintillators (calibrated data).
TH1F * h_timeF_scint_end[2]
EKLM part.
TProfile * m_ProfileRpcPhi
For BKLM RPC phi plane.
TGraphErrors * gre_ctime_channel_scint
BKLM Scintillator.
TProfile * m_ProfileEKLMScintillatorPlane2
For EKLM scintillator plane2.
TH1F * h_time_rpc
BKLM RPC part.
TH1F * h_timeFSL_end[2][4][14]
EKLM part.
TProfile * m_Profile2RpcPhi
For BKLM RPC phi plane.
TH1F * h_timeF_scint[2]
BKLM scintillator part.
TH1F * hc_timeFSL[2][8][15]
BKLM part.
TProfile * m_Profile2BKLMScintillatorZ
For BKLM scintillator z plane.
TH1F * h_timeFS_rpc[2][8]
BKLM RPC part.
KLMChannelIndex m_klmChannels
KLM ChannelIndex object.
TGraph * gr_timeShift_channel_rpc
BKLM RPC.
std::map< KLMChannelNumber, double > m_timeRes
Resolution values of each channel.
TH1F * h_diff
Distance between global and local position.
TH2F * h2_timeF_scint[2]
BKLM scintillator part.
TH1F * h_time_scint_tc
BKLM scintillator part.
double m_LowerTimeBoundaryRPC
Lower time boundary for RPC.
virtual EResult calibrate() override
Run algorithm on data.
std::map< KLMChannelNumber, double > m_ctime_channel
Calibrated time distribution central value of each channel.
double m_LowerTimeBoundaryCalibratedRPC
Lower time boundary for RPC (calibrated data).
bool m_useEventT0
Whether to use event T0 from CDC.
int m_MinimalDigitNumber
Minimal digit number (total).
void setLowerLimit(int counts)
Set the lower number of hits collected on one sigle strip.
ChannelCalibrationStatus
Channel calibration status.
TProfile * m_ProfileEKLMScintillatorPlane1
For EKLM scintillator plane1.
double m_UpperTimeBoundaryRPC
Upper time boundary for RPC.
TH2F * h2c_timeF_rpc[2]
BKLM RPC part.
TF1 * fcn_land
Landau function.
KLMTimeCableDelay * m_timeCableDelay
DBObject of the calibration constant of each channel due to cable decay.
std::pair< int, double > tS_lowerStrip(const KLMChannelIndex &klmChannel)
Tracing avaiable channels with decreasing strip number.
TProfile * m_ProfileRpcZ
For BKLM RPC z plane.
std::map< KLMChannelNumber, double > mc_etime_channel
Calibrated time distribution central value Error of each channel.
std::pair< int, double > tR_lowerStrip(const KLMChannelIndex &klmChannel)
Tracing avaiable channels with decreasing strip number.
void setMC(bool mc)
Set flag indicating whether the input is MC sample.
double m_LowerTimeBoundaryScintilltorsBKLM
Lower time boundary for BKLM scintillators.
TH1F * hc_timeFSLPC[2][8][15][2][54]
BKLM part.
ROOT::Math::MinimizerOptions m_minimizerOptions
Minimization options.
std::map< KLMChannelNumber, int > m_cFlag
Calibration flag if the channel has enough hits collected and fitted OK.
TGraphErrors * gre_time_channel_rpc
BKLM RPC.
TH2F * h2_timeFS_end[2][4]
EKLM part.
TH2F * h2_timeF_rpc[2]
BKLM RPC part.
std::map< KLMChannelNumber, std::vector< struct Event > > m_evts
Container of hit information.
TH1F * h_timeFS_scint_end[2][4]
EKLM part.
double m_time_channelAvg_rpc
Central value of the global time distribution (BKLM RPC part).
TH2F * h2c_timeFS[2][8]
BKLM part.
double m_etime_channelAvg_rpc
Central value error of the global time distribution (BKLM RPC part).
std::map< KLMChannelNumber, double > m_etime_channel
Time distribution central value Error of each channel.
double m_UpperTimeBoundaryScintilltorsEKLM
Upper time boundary for BKLM scintillators.
int m_lower_limit_counts
Lower limit of hits collected for on single channel.
Class to store BKLM delay time coused by cable in the database.
Class to store KLM constants related to time.
Class to store KLM time resolution in the database.
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
Definition: GeometryPar.h:37
Abstract base class for different kinds of events.
double flyTime
Particle flying time.
double diffDistX
Global position difference between klmHit2d and ExtHit (X).
double t0
EventT0 for the digit.
int channelId
Unique channel id Barral and endcap merged.
double time()
Get propagation time + cableDelay time.
bool inRPC
BKLM RPC flag, used for testing and not necessary.
double eDep
Collect energy eV.
double diffDistY
Global position difference between klmHit2d and ExtHit (Y).
double diffDistZ
Global position difference between klmHit2d and ExtHit (Z).
double dist
Propagation distance from hit to FEE.
double nPE
Number of photon electron.
double recTime
Recosntruction time respected to the trigger time.
bool isFlipped
If phi and z plane flipped, used for testing and not necessary.