forked from h2gglobe/h2gglobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MassResolution.h
129 lines (94 loc) · 3.54 KB
/
MassResolution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef MassResolution_h
#define MassResolution_h
//----------------------------------------------------------//
// Project: MassResolution
// Author: Matt Kenzie ([email protected])
// Modified: 25/08/2011
// Admins: Matth Kenzie ([email protected])
//---------------------------------------------------------//
/*
Calculates the mass resolution for a higgs to two photon event.
Designed to work solely inside the h2gglobe framework.
Define a MassResolution object as public data member of StatAnalysis.h
(or equivalent) with
MassResolution massResFinder;
In the Init method of StatAnalysis create a new object with
massResFinder = new MassResolution();
Make sure to clean this in the Term method of StatAnalysis with
delete massResFinder;
To calculate the mass resolution event by event insert the following in
the Analysis method of StatAnalysis (after the smearing has been done and HiggsM andHiggs Pt have been calculated)
massResFinder.Setup(l,diphoton_index.first,diphton_index.second,diphoton_id,higgsPt,higgsMass,eSmearPars,nR9Categories,nEtaCategories);
and then access the mass resolution with
massResFinder.getMassResolution();
there are various other methods to get more specialised information such getAngleResolution(), getLeadResolution() etc.
You can also use printInfo() or dumpInfo(filename) to print or write the information in Setup.
*/
#include <iostream>
#include <string>
#include <cassert>
#include "TROOT.h"
#include "TMath.h"
#include "TLorentzVector.h"
#include "TVector3.h"
#include "TFile.h"
#include "TF1.h"
#include "math.h"
#include "BaseAnalysis.h"
#include "BaseSmearer.h"
//#include "PhotonAnalysis.h"
#include "LoopAll.h"
#include "EnergySmearer.h"
#include "RooContainer.h"
#include "PhotonReducedInfo.h"
class MassResolution {
public:
MassResolution();
void Setup(LoopAll&,PhotonReducedInfo*,PhotonReducedInfo*,int,EnergySmearer::energySmearingParameters,int,int,double);
void Setup(LoopAll&,PhotonReducedInfo*,PhotonReducedInfo*,int,EnergySmearer::energySmearingParameters,int,int,double,bool);
double beamspotSigma;
// double massResolution();
double massResolutionCorrVtx();
double massResolutionWrongVtx();
double massResolutionEonly();
double massResolutionAonly();
double massResolutionEonlyNoSmear();
double massResolutionCorrVtxNoSmear();
double massResolutionWrongVtxNoSmear();
double leadPhotonResolution();
double subleadPhotonResolution();
double leadPhotonResolutionNoSmear();
double subleadPhotonResolutionNoSmear();
private:
double getPhotonResolution(double,double,double,double,bool, bool ispherical=false);
double angleResolution();
double angleResolutionCorrVtx();
double angleResolutionWrongVtx();
double dzResolution();
double dzResolutionCorrVtx();
double dzResolutionWrongVtx();
//double getEffectiveSigma(TF1*, int);
double propagateDz(double);
double SecH(double);
double TanH(double);
// TLorentzVector *lead_p4;
// TLorentzVector *sublead_p4;
PhotonReducedInfo *leadPhoton;
PhotonReducedInfo *subleadPhoton;
TVector3 lead_sc_pos;
TVector3 sublead_sc_pos;
TVector3 *vertex;
TVector3 *vtx_dxdydz;
double lead_Eres;
double sublead_Eres;
double lead_r9;
double sublead_r9;
bool lead_iDet;
bool sublead_iDet;
EnergySmearer::energySmearingParameters _eSmearPars;
double dz;
double higgsMass;
TFile *dz_file;
TGraph *dz_plot;
};
#endif