42 |
|
const mithep::Array<mithep::Vertex> * vtxArr , |
43 |
|
const mithep::Array<mithep::PFCandidate> *pfCandidates, |
44 |
|
const mithep::Array<mithep::PileupEnergyDensity> *puEnergyDensity, |
45 |
+ |
const mithep::DecayParticleCol *fConversions, |
46 |
|
const mithep::Array<mithep::Electron> *electronArr, // input electrons |
47 |
|
SelectionStatus (*ElectronPreSelector)( ControlFlags &, |
48 |
|
const mithep::Electron*, |
158 |
|
|
159 |
|
tmplep.status = musel; |
160 |
|
tmplep.fsrRecoveryAttempted = false; |
161 |
< |
SelectionStatus tmpstat = PassWwMuonSel(mu,vtx,pfCandidates); |
161 |
< |
tmplep.tightCutsApplied = tmpstat.tight(); |
161 |
> |
tmplep.tightCutsApplied = muon2012CutBasedIDTight(ctrl,mu,vtx,pfCandidates,puEnergyDensity,eraMu); |
162 |
|
lepvec.push_back(tmplep); |
163 |
|
if( ctrl.debug ) cout << endl; |
164 |
|
} |
171 |
|
|
172 |
|
SelectionStatus denomSel; |
173 |
|
denomSel |= electronPreSelectionNoD0DzIP(ctrl,ele,vtx); |
174 |
< |
if( !(denomSel.getStatus() & SelectionStatus::PRESELECTION) ) continue; |
174 |
> |
if( !denomSel.passPre() ) continue; |
175 |
|
|
176 |
|
SelectionStatus elesel; |
177 |
|
elesel |= (*ElectronPreSelector)(ctrl,ele,vtx); |
211 |
|
tmplep.idMVA = elesel.idMVA; |
212 |
|
tmplep.isoMVA = elesel.isoMVA; |
213 |
|
tmplep.fsrRecoveryAttempted = false; |
214 |
< |
SelectionStatus tmpstat = electronTagSelection(ele,vtx,pfCandidates); |
215 |
< |
tmplep.tightCutsApplied = tmpstat.tight(); |
214 |
> |
tmplep.tightCutsApplied = electron2012CutBasedIDMedium(ctrl,ele,vtx,pfCandidates,fConversions,puEnergyDensity,eraEle); |
215 |
|
lepvec.push_back(tmplep); |
216 |
|
if( ctrl.debug ) cout << endl; |
217 |
|
} |
248 |
|
//******************************************************** |
249 |
|
// Step 3: Good Leptons |
250 |
|
//******************************************************** |
252 |
– |
vector<double> pt_of_leptons_to_erase; |
251 |
|
for (int i=0; i<lepvec.size(); i++ ) { |
254 |
– |
bool already_pushed=false; |
252 |
|
if( !(lepvec[i].status.loose()) ) { |
253 |
< |
pt_of_leptons_to_erase.push_back(lepvec[i].vec.Pt()); |
257 |
< |
already_pushed = true; |
258 |
< |
failingLeptons.push_back(lepvec[i]); // these should pass preselection |
253 |
> |
failingLeptons.push_back(lepvec[i]); |
254 |
|
} else { |
255 |
|
passingLeptons.push_back(lepvec[i]); |
256 |
|
} |
262 |
– |
#ifndef SYNC |
263 |
– |
if( !already_pushed && fabs(lepvec[i].ip3dSig)>4 ) |
264 |
– |
pt_of_leptons_to_erase.push_back(lepvec[i].vec.Pt()); |
265 |
– |
#endif |
266 |
– |
} |
267 |
– |
for( int i=0; i<pt_of_leptons_to_erase.size(); i++ ) { |
268 |
– |
for( vector<SimpleLepton>::iterator it=lepvec.begin(); it != lepvec.end(); it++ ) { |
269 |
– |
SimpleLepton flep = *it; |
270 |
– |
if( flep.vec.Pt() != pt_of_leptons_to_erase[i] ) continue; |
271 |
– |
lepvec.erase(it); |
272 |
– |
break; |
273 |
– |
} |
257 |
|
} |
258 |
|
|
259 |
|
//****************************************************************************** |