CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaTrackSelector.cc
Go to the documentation of this file.
4 
5 using namespace egammaisolation;
6 using namespace reco;
7 
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 }
result_type operator()(const input_type &tracks) const
const std::string metname
const_iterator begin() const
tuple result
Definition: query.py:137
float ChiSquaredProbability(double chiSquared, double nrDOF)
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:85
const_iterator end() const