ATLAS Offline Software
TrigInDetTrack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGINDETTRACK_H
6 #define TRIGINDETTRACK_H
11 #include "Identifier/Identifier.h"
12 #include <map>
13 #include <ostream>
14 #include "GaudiKernel/MsgStream.h"
15 
16 
35 
36  public:
40 
43  // m_trkID(-1),
44  m_algId(NULLID), m_param(NULL), m_endParam(NULL),
45  m_chi2(-1.0), m_siSpacePoints(NULL), m_trtDriftCircles(NULL)
46  {
47  m_NStrawHits=-1;
48  m_NStraw=-1;
49  m_NStrawTime=-1;
50  m_NTRHits=-1;
53  m_HitPattern=0;
54  };
55 
59  const double chi2=0) :
60  // m_trkID(-1),
63  {
64  m_NStrawHits=-1;
65  m_NStraw=-1;
66  m_NStrawTime=-1;
67  m_NTRHits=-1;
70  m_HitPattern=0;
71  };
72 
74  TrigInDetTrack (std::vector<const TrigSiSpacePoint*>* siSpacePoints,
75  const TrigInDetTrackFitPar* param = 0,
77  const double chi2=0) :
78  // m_trkID(-1),
81  {
82  m_NStrawHits=-1;
83  m_NStraw=-1;
84  m_NStrawTime=-1;
85  m_NTRHits=-1;
88  m_HitPattern=0;
89  fillSiHitInfo();
90  }
91 
92  // Constructor with a list of DriftCircles
93  TrigInDetTrack (std::vector<const InDet::TRT_DriftCircle*>* driftCircles,
94  const TrigInDetTrackFitPar* param = 0,
96  const double chi2=0) :
97  // m_trkID(-1),
99  m_siSpacePoints(NULL), m_trtDriftCircles(driftCircles)
100  {
101  m_NStrawHits=-1;
102  m_NStraw=-1;
103  m_NStrawTime=-1;
104  m_NTRHits=-1;
107  m_HitPattern=0;
108  }
109 
110  TrigInDetTrack (const TrigInDetTrack&) = delete;
112 
114 
117  if(m_param) delete m_param;
118  if(m_endParam) delete m_endParam;
119  if(m_siSpacePoints) delete m_siSpacePoints;
121  }
122 
123  // Methods to set data members
124  //void trackId(const int id) { m_trkID = id;}
125  void algorithmId(const AlgoId id) { m_algId = id;}
128  void chi2 ( const double chi2) { m_chi2 = chi2; }
129  void StrawHits (const int NSHits ) { m_NStrawHits = NSHits;}
130  void Straw (const int NS ) { m_NStraw = NS ;}
131  void StrawTime (const int NSTime ) { m_NStrawTime = NSTime;}
132  void TRHits (const int NTR ) { m_NTRHits = NTR ;}
134  void NSCT_SpacePoints(const int n) { m_NSCT_SpacePoints = n;}
135 
136  void siSpacePoints ( std::vector<const TrigSiSpacePoint*>* spacePoints ) {
137  m_siSpacePoints = spacePoints;
138  fillSiHitInfo();
139  }
140  void trtDriftCircles(std::vector<const InDet::TRT_DriftCircle*>* driftCircles) {
141  m_trtDriftCircles = driftCircles;
142  }
144  void HitPattern(const long hp) { m_HitPattern = hp;}
145 
146  // Methods to retrieve data members
147  //int trackId() const { return m_trkID; }
149  AlgoId algorithmId() const { return m_algId; }
151  const TrigInDetTrackFitPar* param() const { return m_param; }
153  const TrigInDetTrackFitPar* endParam() const { return m_endParam; }
155  double chi2() const { return m_chi2; }
157  std::vector <const TrigSiSpacePoint*>* siSpacePoints() { return m_siSpacePoints; }
158  const std::vector <const TrigSiSpacePoint*>* siSpacePoints() const { return m_siSpacePoints; }
159 
161  inline int NPixelSpacePoints() const { return m_NPixelSpacePoints;}
163  inline int NSCT_SpacePoints() const { return m_NSCT_SpacePoints;}
165  inline long HitPattern() const { return m_HitPattern;}
166 
167  //Sivokl: add TRT info
169  inline int NStrawHits() const { return m_NStrawHits; }
171  inline int NStraw() const { return m_NStraw; }
173  inline int NStrawTime() const { return m_NStrawTime; }
175  inline int NTRHits() const { return m_NTRHits; }
177  std::vector<const InDet::TRT_DriftCircle*>* trtDriftCircles() {
178  return m_trtDriftCircles;
179  }
180  const std::vector<const InDet::TRT_DriftCircle*>* trtDriftCircles() const {
181  return m_trtDriftCircles;
182  }
184  const std::vector<Identifier>& rdoList() const {
185  return m_rdoList;
186  }
187 
188  void rdoList (std::vector<Identifier>&& l)
189  {
190  m_rdoList = std::move (l);
191  }
192 
193  void eraseRdoList() {
194  m_rdoList.clear();
195  }
196 
197  void fillRdoList();
198 
199  private:
200  //int m_trkID;
204  double m_chi2;
206  int m_NStraw;
208  int m_NTRHits;
212  std::vector<const TrigSiSpacePoint*>* m_siSpacePoints;
213  std::vector<const InDet::TRT_DriftCircle*>* m_trtDriftCircles;
214  void fillSiHitInfo();
215 
216  std::vector<Identifier> m_rdoList;
217 };
218 
219 std::string str( const TrigInDetTrack& t ); //<! printing helper
220 MsgStream& operator<< ( MsgStream& m, const TrigInDetTrack& t ); //<! printing helper (wraps above)
221 bool operator== ( const TrigInDetTrack& a, const TrigInDetTrack& b );
222 inline bool operator!= ( const TrigInDetTrack& a, const TrigInDetTrack& b ) { return !(a==b); }
223 
231 void diff( const TrigInDetTrack& a, const TrigInDetTrack& b, std::map<std::string, double>& variableChange );
232 
233 
234 CLASS_DEF( TrigInDetTrack , 256636597 , 1 )
235 
236 
237 #endif
TrigInDetTrack::StrawTime
void StrawTime(const int NSTime)
Definition: TrigInDetTrack.h:131
TrigInDetTrack::trtDriftCircles
void trtDriftCircles(std::vector< const InDet::TRT_DriftCircle * > *driftCircles)
Definition: TrigInDetTrack.h:140
TrigInDetTrack::param
void param(const TrigInDetTrackFitPar *param)
Definition: TrigInDetTrack.h:126
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrigInDetTrack::NStrawTime
int NStrawTime() const
Number of TRT straws with valid drift time intersected by track.
Definition: TrigInDetTrack.h:173
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack(std::vector< const TrigSiSpacePoint * > *siSpacePoints, const TrigInDetTrackFitPar *param=0, const TrigInDetTrackFitPar *endParam=0, const double chi2=0)
Constructor with a list of points.
Definition: TrigInDetTrack.h:74
TrigInDetTrack::m_rdoList
std::vector< Identifier > m_rdoList
Definition: TrigInDetTrack.h:216
TrigInDetTrackFitPar
Definition: TrigInDetTrackFitPar.h:67
TrigInDetTrack::HitPattern
long HitPattern() const
Hit pattern of silicon spacepoints.
Definition: TrigInDetTrack.h:165
TrigInDetTrack::chi2
void chi2(const double chi2)
Definition: TrigInDetTrack.h:128
TrigInDetTrack::TRHits
void TRHits(const int NTR)
Definition: TrigInDetTrack.h:132
TrigInDetTrack::m_algId
AlgoId m_algId
Definition: TrigInDetTrack.h:201
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrigInDetTrack::STRATEGY_F_ID
@ STRATEGY_F_ID
Definition: TrigInDetTrack.h:38
TrigSiSpacePoint.h
TrigInDetTrack::eraseRdoList
void eraseRdoList()
Definition: TrigInDetTrack.h:193
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrigInDetTrack::endParam
const TrigInDetTrackFitPar * endParam() const
Track parameters (class TrigInDetTrackFitPar) at end of track.
Definition: TrigInDetTrack.h:153
TrigInDetTrack::STRATEGY_FR_ID
@ STRATEGY_FR_ID
Definition: TrigInDetTrack.h:39
TrigInDetTrack::AlgoId
AlgoId
Definition: TrigInDetTrack.h:37
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack(std::vector< const InDet::TRT_DriftCircle * > *driftCircles, const TrigInDetTrackFitPar *param=0, const TrigInDetTrackFitPar *endParam=0, const double chi2=0)
Definition: TrigInDetTrack.h:93
TrigInDetTrack::NStraw
int NStraw() const
Number of TRT straws intersected by track.
Definition: TrigInDetTrack.h:171
TrigInDetTrack::m_HitPattern
long m_HitPattern
Definition: TrigInDetTrack.h:211
TrigInDetTrack::STRATEGY_AC_ID
@ STRATEGY_AC_ID
Definition: TrigInDetTrack.h:39
TrigInDetTrack::m_trtDriftCircles
std::vector< const InDet::TRT_DriftCircle * > * m_trtDriftCircles
Definition: TrigInDetTrack.h:213
TrigInDetTrack::operator=
TrigInDetTrack & operator=(const TrigInDetTrack &)=delete
TrigInDetTrack::IDSCANID
@ IDSCANID
Definition: TrigInDetTrack.h:37
TrigInDetTrack
Definition: TrigInDetTrack.h:34
TrigInDetTrack::STRATEGY_G_ID
@ STRATEGY_G_ID
Definition: TrigInDetTrack.h:38
TrigInDetTrack::STRATEGY_B_ID
@ STRATEGY_B_ID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack()
Constructors: POOL needs default constructor.
Definition: TrigInDetTrack.h:42
TrigInDetTrack::algorithmId
AlgoId algorithmId() const
Track author SiTrack = 1, IdScan = 2, TrtXK = 4.
Definition: TrigInDetTrack.h:149
TrigInDetTrack::NULLID
@ NULLID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::m_siSpacePoints
std::vector< const TrigSiSpacePoint * > * m_siSpacePoints
Definition: TrigInDetTrack.h:212
TrigInDetTrack::STRATEGY_C_ID
@ STRATEGY_C_ID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::m_NPixelSpacePoints
int m_NPixelSpacePoints
Definition: TrigInDetTrack.h:209
TrigInDetTrack::m_NStrawTime
int m_NStrawTime
Definition: TrigInDetTrack.h:207
beamspotman.n
n
Definition: beamspotman.py:731
TrigInDetTrack::siSpacePoints
std::vector< const TrigSiSpacePoint * > * siSpacePoints()
Pixel and SCT spacepoints associated with track.
Definition: TrigInDetTrack.h:157
TrigInDetTrack::NPixelSpacePoints
void NPixelSpacePoints(const int n)
Definition: TrigInDetTrack.h:133
TrigInDetTrack::NSCT_SpacePoints
void NSCT_SpacePoints(const int n)
Definition: TrigInDetTrack.h:134
TrigInDetTrackFitPar.h
TrigInDetTrack::TRTLUTID
@ TRTLUTID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::m_NStrawHits
int m_NStrawHits
Definition: TrigInDetTrack.h:205
TrigInDetTrack::m_endParam
const TrigInDetTrackFitPar * m_endParam
Definition: TrigInDetTrack.h:203
operator==
bool operator==(const TrigInDetTrack &a, const TrigInDetTrack &b)
Definition: TrigInDetTrack.cxx:93
TrigInDetTrack::trtDriftCircles
std::vector< const InDet::TRT_DriftCircle * > * trtDriftCircles()
TRT drift circles associated with track.
Definition: TrigInDetTrack.h:177
operator<<
MsgStream & operator<<(MsgStream &m, const TrigInDetTrack &t)
Definition: TrigInDetTrack.cxx:87
TrigInDetTrack::rdoList
void rdoList(std::vector< Identifier > &&l)
Definition: TrigInDetTrack.h:188
TrigInDetTrack::Straw
void Straw(const int NS)
Definition: TrigInDetTrack.h:130
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack(const TrigInDetTrackFitPar *param, const TrigInDetTrackFitPar *endParam=0, const double chi2=0)
Constructor with no space points or drift circles.
Definition: TrigInDetTrack.h:57
TRT_DriftCircle.h
TrigInDetTrack::m_NStraw
int m_NStraw
Definition: TrigInDetTrack.h:206
TrigInDetTrack::NStrawHits
int NStrawHits() const
Number of TRT hits associated with track.
Definition: TrigInDetTrack.h:169
TrigInDetTrack::fillSiHitInfo
void fillSiHitInfo()
Definition: TrigInDetTrack.cxx:29
TrigInDetTrack::fillRdoList
void fillRdoList()
Definition: TrigInDetTrack.cxx:52
TrigInDetTrack::siSpacePoints
const std::vector< const TrigSiSpacePoint * > * siSpacePoints() const
Definition: TrigInDetTrack.h:158
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
TrigInDetTrack::StrawHits
void StrawHits(const int NSHits)
Definition: TrigInDetTrack.h:129
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigInDetTrack::SITRACKID
@ SITRACKID
Definition: TrigInDetTrack.h:37
str
std::string str(const TrigInDetTrack &t)
Definition: TrigInDetTrack.cxx:68
TrigInDetTrack::NTRHits
int NTRHits() const
Number of high-threshold TRT hits associated with track.
Definition: TrigInDetTrack.h:175
TrigInDetTrack::~TrigInDetTrack
~TrigInDetTrack()
Destructor.
Definition: TrigInDetTrack.h:116
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TrigInDetTrack::STRATEGY_A_ID
@ STRATEGY_A_ID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::STRATEGY_AB_ID
@ STRATEGY_AB_ID
Definition: TrigInDetTrack.h:39
operator!=
bool operator!=(const TrigInDetTrack &a, const TrigInDetTrack &b)
Definition: TrigInDetTrack.h:222
TrigInDetTrack::NPixelSpacePoints
int NPixelSpacePoints() const
Number of Pixel spacepoints associated with track.
Definition: TrigInDetTrack.h:161
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigInDetTrack::m_param
const TrigInDetTrackFitPar * m_param
Definition: TrigInDetTrack.h:202
TrigInDetTrack::param
const TrigInDetTrackFitPar * param() const
Track parameters (class TrigInDetTrackFitPar) at start of track.
Definition: TrigInDetTrack.h:151
TrigInDetTrack::endParam
void endParam(const TrigInDetTrackFitPar *param)
Definition: TrigInDetTrack.h:127
TrigInDetTrack::chi2
double chi2() const
Chi2 of the track fit normalized on number of DOF.
Definition: TrigInDetTrack.h:155
TrigInDetTrack::siSpacePoints
void siSpacePoints(std::vector< const TrigSiSpacePoint * > *spacePoints)
Definition: TrigInDetTrack.h:136
TrigInDetTrack::trtDriftCircles
const std::vector< const InDet::TRT_DriftCircle * > * trtDriftCircles() const
Definition: TrigInDetTrack.h:180
TrigInDetTrack::NSCT_SpacePoints
int NSCT_SpacePoints() const
Number of SCT spacepoints associated with track.
Definition: TrigInDetTrack.h:163
TrigInDetTrack::m_NSCT_SpacePoints
int m_NSCT_SpacePoints
Definition: TrigInDetTrack.h:210
TrigInDetTrack::TrigInDetTrack
TrigInDetTrack(const TrigInDetTrack &)=delete
TrigInDetTrack::TRTXKID
@ TRTXKID
Definition: TrigInDetTrack.h:37
TrigInDetTrack::algorithmId
void algorithmId(const AlgoId id)
Definition: TrigInDetTrack.h:125
TrigInDetTrack::rdoList
const std::vector< Identifier > & rdoList() const
RDOs associated with track.
Definition: TrigInDetTrack.h:184
TrigInDetTrack::HitPattern
void HitPattern(const long hp)
Hit pattern setter method.
Definition: TrigInDetTrack.h:144
CLASS_DEF.h
macros to associate a CLID to a type
FTF
header for factorised IRoiDescriptor interface
Definition: TrigInDetUtils.h:18
TrigInDetTrack::m_chi2
double m_chi2
Definition: TrigInDetTrack.h:204
diff
void diff(const TrigInDetTrack &a, const TrigInDetTrack &b, std::map< std::string, double > &variableChange)
comparison with feedback Function compares two objects and returns "semi verbose" output in the form ...
Definition: TrigInDetTrack.cxx:112
TrigInDetTrack::m_NTRHits
int m_NTRHits
Definition: TrigInDetTrack.h:208
TrigInDetTrack::STRATEGY_BC_ID
@ STRATEGY_BC_ID
Definition: TrigInDetTrack.h:39