ATLAS Offline Software
MuonHoughHitContainer.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 MUONHOUGHPATTERNEVENT_MUONHOUGHHITCONTAINER_H
6 #define MUONHOUGHPATTERNEVENT_MUONHOUGHHITCONTAINER_H
7 
9 #include <memory>
10 
11 namespace Trk {
12  class PrepRawData;
13 }
14 
19 public:
21  MuonHoughHitContainer() = default;
22 
25 
27  std::shared_ptr<MuonHoughHit> getHit(int hitno) const;
29  const std::vector<std::shared_ptr<MuonHoughHit>>& getHits() const;
30 
32  void addHit(const std::shared_ptr<MuonHoughHit>& hit);
33 
35  void removeHit(unsigned int hitno);
36 
38  int getHitId(unsigned int hitno) const;
40  double getHitx(unsigned int hitno) const;
42  double getHity(unsigned int hitno) const;
44  double getHitz(unsigned int hitno) const;
45 
47  double getRadius(unsigned int hitno) const;
49  double getTheta(unsigned int hitno) const;
51  double getPhi(unsigned int hitno) const;
53  double getWeight(unsigned int hitno) const;
55  double getOrigWeight(unsigned int hitno) const;
56 
58  bool getMeasuresPhi(unsigned int hitno) const;
60  const Trk::PrepRawData* getPrd(unsigned int hitno) const;
61 
63  std::string getWhichDetector(unsigned int hitno) const;
65  MuonHough::DetectorTechnology getDetectorId(unsigned int hitno) const;
67  unsigned int size() const;
69  bool empty() const;
71  void reserve(int size);
72 
74  int getRPChitno() const;
76  int getRPCetahitno() const;
78  int getMDThitno() const;
80  int getCSChitno() const;
82  int getTGChitno() const;
83 
84 protected:
86  std::vector<std::shared_ptr<MuonHoughHit>> m_hit;
87 
88 
89 };
90 
91 inline std::shared_ptr<MuonHoughHit> MuonHoughHitContainer::getHit(int hitno) const { return m_hit.at(hitno); }
92 inline const std::vector<std::shared_ptr<MuonHoughHit>>& MuonHoughHitContainer::getHits() const { return m_hit; }
93 inline int MuonHoughHitContainer::getHitId(unsigned int hitno) const { return m_hit[hitno]->getId(); }
94 inline double MuonHoughHitContainer::getHitx(unsigned int hitno) const { return m_hit[hitno]->getHitx(); }
95 inline double MuonHoughHitContainer::getHity(unsigned int hitno) const { return m_hit[hitno]->getHity(); }
96 inline double MuonHoughHitContainer::getHitz(unsigned int hitno) const { return m_hit[hitno]->getHitz(); }
97 inline double MuonHoughHitContainer::getRadius(unsigned int hitno) const { return m_hit[hitno]->getRadius(); }
98 
99 inline double MuonHoughHitContainer::getTheta(unsigned int hitno) const { return m_hit[hitno]->getTheta(); }
100 inline double MuonHoughHitContainer::getPhi(unsigned int hitno) const { return m_hit[hitno]->getPhi(); }
101 inline double MuonHoughHitContainer::getWeight(unsigned int hitno) const { return m_hit[hitno]->getWeight(); }
102 inline double MuonHoughHitContainer::getOrigWeight(unsigned int hitno) const { return m_hit[hitno]->getOrigWeight(); }
103 
104 inline unsigned int MuonHoughHitContainer::size() const { return m_hit.size(); }
105 inline bool MuonHoughHitContainer::empty() const { return m_hit.empty(); }
106 inline void MuonHoughHitContainer::reserve(int size) { m_hit.reserve(size); }
107 inline MuonHough::DetectorTechnology MuonHoughHitContainer::getDetectorId(unsigned int hitno) const { return m_hit[hitno]->getDetectorId(); }
108 inline std::string MuonHoughHitContainer::getWhichDetector(unsigned int hitno) const { return m_hit[hitno]->getWhichDetector(); }
109 inline bool MuonHoughHitContainer::getMeasuresPhi(unsigned int hitno) const { return m_hit[hitno]->getMeasuresPhi(); }
110 inline const Trk::PrepRawData* MuonHoughHitContainer::getPrd(unsigned int hitno) const { return m_hit[hitno]->getPrd(); }
111 
112 #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHHITCONTAINER_H
MuonHoughHitContainer::MuonHoughHitContainer
MuonHoughHitContainer()=default
MuonHoughHitContainer does own its hits all added hits should be 'newed', except when m_ownhits==fals...
MuonHoughHitContainer::getWeight
double getWeight(unsigned int hitno) const
returns weight of hit hitno
Definition: MuonHoughHitContainer.h:101
MuonHoughHitContainer::getTheta
double getTheta(unsigned int hitno) const
returns theta of hit hitno
Definition: MuonHoughHitContainer.h:99
MuonHoughHitContainer::getHitz
double getHitz(unsigned int hitno) const
returns z position of hit hitno
Definition: MuonHoughHitContainer.h:96
MuonHoughHitContainer::getMeasuresPhi
bool getMeasuresPhi(unsigned int hitno) const
returns if hit hitno measures phi
Definition: MuonHoughHitContainer.h:109
MuonHoughHitContainer::getHit
std::shared_ptr< MuonHoughHit > getHit(int hitno) const
returns Hit at position hitno
Definition: MuonHoughHitContainer.h:91
MuonHoughHitContainer::getPhi
double getPhi(unsigned int hitno) const
returns phi of hit hitno
Definition: MuonHoughHitContainer.h:100
MuonHoughHitContainer::m_hit
std::vector< std::shared_ptr< MuonHoughHit > > m_hit
vector of hits in container
Definition: MuonHoughHitContainer.h:86
MuonHoughHitContainer::addHit
void addHit(const std::shared_ptr< MuonHoughHit > &hit)
add hit to container
Definition: MuonHoughHitContainer.cxx:8
MuonHoughHitContainer::getHitId
int getHitId(unsigned int hitno) const
returns hitid of hit hitno
Definition: MuonHoughHitContainer.h:93
MuonHoughHitContainer::getRPCetahitno
int getRPCetahitno() const
returns number of rpc eta hits in container
Definition: MuonHoughHitContainer.cxx:31
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MuonHoughHit.h
MuonHoughHitContainer::getHits
const std::vector< std::shared_ptr< MuonHoughHit > > & getHits() const
returns hit vector
Definition: MuonHoughHitContainer.h:92
MuonHoughHitContainer::size
unsigned int size() const
returns size of hitcontainer
Definition: MuonHoughHitContainer.h:104
MuonHoughHitContainer::reserve
void reserve(int size)
allocates memory for hitvector
Definition: MuonHoughHitContainer.h:106
MuonHoughHitContainer::getHity
double getHity(unsigned int hitno) const
returns y position of hit hitno
Definition: MuonHoughHitContainer.h:95
MuonHoughHitContainer::getPrd
const Trk::PrepRawData * getPrd(unsigned int hitno) const
returns preprawdata pointer of hit hitno
Definition: MuonHoughHitContainer.h:110
MuonHoughHitContainer
Definition: MuonHoughHitContainer.h:15
MuonHoughHitContainer::getOrigWeight
double getOrigWeight(unsigned int hitno) const
returns the orignal weight of hit hitno
Definition: MuonHoughHitContainer.h:102
MuonHoughHitContainer::getRPChitno
int getRPChitno() const
returns number of rpc hits in container
Definition: MuonHoughHitContainer.cxx:19
Trk::PrepRawData
Definition: PrepRawData.h:62
MuonHoughHitContainer::getWhichDetector
std::string getWhichDetector(unsigned int hitno) const
returns detectortechnology in string of hit hitno
Definition: MuonHoughHitContainer.h:108
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
MuonHoughHitContainer::getDetectorId
MuonHough::DetectorTechnology getDetectorId(unsigned int hitno) const
returns detectortechnology of hit hitno
Definition: MuonHoughHitContainer.h:107
MuonHoughHitContainer::~MuonHoughHitContainer
~MuonHoughHitContainer()=default
destructor
MuonHoughHitContainer::getTGChitno
int getTGChitno() const
returns number of tgc hits in container
Definition: MuonHoughHitContainer.cxx:43
MuonHoughHitContainer::empty
bool empty() const
returns if hitcontainer is empty
Definition: MuonHoughHitContainer.h:105
MuonHoughHitContainer::getMDThitno
int getMDThitno() const
returns number of mdt hits in container
Definition: MuonHoughHitContainer.cxx:25
MuonHoughHitContainer::removeHit
void removeHit(unsigned int hitno)
remove hit from container
Definition: MuonHoughHitContainer.cxx:13
MuonHoughHitContainer::getRadius
double getRadius(unsigned int hitno) const
returns radius of hit hitno
Definition: MuonHoughHitContainer.h:97
MuonHough::DetectorTechnology
DetectorTechnology
enum to identify the muondetectortechnology
Definition: MuonHoughHit.h:17
MuonHoughHitContainer::getCSChitno
int getCSChitno() const
returns number of csc hits in container
Definition: MuonHoughHitContainer.cxx:37
MuonHoughHitContainer::getHitx
double getHitx(unsigned int hitno) const
returns x position of hit hitno
Definition: MuonHoughHitContainer.h:94