CMS 3D CMS Logo

EgammaTrackSelector.cc
Go to the documentation of this file.
4 
5 using namespace egammaisolation;
6 using namespace reco;
7 
9  static const std::string metname = "EgammaIsolationAlgos|EgammaTrackSelector";
11  for (input_type::const_iterator it = tracks.begin(); it != tracks.end(); it++) {
15 
16  float tZ;
17  switch (thePars.dzOption) {
18  case dz:
19  tZ = it->dz();
20  break;
21  case vz:
22  tZ = it->vz();
23  break;
24  case bs:
25  tZ = it->dz(thePars.beamPoint);
26  break;
27  default:
28  tZ = it->vz();
29  break;
30  }
31 
32  float tPt = it->pt();
33  //float tD0 = fabs(it->d0()); //currently not used.
34  float tD0Cor = fabs(it->dxy(thePars.beamPoint));
35  float tEta = it->eta();
36  float tPhi = it->phi();
37  float tChi2Ndof = it->normalizedChi2();
38 
40 
41  if (!thePars.zRange.inside(tZ))
42  continue;
43  if (tPt < thePars.ptMin)
44  continue;
45  if (!thePars.rRange.inside(tD0Cor))
46  continue;
47  if (thePars.dir.deltaR(reco::isodeposit::Direction(tEta, tPhi)) > thePars.drMax)
48  continue;
49  if (tChi2Ndof > thePars.chi2NdofMax)
50  continue;
51 
53  if (thePars.nHitsMin > 0) {
54  unsigned int tHits = it->numberOfValidHits();
55  if (tHits < thePars.nHitsMin)
56  continue;
57  }
58 
60  if (thePars.chi2ProbMin > 0) {
61  float tChi2Prob = ChiSquaredProbability(it->chi2(), it->ndof());
62  if (tChi2Prob < thePars.chi2ProbMin)
63  continue;
64  }
65  result.push_back(&*it);
66  }
67  return result;
68 }
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
MessageLogger.h
egammaisolation
Definition: EgammaRange.h:12
ChiSquaredProbability
float ChiSquaredProbability(double chiSquared, double nrDOF)
Definition: ChiSquaredProbability.cc:13
ChiSquaredProbability.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
cms::cuda::bs
bs
Definition: HistoContainer.h:127
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::View
Definition: CaloClusterFwd.h:14
egammaisolation::EgammaTrackSelector::operator()
result_type operator()(const input_type &tracks) const
Definition: EgammaTrackSelector.cc:8
EgammaTrackSelector.h
PVValHelper::dz
Definition: PVValidationHelpers.h:50
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
egammaisolation::EgammaTrackSelector::result_type
std::list< const reco::Track * > result_type
Definition: EgammaTrackSelector.h:16
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
mps_fire.result
result
Definition: mps_fire.py:303
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43