#include <EgammaTrackSelector.h>
Classes | |
struct | Parameters |
config parameters More... | |
Public Types | |
enum | { dz = 0, vz, bs, vtx } |
typedef reco::TrackBase::Point | BeamPoint |
typedef edm::View< reco::Track > | input_type |
typedef egammaisolation::EgammaRange < float > | Range |
typedef std::list< const reco::Track * > | result_type |
Public Member Functions | |
EgammaTrackSelector (const Parameters &pars) | |
result_type | operator() (const input_type &tracks) const |
Private Attributes | |
Parameters | thePars |
Definition at line 14 of file EgammaTrackSelector.h.
Definition at line 20 of file EgammaTrackSelector.h.
Definition at line 19 of file EgammaTrackSelector.h.
Definition at line 17 of file EgammaTrackSelector.h.
typedef std::list<const reco::Track*> egammaisolation::EgammaTrackSelector::result_type |
Definition at line 18 of file EgammaTrackSelector.h.
anonymous enum |
egammaisolation::EgammaTrackSelector::EgammaTrackSelector | ( | const Parameters & | pars | ) | [inline] |
Definition at line 46 of file EgammaTrackSelector.h.
: thePars(pars) { }
EgammaTrackSelector::result_type EgammaTrackSelector::operator() | ( | const input_type & | tracks | ) | const |
pick/read variables in order to cut down on unnecessary calls someone will have some fun reading the log if Debug is on the biggest reason is the numberOfValidHits call (the rest are not as costly)
access to the remaining vars is slow
skip if min Hits == 0; assumes any track has at least one valid hit
similarly here
Definition at line 8 of file EgammaTrackSelector.cc.
References edm::View< T >::begin(), ChiSquaredProbability(), edm::View< T >::end(), metname, and query::result.
{ static std::string metname = "EgammaIsolationAlgos|EgammaTrackSelector"; result_type result; for (input_type::const_iterator it = tracks.begin(); it != tracks.end(); it++) { float tZ; switch(thePars.dzOption) { case dz : tZ = it->dz(); break; case vz : tZ = it->vz(); break; case bs : tZ = it->dz(thePars.beamPoint); break; default : tZ = it->vz(); break; } float tPt = it->pt(); //float tD0 = fabs(it->d0()); //currently not used. float tD0Cor = fabs(it->dxy(thePars.beamPoint)); float tEta = it->eta(); float tPhi = it->phi(); float tChi2Ndof = it->normalizedChi2(); if ( !thePars.zRange.inside( tZ ) ) continue; if ( tPt < thePars.ptMin ) continue; if ( !thePars.rRange.inside( tD0Cor) ) continue; if ( thePars.dir.deltaR( reco::isodeposit::Direction(tEta, tPhi) ) > thePars.drMax ) continue; if ( tChi2Ndof > thePars.chi2NdofMax ) continue; if (thePars.nHitsMin > 0 ){ unsigned int tHits = it->numberOfValidHits(); if ( tHits < thePars.nHitsMin ) continue; } if(thePars.chi2ProbMin > 0){ float tChi2Prob = ChiSquaredProbability(it->chi2(), it->ndof()); if ( tChi2Prob < thePars.chi2ProbMin ) continue; } result.push_back(&*it); } return result; }
Definition at line 52 of file EgammaTrackSelector.h.