Belle II Software development
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
11#include <TH1F.h>
12
13#include <string>
14
15namespace Belle2 {
20 namespace CDC {
25 public:
29 virtual ~T0Correction() {}
31 virtual void setDebug(bool debug = false) {m_debug = debug; }
33 virtual void setUseDB(bool useDB = false) {m_useDB = useDB; }
35 virtual void storeHisto(bool storeHist = false) {m_storeHisto = storeHist;}
37 void setMinimumNDF(double minndf) {m_ndfmin = minndf;}
39 void setMinimumPval(double minPval) {m_Pvalmin = minPval;}
41 void inputFileNames(std::string inputname) {m_inputRootFileName.assign(inputname);}
43 void outputFileName(std::string outputname) {m_outputT0FileName.assign(outputname);}
45 void execute()
46 {
47 calibrate();
48 }
49
50 protected:
52 virtual bool calibrate();
54 virtual void CreateHisto();
56 virtual void Write();
57 private:
58 TH1F* m_hTotal;
59 TH1F* m_h1[56][385];
60 TH1F* m_hT0b[300];
61 double m_xmin = 0.07;
62 double m_ndfmin = 5;
63 double m_Pvalmin = 0.;
64 //double t0[56][385] = {{0.}}; /**< t0 */
65 double dt[56][385] = {{0.}};
66 double err_dt[56][385] = {{0.}};
67 double dtb[300] = {0.};
68 double err_dtb[300] = {0.};
69
70 bool m_debug;
72 bool m_useDB;
73 std::string m_outputT0FileName = "t0_new.dat";
74 std::string m_inputRootFileName = "rootfile/output*";
79 };
80 }// name space CDC
82} // namespace Belle2
83
void setMinimumNDF(double minndf)
minimum ndf require for track.
void setMinimumPval(double minPval)
minimum pvalue requirement.
double m_xmin
minimum drift length
std::string m_outputT0FileName
output t0 file name for text file
double dtb[300]
dt of each board
std::string m_inputRootFileName
input file names
TH1F * m_hTotal
1D histogram of delta T whole channel
double dt[56][385]
dt of each channel
bool m_storeHisto
store histo or not
double m_ndfmin
minimum ndf required
void execute()
run t0 correction.
int m_lastExperiment
Last experiment.
virtual void Write()
write output or store db
virtual void setUseDB(bool useDB=false)
use DB or text mode.
virtual ~T0Correction()
Destructor.
virtual void storeHisto(bool storeHist=false)
store Hisotgram or not.
virtual bool calibrate()
Run algo on data.
virtual void CreateHisto()
create histo for each channel
TH1F * m_h1[56][385]
1D histogram for each channel
double err_dt[56][385]
error of dt of each channel
int m_firstExperiment
First experiment.
TH1F * m_hT0b[300]
1D histogram for each board
double m_Pvalmin
minimum pvalue required
virtual void setDebug(bool debug=false)
turn on/off debug.
void outputFileName(std::string outputname)
output xt T0 file name (for text mode)
bool m_useDB
use DB or text mode
void inputFileNames(std::string inputname)
input root file name.
double err_dtb[300]
error of dt of board
Abstract base class for different kinds of events.