-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcutClass.h~
114 lines (99 loc) · 3.48 KB
/
cutClass.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
#include "AnalysisEvent.h"
#include <vector>
#include <map>
#include "plots.h"
#include <fstream>
class Cuts{
bool makeLeptonCuts(AnalysisEvent*,float,std::map<std::string,Plots*>, TH1F*);
bool invertIsoCut(AnalysisEvent*,float,std::map<std::string,Plots*>, TH1F*);
std::vector<int> makeJetCuts(AnalysisEvent*);
std::vector<int> makeMetCuts(AnalysisEvent*);
std::vector<int> makeBCuts(AnalysisEvent*, std::vector<int>);
std::vector<int> getTightEles(AnalysisEvent* event);
std::vector<int> getInvIsoEles(AnalysisEvent* event);
std::vector<int> getLooseEles(AnalysisEvent* event);
std::vector<int> getTightMuons(AnalysisEvent* event);
std::vector<int> synchTightMuons(AnalysisEvent* event);
std::vector<int> getInvIsoMuons(AnalysisEvent* event);
std::vector<int> getLooseMuons(AnalysisEvent* event);
float getZCand(AnalysisEvent*, std::vector<int>, std::vector<int>);
bool triggerCuts(AnalysisEvent*);
//Method for running the synchronisation with Jeremy.
bool synchCuts(AnalysisEvent * event);
int getLooseLepsNum(AnalysisEvent * event); //Mimic preselection skims
int getLooseElecs(AnalysisEvent* event);
int getLooseMus(AnalysisEvent* event);
//Simple deltaR function, because the reco namespace doesn't work or something
double deltaR(float,float,float,float);
void dumpToFile(AnalysisEvent * event, int);
// Tight electron cuts
unsigned int numTightEle_;
float tightElePt_;
float tightEleEta_;
float tightEled0_;
int tightEleMissLayers_;
bool tightEleCheckPhotonVeto_;
float tightEleMVA_;
float tightEleRelIso_;
//Loose electron cuts
unsigned int numLooseEle_;
float looseElePt_;
float looseEleEta_;
float looseEleMVA_;
float looseEleRelIso_;
//Tight muon cuts
unsigned int numTightMu_;
float tightMuonPt_;
float tightMuonEta_;
float tightMuonRelIso_;
//Loose muon cuts
unsigned int numLooseMu_;
float looseMuonPt_;
float looseMuonEta_;
float looseMuonRelIso_;
//Tight jet cuts
unsigned int numJets_;
float jetPt_;
float jetEta_;
int jetNConsts_;
bool jetIDDo_;
//B-Disc cut
unsigned int numbJets_;
float bDiscCut_;
//set to true to fill in histograms.
bool doPlots_;
bool fillCutFlow_; // Fill cut flows
bool invertIsoCut_; // For background estimation
bool synchCutFlow_; //For synch
bool tighterMuonID_; //Tighter muon ID.
bool singleEventInfoDump_; //For dropping info on event for synching.
//Histogram to be used in synchronisation.
TH1F* synchCutFlowHist_;
TH1I* synchNumEles_;
TH1I* synchNumMus_;
TH1I* synchMuonCutFlow_;
bool makeEventDump_;
ofstream step0EventDump_;
ofstream step2EventDump_;
ofstream step4EventDump_;
ofstream step6EventDump_;
//Sets whether to do MC or data cuts. Set every time a new dataset is processed in the main loop.
bool isMC_;
std::string triggerFlag_;
std::string postfixName_;
//Sets trigger from config file
std::string cutConfTrigLabel_;
public:
Cuts(bool,bool,bool,bool,bool,bool);
~Cuts();
bool makeCuts(AnalysisEvent*,float,std::map<std::string,Plots*>, TH1F*);
void setTightEle(float pt = 20, float eta = 2.5, float d0 = 0.04);
void setMC(bool isMC) {isMC_ = isMC;};
void setTriggerFlag(std::string triggerFlag) {triggerFlag_ = triggerFlag;};
bool parse_config(std::string);
void dumpLeptonInfo(AnalysisEvent*);
void dumpLooseLepInfo(AnalysisEvent*);
TH1F* getSynchCutFlow();
int numFound(){return synchCutFlowHist_->GetBinContent(4);};
void setEventInfoFlag(bool flag){singleEventInfoDump_ = flag;};
};