ATLAS Offline Software
Loading...
Searching...
No Matches
MuonHoughHitContainer Class Reference

#include <MuonHoughHitContainer.h>

Inheritance diagram for MuonHoughHitContainer:
Collaboration diagram for MuonHoughHitContainer:

Public Member Functions

 MuonHoughHitContainer ()=default
 MuonHoughHitContainer does own its hits all added hits should be 'newed', except when m_ownhits==false.
 ~MuonHoughHitContainer ()=default
 destructor
std::shared_ptr< MuonHoughHitgetHit (int hitno) const
 returns Hit at position hitno
const std::vector< std::shared_ptr< MuonHoughHit > > & getHits () const
 returns hit vector
void addHit (const std::shared_ptr< MuonHoughHit > &hit)
 add hit to container
void removeHit (unsigned int hitno)
 remove hit from container
int getHitId (unsigned int hitno) const
 returns hitid of hit hitno
double getHitx (unsigned int hitno) const
 returns x position of hit hitno
double getHity (unsigned int hitno) const
 returns y position of hit hitno
double getHitz (unsigned int hitno) const
 returns z position of hit hitno
double getRadius (unsigned int hitno) const
 returns radius of hit hitno
double getTheta (unsigned int hitno) const
 returns theta of hit hitno
double getPhi (unsigned int hitno) const
 returns phi of hit hitno
double getWeight (unsigned int hitno) const
 returns weight of hit hitno
double getOrigWeight (unsigned int hitno) const
 returns the orignal weight of hit hitno
bool getMeasuresPhi (unsigned int hitno) const
 returns if hit hitno measures phi
const Trk::PrepRawDatagetPrd (unsigned int hitno) const
 returns preprawdata pointer of hit hitno
std::string getWhichDetector (unsigned int hitno) const
 returns detectortechnology in string of hit hitno
MuonHough::DetectorTechnology getDetectorId (unsigned int hitno) const
 returns detectortechnology of hit hitno
unsigned int size () const
 returns size of hitcontainer
bool empty () const
 returns if hitcontainer is empty
void reserve (int size)
 allocates memory for hitvector
int getRPChitno () const
 returns number of rpc hits in container
int getRPCetahitno () const
 returns number of rpc eta hits in container
int getMDThitno () const
 returns number of mdt hits in container
int getCSChitno () const
 returns number of csc hits in container
int getTGChitno () const
 returns number of tgc hits in container

Protected Attributes

std::vector< std::shared_ptr< MuonHoughHit > > m_hit
 vector of hits in container

Detailed Description

Definition at line 15 of file MuonHoughHitContainer.h.

Constructor & Destructor Documentation

◆ MuonHoughHitContainer()

MuonHoughHitContainer::MuonHoughHitContainer ( )
default

MuonHoughHitContainer does own its hits all added hits should be 'newed', except when m_ownhits==false.

constructor, flag for deleting hits at destructor

◆ ~MuonHoughHitContainer()

MuonHoughHitContainer::~MuonHoughHitContainer ( )
default

destructor

Member Function Documentation

◆ addHit()

void MuonHoughHitContainer::addHit ( const std::shared_ptr< MuonHoughHit > & hit)

add hit to container

Definition at line 8 of file MuonHoughHitContainer.cxx.

8 {
9 if (hit->getId() == -1) { hit->setId(size()); }
10 m_hit.push_back(hit);
11}
unsigned int size() const
returns size of hitcontainer
std::vector< std::shared_ptr< MuonHoughHit > > m_hit
vector of hits in container
void setId(int id)
set id
int getId() const
returns id

◆ empty()

bool MuonHoughHitContainer::empty ( ) const
inline

returns if hitcontainer is empty

Definition at line 105 of file MuonHoughHitContainer.h.

105{ return m_hit.empty(); }

◆ getCSChitno()

int MuonHoughHitContainer::getCSChitno ( ) const

returns number of csc hits in container

Definition at line 37 of file MuonHoughHitContainer.cxx.

37 {
38 int cschitno = 0;
39 for (unsigned int i = 0; i < m_hit.size(); i++) { cschitno += getDetectorId(i) == MuonHough::CSC; }
40 return cschitno;
41}
MuonHough::DetectorTechnology getDetectorId(unsigned int hitno) const
returns detectortechnology of hit hitno

◆ getDetectorId()

MuonHough::DetectorTechnology MuonHoughHitContainer::getDetectorId ( unsigned int hitno) const
inline

returns detectortechnology of hit hitno

Definition at line 107 of file MuonHoughHitContainer.h.

107{ return m_hit[hitno]->getDetectorId(); }

◆ getHit()

std::shared_ptr< MuonHoughHit > MuonHoughHitContainer::getHit ( int hitno) const
inline

returns Hit at position hitno

Definition at line 91 of file MuonHoughHitContainer.h.

91{ return m_hit.at(hitno); }

◆ getHitId()

int MuonHoughHitContainer::getHitId ( unsigned int hitno) const
inline

returns hitid of hit hitno

Definition at line 93 of file MuonHoughHitContainer.h.

93{ return m_hit[hitno]->getId(); }

◆ getHits()

const std::vector< std::shared_ptr< MuonHoughHit > > & MuonHoughHitContainer::getHits ( ) const
inline

returns hit vector

Definition at line 92 of file MuonHoughHitContainer.h.

92{ return m_hit; }

◆ getHitx()

double MuonHoughHitContainer::getHitx ( unsigned int hitno) const
inline

returns x position of hit hitno

Definition at line 94 of file MuonHoughHitContainer.h.

94{ return m_hit[hitno]->getHitx(); }

◆ getHity()

double MuonHoughHitContainer::getHity ( unsigned int hitno) const
inline

returns y position of hit hitno

Definition at line 95 of file MuonHoughHitContainer.h.

95{ return m_hit[hitno]->getHity(); }

◆ getHitz()

double MuonHoughHitContainer::getHitz ( unsigned int hitno) const
inline

returns z position of hit hitno

Definition at line 96 of file MuonHoughHitContainer.h.

96{ return m_hit[hitno]->getHitz(); }

◆ getMDThitno()

int MuonHoughHitContainer::getMDThitno ( ) const

returns number of mdt hits in container

Definition at line 25 of file MuonHoughHitContainer.cxx.

25 {
26 int mdthitno = 0;
27 for (unsigned int i = 0; i < m_hit.size(); i++) { mdthitno += getDetectorId(i) == MuonHough::MDT; }
28 return mdthitno;
29}

◆ getMeasuresPhi()

bool MuonHoughHitContainer::getMeasuresPhi ( unsigned int hitno) const
inline

returns if hit hitno measures phi

Definition at line 109 of file MuonHoughHitContainer.h.

109{ return m_hit[hitno]->getMeasuresPhi(); }

◆ getOrigWeight()

double MuonHoughHitContainer::getOrigWeight ( unsigned int hitno) const
inline

returns the orignal weight of hit hitno

Definition at line 102 of file MuonHoughHitContainer.h.

102{ return m_hit[hitno]->getOrigWeight(); }

◆ getPhi()

double MuonHoughHitContainer::getPhi ( unsigned int hitno) const
inline

returns phi of hit hitno

Definition at line 100 of file MuonHoughHitContainer.h.

100{ return m_hit[hitno]->getPhi(); }

◆ getPrd()

const Trk::PrepRawData * MuonHoughHitContainer::getPrd ( unsigned int hitno) const
inline

returns preprawdata pointer of hit hitno

Definition at line 110 of file MuonHoughHitContainer.h.

110{ return m_hit[hitno]->getPrd(); }

◆ getRadius()

double MuonHoughHitContainer::getRadius ( unsigned int hitno) const
inline

returns radius of hit hitno

Definition at line 97 of file MuonHoughHitContainer.h.

97{ return m_hit[hitno]->getRadius(); }

◆ getRPCetahitno()

int MuonHoughHitContainer::getRPCetahitno ( ) const

returns number of rpc eta hits in container

Definition at line 31 of file MuonHoughHitContainer.cxx.

31 {
32 int rpchitno = 0;
33 for (unsigned int i = 0; i < m_hit.size(); i++) { rpchitno += getDetectorId(i) == MuonHough::RPC && !getMeasuresPhi(i); }
34 return rpchitno;
35}
bool getMeasuresPhi(unsigned int hitno) const
returns if hit hitno measures phi

◆ getRPChitno()

int MuonHoughHitContainer::getRPChitno ( ) const

returns number of rpc hits in container

Definition at line 19 of file MuonHoughHitContainer.cxx.

19 {
20 int rpchitno = 0;
21 for (unsigned int i = 0; i < m_hit.size(); i++) { rpchitno += getDetectorId(i) == MuonHough::RPC; }
22 return rpchitno;
23}

◆ getTGChitno()

int MuonHoughHitContainer::getTGChitno ( ) const

returns number of tgc hits in container

Definition at line 43 of file MuonHoughHitContainer.cxx.

43 {
44 int tgchitno = 0;
45 for (unsigned int i = 0; i < m_hit.size(); i++) { tgchitno += getDetectorId(i) == MuonHough::TGC; }
46 return tgchitno;
47}

◆ getTheta()

double MuonHoughHitContainer::getTheta ( unsigned int hitno) const
inline

returns theta of hit hitno

Definition at line 99 of file MuonHoughHitContainer.h.

99{ return m_hit[hitno]->getTheta(); }

◆ getWeight()

double MuonHoughHitContainer::getWeight ( unsigned int hitno) const
inline

returns weight of hit hitno

Definition at line 101 of file MuonHoughHitContainer.h.

101{ return m_hit[hitno]->getWeight(); }

◆ getWhichDetector()

std::string MuonHoughHitContainer::getWhichDetector ( unsigned int hitno) const
inline

returns detectortechnology in string of hit hitno

Definition at line 108 of file MuonHoughHitContainer.h.

108{ return m_hit[hitno]->getWhichDetector(); }

◆ removeHit()

void MuonHoughHitContainer::removeHit ( unsigned int hitno)

remove hit from container

Definition at line 13 of file MuonHoughHitContainer.cxx.

13 {
14 if (hitno >= m_hit.size()) { throw std::runtime_error("MuonHoughHitContainer::range error!"); }
15
16 m_hit.erase(m_hit.begin() + hitno);
17}

◆ reserve()

void MuonHoughHitContainer::reserve ( int size)
inline

allocates memory for hitvector

Definition at line 106 of file MuonHoughHitContainer.h.

106{ m_hit.reserve(size); }

◆ size()

unsigned int MuonHoughHitContainer::size ( ) const
inline

returns size of hitcontainer

Definition at line 104 of file MuonHoughHitContainer.h.

104{ return m_hit.size(); }

Member Data Documentation

◆ m_hit

std::vector<std::shared_ptr<MuonHoughHit> > MuonHoughHitContainer::m_hit
protected

vector of hits in container

Definition at line 86 of file MuonHoughHitContainer.h.


The documentation for this class was generated from the following files: