BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
HadronPrep.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// HadronPrep is a class that prepares a sample for the hadron calibration. It
8// first bins the sample in terms of beta-gamma (p/m) and cos(theta) and fits for
9// the mean of the measured dE/dx distribution and its error. This information is
10// used in the HadronSaturation class. The HadronPrep class also contains methods
11// to determine the predicted dE/dx mean and resolution.
12//
13// For additional details, see the Widget document.
14//
15//********************************************************************************
16#ifndef WIDGETPREP_H
17#define WIDGETPREP_H
18
19#include <string>
20#include <sstream>
21#include <vector>
22#include <math.h>
23#include <stdlib.h>
24
25#include "TFile.h"
26#include "TTree.h"
27#include "TH1F.h"
28#include "TH2F.h"
29#include "TLine.h"
30#include "TF1.h"
31#include "TMath.h"
32#include "TGraph.h"
33#include "TGraphErrors.h"
34#include "TString.h"
35#include "TMath.h"
36#include "TCanvas.h"
37#include "TLegend.h"
38#include "TFitter.h"
39#include "TFitResult.h"
40#include "TFitResultPtr.h"
41
42#include "HadronSaturation.h"
43#include "HadronCalibration.h"
44
46
47 public:
48
49 HadronPrep();
50 virtual ~HadronPrep() {};
51
52 // set the input file name and other variables
53 HadronPrep( TString infile, int mcflag, int type, int bgbins, double upperbg, double lowerbg, int cosbins, double uppercos, double lowercos );
54
55 // apply some formatting to TGraphs
56 void FormatGraph( TGraphErrors* gr, int flag );
57
58 // perform fits in bins of beta-gamma and cos(theta)
59 void bgCosThetaFits( TString particle, TFile* outfile, bool correct, std::string paramfile );
60
61 // perform fits in bins of beta-gamma
62 void bgFits( TString particle, TFile* outfile, bool correct, std::string paramfile );
63
64 private:
65
66 TString m_filename; // ROOT file containing reconstructed dedx information
67 int m_mcFlag; // flag for hadron correction: 0 if data, 1 if mc
68 int m_type; // flag for data type: 0 if BESIII, 1 if BELLEII
69
70 int m_bgbins; // number of beta-gamma bins
71 double m_upperbg; // Upper limit on beta-gamma
72 double m_lowerbg; // Lower limit on beta-gamma
73
74 int m_cosbins; // number of cos(theta) bins
75 double m_uppercos; // Upper limit on cos(theta)
76 double m_lowercos; // Lower limit on cos(theta)
77
78 HadronSaturation m_hadsat; // object storing hadron saturation parameterization
79 WidgetParameterization m_gpar; // defines beta-gamma curve and other parameterizations
80};
81#endif
virtual ~HadronPrep()
Definition: HadronPrep.h:50
void FormatGraph(TGraphErrors *gr, int flag)
Definition: HadronPrep.cc:28
void bgCosThetaFits(TString particle, TFile *outfile, bool correct, std::string paramfile)
Definition: HadronPrep.cc:55
void bgFits(TString particle, TFile *outfile, bool correct, std::string paramfile)
Definition: HadronPrep.cc:544