ATLAS Offline Software
EMTrackMatch.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMAEVENT_EMTRACKMATCH_H
6 #define EGAMMAEVENT_EMTRACKMATCH_H
7 
16 #include <vector>
17 #include "egammaEvent/egDetail.h"
18 
19 class EMTrackMatch : public egDetail
20 {
21 public:
22 
24  enum TrkExtrapDef {
33  };
34 
36  EMTrackMatch() = default;
37 
39  EMTrackMatch(const std::vector<double>& deltaEta,
40  const std::vector<double>& deltaPhi,
41  bool isPrimary,
42  int trackNumber,
43  bool trackRefit,
44  int linkIndex = 0);
45 
47  EMTrackMatch(const std::vector<double>& EtaExtrap,
48  const std::vector<double>& PhiExtrap,
49  const std::vector<double>& deltaEta,
50  const std::vector<double>& deltaPhi,
51  bool isPrimary,
52  int trackNumber,
53  bool trackRefit,
54  int linkIndex = 0);
55 
57  virtual ~EMTrackMatch() = default;
58 
59  virtual const std::string& className() const override;
60 
61  virtual double parameter(egammaParameters::ParamDef) const override;
62  virtual bool hasParameter(egammaParameters::ParamDef) const override;
63  virtual bool hasBoolParameter(egammaParameters::ParamDef) const override final;
64 
65  void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false) ;
66  void set_boolParameter(egammaParameters::ParamDef, bool, bool overwrite = false);
67 
69  double deltaEta (int) const;
71  double deltaPhi (int) const;
73  double EtaExtrap (int) const;
75  double PhiExtrap (int) const;
77  double PhiRescaled (int) const;
78 
79 
82  double etaSampling1 () const;
83 
87  double deltaPhiRescaled () const;
88 
91  TrkExtrapDef extrapMethod () const;
92 
96  double deltaPhiRot () const;
97 
100  double deltaPhiLast () const;
101 
103  double trackd0_physics() const;
104 
106  double trackd0_pv() const;
107 
109  double trackd0sigma_physics() const;
110 
112  double trackd0sigma_pv() const;
113 
115  bool expectHitInBLayer() const;
116 
118  void fill(const std::vector<double>& deltaEta,
119  const std::vector<double>& deltaPhi,
120  bool isPrimary,
121  int trackNumber,
122  bool trackRefit,
123  int linkIndex = 0);
125  void fill(const std::vector<double>& EtaExtrap,
126  const std::vector<double>& PhiExtrap,
127  const std::vector<double>& deltaEta,
128  const std::vector<double>& deltaPhi,
129  bool isPrimary,
130  int trackNumber,
131  bool trackRefit,
132  int linkIndex = 0);
133 
134 
136  void fill(int trackNumber);
137 
139  void fillEtaPhiExtrap(const std::vector<double>& EtaExtrap,
140  const std::vector<double>& PhiExtrap);
142  void fill(const std::vector<double>& deltaEta,
143  const std::vector<double>& deltaPhi);
144 
146  bool isPrimary () const;
147 
149  bool trackRefit () const;
150 
151  // debugging aid
152  void print() const;
153 
155  int trackNumber () const;
156 
158  virtual int linkIndex () const override;
159  virtual void set_linkIndex (int value) override;
160 
164  int tracksInBroadWindow () const;
165  void tracksInBroadWindow (int value, bool overwrite=true);
166  void setEtaExtrap (int sampl, double value, bool overwrite=false);
167  void setPhiExtrap (int sampl, double value, bool overwrite=false);
168  void setPhiRescaled (int sampl, double value, bool overwrite=false);
169  void setDeltaEta (int sampl, double value, bool overwrite=false);
170  void setDeltaPhi (int sampl, double value, bool overwrite=false);
171  void setEtaSampling1 (double value, bool overwrite=false);
172  void setDeltaPhiRescaled (double value, bool overwrite=false);
173  void setextrapMethod (TrkExtrapDef value, bool overwrite=false);
174  void setDeltaPhiRot (double value, bool overwrite=false);
175  void setDeltaPhiLast (double value, bool overwrite=false);
176 
177  private:
178 
179  std::vector < std::pair<egammaParameters::ParamDef , double > > m_parameters;
180  std::vector < std::pair<egammaParameters::ParamDef, bool> > m_parametersBool;
181 
182  virtual bool boolParameter(egammaParameters::ParamDef) const override;
183 };
184 
185 
186 #endif
187 
188 
EMTrackMatch::set_boolParameter
void set_boolParameter(egammaParameters::ParamDef, bool, bool overwrite=false)
Definition: EMTrackMatch.cxx:166
EMTrackMatch::deltaPhi
double deltaPhi(int) const
deltaPhi at pre sampler(0) -> 3rd sampling(3)
Definition: EMTrackMatch.cxx:558
EMTrackMatch::setDeltaPhi
void setDeltaPhi(int sampl, double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:264
EMTrackMatch::linkIndex
virtual int linkIndex() const override
index number among TrackParticle links of the egamma object (counting starts at 0)
Definition: EMTrackMatch.cxx:642
EMTrackMatch
Definition: EMTrackMatch.h:20
EMTrackMatch::~EMTrackMatch
virtual ~EMTrackMatch()=default
Destructor.
EMTrackMatch::parameter
virtual double parameter(egammaParameters::ParamDef) const override
Definition: EMTrackMatch.cxx:109
EMTrackMatch::TrkExtrapDef
TrkExtrapDef
Enum for track extrapolation to calo.
Definition: EMTrackMatch.h:24
EMTrackMatch::hasBoolParameter
virtual bool hasBoolParameter(egammaParameters::ParamDef) const override final
Definition: EMTrackMatch.cxx:491
EMTrackMatch::trackd0sigma_pv
double trackd0sigma_pv() const
return track transverse impact parameter wrt primary vertex
Definition: EMTrackMatch.cxx:707
EMTrackMatch::setPhiExtrap
void setPhiExtrap(int sampl, double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:222
EMTrackMatch::setextrapMethod
void setextrapMethod(TrkExtrapDef value, bool overwrite=false)
Definition: EMTrackMatch.cxx:299
EMTrackMatch::deltaEta
double deltaEta(int) const
deltaEta at pre sampler(0) -> 3rd sampling(3)
Definition: EMTrackMatch.cxx:543
EMTrackMatch::PhiRescaled
double PhiRescaled(int) const
PhiRescaled at pre sampler(0) -> 3rd sampling(3)
Definition: EMTrackMatch.cxx:529
egammaParameters::ParamDef
ParamDef
Definition: egammaParamDefs.h:99
athena.value
value
Definition: athena.py:124
EMTrackMatch::hasParameter
virtual bool hasParameter(egammaParameters::ParamDef) const override
Definition: EMTrackMatch.cxx:445
EMTrackMatch::fillEtaPhiExtrap
void fillEtaPhiExtrap(const std::vector< double > &EtaExtrap, const std::vector< double > &PhiExtrap)
set method (EtaExtrap and PhiExtrap)
Definition: EMTrackMatch.cxx:393
EMTrackMatch::deltaPhiLast
double deltaPhiLast() const
deltaPhi from the last Point
Definition: EMTrackMatch.cxx:615
EMTrackMatch::PhiExtrap
double PhiExtrap(int) const
Phi of track extrapolated at pre sampler(0) -> 3rd sampling(3)
Definition: EMTrackMatch.cxx:515
EMTrackMatch::trackd0_physics
double trackd0_physics() const
return track transverse impact parameter wrt beam spot
Definition: EMTrackMatch.cxx:680
EMTrackMatch::setPhiRescaled
void setPhiRescaled(int sampl, double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:236
EMTrackMatch::expectHitInBLayer
bool expectHitInBLayer() const
boolean to know if b-layer hit is expected
Definition: EMTrackMatch.cxx:716
EMTrackMatch::extrapMethod
TrkExtrapDef extrapMethod() const
enum to indicate which track extrapolation method was used for track match.
Definition: EMTrackMatch.cxx:582
EMTrackMatch::trackNumber
int trackNumber() const
index number in TrackContainer (counting starts at 1 for sake of CBNT)
Definition: EMTrackMatch.cxx:633
EMTrackMatch::m_parameters
std::vector< std::pair< egammaParameters::ParamDef, double > > m_parameters
Definition: EMTrackMatch.h:179
EMTrackMatch::fromCaloToPerigee
@ fromCaloToPerigee
from the calo to the perigee - fast extrapolation
Definition: EMTrackMatch.h:32
EMTrackMatch::EMTrackMatch
EMTrackMatch()=default
Default constructor.
EMTrackMatch::trackRefit
bool trackRefit() const
true if track was refitted to account for brem effects
Definition: EMTrackMatch.cxx:658
EMTrackMatch::trackd0sigma_physics
double trackd0sigma_physics() const
return track transverse impact parameter wrt beam spot
Definition: EMTrackMatch.cxx:698
EMTrackMatch::setDeltaPhiLast
void setDeltaPhiLast(double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:319
egDetail.h
EMTrackMatch::set_parameter
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
Definition: EMTrackMatch.cxx:132
EMTrackMatch::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle rescaled by Ecluster
Definition: EMTrackMatch.h:30
EMTrackMatch::print
void print() const
Definition: EMTrackMatch.cxx:414
EMTrackMatch::setDeltaEta
void setDeltaEta(int sampl, double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:250
EMTrackMatch::isPrimary
bool isPrimary() const
true if matched track has a hit in first or second pixel layer
Definition: EMTrackMatch.cxx:624
EMTrackMatch::m_parametersBool
std::vector< std::pair< egammaParameters::ParamDef, bool > > m_parametersBool
Definition: EMTrackMatch.h:180
EMTrackMatch::setDeltaPhiRot
void setDeltaPhiRot(double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:308
EMTrackMatch::etaSampling1
double etaSampling1() const
eta at sampling 1 for extrapolation from the last hit - allows recalcultion of deltaEta
Definition: EMTrackMatch.cxx:572
EMTrackMatch::tracksInBroadWindow
int tracksInBroadWindow() const
number of tracks in isolation window (taken at sampling 2): (# primary tracks if matched track is pri...
Definition: EMTrackMatch.cxx:664
EMTrackMatch::deltaPhiRescaled
double deltaPhiRescaled() const
deltaPhi at sampling 2 for rescaled momentum extrapolation from the perigee.
Definition: EMTrackMatch.cxx:592
EMTrackMatch::boolParameter
virtual bool boolParameter(egammaParameters::ParamDef) const override
Definition: EMTrackMatch.cxx:190
EMTrackMatch::set_linkIndex
virtual void set_linkIndex(int value) override
Definition: EMTrackMatch.cxx:652
EMTrackMatch::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: EMTrackMatch.h:28
EMTrackMatch::EtaExtrap
double EtaExtrap(int) const
Eta of track extrapolated at pre sampler(0) -> 3rd sampling(3)
Definition: EMTrackMatch.cxx:500
EMTrackMatch::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: EMTrackMatch.h:26
EMTrackMatch::className
virtual const std::string & className() const override
interface methods
Definition: EMTrackMatch.cxx:102
EMTrackMatch::deltaPhiRot
double deltaPhiRot() const
deltaPhi between the direction of the momentum of the track at its perigee and the phi of the POSITIO...
Definition: EMTrackMatch.cxx:604
EMTrackMatch::setEtaExtrap
void setEtaExtrap(int sampl, double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:208
EMTrackMatch::fill
void fill(const std::vector< double > &deltaEta, const std::vector< double > &deltaPhi, bool isPrimary, int trackNumber, bool trackRefit, int linkIndex=0)
general set method (arguments as constructor)
Definition: EMTrackMatch.cxx:366
egDetail
Definition: egDetail.h:29
EMTrackMatch::trackd0_pv
double trackd0_pv() const
return track transverse impact parameter wrt primary vertex
Definition: EMTrackMatch.cxx:689
EMTrackMatch::setEtaSampling1
void setEtaSampling1(double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:278
EMTrackMatch::setDeltaPhiRescaled
void setDeltaPhiRescaled(double value, bool overwrite=false)
Definition: EMTrackMatch.cxx:288