BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
ElectronCollector.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 ELECTRONCOLLECTOR_H
15#define ELECTRONCOLLECTOR_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 virtual ~Electroncollector() {};
51
52 // --------------------------------------------------
53 // run gains
54 // --------------------------------------------------
55
56 // fit the dE/dx distributions
57 void fitRunGains( TFile* outfile );
58
59 // plot the mean values versus run number
60 void plotRunGains( TString filename );
61
62 // --------------------------------------------------
63 // wire gains
64 // --------------------------------------------------
65
66 // --------------------------------------------------
67 // electron saturation correction
68 // --------------------------------------------------
69
70 // perform the electron saturation correction
71 void SaturationCorrection( TFile* oufile );
72
73 // --------------------------------------------------
74 // 2D correction
75 // --------------------------------------------------
76
77 // divide data into bins of DOCA and entrance angle
78 void TwoDCorrection( TFile* outfile );
79
80 // --------------------------------------------------
81 // 1D residual cleanup
82 // --------------------------------------------------
83
84 // divide data into bins of entrance angle
86
87 private:
88
89 TString m_filename; // name of ROOT file that contain hit information
90 TString m_constfilename; // name of ROOT file that contains constants
91
92 int m_mcFlag; // flag for hadron correction: 0 if data, 1 if mc
93 int m_type; // flag for data type: 0 if BESIII, 1 if BELLEII
94 int m_fits; // for 2D correction do truncation (0) or fits (1)
95
96 int m_docabins; // number of DOCA bins
97 double m_lowerdoca; // lower bound of DOCA
98 double m_upperdoca; // upper bound of DOCA
99
100 int m_entabins; // number of entrance angle bins
101 double m_lowerenta; // lower bound of entrance angle
102 double m_upperenta; // upper bound of entrance angle
103
104 int m_costhbins; // number of cos(theta) bins
105};
106#endif
const double PI
Definition: PipiJpsi.cxx:55
void SaturationCorrection(TFile *oufile)
void plotRunGains(TString filename)
void TwoDCorrection(TFile *outfile)
virtual ~Electroncollector()
void fitRunGains(TFile *outfile)