1 |
|
#include "Selection.h" |
2 |
|
#include "PassHLT.h" |
3 |
+ |
|
4 |
+ |
#include "SiMVAElectronSelection.h" |
5 |
+ |
|
6 |
|
#include "HZZCiCElectronSelection.h" |
7 |
|
#include "HZZLikelihoodElectronSelection.h" |
8 |
+ |
#include "HZZBDTElectronSelection.h" |
9 |
|
#include "RunLumiRangeMap.h" |
10 |
|
|
11 |
|
RunLumiRangeMap rlrm; |
22 |
|
TClonesArray *electronArr, // input electrons |
23 |
|
TClonesArray *muonArr, // input muons |
24 |
|
double eventweight, // weight |
25 |
< |
TNtuple * passtuple ) { |
25 |
> |
TTree * passtuple ) { |
26 |
|
|
27 |
|
fails_HZZ4L_selection( ctrl, info, electronArr, muonArr, eventweight, passtuple, NULL ); |
28 |
|
|
45 |
|
TClonesArray *electronArr, // input electrons |
46 |
|
TClonesArray *muonArr, // input muons |
47 |
|
double eventweight, // weight |
48 |
< |
TNtuple * passtuple, |
48 |
> |
TTree * passtuple, |
49 |
|
LabVectors * l) { // output ntuple |
50 |
|
|
51 |
|
unsigned evtfail = 0x0; |
52 |
|
|
53 |
+ |
|
54 |
+ |
if( ctrl.debug ) { |
55 |
+ |
cout << "Run: " << info->runNum |
56 |
+ |
<< "\tEvt: " << info->evtNum |
57 |
+ |
<< "\tLumi: " << info->lumiSec |
58 |
+ |
<< endl; |
59 |
+ |
} |
60 |
+ |
|
61 |
|
if( !ctrl.mc ) { |
62 |
|
// not accounting for overlap atm |
63 |
|
RunLumiRangeMap::RunLumiPairType rl(info->runNum, info->lumiSec); |
64 |
|
if( !(rlrm.HasRunLumi(rl)) ) { |
65 |
+ |
if( ctrl.debug ) cout << "\tfails JSON" << endl; |
66 |
|
evtfail |= (1<<EVTFAIL_JSON); |
67 |
|
return evtfail; |
68 |
|
} |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
< |
if( ctrl.debug ) { |
60 |
< |
cout << "Run: " << info->runNum |
61 |
< |
<< "\tEvt: " << info->evtNum |
62 |
< |
<< "\tLumi: " << info->lumiSec |
63 |
< |
<< endl; |
64 |
< |
} |
72 |
> |
|
73 |
|
|
74 |
|
|
75 |
|
//******************************************************** |
150 |
|
} |
151 |
|
} |
152 |
|
|
153 |
< |
unsigned FAIL; |
154 |
< |
CICStruct tightcuts = getTightCuts(); |
155 |
< |
unsigned failsCIC = failsCicSelection(ctrl, ele, tightcuts, ctrl.kinematics); |
156 |
< |
LikStruct likcuts = getLikCuts(ctrl.lik_cut); |
157 |
< |
unsigned failsLike = failsLikelihoodSelection(ele, likcuts, ctrl.kinematics); |
153 |
> |
unsigned FAIL=0; |
154 |
> |
CICStruct ciccuts = getCiCCuts(ctrl.eleSeleScheme); |
155 |
> |
unsigned failsCIC=0; |
156 |
> |
if(ctrl.eleSele=="cic") { |
157 |
> |
failsCIC = failsCicSelection(ctrl, ele, ciccuts, ctrl.kinematics); |
158 |
> |
FAIL = failsCIC; |
159 |
> |
} |
160 |
> |
LikStruct likcuts; |
161 |
> |
unsigned failsLike=0; |
162 |
> |
if(ctrl.eleSele=="lik") { |
163 |
> |
likcuts = getLikCuts(ctrl.eleSeleScheme); |
164 |
> |
failsLike = failsLikelihoodSelection(ele, likcuts, ctrl.kinematics); |
165 |
> |
FAIL = failsLike; |
166 |
> |
} |
167 |
> |
unsigned failsBDT=0; |
168 |
> |
if(ctrl.eleSele=="bdt") { |
169 |
> |
failsBDT = failsBDTSelection(ctrl,ele); |
170 |
> |
FAIL = failsBDT; |
171 |
> |
} |
172 |
> |
unsigned failsSi=0; |
173 |
> |
if(ctrl.eleSele=="si") { |
174 |
> |
failsSi = failsSiMVAElectronSelection(ctrl, ele, 0.95, ctrl.kinematics); |
175 |
> |
FAIL = failsSi; |
176 |
> |
} |
177 |
> |
|
178 |
> |
|
179 |
|
|
151 |
– |
if ( ctrl.cic ) { FAIL = failsCIC;} |
152 |
– |
else { FAIL = failsLike; } |
180 |
|
|
181 |
|
if( ctrl.debug ){ |
182 |
|
cout << "CIC category: " << cicCategory(ele) |
184 |
|
<< "\tFAIL: 0x" << hex << FAIL << dec |
185 |
|
<< "\tfailsCIC: 0x" << hex << failsCIC << dec |
186 |
|
<< "\tfailsLike: 0x" << hex << failsLike << dec |
187 |
+ |
<< "\tfailsBDT: 0x" << hex << failsBDT << dec |
188 |
|
<< "\tscEt: " << ele->scEt |
189 |
|
<< "\tscEta: " << ele->scEta |
190 |
|
<< "\tncluster: " << ele->ncluster |
585 |
|
(lepvec[Z1LeptonMinusIndex].type == 13 && lepvec[Z2LeptonMinusIndex].type == 11)) channel=2; |
586 |
|
|
587 |
|
|
588 |
< |
|
588 |
> |
|
589 |
|
if( passtuple != NULL ) { |
590 |
< |
passtuple->Fill( info->runNum, |
591 |
< |
info->evtNum, |
592 |
< |
info->lumiSec, |
593 |
< |
channel, |
594 |
< |
Z1Candidate.M(), |
595 |
< |
Z2Candidate.M(), |
596 |
< |
ZZSystem.M(), |
597 |
< |
ZZSystem.Pt(), |
598 |
< |
eventweight); |
590 |
> |
unsigned run = info->runNum; |
591 |
> |
unsigned evt = info->evtNum; |
592 |
> |
unsigned lumi = info->lumiSec; |
593 |
> |
unsigned chan = channel; |
594 |
> |
double w = eventweight; |
595 |
> |
float mZ1 = Z1Candidate.M() ; |
596 |
> |
float mZ2 = Z2Candidate.M() ; |
597 |
> |
float m4l = ZZSystem.M() ; |
598 |
> |
float pt4l = ZZSystem.Pt() ; |
599 |
> |
passtuple->SetBranchAddress("run", &run); |
600 |
> |
passtuple->SetBranchAddress("evt", &evt); |
601 |
> |
passtuple->SetBranchAddress("lumi", &lumi); |
602 |
> |
passtuple->SetBranchAddress("mZ1", &mZ1); |
603 |
> |
passtuple->SetBranchAddress("mZ2", &mZ2); |
604 |
> |
passtuple->SetBranchAddress("m4l", &m4l); |
605 |
> |
passtuple->SetBranchAddress("pt4l", &pt4l); |
606 |
> |
passtuple->SetBranchAddress("w", &w); |
607 |
> |
passtuple->Fill( ); |
608 |
|
} |
609 |
|
|
610 |
|
if( ctrl.debug ) cout << "run: " << info->runNum |