ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/VHbbDataFormats/interface/Cuts200X.h
Revision: 1.5
Committed: Fri Aug 26 09:01:43 2011 UTC (13 years, 8 months ago) by arizzi
Content type: text/plain
Branch: MAIN
CVS Tags: EDMV42_Step2_V8, EDMV42_Step2_V7, EDMV42_Step2_V6, EDMV42_Step2_V5a, EDMV42_Step2_V5, tauCandV42, hbbsubstructDev_11, hbbsubstructDev_10, hbbsubstructDev_9, hbbsubstructDev_8, hbbsubstructDev_7, hbbsubstructDev_6, hbbsubstructDev_5, hbbsubstructDev_4, hbbsubstructDev_3, hbbsubstructDev_2, hbbsubstructDev_1, hbbsubstructDev, V21TauCand_0, EDMV42_Step2_V4a, EDMV42_Step2_V4, EDMV42_Step2_V3, EDMV42_Step2_V2, EDMV42_Step2_V1, EdmV42, EdmV41alpha1, EdmV40alpha1, EdmV40alpha, V21emuCand, EdmV33Jun12v2_consistent, Step2ForV33_v2, Step2ForV33_v1, EdmV33Jun12v2, EdmV33Jun12v1, EdmV33Jun12v0, Step2ForV32_v2, Step2ForV32_v1, Step2ForV32_v0, Step2ForV31_v0, EdmV32May24v0, EdmV31May21v1, EdmV31May17v0, May14thStep2, EdmV30Apr10, EdmV21Apr10v2, EdmV22May9, EdmV21Apr06, EdmV21Apr10, EdmV21Apr04, EdmV21Apr03, EdmV21Apr2, EdmV21Mar30, EdmV20Mar12, AR_Nov10Ntuple, AR_step2_Oct25, AR_step2_oct19, EdmV11Oct2011, AR_Step2_Oct13, AR_Oct9Ntuple, AR_Oct7_step2ntuple, AR_Oct5Ntuple, EdmV10Oct2011, EdmV9Sept2011, Sept19th2011_2, Sept19th2011, Sept19th, VHNtupleV9_AR1, VHSept15_AR1, Sept14th2011_2, Sept14th2011_AR1, Sept14th2011, Sept13th2011, AR_Sep8_LightNtuple, VHBB_EDMNtupleV3, HEAD
Branch point for: V42TauCandidate, hbbsubstructDevPostHCP, V21TauCand, V21emuCandidate
Changes since 1.4: +2 -2 lines
Log Message:
fix for transverse mass

File Contents

# User Rev Content
1 arizzi 1.1 #ifndef CUTS200X_H
2     #define CUTS200X_H
3     #include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEvent.h"
4     #include "VHbbAnalysis/VHbbDataFormats/interface/VHbbCandidate.h"
5     #include "VHbbAnalysis/VHbbDataFormats/interface/VHbbProxy.h"
6     #include "VHbbAnalysis/VHbbDataFormats/interface/CutsAndHistos.h"
7     #include <TH1F.h>
8     #include "DataFormats/GeometryVector/interface/VectorUtil.h"
9     #include <sstream>
10     #include "TKey.h"
11    
12    
13     #define CSVM 0.679
14     #define CSVL 0.244
15     #define CSVT 0.898
16    
17     struct CompareJetPt {
18     bool operator()( const VHbbEvent::SimpleJet& j1, const VHbbEvent::SimpleJet& j2 ) const {
19     return j1.p4.Pt() > j2.p4.Pt();
20     }
21     };
22    
23     struct CompareBTag {
24     bool operator()(const VHbbEvent::SimpleJet& j1, const VHbbEvent::SimpleJet& j2 ) const {
25     return j1.csv > j2.csv;
26     }
27     };
28    
29    
30     // New implementations of the control region
31     // The signal regions must be implemented incrementally since cutflow is needed
32    
33     class VlightRegionHWmun: public Cut {
34     std::string name() {return "VlightRegionHWmun";};
35 arizzi 1.3 Bool_t pass(VHbbProxy &p){
36     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
37 arizzi 1.1 if(iCand->size() < 1) return false;
38 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
39     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
40 arizzi 1.1
41     return ( iCand->at(0).candidateType == VHbbCandidate::Wmun
42     && H.jets.size() >= 2
43     && H.jets.at(0).Pt() > 30
44     && H.jets.at(1).Pt() > 30
45     && H.p4.Pt() > 150
46     && V.p4.Pt() > 150
47 arizzi 1.4 // && V.Mt(VHbbCandidate::Wmun) < 160
48     // && ( H.jets.at(0).csv < CSVM)
49     // && ( H.jets.at(1).csv < CSVM)
50 arizzi 1.1 && iCand->at(0).additionalJets.size() < 2
51     && V.mets[0].metSig > 2.5
52     // && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.5
53 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
54 arizzi 1.1 );
55     }
56     };
57    
58    
59     class VlightRegionHWen: public Cut {
60     std::string name() {return "VlightRegionHWen";};
61 arizzi 1.3 Bool_t pass(VHbbProxy &p){
62     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
63 arizzi 1.1 if(iCand->size() < 1) return false;
64 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
65     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
66 arizzi 1.1
67     return ( iCand->at(0).candidateType == VHbbCandidate::Wen
68 arizzi 1.4 && V.electrons[0].p4.Pt() > 30
69 arizzi 1.1 && H.jets.size() >= 2
70     && H.jets.at(0).Pt() > 30
71     && H.jets.at(1).Pt() > 30
72     && H.p4.Pt() > 150
73     && V.p4.Pt() > 150
74 arizzi 1.4 // && ( H.jets.at(0).csv < CSVM)
75     // && ( H.jets.at(1).csv < CSVM)
76     && iCand->at(0).additionalJets.size() < 2
77     && V.mets[0].metSig > 2.5
78     // && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.5
79 arizzi 1.3 && p.trigger()->accept("HLT_Ele\\(\\(27\\)\\|\\(32\\)\\)_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v.")
80 arizzi 1.1 );
81     }
82     };
83    
84     class VlightRegionHZmumu: public Cut {
85     std::string name() {return "VlightRegionHZmumu";};
86 arizzi 1.3 Bool_t pass(VHbbProxy &p){
87     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
88 arizzi 1.1 if(iCand->size() < 1) return false;
89 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
90     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
91 arizzi 1.1
92     return ( iCand->at(0).candidateType == VHbbCandidate::Zmumu
93     && H.jets.size() >= 2
94     && H.jets.at(0).Pt() > 20
95     && H.jets.at(1).Pt() > 20
96 arizzi 1.4 && H.p4.Pt() > 100
97 arizzi 1.1 && V.p4.Pt() > 100
98 arizzi 1.4 // && ( H.jets.at(0).csv < CSVL)
99     // && ( H.jets.at(1).csv < CSVL)
100 arizzi 1.1 && iCand->at(0).additionalJets.size() < 2
101 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
102 arizzi 1.1 && V.p4.M() > 75
103     && V.p4.M() < 105
104     );
105     }
106     };
107    
108     class VlightRegionHZee: public Cut {
109     std::string name() {return "VlightRegionHZee";};
110 arizzi 1.3 Bool_t pass(VHbbProxy &p){
111     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
112 arizzi 1.1 if(iCand->size() < 1) return false;
113 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
114     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
115 arizzi 1.1
116     return ( iCand->at(0).candidateType == VHbbCandidate::Zee
117     && H.jets.size() >= 2
118     && H.jets.at(0).Pt() > 20
119     && H.jets.at(1).Pt() > 20
120 arizzi 1.4 && H.p4.Pt() > 100
121 arizzi 1.1 && V.p4.Pt() > 100
122 arizzi 1.4 // && ( H.jets.at(0).csv < CSVL)
123     // && ( H.jets.at(1).csv < CSVL)
124 arizzi 1.1 && iCand->at(0).additionalJets.size() < 2
125 arizzi 1.3 && p.trigger()->accept("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v.*")
126 arizzi 1.1 && V.p4.M() > 75
127     && V.p4.M() < 105
128     );
129     }
130     };
131    
132    
133    
134     class TTbarRegionHWmun: public Cut {
135     std::string name() {return "TTbarRegionHWmun";};
136 arizzi 1.3 Bool_t pass(VHbbProxy &p){
137     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
138 arizzi 1.1 if(iCand->size() < 1) return false;
139 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
140     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
141 arizzi 1.1
142     return ( iCand->at(0).candidateType == VHbbCandidate::Wmun
143 arizzi 1.4 // && V.muons[0].p4.Pt() > 20
144 arizzi 1.1 && H.jets.size() >= 2
145     && H.jets.at(0).Pt() > 30
146     && H.jets.at(1).Pt() > 30
147     && H.p4.Pt() > 100
148     && V.p4.Pt() > 100
149     // && V.Mt(VHbbCandidate::Wmun) > 40
150     // && V.Mt(VHbbCandidate::Wmun) < 120
151     && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
152     && iCand->at(0).additionalJets.size() > 1
153 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
154 arizzi 1.1 );
155     }
156     };
157    
158     class TTbarRegionHWen: public Cut {
159     std::string name() {return "TTbarRegionHWen";};
160 arizzi 1.3 Bool_t pass(VHbbProxy &p){
161     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
162 arizzi 1.1 if(iCand->size() < 1) return false;
163 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
164     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
165 arizzi 1.1
166     return ( iCand->at(0).candidateType == VHbbCandidate::Wen
167 arizzi 1.4 && V.electrons[0].p4.Pt() > 30
168 arizzi 1.1 && H.jets.size() >= 2
169     && H.jets.at(0).Pt() > 30
170     && H.jets.at(1).Pt() > 30
171 arizzi 1.4 && H.p4.Pt() > 100
172     && V.p4.Pt() > 100
173 arizzi 1.1 && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
174 arizzi 1.4 && iCand->at(0).additionalJets.size() > 1
175     // && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.5
176     // && iCand->at(0).additionalJets.at(0).p4.Pt() > 35
177     // && V.mets[0].metSig > 2
178     // && ( TMath::Abs( Geom::deltaPhi( V.mets[0].p4.Phi(), H.jets.at(0).p4.Phi())) > 1.5
179     // || TMath::Abs( Geom::deltaPhi(V.mets[0].p4.Phi(), H.jets.at(1).p4.Phi())) > 1.5 )
180 arizzi 1.3 && p.trigger()->accept("HLT_Ele\\(\\(27\\)\\|\\(32\\)\\)_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v.")
181 arizzi 1.1
182    
183     );
184     }
185     };
186    
187    
188     class TTbarRegionHZmumu: public Cut {
189     std::string name() {return "TTbarRegionHZmumu";};
190 arizzi 1.3 Bool_t pass(VHbbProxy &p){
191     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
192 arizzi 1.1 if(iCand->size() < 1) return false;
193 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
194     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
195 arizzi 1.1
196     return ( iCand->at(0).candidateType == VHbbCandidate::Zmumu
197 arizzi 1.4 // && V.muons[0].p4.Pt() > 20
198 arizzi 1.1 && H.jets.size() >= 2
199     && H.jets.at(0).Pt() > 20
200     && H.jets.at(1).Pt() > 20
201 arizzi 1.4 // && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
202 arizzi 1.1 && ( V.mets.size() >0 && V.mets.at(0).p4.Pt() > 50)
203 arizzi 1.4 // && iCand->at(0).additionalJets.size() > 1
204 arizzi 1.1 && V.p4.M() > 120
205 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
206 arizzi 1.1 );
207     }
208     };
209    
210    
211     class TTbarRegionHZee: public Cut {
212     std::string name() {return "TTbarRegionHZee";};
213 arizzi 1.3 Bool_t pass(VHbbProxy &p){
214     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
215 arizzi 1.1 if(iCand->size() < 1) return false;
216 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
217     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
218 arizzi 1.1
219     return ( iCand->at(0).candidateType == VHbbCandidate::Zee
220     && H.jets.size() >= 2
221     && H.jets.at(0).Pt() > 20
222     && H.jets.at(1).Pt() > 20
223     // && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
224     && ( V.mets.size() >0 && V.mets.at(0).p4.Pt() > 50)
225 arizzi 1.4 && V.p4.M() > 120
226     // && iCand->at(0).additionalJets.size() > 1
227 arizzi 1.3 && p.trigger()->accept("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v.*")
228 arizzi 1.1
229     );
230     }
231     };
232    
233    
234     class VbbRegionHWmun: public Cut {
235     std::string name() {return "VbbRegionHWmun";};
236 arizzi 1.3 Bool_t pass(VHbbProxy &p){
237     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
238 arizzi 1.1 if(iCand->size() < 1) return false;
239 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
240     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
241 arizzi 1.1
242     return ( iCand->at(0).candidateType == VHbbCandidate::Wmun
243 arizzi 1.4 // && V.muons[0].p4.Pt() > 20
244 arizzi 1.1 && H.jets.size() >= 2
245     && H.jets.at(0).Pt() > 30
246     && H.jets.at(1).Pt() > 30
247     && H.p4.Pt() < 150
248     && V.p4.Pt() < 150
249     && V.Mt(VHbbCandidate::Wmun) < 120
250     && V.Mt(VHbbCandidate::Wmun) > 40
251     && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
252 arizzi 1.4 // && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.5
253 arizzi 1.1 && iCand->at(0).additionalJets.size() ==0
254     && V.mets[0].metSig > 2.5
255 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
256 arizzi 1.1 );
257     }
258     };
259    
260     class VbbRegionHWen: public Cut {
261     std::string name() {return "VbbRegionHWen";};
262 arizzi 1.3 Bool_t pass(VHbbProxy &p){
263     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
264 arizzi 1.1 if(iCand->size() < 1) return false;
265 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
266     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
267 arizzi 1.1
268     return ( iCand->at(0).candidateType == VHbbCandidate::Wen
269 arizzi 1.4 && V.electrons[0].p4.Pt() > 30
270 arizzi 1.1 && H.jets.size() >= 2
271     && H.jets.at(0).Pt() > 30
272     && H.jets.at(1).Pt() > 30
273     && H.p4.Pt() < 150
274     && V.p4.Pt() < 150
275 arizzi 1.5 && V.Mt(VHbbCandidate::Wen) < 120
276     && V.Mt(VHbbCandidate::Wen) > 40
277 arizzi 1.1 && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
278 arizzi 1.4 // && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.4
279     && iCand->at(0).additionalJets.size() == 0
280     && V.mets[0].metSig > 2.5
281 arizzi 1.3 && p.trigger()->accept("HLT_Ele\\(\\(27\\)\\|\\(32\\)\\)_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v.*")
282 arizzi 1.1
283     );
284     }
285     };
286    
287     class VbbRegionHZmumu: public Cut {
288     std::string name() {return "VbbRegionHZmumu";};
289 arizzi 1.3 Bool_t pass(VHbbProxy &p){
290     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
291 arizzi 1.1 if(iCand->size() < 1) return false;
292 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
293     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
294 arizzi 1.1
295     return ( iCand->at(0).candidateType == VHbbCandidate::Zmumu
296     && H.jets.size() >= 2
297     && H.jets.at(0).Pt() > 20
298     && H.jets.at(1).Pt() > 20
299 arizzi 1.4 && ( H.p4.M() < 90 || H.p4.M() > 145)
300 arizzi 1.1 // && ( H.jets.at(0).csv > CSVT || H.jets.at(1).csv > CSVT)
301     && ( H.jets.at(0).csv > CSVT && H.jets.at(1).csv > CSVT)
302     && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.9
303     && iCand->at(0).additionalJets.size() < 2
304 arizzi 1.4 // && ( V.mets.size() ==0 || V.mets.at(0).p4.Pt() < 30)
305 arizzi 1.3 && p.trigger()->accept("HLT_IsoMu17_v.*")
306 arizzi 1.1 && V.p4.M() > 75
307     && V.p4.M() < 105
308    
309     );
310     }
311     };
312    
313     class VbbRegionHZee: public Cut {
314     std::string name() {return "VbbRegionHZee";};
315 arizzi 1.3 Bool_t pass(VHbbProxy &p){
316     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
317 arizzi 1.1 if(iCand->size() < 1) return false;
318 arizzi 1.3 VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
319     VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
320 arizzi 1.1
321     return ( iCand->at(0).candidateType == VHbbCandidate::Zee
322     && H.jets.size() >= 2
323     && H.jets.at(0).Pt() > 20
324     && H.jets.at(1).Pt() > 20
325 arizzi 1.4 && ( H.p4.M() < 90 || H.p4.M() > 145)
326     && ( H.jets.at(0).csv > CSVT && H.jets.at(1).csv > CSVT)
327     && TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > 2.9
328 arizzi 1.1 && iCand->at(0).additionalJets.size() < 2
329     // && V.mets[0].p4.Pt() < 30
330 arizzi 1.3 && p.trigger()->accept("HLT_Ele17_CaloIdL_CaloIsoVL_Ele8_CaloIdL_CaloIsoVL_v.*")
331 arizzi 1.1 && V.p4.M() > 75
332     && V.p4.M() < 105
333     );
334     }
335     };
336    
337    
338 arizzi 1.2 class SignalPreSelectionWen : public Cut {
339     std::string name() {return "SignalPreSelWen";};
340    
341 arizzi 1.3 Bool_t pass(VHbbProxy &p){
342     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
343 arizzi 1.2 if(iCand->size() < 1) return false;
344 arizzi 1.3 return ( iCand->at(0).candidateType == VHbbCandidate::Wen);
345 arizzi 1.2 }
346     };
347    
348 arizzi 1.3 class SignalPreSelectionWmun : public Cut {
349 arizzi 1.2 std::string name() {return "SignalPreSelWmun";};
350 arizzi 1.1
351 arizzi 1.3 Bool_t pass(VHbbProxy &p){
352     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
353 arizzi 1.2 if(iCand->size() < 1) return false;
354 arizzi 1.3 return ( iCand->at(0).candidateType == VHbbCandidate::Wmun);
355 arizzi 1.2 }
356     };
357 arizzi 1.1
358 arizzi 1.3 class SignalPreSelectionZee : public Cut {
359 arizzi 1.2 std::string name() {return "SignalPreSelZee";};
360    
361 arizzi 1.3 Bool_t pass(VHbbProxy &p){
362     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
363 arizzi 1.2 if(iCand->size() < 1) return false;
364 arizzi 1.3 return ( iCand->at(0).candidateType == VHbbCandidate::Zee);
365 arizzi 1.2 }
366     };
367 arizzi 1.1
368 arizzi 1.3 class SignalPreSelectionZmumu : public Cut {
369 arizzi 1.2 std::string name() {return "SignalPreSelZmumu";};
370    
371 arizzi 1.3 Bool_t pass(VHbbProxy &p){
372     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
373 arizzi 1.2 if(iCand->size() < 1) return false;
374 arizzi 1.3 return ( iCand->at(0).candidateType == VHbbCandidate::Zmumu);
375 arizzi 1.2 }
376     };
377 arizzi 1.1
378 arizzi 1.3 class SignalPreSelectionZnn : public Cut {
379 arizzi 1.2 std::string name() {return "SignalPreSelZnn";};
380    
381 arizzi 1.3 Bool_t pass(VHbbProxy &p){
382     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
383 arizzi 1.2 if(iCand->size() < 1) return false;
384 arizzi 1.3 return ( iCand->at(0).candidateType == VHbbCandidate::Znn);
385 arizzi 1.2 }
386     };
387    
388     class HPtCut : public PCut
389     {
390     public:
391     HPtCut(double ptMin):PCut(ptMin){}
392     bool pass(VHbbProxy &p) {
393 arizzi 1.3 const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
394 arizzi 1.2 if(iCand->size() < 1) return false;
395 arizzi 1.3 return ( iCand->at(0).H.p4.Pt() > m_cut);
396 arizzi 1.2 }
397     virtual std::string name() {return "Higgs_Pt_Gt_"+cutValueString(); }
398     };
399    
400     class VPtCut : public PCut
401     {
402     public:
403     VPtCut(double ptMin):PCut(ptMin){}
404     bool pass(VHbbProxy &p) {
405 arizzi 1.3 const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
406 arizzi 1.2 if(iCand->size() < 1) return false;
407 arizzi 1.3 return ( iCand->at(0).V.p4.Pt() > m_cut);
408 arizzi 1.2 }
409     virtual std::string name() {return "Vector_Pt_Gt_"+cutValueString(); }
410 arizzi 1.1 };
411    
412    
413 arizzi 1.2 class DoubleBTagCut : public PCut
414 arizzi 1.3 {
415 arizzi 1.2 public:
416     DoubleBTagCut(double csvMin):PCut(csvMin){}
417     bool pass(VHbbProxy &p) {
418 arizzi 1.3 const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
419 arizzi 1.2 if(iCand->size() < 1) return false;
420 arizzi 1.3 VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
421 arizzi 1.2 return (
422     H.jets.size() >= 2
423     && ( H.jets.at(0).csv > m_cut && H.jets.at(1).csv > m_cut)
424 arizzi 1.3 );
425 arizzi 1.2 }
426     virtual std::string name() {return "DoubleCSV_"+cutValueString(); }
427     };
428    
429 arizzi 1.3 class SingleBTagCut : public PCut
430     {
431 arizzi 1.4 public:
432 arizzi 1.3 SingleBTagCut(double csvMin):PCut(csvMin){}
433     bool pass(VHbbProxy &p) {
434     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
435     if(iCand->size() < 1) return false;
436     const VHbbCandidate::HiggsCandidate & H = p.getVHbbCandidate()->at(0).H;
437     return (
438     H.jets.size() >= 2
439     && ( H.jets.at(0).csv > m_cut || H.jets.at(1).csv > m_cut)
440     );
441     }
442     virtual std::string name() {return "SingleCSV_"+cutValueString(); }
443    
444     };
445    
446     class VHDeltaPhiCut : public PCut
447     {
448 arizzi 1.4 public:
449 arizzi 1.3 VHDeltaPhiCut(double deltaPhiMin):PCut(deltaPhiMin){}
450     bool pass(VHbbProxy &p) {
451     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
452     if(iCand->size() < 1) return false;
453     const VHbbCandidate::HiggsCandidate & H = p.getVHbbCandidate()->at(0).H;
454     const VHbbCandidate::VectorCandidate & V = p.getVHbbCandidate()->at(0).V;
455    
456     return (TMath::Abs( Geom::deltaPhi(H.p4.Phi(), V.p4.Phi()) ) > m_cut
457     );
458     }
459     virtual std::string name() {return "VHDeltaPhi_Gt_"+cutValueString(); }
460     };
461    
462    
463     class AdditionalJetsCut : public PCut
464     {
465 arizzi 1.4 public:
466 arizzi 1.3 /// Filtering "< n"
467     AdditionalJetsCut(int n):PCut(n) {}
468     bool pass(VHbbProxy &p) {
469     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
470     if(iCand->size() < 1) return false;
471     return (iCand->at(0).additionalJets.size() < m_cut);
472     }
473     virtual std::string name() {return "NumAddJets_Lt_"+cutValueString(); }
474     };
475    
476     class AdditionalLeptonsCut : public PCut
477     {
478 arizzi 1.4 public:
479 arizzi 1.3 /// Filtering "< n"
480     AdditionalLeptonsCut(int n):PCut(n) {}
481     bool pass(VHbbProxy &p) {
482     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
483     if(iCand->size() < 1) return false;
484     const VHbbCandidate::VectorCandidate & V = p.getVHbbCandidate()->at(0).V;
485     int expectedLeptons = 0;
486     if( iCand->at(0).candidateType == VHbbCandidate::Wmun || iCand->at(0).candidateType == VHbbCandidate::Wen) expectedLeptons =1;
487     if( iCand->at(0).candidateType == VHbbCandidate::Zmumu || iCand->at(0).candidateType == VHbbCandidate::Zee) expectedLeptons =2;
488    
489     return ( V.muons.size() + V.electrons.size() - expectedLeptons < m_cut);
490     }
491     virtual std::string name() {return "NumAddLeptons_Lt_"+cutValueString(); }
492     };
493    
494     class METCut : public PCut
495     {
496     public:
497     METCut(double metMin):PCut(metMin){}
498     bool pass(VHbbProxy &p) {
499     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
500     if(iCand->size() < 1) return false;
501     return ( iCand->at(0).V.mets.at(0).p4.Pt() > m_cut);
502     }
503     virtual std::string name() {return "MET_Gt_"+cutValueString(); }
504     };
505 arizzi 1.2
506 arizzi 1.3 class METSignificanceCut : public PCut
507     {
508     public:
509     METSignificanceCut(double metMin):PCut(metMin){}
510     bool pass(VHbbProxy &p) {
511     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
512     if(iCand->size() < 1) return false;
513     return ( iCand->at(0).V.mets[0].metSig > m_cut);
514     }
515     virtual std::string name() {return "METSig_Gt_"+cutValueString(); }
516     };
517 arizzi 1.2
518 arizzi 1.3 class JetMETDeltaPhiCut : public PCut
519     {
520     public:
521     JetMETDeltaPhiCut(double deltaPhiMin):PCut(deltaPhiMin){}
522     bool pass(VHbbProxy &p) {
523     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
524     if(iCand->size() < 1) return false;
525     const VHbbCandidate::VectorCandidate V = p.getVHbbCandidate()->at(0).V;
526     const VHbbCandidate::HiggsCandidate H = p.getVHbbCandidate()->at(0).H;
527    
528     return ( TMath::Abs( Geom::deltaPhi( V.mets[0].p4.Phi(), H.jets.at(0).p4.Phi())) > m_cut
529     && TMath::Abs( Geom::deltaPhi(V.mets[0].p4.Phi(), H.jets.at(1).p4.Phi())) > m_cut );
530     }
531     virtual std::string name() {return "JetMETDeltaPhi_Gt_"+cutValueString(); }
532     };
533     class DiJetMassMinCut : public PCut
534     {
535     public:
536     DiJetMassMinCut(double mMin):PCut(mMin){}
537     bool pass(VHbbProxy &p) {
538     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
539     if(iCand->size() < 1) return false;
540     return ( iCand->at(0).H.p4.M() > m_cut);
541     }
542     virtual std::string name() {return "Higgs_M_Gt_"+cutValueString(); }
543     };
544 arizzi 1.2
545    
546 arizzi 1.3 class DiJetMassMaxCut : public PCut
547     {
548     public:
549     DiJetMassMaxCut(double mMax):PCut(mMax){}
550     bool pass(VHbbProxy &p) {
551     const std::vector<VHbbCandidate> *iCand = p.getVHbbCandidate();
552     if(iCand->size() < 1) return false;
553     return ( iCand->at(0).H.p4.M() <= m_cut);
554     }
555     virtual std::string name() {return "Higgs_M_Lt_"+cutValueString(); }
556     };
557 arizzi 1.2
558 arizzi 1.4 CutSet buildSignalSelectionZee(float mass);
559     CutSet buildSignalSelectionZmumu(float mass);
560     CutSet buildSignalSelectionWen(float mass);
561     CutSet buildSignalSelectionWmun(float mass);
562 arizzi 1.1
563     #endif