197 |
|
if(ctrl.debug) cout << "muon presel returning status : " << status.getStatus() << endl; |
198 |
|
return status; |
199 |
|
} |
200 |
+ |
//-------------------------------------------------------------------------------------------------- |
201 |
+ |
SelectionStatus muonDenominatorSelection( ControlFlags &ctrl, |
202 |
+ |
const mithep::Muon * mu, |
203 |
+ |
const mithep::Vertex * vtx, |
204 |
+ |
const mithep::Array<mithep::PFCandidate> * pfCandidates ) |
205 |
+ |
//-------------------------------------------------------------------------------------------------- |
206 |
+ |
{ |
207 |
+ |
bool ret = true; |
208 |
+ |
|
209 |
+ |
ret &= ( fabs(mu->Ip3dPVSignificance()) < 100 ); |
210 |
+ |
ret &= ( mu->Pt() >= 5 ); |
211 |
+ |
ret &= ( fabs(mu->Eta()) <= 2.4 ); |
212 |
+ |
ret &= ( mu->IsTrackerMuon() || mu->IsGlobalMuon() ); |
213 |
+ |
ret &= (mu->HasTrackerTrk() && |
214 |
+ |
fabs(mu->TrackerTrk()->D0Corrected(*vtx)) < 0.5 && |
215 |
+ |
fabs(mu->TrackerTrk()->DzCorrected(*vtx)) < 1.0); |
216 |
+ |
|
217 |
+ |
SelectionStatus status; |
218 |
+ |
if( ret ) status.setStatus(SelectionStatus::PRESELECTION); |
219 |
+ |
return status; |
220 |
+ |
} |
221 |
|
|
222 |
|
//-------------------------------------------------------------------------------------------------- |
223 |
|
SelectionStatus muonPreSelectionNoD0DzIP( ControlFlags &ctrl, |
368 |
|
|
369 |
|
return status; |
370 |
|
} |
371 |
+ |
//---------------------------------------------------------------------------------------- |
372 |
+ |
SelectionStatus PassWwMuonSel(const mithep::Muon *mu, const mithep::Vertex *vtx, |
373 |
+ |
const mithep::Array<mithep::PFCandidate> *pfArr |
374 |
+ |
) |
375 |
+ |
{ |
376 |
+ |
bool passID=true; |
377 |
+ |
bool passIso=true; |
378 |
+ |
|
379 |
+ |
if (mu->Pt() < 5) |
380 |
+ |
passID = false; |
381 |
+ |
if (fabs(mu->Eta()) > 2.4) |
382 |
+ |
passID = false; |
383 |
+ |
if (mu->BestTrk()->PtErr()/mu->Pt() > 0.1) |
384 |
+ |
passID = false; |
385 |
+ |
if (fabs(mu->BestTrk()->DzCorrected(*vtx)) > 0.1) |
386 |
+ |
passID = false; |
387 |
+ |
Bool_t isGlobal = (mu->IsGlobalMuon()) && (mu->BestTrk()->RChi2() < 10) && |
388 |
+ |
(mu->NMatches() > 1) && (mu->NValidHits() > 0); |
389 |
+ |
Bool_t isTracker = (mu->IsTrackerMuon()) && |
390 |
+ |
(mu->Quality().Quality(mithep::MuonQuality::TMLastStationTight)); |
391 |
+ |
if (!isGlobal && !isTracker) |
392 |
+ |
passID = false; |
393 |
+ |
int ntrkhits = (mu->HasTrackerTrk()) ? mu->TrackerTrk()->NHits() : 0; |
394 |
+ |
if (ntrkhits < 10) |
395 |
+ |
passID = false; |
396 |
+ |
if (mu->BestTrk()->NPixelHits() < 1) |
397 |
+ |
passID = false; |
398 |
+ |
if (fabs(mu->BestTrk()->D0Corrected(*vtx)) > 0.02) |
399 |
+ |
passID = false; |
400 |
+ |
|
401 |
+ |
// note: this isn't really ww muon isolation |
402 |
+ |
float pfiso = computePFMuonIso(mu,vtx,pfArr,0.3); |
403 |
+ |
|
404 |
+ |
if (pfiso > 0.2*mu->Pt()) |
405 |
+ |
passIso = false; |
406 |
+ |
|
407 |
+ |
SelectionStatus status; |
408 |
+ |
if(passID) status |= SelectionStatus::TIGHTIDANDPRE; |
409 |
+ |
if(passIso) status |= SelectionStatus::TIGHTISOANDPRE; |
410 |
+ |
|
411 |
+ |
return status; |
412 |
+ |
|
413 |
+ |
} |