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
Enumerator
dz 
vz 
bs 
vtx 

Definition at line 20 of file EgammaTrackSelector.h.

20 { dz = 0, vz, bs, vtx };

Constructor & Destructor Documentation

◆ EgammaTrackSelector()

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

Definition at line 60 of file EgammaTrackSelector.h.

60 : thePars(pars) {}

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.

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 }

References cms::cuda::bs, ChiSquaredProbability(), PVValHelper::dz, metname, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, and PDWG_EXOHSCP_cff::tracks.

Member Data Documentation

◆ thePars

Parameters egammaisolation::EgammaTrackSelector::thePars
private

Definition at line 65 of file EgammaTrackSelector.h.

PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
egammaisolation::EgammaTrackSelector::dz
Definition: EgammaTrackSelector.h:20
ChiSquaredProbability
float ChiSquaredProbability(double chiSquared, double nrDOF)
Definition: ChiSquaredProbability.cc:13
egammaisolation::EgammaTrackSelector::bs
Definition: EgammaTrackSelector.h:20
egammaisolation::EgammaTrackSelector::vz
Definition: EgammaTrackSelector.h:20
egammaisolation::EgammaTrackSelector::Parameters::ptMin
double ptMin
ChiSquaredProbability( chi2, ndf ) > chi2ProbMin.
Definition: EgammaTrackSelector.h:56
egammaisolation::EgammaTrackSelector::Parameters::chi2NdofMax
double chi2NdofMax
nValidHits >= nHitsMin
Definition: EgammaTrackSelector.h:54
egammaisolation::EgammaTrackSelector::Parameters::chi2ProbMin
double chi2ProbMin
max value of normalized chi2
Definition: EgammaTrackSelector.h:55
egammaisolation::EgammaTrackSelector::Parameters::dir
reco::isodeposit::Direction dir
range in d0 or dxy (abs value)
Definition: EgammaTrackSelector.h:50
egammaisolation::EgammaTrackSelector::thePars
Parameters thePars
Definition: EgammaTrackSelector.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
egammaisolation::EgammaTrackSelector::Parameters::dzOption
int dzOption
tk.pt>ptMin
Definition: EgammaTrackSelector.h:57
reco::isodeposit::Direction::deltaR
double deltaR(const Direction &dir2) const
Definition: IsoDepositDirection.h:47
egammaisolation::EgammaTrackSelector::vtx
Definition: EgammaTrackSelector.h:20
egammaisolation::EgammaTrackSelector::Parameters::zRange
Range zRange
Definition: EgammaTrackSelector.h:48
egammaisolation::EgammaTrackSelector::Parameters::beamPoint
BeamPoint beamPoint
cone size
Definition: EgammaTrackSelector.h:52
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
egammaisolation::EgammaTrackSelector::Parameters::rRange
Range rRange
range in z
Definition: EgammaTrackSelector.h:49
egammaisolation::EgammaTrackSelector::Parameters::drMax
double drMax
direction of the selection cone
Definition: EgammaTrackSelector.h:51
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
egammaisolation::EgammaTrackSelector::Parameters::nHitsMin
unsigned int nHitsMin
beam spot position
Definition: EgammaTrackSelector.h:53
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40