BOSS
7.1.1
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
43
static
double
PI
= 3.14159265;
44
45
class
ElectronCalibration
{
46
47
public
:
48
49
ElectronCalibration
();
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 );
51
virtual
~ElectronCalibration
() {};
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
86
void
make1DHists
();
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
ElectronCorrection.h
PI
#define PI
Definition
EvtD0ToKKpi0.cc:41
ElectronCalibration
Definition
ElectronCalibration.h:45
ElectronCalibration::make1DHists
void make1DHists()
ElectronCalibration::fitRunGains
void fitRunGains(TFile *outfile)
Definition
ElectronWidget/ElectronCalibration.cc:34
ElectronCalibration::ElectronCalibration
ElectronCalibration()
Definition
ElectronWidget/ElectronCalibration.cc:3
ElectronCalibration::TwoDCorrection
void TwoDCorrection(TFile *outfile)
Definition
ElectronWidget/ElectronCalibration.cc:201
ElectronCalibration::~ElectronCalibration
virtual ~ElectronCalibration()
Definition
ElectronCalibration.h:51
ElectronCalibration::plotRunGains
void plotRunGains(TString filename)
Definition
ElectronWidget/ElectronCalibration.cc:172
ElectronCalibration::SaturationCorrection
void SaturationCorrection(TFile *oufile)
Definition
ElectronWidget/ElectronCalibration.cc:461
7.1.1
Mdc
DedxCalibAlg
DedxCalibAlg-00-02-01
share
template
HadronCalib
Widget
Widget
ElectronWidget
ElectronCalibration.h
Generated by
1.12.0