 |
Belle II Software
release-05-02-19
|
15 #include <TGraphErrors.h>
16 #include <calibration/CalibrationAlgorithm.h>
17 #include <cdc/dbobjects/CDCGeometry.h>
18 #include <framework/database/DBObjPtr.h>
30 class SpaceResolutionCalibrationAlgorithm :
public CalibrationAlgorithm {
90 int N = graph->GetN();
91 int Nstart = floor(0.5 * (N - unCount));
92 int Nend = N - unCount;
93 for (
int i = Nstart; i < Nend; ++i) {
94 graph->GetPoint(i, x, y);
95 if (graph->GetErrorY(i) > 0.06E-3)
continue;
101 if (imax <= Nstart) {
102 graph->GetPoint(Nend, x, y);
111 static const unsigned short Max_np = 40;
120 double m_sigma[56][2][18][7][8];
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
double m_sigmaPost[56][2][18][7][8]
sigma prameters before calibration
double getUpperBoundaryForFit(TGraphErrors *graph)
search max point at boundary region
static const int Max_nalpha
Maximum alpha bin.
float m_iAlpha[18]
represented alphas of alpha bins.
double m_threshold
minimal requirement for the fraction of fitted results
void createHisto()
create histogram
unsigned short m_sigmaParamMode
sigma mode for this calibration.
void enableTextOutput(bool output=true)
Enable text output of calibration result.
void setDebug(bool debug=false)
Set Debug mode.
SpaceResolutionCalibrationAlgorithm()
Constructor.
TH2F * m_hUnbiased[56][2][Max_nalpha][Max_ntheta]
2D histogram of unbiased residual
~SpaceResolutionCalibrationAlgorithm()
Destructor.
static const int Max_ntheta
maximum theta bin
double m_sigma[56][2][18][7][8]
new sigma prameters.
void setStoreHisto(bool storeHist=false)
Store histograms durring the calibration or not.
double m_minNdf
Minimum NDF
void setThreshold(double th=0.6)
Set threshold for the fraction of fitted results.
bool m_storeHisto
Store histogram or not.
TH1F * m_hSigmaBiased[56][2][Max_nalpha][Max_ntheta]
sigma histogram of biased residual
Class for accessing objects in the database.
int m_nThetaBins
number of theta bins
EResult calibrate() override
Run algo on data.
void setBField(bool bfield)
Work with B field or not;.
float m_lowerAlpha[18]
Lower boundays of alpha bins.
TGraphErrors * m_gFit[56][2][18][7]
sigma*sigma graph for fit
double m_minPval
Minimum Prob(chi2) of track.
Abstract base class for different kinds of events.
void setOutputFileName(std::string outputname)
output file name
std::string m_histName
root file name
int m_nAlphaBins
number of alpha bins
TH1F * m_hMeanUnbiased[56][2][Max_nalpha][Max_ntheta]
mean histogram of unbiased residual
float m_upperAlpha[18]
Upper boundays of alpha bins.
TH1F * m_hSigmaUnbiased[56][2][Max_nalpha][Max_ntheta]
sigma histogram of ubiased residual
void storeHisto()
store histogram
bool m_textOutput
output text file if true
void setMinimumPval(double pval)
Minimum Pval required.
EResult
The result of calibration.
TH2F * m_hBiased[56][2][Max_nalpha][Max_ntheta]
2D histogram of biased residual
void write()
save calibration, in text file or db
void setBinWidth(double bw)
Bin width of each slide.
float m_iTheta[7]
represented alphas of theta bins.
void prepare()
Prepare the calibration of space resolution.
static const unsigned short Max_np
Maximum number of point =1/binwidth.
float m_lowerTheta[7]
Lower boundays of theta bins.
void setHistFileName(const std::string &name)
Set name for histogram output.
TGraphErrors * m_graph[56][2][18][7]
sigma graph.
TH1F * m_hMeanBiased[56][2][Max_nalpha][Max_ntheta]
mean histogram biased residual
int m_fitStatus[56][2][Max_nalpha][Max_ntheta]
Fit flag; 1:OK ; 0:error.
bool m_debug
Debug or not.
void setMinimumNDF(double ndf)
minimum NDF required for track
std::string m_outputFileName
Output sigma filename.
unsigned short m_sigmaParamModePost
sigma mode before this calibration.
float m_upperTheta[7]
Upper boundays of theta bins.
double m_binWidth
width of each bin, unit cm
bool m_bField
Work with BField, fit range and initial parameters is different incase B and noB.