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 egammaisolation::EgammaRange< 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

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

8  {
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;
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 }

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::EgammaRange::inside
bool inside(const T &value) const
Definition: EgammaRange.h:31
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:303
egammaisolation::EgammaTrackSelector::Parameters::nHitsMin
unsigned int nHitsMin
beam spot position
Definition: EgammaTrackSelector.h:53
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43