Belle II Software prerelease-10-00-00a
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"
12namespace Belle2 {
17 namespace CDC {
22 public:
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.};
66
67 bool m_debug;
69 bool m_useDB;
70 std::string m_outputT0FileName = "t0_new.dat";
71 std::string m_inputRootFileName = "rootfile/output*";
76 };
77 }// name space CDC
79} // namespace Belle2
80
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.