CMS 3D CMS Logo

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 std::pair< float, 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 13 of file EgammaTrackSelector.h.

Member Typedef Documentation

◆ BeamPoint

Definition at line 18 of file EgammaTrackSelector.h.

◆ input_type

Definition at line 17 of file EgammaTrackSelector.h.

◆ Range

typedef std::pair<float, float> egammaisolation::EgammaTrackSelector::Range

Definition at line 15 of file EgammaTrackSelector.h.

◆ result_type

Definition at line 16 of file EgammaTrackSelector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Constructor & Destructor Documentation

◆ EgammaTrackSelector()

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

Definition at line 60 of file EgammaTrackSelector.h.

Member Function Documentation

◆ operator()()

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 15 of file EgammaTrackSelector.cc.

References cms::cuda::bs, ChiSquaredProbability(), PVValHelper::dz, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, metname, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, DiMuonV_cfg::tracks, and btvMC_cff::vz.

15  {
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;
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 }
const std::string metname
double ptMin
ChiSquaredProbability( chi2, ndf ) > chi2ProbMin.
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
std::list< const reco::Track * > result_type
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
double deltaR(const Direction &dir2) const

Member Data Documentation

◆ thePars

Parameters egammaisolation::EgammaTrackSelector::thePars
private

Definition at line 65 of file EgammaTrackSelector.h.