-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCutBasedHiggsSelector.hh
More file actions
159 lines (137 loc) · 6.59 KB
/
CutBasedHiggsSelector.hh
File metadata and controls
159 lines (137 loc) · 6.59 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#ifndef CutBasedHiggsSelector_h
#define CutBasedHiggsSelector_h
#include "CommonTools/include/Selection.hh"
#include "CommonTools/include/Counters.hh"
class CutBasedHiggsSelector {
public:
//! constructor
CutBasedHiggsSelector();
//! copy constructor
CutBasedHiggsSelector( const CutBasedHiggsSelector& selector );
//! destructor
virtual ~CutBasedHiggsSelector();
//! configure from files
void Configure(const char *fileCuts, const char* fileSwitches, const char *theTitle);
//! configure pre-selection (it is not necessarily applied)
void AppendPreselection(Selection *preselection) { _selection->append(preselection); }
//! get the applied selection
Selection* GetSelection() { return _selection; }
//! set event by event observables
void SetMcTruth(bool foundMcTree) { m_foundMcTree = foundMcTree; }
void SetHLT(bool passedHLT) { m_passedHLT = passedHLT; }
void SetIsChannel(bool channelsel) { m_isThisChannel = channelsel; }
void SetProcessID(int processID) { m_processID = processID; }
void SetWeight(float weight) { m_weight = weight; }
void SetHighElePt(float highPt) { m_highPt = highPt; }
void SetLowElePt(float lowPt) { m_lowPt = lowPt; }
void SetInvMass(float mll) { m_invMass = mll; }
void SetElectronId(int isEleId) { m_isElectronId = isEleId; }
void SetPositronId(int isPosId) { m_isPositronId = isPosId; }
void SetElectronIsolation(int isEleIsol) { m_isElectronIsol = isEleIsol; }
void SetPositronIsolation(int isPosIsol) { m_isPositronIsol = isPosIsol; }
void SetElectronConvRejection(int isEleConvRej) { m_isElectronConvRej = isEleConvRej; }
void SetPositronConvRejection(int isPosConvRej) { m_isPositronConvRej = isPosConvRej; }
void SetElectronIp(int isEleIp) { m_isElectronIp = isEleIp; }
void SetPositronIp(int isPosIp) { m_isPositronIp = isPosIp; }
void SetJetVeto(bool passedCJV) { m_passedJetVeto = passedCJV; }
void SetUncorrJetVeto(bool passedUncorrCJV) { m_passedUncorrJetVeto = passedUncorrCJV; }
void SetNJets(int njets) { m_nJets = njets; }
void SetNUncorrJets(int nuncorrjets) { m_nUncorrJets = nuncorrjets; }
void SetBTagJets(float btag) { m_btagJets = btag; }
void SetNSoftMuons(int nsoftmu) { m_nSoftMuons = nsoftmu; }
void SetNExtraLeptons(int nextralep) { m_nExtraLeptons = nextralep; }
void SetMet(float met) { m_met = met;}
void SetProjectedMet(float projmet) { m_projectedMet = projmet;}
void SetMetOverPtLL(float metopt) { m_metOverPtLL = metopt;}
void SetDYMVA(float dymva) { m_dymva = dymva; }
void SetDeltaPhiLLJet(float deltaphiLLJet) { m_deltaPhiLLJet = deltaphiLLJet; }
void SetDeltaPhi(float deltaPhi) { m_deltaPhi = deltaPhi;}
void SetDetaLeptons(float deltaEta) { m_detaLeptons = deltaEta;}
void SetPtll(float ptll) { m_ptll = ptll; }
void SetExtraSlowLeptonPTCut(float ptMin) { m_extraSlowLeptonPTMin = ptMin; }
void SetWWInvMass(float wwmass) { m_WWInvMass = wwmass; }
void SetNvtx(int nvtx) { m_nVtx = nvtx; }
//! get output of the selector
bool output();
//! the methods outputUpToFinalLeptons and outputUpToJetVeto need
//! output() run before using them
//! get output of the selector until lepton ID + isolation
bool outputUpToFinalLeptons() { return m_finalLeptons; }
//! get output of the selector until jet veto
bool outputUpToJetVeto() {return m_jetVeto; }
bool outputUpToUncorrJetVeto() {return m_uncorrJetVeto; }
//! get output of the selector previous to deltaPhi cut
bool outputPreDeltaPhi() { return m_preDeltaPhi; }
//! latinos
bool outputStep0() { return m_step0; }
bool outputStep1() { return m_step1; }
bool outputStep2() { return m_step2; }
bool outputStep3() { return m_step3; }
bool outputStep4() { return m_step4; }
bool outputStep5() { return m_step5; }
bool outputStep6() { return m_step6; }
bool outputStep7() { return m_step7; }
bool outputStep8() { return m_step8; }
bool outputStep9() { return m_step9; }
bool outputStep10() { return m_step10; }
bool outputStep11() { return m_step11; }
bool outputStep12() { return m_step12; }
bool outputStep13() { return m_step13; }
bool outputStep14() { return m_step14; }
bool outputStep15() { return m_step15; }
bool outputStep16() { return m_step16; }
bool outputStep17() { return m_step17; }
bool outputStep18() { return m_step18; }
bool outputStep19() { return m_step19; }
bool outputStep20() { return m_step20; }
bool outputStep21() { return m_step21; }
bool outputStep22() { return m_step22; }
bool outputStep23() { return m_step23; }
bool outputStep24() { return m_step24; }
bool outputStep25() { return m_step25; }
bool outputStep26() { return m_step26; }
//! display the electron efficiency
void displayEfficiencies(std::string datasetName);
private:
float m_weight;
bool m_foundMcTree;
bool m_passedHLT;
bool m_isThisChannel;
float m_highPt, m_lowPt;
int m_isElectronId, m_isPositronId;
int m_isElectronIsol, m_isPositronIsol;
int m_isElectronConvRej, m_isPositronConvRej;
int m_isElectronIp, m_isPositronIp;
float m_invMass;
bool m_passedJetVeto;
bool m_passedUncorrJetVeto;
int m_nJets, m_nUncorrJets, m_nSoftMuons, m_nExtraLeptons;
float m_btagJets;
float m_met, m_projectedMet, m_deltaPhi, m_detaLeptons, m_metOverPtLL, m_deltaPhiLLJet, m_dymva;
float m_maxPtElectron, m_minPtElectron, m_WWInvMass, m_ptll;
float m_extraSlowLeptonPTMin;
int m_nVtx;
int m_processID;
//! contains the preselection cuts
Selection* _selection;
//! counters for the efficiencies display, based on electron candidates
Counters* globalCounter;
//! true if the selection arrived to lepton ID and isolation
bool m_finalLeptons;
//! true if the selection arrived to jet veto
bool m_jetVeto;
//! true if the selection arrived to jet veto with uncorrected jets
bool m_uncorrJetVeto;
//! true if passed all the selections previous to deltaPhi
bool m_preDeltaPhi;
//! latinos
bool m_step0, m_step1, m_step2, m_step3, m_step4, m_step5, m_step6, m_step7, m_step8, m_step9;
bool m_step10, m_step11, m_step12, m_step13, m_step14, m_step15, m_step16, m_step17;
bool m_step18, m_step19, m_step20, m_step21, m_step22, m_step23, m_step24;
bool m_step25, m_step26;
//! this is to do an efficiency for each process in the sample
//! (if more than one is present)
//! to turn on it, use SetProcessID(int processID) with processID=!-1
std::map<int, Counters*> multiProcessCounter;
};
#endif