ATLAS Offline Software
AlfaLocalHits.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AlfaLocalHits_h
6 #define AlfaLocalHits_h
7 
8 
10 #include "GaudiKernel/Algorithm.h"
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/ServiceHandle.h"
13 
17 
18 
19 // ROOT headers
20 #include <TROOT.h>
21 #include "TString.h"
22 #include "TObjArray.h"
23 #include "TObjString.h"
24 
25 
26 
28 //
29 // user class to store ONE local hit
30 //
33  private:
34  int m_pot = 0;
35  TString m_potname;
36  int m_ishit = 0;
37  Float_t m_x = 0.0F, m_y = 0.0F, m_z = 0.0F;
39  public:
40  AlfaLocalHit();
41  AlfaLocalHit(const ALFA_LocRecCorrEvent * LocRecCorrHit);
42  AlfaLocalHit(const AlfaLocalHit * h);
43  void SetHit(const ALFA_LocRecCorrEvent * LocRecCorrHit);
44  void AssignZ();
45  int GetPotNum() const {return m_pot;};
46  float GetX() const {return m_x;};
47  float GetY() const {return m_y;};
48  float GetZ() const {return m_z;};
49  int IsHi() const {return m_ishit;};
50  int GetMDindex(const char * name);
51  TString GetPotName() const {return m_potname;};
52  TString GetMDname (int i);
53  const ALFA_LocRecCorrEvent * GetLocRecCorr() const {return m_LocRecCorr;};
54  void Print();
55 };
56 
58 //
59 // user class to store MULTIPLE local hits
60 // inherits from AlfaLocalHit
61 //
62 // from such a collection of hits one can
63 // select global track candidates by means
64 // of applying "paths", i.e. B7L1U_A7L1U_X_X etc.
65 //
67 class AlfaLocalHits : public AlfaLocalHit {
68  private:
69  std::vector<AlfaLocalHit> m_hits;
70  int m_nhits;
71  std::vector<AlfaLocalHits> m_paths;
72  int m_npaths;
73  TString m_pathpattern;
74  public:
75  AlfaLocalHits(); // .. default ctor.
76  void update();
77  int AddHit(const AlfaLocalHit& h);
78  void Reset();
79  void ResetPaths();
80  int size();
81  int GetNhits() {return m_nhits;}
82  int GetNpaths(){return m_npaths;}
83  void Dump();
84  void DumpPaths();
85  void ApplyPathPattern(const char * pattern);
86  AlfaLocalHits * GetPathHits(int ipath);
87  AlfaLocalHit * GetHit(int ihit);
88  void SetPathPattern(const char * pattern);
89  TString GetPathPattern(){return m_pathpattern;}
90 };
91 
92 
93 
95 //
96 // user class to store one track candidate
97 //
100  private:
101  int m_arm;
102  float m_x, m_y, m_z;
107  HepGeom::Point3D<double> m_nearimpactpoint;
108  HepGeom::Point3D<double> m_farimpactpoint;
109  public:
110  AlfaTrackCand(AlfaLocalHits * hits); // .. explicit ctor.
111  int IsLeftTrack();
112  int IsRightTrack();
113  int IsLowerArmTrack();
114  int IsUpperArmTrack();
116  int IsLeftOrRightTrack();
117  int IsLeftAndRightTrack();
118  void CalcTrack();
119  int GetArmNum(){return m_arm;};
120  float GetX(){return m_x;};
121  float GetY(){return m_y;};
122  float GetZ(){return m_z;};
123  float GetXslope(){return m_xslope;};
124  float GetYslope(){return m_yslope;};
129  void CalcImpactPoints();
130  HepGeom::Point3D<double> * GetNearImpactPoint(){return &m_nearimpactpoint;};
131  HepGeom::Point3D<double> * GetFarImpactPoint(){return &m_farimpactpoint;};
132  void Dump() const;
133 };
134 
135 
136 
137 #endif // AlfaLocalHits_h
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
AlfaLocalHit::AlfaLocalHit
AlfaLocalHit()
Definition: AlfaLocalHits.cxx:25
AlfaTrackCand::IsLowerArmTrack
int IsLowerArmTrack()
Definition: AlfaLocalHits.cxx:325
AlfaLocalHits::GetPathPattern
TString GetPathPattern()
Definition: AlfaLocalHits.h:89
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
ALFA_LocRecCorrEvent.h
AlfaLocalHit::m_z
Float_t m_z
Definition: AlfaLocalHits.h:37
AlfaTrackCand::GetFarLocalHit
AlfaLocalHit * GetFarLocalHit()
Definition: AlfaLocalHits.h:126
AlfaTrackCand::GetNearLocRecCorr
const ALFA_LocRecCorrEvent * GetNearLocRecCorr() const
Definition: AlfaLocalHits.h:127
AlfaTrackCand::GetY
float GetY()
Definition: AlfaLocalHits.h:121
AlfaLocalHits::DumpPaths
void DumpPaths()
Definition: AlfaLocalHits.cxx:172
AlfaTrackCand::IsLeftAndRightTrack
int IsLeftAndRightTrack()
Definition: AlfaLocalHits.cxx:362
AlfaLocalHit::m_x
Float_t m_x
Definition: AlfaLocalHits.h:37
ALFA_GeometryReader.h
AlfaTrackCand::m_farimpactpoint
HepGeom::Point3D< double > m_farimpactpoint
Definition: AlfaLocalHits.h:108
AlfaLocalHits::m_pathpattern
TString m_pathpattern
Definition: AlfaLocalHits.h:73
AlfaLocalHits::AlfaLocalHits
AlfaLocalHits()
Definition: AlfaLocalHits.cxx:124
AlfaLocalHits::AddHit
int AddHit(const AlfaLocalHit &h)
Definition: AlfaLocalHits.cxx:135
AlfaLocalHits::m_paths
std::vector< AlfaLocalHits > m_paths
Definition: AlfaLocalHits.h:71
AlfaLocalHit::m_potname
TString m_potname
Definition: AlfaLocalHits.h:35
AlfaTrackCand::m_farlocalhit
AlfaLocalHit * m_farlocalhit
Definition: AlfaLocalHits.h:106
AlfaLocalHits
Definition: AlfaLocalHits.h:67
ALFA_LocRecEvent.h
AlfaTrackCand::GetXslope
float GetXslope()
Definition: AlfaLocalHits.h:123
AlfaTrackCand::GetFarLocRecCorr
const ALFA_LocRecCorrEvent * GetFarLocRecCorr() const
Definition: AlfaLocalHits.h:128
AlfaLocalHits::GetPathHits
AlfaLocalHits * GetPathHits(int ipath)
Definition: AlfaLocalHits.cxx:250
AlfaTrackCand::m_arm
int m_arm
Definition: AlfaLocalHits.h:101
AlfaTrackCand::IsLeftTrack
int IsLeftTrack()
Definition: AlfaLocalHits.cxx:297
AlfaTrackCand::m_x
float m_x
Definition: AlfaLocalHits.h:102
AlfaLocalHits::Dump
void Dump()
Definition: AlfaLocalHits.cxx:160
AlfaLocalHit::m_ishit
int m_ishit
Definition: AlfaLocalHits.h:36
AlfaLocalHits::GetNpaths
int GetNpaths()
Definition: AlfaLocalHits.h:82
AlfaTrackCand::m_xslope
float m_xslope
Definition: AlfaLocalHits.h:103
AlfaLocalHit::GetPotNum
int GetPotNum() const
Definition: AlfaLocalHits.h:45
AthAlgorithm.h
AlfaLocalHits::size
int size()
Definition: AlfaLocalHits.cxx:153
AlfaLocalHits::GetNhits
int GetNhits()
Definition: AlfaLocalHits.h:81
lumiFormat.i
int i
Definition: lumiFormat.py:85
AlfaTrackCand::GetZ
float GetZ()
Definition: AlfaLocalHits.h:122
AlfaLocalHit::m_LocRecCorr
const ALFA_LocRecCorrEvent * m_LocRecCorr
Definition: AlfaLocalHits.h:38
AlfaLocalHit::GetY
float GetY() const
Definition: AlfaLocalHits.h:47
AlfaTrackCand::GetYslope
float GetYslope()
Definition: AlfaLocalHits.h:124
AlfaLocalHits::SetPathPattern
void SetPathPattern(const char *pattern)
Definition: AlfaLocalHits.cxx:246
AlfaLocalHit::AssignZ
void AssignZ()
Definition: AlfaLocalHits.cxx:65
AlfaLocalHit::GetMDindex
int GetMDindex(const char *name)
Definition: AlfaLocalHits.cxx:91
AlfaLocalHit::GetLocRecCorr
const ALFA_LocRecCorrEvent * GetLocRecCorr() const
Definition: AlfaLocalHits.h:53
AlfaTrackCand::m_nearlocalhit
AlfaLocalHit * m_nearlocalhit
Definition: AlfaLocalHits.h:105
ALFA_LocRecCorrEvent
Definition: ALFA_LocRecCorrEvent.h:8
AlfaTrackCand::GetFarImpactPoint
HepGeom::Point3D< double > * GetFarImpactPoint()
Definition: AlfaLocalHits.h:131
AlfaTrackCand::GetNearLocalHit
AlfaLocalHit * GetNearLocalHit()
Definition: AlfaLocalHits.h:125
AlfaLocalHit::GetZ
float GetZ() const
Definition: AlfaLocalHits.h:48
AlfaLocalHits::m_npaths
int m_npaths
Definition: AlfaLocalHits.h:72
AlfaTrackCand::m_trackcandhits
AlfaLocalHits * m_trackcandhits
Definition: AlfaLocalHits.h:104
AlfaLocalHits::m_hits
std::vector< AlfaLocalHit > m_hits
Definition: AlfaLocalHits.h:69
AlfaLocalHits::GetHit
AlfaLocalHit * GetHit(int ihit)
Definition: AlfaLocalHits.cxx:258
AlfaLocalHits::ResetPaths
void ResetPaths()
Definition: AlfaLocalHits.cxx:146
AlfaTrackCand::AlfaTrackCand
AlfaTrackCand(AlfaLocalHits *hits)
Definition: AlfaLocalHits.cxx:273
AlfaTrackCand::GetX
float GetX()
Definition: AlfaLocalHits.h:120
AlfaTrackCand::m_y
float m_y
Definition: AlfaLocalHits.h:102
AlfaLocalHit::GetMDname
TString GetMDname(int i)
Definition: AlfaLocalHits.cxx:103
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AlfaTrackCand::CalcTrack
void CalcTrack()
Definition: AlfaLocalHits.cxx:370
AlfaTrackCand::IsValidTrack
int IsValidTrack()
Definition: AlfaLocalHits.h:115
AlfaLocalHit::IsHi
int IsHi() const
Definition: AlfaLocalHits.h:49
AlfaTrackCand::IsLeftOrRightTrack
int IsLeftOrRightTrack()
Definition: AlfaLocalHits.cxx:354
AlfaTrackCand::m_yslope
float m_yslope
Definition: AlfaLocalHits.h:103
AlfaLocalHit
Definition: AlfaLocalHits.h:32
h
AlfaLocalHit::SetHit
void SetHit(const ALFA_LocRecCorrEvent *LocRecCorrHit)
Definition: AlfaLocalHits.cxx:53
AlfaLocalHits::m_nhits
int m_nhits
Definition: AlfaLocalHits.h:70
AlfaTrackCand::IsUpperArmTrack
int IsUpperArmTrack()
Definition: AlfaLocalHits.cxx:339
AlfaLocalHit::m_pot
int m_pot
Definition: AlfaLocalHits.h:34
AlfaLocalHits::Reset
void Reset()
Definition: AlfaLocalHits.cxx:140
AlfaLocalHit::Print
void Print()
Definition: AlfaLocalHits.cxx:83
AlfaLocalHits::ApplyPathPattern
void ApplyPathPattern(const char *pattern)
Definition: AlfaLocalHits.cxx:179
AlfaTrackCand::m_nearimpactpoint
HepGeom::Point3D< double > m_nearimpactpoint
Definition: AlfaLocalHits.h:107
AlfaLocalHit::GetX
float GetX() const
Definition: AlfaLocalHits.h:46
AlfaTrackCand::GetArmNum
int GetArmNum()
Definition: AlfaLocalHits.h:119
AlfaTrackCand::IsRightTrack
int IsRightTrack()
Definition: AlfaLocalHits.cxx:311
AlfaLocalHit::GetPotName
TString GetPotName() const
Definition: AlfaLocalHits.h:51
AlfaLocalHits::update
void update()
Definition: AlfaLocalHits.cxx:131
AlfaTrackCand::m_z
float m_z
Definition: AlfaLocalHits.h:102
AlfaTrackCand::GetNearImpactPoint
HepGeom::Point3D< double > * GetNearImpactPoint()
Definition: AlfaLocalHits.h:130
AlfaTrackCand
Definition: AlfaLocalHits.h:99
AlfaTrackCand::CalcImpactPoints
void CalcImpactPoints()
Definition: AlfaLocalHits.cxx:430
AlfaLocalHit::m_y
Float_t m_y
Definition: AlfaLocalHits.h:37
AlfaTrackCand::Dump
void Dump() const
Definition: AlfaLocalHits.cxx:456