ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
16#include <vector>
18
19class EMTrackMatch : public egDetail
20{
21public:
22
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
92
95
96 double deltaPhiRot () const;
97
99
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
double PhiExtrap(int) const
Phi of track extrapolated at pre sampler(0) -> 3rd sampling(3)
EMTrackMatch()=default
Default constructor.
double trackd0sigma_physics() const
return track transverse impact parameter wrt beam spot
virtual bool hasBoolParameter(egammaParameters::ParamDef) const override final
TrkExtrapDef extrapMethod() const
enum to indicate which track extrapolation method was used for track match.
TrkExtrapDef
Enum for track extrapolation to calo.
@ fromPerigee
from the perigee of TrackParticle
@ fromCaloToPerigee
from the calo to the perigee - fast extrapolation
@ fromPerigeeRescaled
from the perigee of TrackParticle rescaled by Ecluster
@ fromLastMeasurement
from the last measurement of TrackParticle
std::vector< std::pair< egammaParameters::ParamDef, double > > m_parameters
bool expectHitInBLayer() const
boolean to know if b-layer hit is expected
virtual double parameter(egammaParameters::ParamDef) const override
double trackd0_pv() const
return track transverse impact parameter wrt primary vertex
double etaSampling1() const
eta at sampling 1 for extrapolation from the last hit - allows recalcultion of deltaEta
virtual bool boolParameter(egammaParameters::ParamDef) const override
virtual const std::string & className() const override
interface methods
void fillEtaPhiExtrap(const std::vector< double > &EtaExtrap, const std::vector< double > &PhiExtrap)
set method (EtaExtrap and PhiExtrap)
virtual int linkIndex() const override
index number among TrackParticle links of the egamma object (counting starts at 0)
int trackNumber() const
index number in TrackContainer (counting starts at 1 for sake of CBNT)
virtual ~EMTrackMatch()=default
Destructor.
int tracksInBroadWindow() const
number of tracks in isolation window (taken at sampling 2): (# primary tracks if matched track is pri...
double EtaExtrap(int) const
Eta of track extrapolated at pre sampler(0) -> 3rd sampling(3)
void setDeltaPhiLast(double value, bool overwrite=false)
void setEtaExtrap(int sampl, double value, bool overwrite=false)
double deltaPhiRot() const
deltaPhi between the direction of the momentum of the track at its perigee and the phi of the POSITIO...
virtual void set_linkIndex(int value) override
double PhiRescaled(int) const
PhiRescaled at pre sampler(0) -> 3rd sampling(3)
bool isPrimary() const
true if matched track has a hit in first or second pixel layer
bool trackRefit() const
true if track was refitted to account for brem effects
void print() const
void set_boolParameter(egammaParameters::ParamDef, bool, bool overwrite=false)
virtual bool hasParameter(egammaParameters::ParamDef) const override
double trackd0_physics() const
return track transverse impact parameter wrt beam spot
void setextrapMethod(TrkExtrapDef value, bool overwrite=false)
double trackd0sigma_pv() const
return track transverse impact parameter wrt primary vertex
void setDeltaPhiRot(double value, bool overwrite=false)
void setDeltaPhi(int sampl, double value, bool overwrite=false)
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
void setPhiExtrap(int sampl, double value, bool overwrite=false)
double deltaPhi(int) const
deltaPhi at pre sampler(0) -> 3rd sampling(3)
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)
void setEtaSampling1(double value, bool overwrite=false)
double deltaEta(int) const
deltaEta at pre sampler(0) -> 3rd sampling(3)
double deltaPhiRescaled() const
deltaPhi at sampling 2 for rescaled momentum extrapolation from the perigee.
std::vector< std::pair< egammaParameters::ParamDef, bool > > m_parametersBool
void setPhiRescaled(int sampl, double value, bool overwrite=false)
double deltaPhiLast() const
deltaPhi from the last Point
void setDeltaPhiRescaled(double value, bool overwrite=false)
void setDeltaEta(int sampl, double value, bool overwrite=false)
egDetail()=default
Default constructor.