-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestGen.h
More file actions
executable file
·137 lines (111 loc) · 3.44 KB
/
TestGen.h
File metadata and controls
executable file
·137 lines (111 loc) · 3.44 KB
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
130
131
132
133
134
135
136
#ifndef TestGen_H
#define TestGen_H
#include "TObject.h"
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <TMath.h>
#include <TF1.h>
#include <TH1.h>
#include <TH2.h>
#include <THStack.h>
#include <TFile.h>
#include <TTree.h>
#include <TBranch.h>
#include <TRandom3.h>
#include <TLeaf.h>
#include <TString.h>
#include <TSystem.h>
#include <TCanvas.h>
#include <TStyle.h>
#include <TFrame.h>
#include <TLegend.h>
#include <TGraph.h>
#include <TGraphErrors.h>
#include "TLorentzVector.h"
#include <algorithm>
#include "AnaInput.h"
#include "DPSelection.h"
#include "hDraw.h"
#include "Histogram.h"
/*
#define MAXPHO 10
#define MAXVTX 10
#define MAXGEN 20
#define MAXMU 5
*/
struct iMatch {
int idg ; // the matching id for gen
int idr ; // the matching id for reco
int ig ; // position in gen collection
int ir ; // position in reco collection
double dr ;
double dPt ;
} ;
class TestGen : public TObject {
public:
TestGen( string datacardfile = "DataCard.txt");
~TestGen();
void ReadTree( string dataName = "0", double weight = 1., string fNamePattern = "" ) ;
bool Propagator( TLorentzVector& v, double& x, double& y, double& z, double& t, double ctaugamma = 99999999. ) ;
bool Propagator1( TLorentzVector v, double& x, double& y, double& z, double& t, double ctaugamma = 99999999. ) ;
//vector<int> GlobalDRMatch( vector<objID> vr, vector<objID> vg, vector<double>& v_dr ) ;
vector<iMatch> GlobalDRMatch( vector<objID> vr, vector<objID> vg ) ;
double RecoWeight( double pT ) ;
private:
AnaInput* Input;
DPSelection* select;
Histogram* Hist ;
string hfolder ;
string plotType ;
string rfolder ;
int ProcessEvents ;
int SkipEvents ;
int isData ;
double TCut ;
double FitCtau ;
int systType ;
float genPx[MAXGEN], genPy[MAXGEN], genPz[MAXGEN], genE[MAXGEN] ;
float genVx[MAXGEN], genVy[MAXGEN], genVz[MAXGEN], genT[MAXGEN] ;
int pdgId[MAXGEN], momId[MAXGEN] ;
float phoPx[MAXPHO], phoPy[MAXPHO], phoPz[MAXPHO], phoE[MAXPHO] ;
float seedTime[MAXPHO], aveTime[MAXPHO], aveTime1[MAXPHO], timeChi2[MAXPHO] ;
float seedTimeErr[MAXPHO] ;
float phoEcalIso[MAXPHO], phoHcalIso[MAXPHO], phoTrkIso[MAXPHO], sMinPho[MAXPHO], sMajPho[MAXPHO];
float photIso[MAXPHO] , cHadIso[MAXPHO], nHadIso[MAXPHO], phoHoverE[MAXPHO] ;
float fSpike[MAXPHO], seedSwissX[MAXPHO], dR_TrkPho[MAXPHO] ;
int nXtals[MAXPHO], nBC[MAXPHO] ;
float sigmaEta[MAXPHO], sigmaIeta[MAXPHO], cscdPhi[MAXPHO], dtdPhi[MAXPHO], dtdEta[MAXPHO] ;
//float vtxX[MAXVTX], vtxY[MAXVTX], vtxZ[MAXVTX] ;
float vtxZ[MAXVTX] ;
float metPx, metPy, metE ;
int nGen, nPhotons, nJets, nMuons, nElectrons, triggered, nVertices, totalNVtx, eventId ;
TLorentzVector newMET ;
TLorentzVector noPhotMET ;
vector<objID> selectJets ;
vector<objID> selectPho ;
vector<objID> recoPho ;
vector<objID> genPho ;
vector<double> recoTs ;
vector<double> genTs ;
vector<double> genXTs ;
vector<double> v_ctbgTs ;
vector<TLorentzVector> genPs ;
vector<TLorentzVector> genXPs ;
vector<double> photonCuts ;
vector<double> photonPFIso ;
vector<double> jetCuts ;
vector<double> timeCalib ;
double decayR ;
// Root File for Rootuple or histograms
TFile *theFile ;
string hfName ;
// Histograms set
hSet h ;
//ClassDef(TestGen, 1);
};
//#if !defined(__CINT__)
// ClassImp(TestGen);
#endif