Belle II Software  release-08-01-10
T0Correction.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 #include <TH1F.h>
11 #include "string"
12 namespace Belle2 {
17  namespace CDC {
21  class T0Correction {
22  public:
24  T0Correction();
26  virtual ~T0Correction() {}
28  virtual void setDebug(bool debug = false) {m_debug = debug; }
30  virtual void setUseDB(bool useDB = false) {m_useDB = useDB; }
32  virtual void storeHisto(bool storeHist = false) {m_storeHisto = storeHist;}
34  void setMinimumNDF(double minndf) {m_ndfmin = minndf;}
36  void setMinimumPval(double minPval) {m_Pvalmin = minPval;}
38  void inputFileNames(std::string inputname) {m_inputRootFileName.assign(inputname);}
40  void outputFileName(std::string outputname) {m_outputT0FileName.assign(outputname);}
42  void execute()
43  {
44  calibrate();
45  }
46 
47  protected:
49  virtual bool calibrate();
51  virtual void CreateHisto();
53  virtual void Write();
54  private:
55  TH1F* m_hTotal;
56  TH1F* m_h1[56][385];
57  TH1F* m_hT0b[300];
58  double m_xmin = 0.07;
59  double m_ndfmin = 5;
60  double m_Pvalmin = 0.;
61  //double t0[56][385] = {{0.}}; /**< t0 */
62  double dt[56][385] = {{0.}};
63  double err_dt[56][385] = {{0.}};
64  double dtb[300] = {0.};
65  double err_dtb[300] = {0.};
67  bool m_debug;
68  bool m_storeHisto;
69  bool m_useDB;
70  std::string m_outputT0FileName = "t0_new.dat";
71  std::string m_inputRootFileName = "rootfile/output*";
73  int m_firstRun;
75  int m_lastRun;
76  };
77  }// name space CDC
79 } // namespace Belle2
80 
Class for T0 Correction .
Definition: T0Correction.h:21
void setMinimumNDF(double minndf)
minimum ndf require for track.
Definition: T0Correction.h:34
void setMinimumPval(double minPval)
minimum pvalue requirement.
Definition: T0Correction.h:36
double m_xmin
minimum drift length
Definition: T0Correction.h:58
std::string m_outputT0FileName
output t0 file name for text file
Definition: T0Correction.h:70
double dtb[300]
dt of each board
Definition: T0Correction.h:64
std::string m_inputRootFileName
input file names
Definition: T0Correction.h:71
TH1F * m_hTotal
1D histogram of delta T whole channel
Definition: T0Correction.h:55
double dt[56][385]
dt of each channel
Definition: T0Correction.h:62
bool m_storeHisto
store histo or not
Definition: T0Correction.h:68
double m_ndfmin
minimum ndf required
Definition: T0Correction.h:59
void execute()
run t0 correction.
Definition: T0Correction.h:42
T0Correction()
Constructor.
Definition: T0Correction.cc:28
int m_lastExperiment
Last experiment.
Definition: T0Correction.h:74
virtual void Write()
write outut or store db
virtual void setUseDB(bool useDB=false)
use DB or text mode.
Definition: T0Correction.h:30
virtual ~T0Correction()
Destructor.
Definition: T0Correction.h:26
virtual void storeHisto(bool storeHist=false)
store Hisotgram or not.
Definition: T0Correction.h:32
virtual bool calibrate()
Run algo on data.
virtual void CreateHisto()
create histo for each channel
Definition: T0Correction.cc:44
TH1F * m_h1[56][385]
1D histogram for each channel
Definition: T0Correction.h:56
double err_dt[56][385]
error of dt of each channel
Definition: T0Correction.h:63
int m_firstExperiment
First experiment.
Definition: T0Correction.h:72
int m_firstRun
First run.
Definition: T0Correction.h:73
TH1F * m_hT0b[300]
1D histogram for each board
Definition: T0Correction.h:57
double m_Pvalmin
minimum pvalue required
Definition: T0Correction.h:60
virtual void setDebug(bool debug=false)
turn on/off debug.
Definition: T0Correction.h:28
void outputFileName(std::string outputname)
output xt T0 file name (for text mode)
Definition: T0Correction.h:40
bool m_useDB
use DB or text mode
Definition: T0Correction.h:69
void inputFileNames(std::string inputname)
input root file name.
Definition: T0Correction.h:38
double err_dtb[300]
error of dt of board
Definition: T0Correction.h:65
Abstract base class for different kinds of events.