CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
egammaisolation::EgammaTrackSelector Class Reference

#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::Trackinput_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
 

Detailed Description

Definition at line 14 of file EgammaTrackSelector.h.

Member Typedef Documentation

Definition at line 20 of file EgammaTrackSelector.h.

Definition at line 19 of file EgammaTrackSelector.h.

Definition at line 17 of file EgammaTrackSelector.h.

Definition at line 18 of file EgammaTrackSelector.h.

Member Enumeration Documentation

anonymous enum

Constructor & Destructor Documentation

egammaisolation::EgammaTrackSelector::EgammaTrackSelector ( const Parameters pars)
inline

Definition at line 46 of file EgammaTrackSelector.h.

Member Function Documentation

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, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

9 {
10  static std::string metname = "EgammaIsolationAlgos|EgammaTrackSelector";
12  for (input_type::const_iterator it = tracks.begin(); it != tracks.end(); it++) {
13 
17 
18  float tZ;
19  switch(thePars.dzOption) {
20  case dz : tZ = it->dz(); break;
21  case vz : tZ = it->vz(); break;
22  case bs : tZ = it->dz(thePars.beamPoint); break;
23  default : tZ = it->vz(); break;
24  }
25 
26  float tPt = it->pt();
27  //float tD0 = fabs(it->d0()); //currently not used.
28  float tD0Cor = fabs(it->dxy(thePars.beamPoint));
29  float tEta = it->eta();
30  float tPhi = it->phi();
31  float tChi2Ndof = it->normalizedChi2();
32 
34 
35  if ( !thePars.zRange.inside( tZ ) ) continue;
36  if ( tPt < thePars.ptMin ) continue;
37  if ( !thePars.rRange.inside( tD0Cor) ) continue;
38  if ( thePars.dir.deltaR( reco::isodeposit::Direction(tEta, tPhi) ) > thePars.drMax ) continue;
39  if ( tChi2Ndof > thePars.chi2NdofMax ) continue;
40 
42  if (thePars.nHitsMin > 0 ){
43  unsigned int tHits = it->numberOfValidHits();
44  if ( tHits < thePars.nHitsMin ) continue;
45  }
46 
48  if(thePars.chi2ProbMin > 0){
49  float tChi2Prob = ChiSquaredProbability(it->chi2(), it->ndof());
50  if ( tChi2Prob < thePars.chi2ProbMin ) continue;
51  }
52  result.push_back(&*it);
53  }
54  return result;
55 }
const std::string metname
tuple result
Definition: mps_fire.py:95
double ptMin
ChiSquaredProbability( chi2, ndf ) &gt; chi2ProbMin.
bool inside(const T &value) const
Definition: EgammaRange.h:31
float ChiSquaredProbability(double chiSquared, double nrDOF)
double chi2ProbMin
max value of normalized chi2
reco::isodeposit::Direction dir
range in d0 or dxy (abs value)
double drMax
direction of the selection cone
tuple tracks
Definition: testEve_cfg.py:39
std::list< const reco::Track * > result_type
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
double deltaR(const Direction &dir2) const

Member Data Documentation

Parameters egammaisolation::EgammaTrackSelector::thePars
private

Definition at line 52 of file EgammaTrackSelector.h.