2 |
|
#include "PassHLT.h" |
3 |
|
#include "HZZCiCElectronSelection.h" |
4 |
|
#include "HZZLikelihoodElectronSelection.h" |
5 |
+ |
#include "HZZBDTElectronSelection.h" |
6 |
|
#include "RunLumiRangeMap.h" |
7 |
|
|
8 |
|
RunLumiRangeMap rlrm; |
19 |
|
TClonesArray *electronArr, // input electrons |
20 |
|
TClonesArray *muonArr, // input muons |
21 |
|
double eventweight, // weight |
22 |
< |
TNtuple * passtuple ) { |
22 |
> |
TTree * passtuple ) { |
23 |
|
|
24 |
|
fails_HZZ4L_selection( ctrl, info, electronArr, muonArr, eventweight, passtuple, NULL ); |
25 |
|
|
42 |
|
TClonesArray *electronArr, // input electrons |
43 |
|
TClonesArray *muonArr, // input muons |
44 |
|
double eventweight, // weight |
45 |
< |
TNtuple * passtuple, |
45 |
> |
TTree * passtuple, |
46 |
|
LabVectors * l) { // output ntuple |
47 |
|
|
48 |
|
unsigned evtfail = 0x0; |
49 |
|
|
50 |
+ |
|
51 |
+ |
if( ctrl.debug ) { |
52 |
+ |
cout << "Run: " << info->runNum |
53 |
+ |
<< "\tEvt: " << info->evtNum |
54 |
+ |
<< "\tLumi: " << info->lumiSec |
55 |
+ |
<< endl; |
56 |
+ |
} |
57 |
+ |
|
58 |
|
if( !ctrl.mc ) { |
59 |
|
// not accounting for overlap atm |
60 |
|
RunLumiRangeMap::RunLumiPairType rl(info->runNum, info->lumiSec); |
61 |
|
if( !(rlrm.HasRunLumi(rl)) ) { |
62 |
+ |
if( ctrl.debug ) cout << "\tfails JSON" << endl; |
63 |
|
evtfail |= (1<<EVTFAIL_JSON); |
64 |
|
return evtfail; |
65 |
|
} |
66 |
|
} |
67 |
|
|
68 |
|
|
69 |
< |
if( ctrl.debug ) { |
60 |
< |
cout << "Run: " << info->runNum |
61 |
< |
<< "\tEvt: " << info->evtNum |
62 |
< |
<< "\tLumi: " << info->lumiSec |
63 |
< |
<< endl; |
64 |
< |
} |
69 |
> |
|
70 |
|
|
71 |
|
|
72 |
|
//******************************************************** |
147 |
|
} |
148 |
|
} |
149 |
|
|
150 |
< |
unsigned FAIL; |
151 |
< |
CICStruct tightcuts = getTightCuts(); |
152 |
< |
unsigned failsCIC = failsCicSelection(ctrl, ele, tightcuts, ctrl.kinematics); |
153 |
< |
LikStruct likcuts = getLikCuts(ctrl.lik_cut); |
154 |
< |
unsigned failsLike = failsLikelihoodSelection(ele, likcuts, ctrl.kinematics); |
155 |
< |
|
156 |
< |
if ( ctrl.cic ) { FAIL = failsCIC;} |
157 |
< |
else { FAIL = failsLike; } |
150 |
> |
unsigned FAIL=0; |
151 |
> |
CICStruct ciccuts = getCiCCuts(ctrl.eleSeleScheme); |
152 |
> |
unsigned failsCIC=0; |
153 |
> |
if(ctrl.eleSele=="cic") { |
154 |
> |
failsCIC = failsCicSelection(ctrl, ele, ciccuts, ctrl.kinematics); |
155 |
> |
FAIL = failsCIC; |
156 |
> |
} |
157 |
> |
LikStruct likcuts; |
158 |
> |
unsigned failsLike=0; |
159 |
> |
if(ctrl.eleSele=="lik") { |
160 |
> |
likcuts = getLikCuts(ctrl.eleSeleScheme); |
161 |
> |
failsLike = failsLikelihoodSelection(ele, likcuts, ctrl.kinematics); |
162 |
> |
FAIL = failsLike; |
163 |
> |
} |
164 |
> |
unsigned failsBDT=0; |
165 |
> |
if(ctrl.eleSele=="bdt") { |
166 |
> |
failsBDT = failsBDTSelection(ele,ctrl.kinematics,ctrl.eleSeleScheme); |
167 |
> |
FAIL = failsBDT; |
168 |
> |
} |
169 |
|
|
170 |
|
if( ctrl.debug ){ |
171 |
|
cout << "CIC category: " << cicCategory(ele) |
173 |
|
<< "\tFAIL: 0x" << hex << FAIL << dec |
174 |
|
<< "\tfailsCIC: 0x" << hex << failsCIC << dec |
175 |
|
<< "\tfailsLike: 0x" << hex << failsLike << dec |
176 |
+ |
<< "\tfailsBDT: 0x" << hex << failsBDT << dec |
177 |
|
<< "\tscEt: " << ele->scEt |
178 |
|
<< "\tscEta: " << ele->scEta |
179 |
|
<< "\tncluster: " << ele->ncluster |
574 |
|
(lepvec[Z1LeptonMinusIndex].type == 13 && lepvec[Z2LeptonMinusIndex].type == 11)) channel=2; |
575 |
|
|
576 |
|
|
577 |
< |
|
577 |
> |
|
578 |
|
if( passtuple != NULL ) { |
579 |
< |
passtuple->Fill( info->runNum, |
580 |
< |
info->evtNum, |
581 |
< |
info->lumiSec, |
582 |
< |
channel, |
583 |
< |
Z1Candidate.M(), |
584 |
< |
Z2Candidate.M(), |
585 |
< |
ZZSystem.M(), |
586 |
< |
ZZSystem.Pt(), |
587 |
< |
eventweight); |
579 |
> |
unsigned run = info->runNum; |
580 |
> |
unsigned evt = info->evtNum; |
581 |
> |
unsigned lumi = info->lumiSec; |
582 |
> |
unsigned chan = channel; |
583 |
> |
float mZ1 = Z1Candidate.M() ; |
584 |
> |
float mZ2 = Z2Candidate.M() ; |
585 |
> |
float m4l = ZZSystem.M() ; |
586 |
> |
float pt4l = ZZSystem.Pt() ; |
587 |
> |
passtuple->SetBranchAddress("run", &run); |
588 |
> |
passtuple->SetBranchAddress("evt", &evt); |
589 |
> |
passtuple->SetBranchAddress("lumi", &lumi); |
590 |
> |
passtuple->SetBranchAddress("mZ1", &mZ1); |
591 |
> |
passtuple->SetBranchAddress("mZ2", &mZ2); |
592 |
> |
passtuple->SetBranchAddress("m4l", &m4l); |
593 |
> |
passtuple->SetBranchAddress("pt4l", &pt4l); |
594 |
> |
passtuple->SetBranchAddress("w", &eventweight); |
595 |
> |
passtuple->Fill( ); |
596 |
|
} |
597 |
|
|
598 |
|
if( ctrl.debug ) cout << "run: " << info->runNum |