4 |
|
#include "EfficiencyWeightsInterface.h" |
5 |
|
|
6 |
|
#include "HZZCiCElectronSelection.h" |
7 |
< |
#include "IsolationSelection.h" |
7 |
> |
//#include "IsolationSelection.h" |
8 |
|
#include "PassHLT.h" |
9 |
|
#include "SelectionZ4L.h" |
10 |
|
|
15 |
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
16 |
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
17 |
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
18 |
< |
EventData apply_HZZ4L_selection(ControlFlags &ctrl, // input control |
18 |
> |
EventData apply_Z4L_selection(ControlFlags &ctrl, // input control |
19 |
|
mithep::TEventInfo *info, // input event info |
20 |
|
TClonesArray *electronArr, // input electrons |
21 |
|
CICStruct &cicCuts, |
37 |
|
EventData ret; |
38 |
|
unsigned evtfail = 0x0; |
39 |
|
TRandom3 r; |
40 |
< |
|
40 |
> |
|
41 |
|
if( ctrl.debug ) { |
42 |
|
cout << "Run: " << info->runNum |
43 |
|
<< "\tEvt: " << info->evtNum |
79 |
|
// Lepton Selection |
80 |
|
//******************************************************** |
81 |
|
vector<SimpleLepton> lepvec; |
82 |
< |
|
82 |
> |
|
83 |
|
// |
84 |
|
if( ctrl.debug ) cout << "\tnMuons: " << muonArr->GetEntries() << endl; |
85 |
|
//---------------------------------------------------- |
104 |
|
} |
105 |
|
|
106 |
|
if ( musel.passID() ) { |
107 |
– |
|
107 |
|
SimpleLepton tmplep; |
108 |
|
float pt = mu->pt; |
109 |
|
tmplep.vecorig->SetPtEtaPhiM(pt, |
134 |
|
tmplep.ip3dSig = mu->ip3dSig; |
135 |
|
tmplep.is4l = false; |
136 |
|
tmplep.isEB = (fabs(mu->eta) < 1.479 ? 1 : 0 ); |
137 |
< |
tmplep.isTight = musel.tight(); |
138 |
< |
tmplep.isLoose = musel.loose(); |
137 |
> |
tmplep.isTight = musel.tightID(); |
138 |
> |
tmplep.isLoose = musel.looseID(); |
139 |
|
lepvec.push_back(tmplep); |
140 |
|
if( ctrl.debug ) { cout << "muon passes ... " << endl;} |
141 |
|
} |
155 |
|
for (int k=0; k<lepvec.size(); ++k) { |
156 |
|
TVector3 tmplep; |
157 |
|
tmplep.SetPtEtaPhi(ele->pt, ele->eta, ele->phi); |
158 |
< |
if ( lepvec[k].isLoose && lepvec[k].type == 13 && lepvec[k].vec->Vect().DrEtaPhi(tmplep) < 0.1 ) { |
158 |
> |
if ( lepvec[k].isLoose && lepvec[k].type == 13 && lepvec[k].vec->Vect().DrEtaPhi(tmplep) < 0.05 ) { |
159 |
|
if( ctrl.debug ) cout << "-----> isMuonOverlap! " << endl; |
160 |
|
isMuonOverlap = kTRUE; |
161 |
|
break; |
178 |
|
<< endl; |
179 |
|
} |
180 |
|
|
181 |
< |
if ( elesel.passID() && !isMuonOverlap ) |
181 |
> |
if ( elesel.passIDAndPre() && !isMuonOverlap ) |
182 |
|
{ |
183 |
|
SimpleLepton tmplep; |
184 |
< |
|
184 |
> |
|
185 |
> |
|
186 |
|
float pt = ele->pt; |
187 |
+ |
|
188 |
|
tmplep.vecorig->SetPtEtaPhiM( pt, |
189 |
|
ele->eta, |
190 |
|
ele->phi, |
225 |
|
} |
226 |
|
} |
227 |
|
|
227 |
– |
|
228 |
|
//******************************************************** |
229 |
|
// Dump Stuff |
230 |
|
//******************************************************** |
243 |
|
<< "\tnmuon: " << nmu |
244 |
|
<< "\tnelectron: " << nele |
245 |
|
<< endl; |
246 |
< |
} |
247 |
< |
|
248 |
< |
|
246 |
> |
} |
247 |
> |
|
248 |
|
//****************************************************************************** |
249 |
|
// Z1 Selection |
250 |
|
//****************************************************************************** |
308 |
|
TLorentzVector Z1LeptonMinus = *(lepvec[Z1LeptonMinusIndex].vec); |
309 |
|
TLorentzVector Z1Candidate = Z1LeptonPlus + Z1LeptonMinus; |
310 |
|
|
312 |
– |
|
311 |
|
//****************************************************************************** |
312 |
|
// Z1 + l |
313 |
|
//****************************************************************************** |
332 |
|
<< "\ttype: " << lepvec[i].type |
333 |
|
<< endl; |
334 |
|
|
335 |
< |
if( ctrl.eleSeleScheme == "mediumloose" && |
338 |
< |
!(lepvec[i].isTight) ) { |
335 |
> |
if( !(lepvec[i].isTight) ) { |
336 |
|
if( ctrl.debug) cout << "it's not tight, skipping ... " << endl; |
337 |
|
continue; |
338 |
|
} |
343 |
|
<< "\ttype: " << lepvec[j].type |
344 |
|
<< endl; |
345 |
|
|
346 |
< |
if( ctrl.eleSeleScheme == "mediumloose" && |
350 |
< |
!(lepvec[j].isTight) ) { |
346 |
> |
if( !(lepvec[j].isTight) ) { |
347 |
|
if( ctrl.debug) cout << "it's not tight, skipping ... " << endl; |
348 |
|
continue; |
349 |
|
} |
366 |
|
continue; //require same flavor |
367 |
|
} |
368 |
|
|
373 |
– |
|
369 |
|
//Make Z2 hypothesis |
370 |
|
TLorentzVector *leptonPlus, *leptonMinus; |
371 |
|
|
383 |
|
if( ctrl.debug ) cout << "dilepton.M() : " << dilepton.M() << endl; |
384 |
|
if( ctrl.debug ) cout << "fourLepton.M() : " << fourLepton.M() << endl; |
385 |
|
|
386 |
< |
if (!(dilepton.M() > 12.0)) continue; |
387 |
< |
if (!(fourLepton.M() > 100.0)) continue; |
386 |
> |
if (!(dilepton.M() > 2.0)) continue; |
387 |
> |
if (!(fourLepton.M() > 60.0)) continue; |
388 |
|
|
389 |
|
//for 4e and 4mu, require at least 1 of the other opp sign lepton pairs have mass > 12 |
390 |
|
if (fabs(lepvec[i].type) == fabs(lepvec[Z1LeptonPlusIndex].type)) { |
391 |
|
TLorentzVector pair1 = Z1LeptonPlus + *leptonMinus; |
392 |
|
TLorentzVector pair2 = Z1LeptonMinus + *leptonPlus; |
393 |
|
if( ctrl.debug ) cout << "pair1: " << pair1.M() << "\tpair2: "<< pair2.M() << endl; |
394 |
< |
if (!(pair1.M() > 12 || pair2.M() > 12)) continue; |
394 |
> |
if (!(pair1.M() > 2 && pair2.M() > 2)) continue; |
395 |
|
} |
396 |
< |
|
396 |
> |
|
397 |
> |
|
398 |
|
|
399 |
|
//Disambiguiation is done by choosing the pair with the largest ptMax and largest ptMin |
400 |
|
if (Z2LeptonPlusIndex < 0) { |
462 |
|
lepvec[Z2LeptonPlusIndex].is4l = true; |
463 |
|
lepvec[Z2LeptonMinusIndex].is4l = true; |
464 |
|
|
465 |
+ |
|
466 |
|
|
467 |
|
//*************************************************************** |
468 |
|
// remaining cuts : kinematic & iso |
473 |
|
return ret; |
474 |
|
} |
475 |
|
|
476 |
< |
double Z2massCut=0; |
480 |
< |
if ( ctrl.kinematics == "loose" ) Z2massCut = 12; |
481 |
< |
else if ( ctrl.kinematics == "tight" ) Z2massCut = 20; |
482 |
< |
else { cout << "error! kinematic tightness not defined!" << endl; assert(0); } |
476 |
> |
double Z2massCut= 2; |
477 |
|
|
478 |
< |
if ( Z1Candidate.M() > 120 || |
478 |
> |
if ( Z1Candidate.M() > 120 || |
479 |
|
Z2Candidate.M() < Z2massCut || |
480 |
|
Z2Candidate.M() > 120 || |
481 |
|
!(lepvec[Z1LeptonPlusIndex].vec->Pt() > 20.0 || lepvec[Z1LeptonMinusIndex].vec->Pt() > 20.0) || |
521 |
|
ret.Z2leptons.push_back(lepvec[Z2LeptonMinusIndex]); |
522 |
|
ret.Z2leptons.push_back(lepvec[Z2LeptonPlusIndex]); |
523 |
|
} |
524 |
+ |
|
525 |
+ |
|
526 |
|
|
527 |
|
return ret; |
528 |
|
} |