BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
ElectronCalibration.h
Go to the documentation of this file.
1//********************************************************************************
2// This file is part of the Widget, a package for performing dE/dx calibration.
3//
4// Author: Jake Bennett
5// Date: July 8, 2015
6//
7// ElectronCalibration is a class designed to perform the cosine correction
8// for electrons. This entails taking the means and errors prepared by the
9// WidgetPrep class and interpolating in bins of cos(theta).
10//
11// For additional details, see the Widget document.
12//
13//********************************************************************************
14#ifndef ELECTRONCALIBRATION_H
15#define ELECTRONCALIBRATION_H
16
17#include <string>
18#include <iostream>
19#include <sstream>
20#include <vector>
21#include <math.h>
22#include <stdlib.h>
23
24#include "TFile.h"
25#include "TTree.h"
26#include "TH1F.h"
27#include "TH2F.h"
28#include "TLine.h"
29#include "TF1.h"
30#include "TMath.h"
31#include "TGraph.h"
32#include "TGraphErrors.h"
33#include "TString.h"
34#include "TMath.h"
35#include "TCanvas.h"
36#include "TLegend.h"
37#include "TFitter.h"
38#include "TFitResult.h"
39#include "TFitResultPtr.h"
40
41#include "ElectronCorrection.h"
42
43static double PI = 3.14159265;
44
46
47 public:
48
50 ElectronCalibration( TString infile, TString constfile, int mcFlag, int type, int fits, int docabins, double upperdoca, double lowerdoca, int entabins, double upperenta, double lowerenta, int costhbins );
52
53 // --------------------------------------------------
54 // run gains
55 // --------------------------------------------------
56
57 // fit the dE/dx distributions
58 void fitRunGains( TFile* outfile );
59
60 // plot the mean values versus run number
61 void plotRunGains( TString filename );
62
63 // --------------------------------------------------
64 // wire gains
65 // --------------------------------------------------
66
67 // --------------------------------------------------
68 // electron saturation correction
69 // --------------------------------------------------
70
71 // perform the electron saturation correction
72 void SaturationCorrection( TFile* oufile );
73
74 // --------------------------------------------------
75 // 2D correction
76 // --------------------------------------------------
77
78 // divide data into bins of DOCA and entrance angle
79 void TwoDCorrection( TFile* outfile );
80
81 // --------------------------------------------------
82 // 1D residual cleanup
83 // --------------------------------------------------
84
85 // divide data into bins of entrance angle
87
88 private:
89
90 TString m_filename; // name of ROOT file that contain hit information
91 TString m_constfilename; // name of ROOT file that contains constants
92
93 int m_mcFlag; // flag for hadron correction: 0 if data, 1 if mc
94 int m_type; // flag for data type: 0 if BESIII, 1 if BELLEII
95 int m_fits; // for 2D correction do truncation (0) or fits (1)
96
97 int m_docabins; // number of DOCA bins
98 double m_lowerdoca; // lower bound of DOCA
99 double m_upperdoca; // upper bound of DOCA
100
101 int m_entabins; // number of entrance angle bins
102 double m_lowerenta; // lower bound of entrance angle
103 double m_upperenta; // upper bound of entrance angle
104
105 int m_costhbins; // number of cos(theta) bins
106};
107#endif
const double PI
Definition: PipiJpsi.cxx:55