10#include <calibration/CalibrationAlgorithm.h>
11#include <cdc/dbobjects/CDCGeometry.h>
12#include <framework/database/DBObjPtr.h>
67 B2FATAL(
"Mode hasn't implemented yet");
Class for Time walk calibration.
std::string m_inputT0FileName
Old t0 file name.
double m_xmin
minimum value cut of drift length.
void prepare()
prepare calibration.
std::string m_outputT0FileName
t0 file name after calibration.
TH2D * m_h2[300]
2D histogram of residual vs ADC for each board.
unsigned short m_twParamMode
=0 for P0/Sqrt(ADC); =1 for P0*Exp(-P1*ADC).
void storeHist()
Store histograms.
std::string m_inputTWFileName
Old tw file name.
void setStoreHisto(bool storeHist)
Store Histogram or not.
std::string m_histName
root file name
double m_constTerm[300]
const term in fitting, it will be added to T0 instead tw
void setMode(unsigned short mode)
Set time walk mode.
bool m_storeHisto
Store all Histogram or not.
~TimeWalkCalibrationAlgorithm()
Destructor.
TimeWalkCalibrationAlgorithm()
Constructor.
double m_minNdf
minimum number of degree of freedom required for track.
unsigned short m_flag[300]
flag for fit status
void createHisto()
Create histo for calibrate.
void setMinimumPval(double pval)
minimum chi2 prob requirement for track
bool m_debug
run debug or not.
double m_minPval
minimum number of Prob(chi2) of fitted track.
void updateT0()
update constant term to t0 database.
std::vector< float > m_tw_old[300]
tw list before calibration.
void setMinimumNDF(double ndf)
minimum number of degree freedom requirement for track
void setDebug(bool debug)
change flag for debug
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
void enableTextOutput(bool output=true)
Enable text output of calibration result.
std::string m_outputTWFileName
tw file name after calibration.
std::vector< float > m_tw_new[300]
tw list after calibration.
void setHistFileName(const std::string &name)
Set name for histogram output.
void write()
save calibration.
unsigned short m_nTwParams
No.
void fitToExponentialFunc(TH1D *h1)
fit tw histogram
void outputTWFileName(std::string tw_out_name)
output tw file name, for text mode
bool m_textOutput
output text file if true
EResult calibrate() override
Run algo on data.
EResult checkConvergence()
check convergence.
TH1D * m_h1[300]
Mean of residual as function of ADC of each board.
void outputT0FileName(std::string t0_out_name)
output t0 file name, for text mode
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Abstract base class for different kinds of events.