CMS 3D CMS Logo

EgammaTrackSelector.cc
Go to the documentation of this file.
4 
5 using namespace egammaisolation;
6 using namespace reco;
7 
8 namespace {
9  template <class T>
10  bool inside(const T& value, std::pair<T, T> const& range) {
11  return value >= range.first && range.second >= value;
12  }
13 } // namespace
14 
16  static const std::string metname = "EgammaIsolationAlgos|EgammaTrackSelector";
18  for (input_type::const_iterator it = tracks.begin(); it != tracks.end(); it++) {
22 
23  float tZ;
24  switch (thePars.dzOption) {
25  case dz:
26  tZ = it->dz();
27  break;
28  case vz:
29  tZ = it->vz();
30  break;
31  case bs:
32  tZ = it->dz(thePars.beamPoint);
33  break;
34  default:
35  tZ = it->vz();
36  break;
37  }
38 
39  float tPt = it->pt();
40  //float tD0 = fabs(it->d0()); //currently not used.
41  float tD0Cor = fabs(it->dxy(thePars.beamPoint));
42  float tEta = it->eta();
43  float tPhi = it->phi();
44  float tChi2Ndof = it->normalizedChi2();
45 
47 
48  if (!inside(tZ, thePars.zRange))
49  continue;
50  if (tPt < thePars.ptMin)
51  continue;
52  if (!inside(tD0Cor, thePars.rRange))
53  continue;
54  if (thePars.dir.deltaR(reco::isodeposit::Direction(tEta, tPhi)) > thePars.drMax)
55  continue;
56  if (tChi2Ndof > thePars.chi2NdofMax)
57  continue;
58 
60  if (thePars.nHitsMin > 0) {
61  unsigned int tHits = it->numberOfValidHits();
62  if (tHits < thePars.nHitsMin)
63  continue;
64  }
65 
67  if (thePars.chi2ProbMin > 0) {
68  float tChi2Prob = ChiSquaredProbability(it->chi2(), it->ndof());
69  if (tChi2Prob < thePars.chi2ProbMin)
70  continue;
71  }
72  result.push_back(&*it);
73  }
74  return result;
75 }
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
MessageLogger.h
egammaisolation
Definition: EgammaTrackSelector.h:11
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
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
value
Definition: value.py:1
egammaisolation::EgammaTrackSelector::operator()
result_type operator()(const input_type &tracks) const
Definition: EgammaTrackSelector.cc:15
EgammaTrackSelector.h
PVValHelper::dz
Definition: PVValidationHelpers.h:51
T
long double T
Definition: Basic3DVectorLD.h:48
relativeConstraints.value
value
Definition: relativeConstraints.py:53
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:311
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40