 |
Belle II Software
release-05-02-19
|
3 #include <TGraphErrors.h>
5 #include <framework/database/DBObjPtr.h>
6 #include <cdc/dbobjects/CDCSpaceResols.h>
84 static const unsigned short Max_np = 40;
99 TGraphErrors*
gfit[56][2][18][7];
100 TGraphErrors*
gr[56][2][18][7];
151 int N = graph->GetN();
152 int Nstart = floor(0.5 * (N - unCount));
153 int Nend = N - unCount;
154 for (
int i = Nstart; i < Nend; ++i) {
155 graph->GetPoint(i, x, y);
156 if (graph->GetErrorY(i) > 0.06E-3)
continue;
162 if (imax <= Nstart) {
163 graph->GetPoint(Nend, x, y);
TH2F * hist_u[56][2][Max_nalpha][Max_ntheta]
2D histogram of unbiased residual
void execute()
execute all, make the interface the same as CAF
static const unsigned short Max_np
Maximum number of point =1/binwidth.
bool m_useDB
use db or text mode
virtual void createHisto()
create histogram
virtual void inputFileNames(std::string inputname)
Input root file names, results of collector module.
bool m_debug
Debug or not.
double itheta[7]
represented alphas of theta bins.
int m_lastExperiment
Last experiment.
bool m_storeHisto
Store histogram or not.
bool m_useProfileFromInputSigma
Use binning from old sigma or new one form input.
TH1F * hb_m[56][2][Max_nalpha][Max_ntheta]
mean histogram of unbiased residual
TH1F * hu_s[56][2][Max_nalpha][Max_ntheta]
sigma histogram of biased residual
virtual void write()
save calibration, in text file or db
TH2F * hist_b[56][2][Max_nalpha][Max_ntheta]
2D histogram of biased residual
double l_theta_old[7]
Lower boundays of theta bins from input.
virtual void setDebug(bool debug=false)
Debug or not.
double m_ndfmin
Minimum NDF
static const int Max_nalpha
Maximum alpha bin.
bool m_BField
Work with BField, fit range and initial parameters is different incase B and noB.
double sigma_new[56][2][18][7][8]
new sigma prameters.
virtual void ProfileFileNames(std::string profileFileName)
File name describe theta/alpha bin, if don't want to use default from input sigma.
int ntheta_old
number of theta bins from input
int m_fitflag[56][2][Max_nalpha][Max_ntheta]
Fit flag; 1:OK ; 0:error.
int nalpha_old
number of alpha bins from input
double u_alpha_old[18]
Upper boundays of alpha bins from input.
virtual void readProfile()
read sigma bining (alpha, theta bining)
virtual void BField(bool bfield)
Work with B field or not;.
double l_alpha_old[18]
Lower boundays of alpha bins from input.
virtual void setMinimumPval(double minPval)
Minimum Pval required.
std::string m_outputSigmaFileName
Output sigma file name.
virtual void setSigmaFileName(std::string name)
Output sigma file name, for text mode.
TH1F * hu_m[56][2][Max_nalpha][Max_ntheta]
mean histogram biased residual
double l_theta[7]
Lower boundays of theta bins.
double l_alpha[18]
Lower boundays of alpha bins.
Class for accessing objects in the database.
Class for Space resolution calibration.
DBObjPtr< CDCSpaceResols > * m_sResolFromDB
Database for sigma.
TF1 * ffit[56][2][18][7]
fitting function
virtual void storeHisto()
store histogram
TGraphErrors * gr[56][2][18][7]
sigma graph.
double itheta_old[7]
represented alphas of theta bins from input.
SpaceResolutionCalibration()
Constructor.
double u_theta_old[7]
Upper boundays of theta bins from input.
double sigma_old[56][2][18][7][8]
old sigma prameters.
virtual void useProfileFromInputSigma(bool useProfileFromInputSigma)
use sigma bin profile form input sigma or new one from input file
std::string m_inputRootFileNames
Input root file names.
TGraphErrors * gfit[56][2][18][7]
sigma*sigma graph for fit
Abstract base class for different kinds of events.
virtual void setMinimumNDF(double minndf)
minimum NDF required for track
virtual void setUseDB(bool useDB=false)
Use database or text mode.
double u_theta[7]
Upper boundays of theta bins.
double ialpha_old[18]
represented alphas of alpha bins from input.
int m_firstExperiment
First experiment.
int m_ntheta
number of theta bins
double m_binWidth
width of each bin, unit cm
std::string m_ProfileFileName
Profile file name.
static const int Max_ntheta
maximum theta bin
virtual void readSigma()
read sigma from previous calibration, (input sigma)
std::string m_sigmafile
Sigma file name, for text mode.
double m_Pvalmin
Minimum Prob(chi2) of track.
double ialpha[18]
represented alphas of alpha bins.
virtual ~SpaceResolutionCalibration()
Destructor.
virtual bool calibrate()
Run algo on data.
virtual void setStoreHisto(bool storeHist=false)
Store histograms durring the calibration or not.
unsigned short m_sigmaParamMode
sigma mode for this calibration.
unsigned short m_sigmaParamMode_old
sigma mode from input.
virtual void readSigmaFromDB()
read sigma from DB
TH1F * hb_s[56][2][Max_nalpha][Max_ntheta]
sigma histogram of ubiased residual
int m_nalpha
number of alpha bins
virtual void readSigmaFromText()
read sigma from text file
double getUpperBoundaryForFit(TGraphErrors *graph)
search max point at boundary region
bool m_draw
print out histogram in pdf file or not
double u_alpha[18]
Upper boundays of alpha bins.
virtual void setBinWidth(double bw)
Bin width of each slide.