Belle II Software  release-08-01-10
XTCalibration Class Reference

Class to perform xt calibration for drift chamber. More...

#include <XTCalibration.h>

Collaboration diagram for XTCalibration:

Public Member Functions

 XTCalibration ()
 Constructor.
 
virtual ~XTCalibration ()
 Destructor.
 
virtual void BField (bool bfield)
 set to use BField
 
virtual void setDebug (bool debug=false)
 Run in debug or silent.
 
virtual void setUseDB (bool useDB=false)
 Set to run with database mode or text mode.
 
virtual void setMinimumNDF (double minndf)
 set minimum number of degree of freedom requirement
 
virtual void setMinimumPval (double minPval)
 set minimum Prob(Chi2) requirement
 
virtual void inputFileNames (std::string inputname)
 Input root file name, output of collector.
 
virtual void profileFileNames (std::string profileFileName)
 Profile file name incase you want to change the xt binning.
 
virtual void useProfileFromInputXT (bool useProfileXTFromInputXT)
 if you want to change xt bining, you have to set this to true
 
virtual void setXTFileName (std::string name)
 input xt file name incase text mode is used.
 
virtual void setMode (unsigned short mode=1)
 set xt mode, 0 is polynimial, 1 is Chebshev polynomial
 
virtual void setStoreHisto (bool storeHist=false)
 set to store histogram or not.
 
void setLRSeparate (bool lr=true)
 Set LR separate mode (default is true).
 
void execute ()
 Run calibration.
 

Protected Member Functions

virtual bool calibrate ()
 Run algo on data.
 
virtual void readXTFromDB ()
 Read old xt parameter from database.
 
virtual void readXTFromText ()
 Read old xt parameter from text file, incase text mode is used.
 
virtual void CreateHisto ()
 Create histogram for calibration.
 
virtual void readProfile ()
 Read profile xt file.
 
virtual void readXT ()
 read xt paramter (wrap text mode and database mode) More...
 
virtual void Write ()
 Store calibrated constand.
 
virtual void storeHisto ()
 Store histogram to file.
 

Private Attributes

double m_ndfmin = 5
 minimum ndf required
 
double m_Pvalmin = 0.
 minimum pvalue required
 
bool m_debug = false
 run in debug or silent
 
bool m_storeHisto = false
 Store histogram or not.
 
bool m_useDB = false
 Use Database or text mode.
 
bool m_useProfileXTFromInputXT = true
 use profile from text file or default in input xt
 
bool m_LRseparate = true
 Separate LR in calibration or mix.
 
bool m_useSliceFit = false
 Use slice fit or profile.
 
bool m_BField = true
 with b field or none
 
double xtold [56][2][18][7][8]
 Old paremeter.
 
int fitflag [56][2][20][10]
 Fit flag.
 
TF1 * xtf5r [56][2][20][10]
 XTFunction.
 
TProfile * hprof [56][2][20][10]
 Profile xt histo.
 
TH2D * hist2d [56][2][20][10]
 2D histo of xt
 
TH2D * hist2d_draw [56][20][10]
 2d histo for draw
 
TH1D * hist2d_1 [56][2][20][10]
 1D xt histo, results of slice fit
 
std::string m_OutputXTFileName = "xt_new.dat"
 Out put xt filename.
 
std::string m_inputRootFileNames = "rootfile/output*"
 input root filename
 
std::string m_profileFileName = "xt_profile"
 profile file name
 
std::string m_xtfile = "cdc/data/xt.dat"
 Input xt file name, incase text mode.
 
int m_nalpha
 number of alpha bins
 
int m_ntheta
 number of theta bins
 
double l_alpha [18]
 Lower boundays of alpha bins.
 
double u_alpha [18]
 Upper boundays of alpha bins.
 
double ialpha [18]
 represented alphas of alpha bins.
 
double l_theta [7]
 Lower boundays of theta bins.
 
double u_theta [7]
 Upper boundays of theta bins.
 
double itheta [7]
 represented alphas of theta bins.
 
int nalpha_old
 number of alpha bins from input
 
int ntheta_old
 number of theta bins from input
 
double l_alpha_old [18]
 Lower boundays of alpha bins from input.
 
double u_alpha_old [18]
 Upper boundays of alpha bins from input.
 
double ialpha_old [18]
 represented alphas of alpha bins from input.
 
double l_theta_old [7]
 Lower boundays of theta bins from input.
 
double u_theta_old [7]
 Upper boundays of theta bins from input.
 
double itheta_old [7]
 represented alphas of theta bins from input.
 
unsigned short xtmode_old
 XT mode old, 0-polynomial, 1 Cheb.
 
int m_MAXalpha = 18
 max alpha bin
 
int m_MAXtheta = 7
 max theta bin
 
unsigned short m_xtmode = 1
 Mode of xt; 0 is polynomial;1 is Chebyshev.
 
int m_smallestEntryRequire = 1000
 minimum number of hit per hitosgram.
 
double m_par6 [56]
 boundary parameter for fitting, semi-experiment number More...
 

Detailed Description

Class to perform xt calibration for drift chamber.

Definition at line 21 of file XTCalibration.h.

Member Function Documentation

◆ readXT()

void readXT ( )
protectedvirtual

read xt paramter (wrap text mode and database mode)

B2FATAL("Error reading xt from DB");return;}

Definition at line 409 of file XTCalibration.cc.

410 {
411  if (m_useDB) {
412  B2INFO("reading xt from DB");
413 
414  /*
415  ReadXT:readXTFromDB(&xtold,dbXT_old,
416  &nalpha_old,l_alpha_old,u_alpha_old,ialpha_old,
417  &ntheta_old,l_theta_old,u_theta_old, itheta_old);
418  */
419  readXTFromDB();
420  B2INFO("Number of theta bin from xt: " << ntheta_old);
421  B2INFO("Theta 0: " << itheta_old[0]);
422  // if(!a){
424  } else {
425  B2INFO("Read Xt from text");
426  /*
427  ReadXT::readXTFromText(xtold,m_xtfile,
428  nalpha_old,l_alpha_old,u_alpha_old,ialpha_old,
429  ntheta_old,l_theta_old,u_theta_old, itheta_old);
430  */
431  readXTFromText();
432  B2INFO("nalpha: " << nalpha_old);
433  // if(!a)
434  // {B2FATAL("Error reading xt from text");return;}
435  }
436 }
virtual void readXTFromText()
Read old xt parameter from text file, incase text mode is used.
virtual void readXTFromDB()
Read old xt parameter from database.
int nalpha_old
number of alpha bins from input
double itheta_old[7]
represented alphas of theta bins from input.
int ntheta_old
number of theta bins from input
bool m_useDB
Use Database or text mode.
Definition: XTCalibration.h:82

Member Data Documentation

◆ m_par6

double m_par6[56]
private
Initial value:
= {89, 91, 94, 99, 104, 107, 110, 117,
126, 144, 150, 157, 170, 180,
160, 167, 183, 205, 200, 194,
177, 189, 192, 206, 224, 234,
193, 206, 209, 215, 222, 239,
204, 212, 217, 227, 235, 240,
215, 222, 230, 239, 246, 253,
227, 232, 239, 243, 253, 258,
231, 243, 246, 256, 263, 300
}

boundary parameter for fitting, semi-experiment number

Definition at line 144 of file XTCalibration.h.


The documentation for this class was generated from the following files: