ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
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. More...
 
 ~MuonHoughHitContainer ()=default
 destructor More...
 
std::shared_ptr< MuonHoughHitgetHit (int hitno) const
 returns Hit at position hitno More...
 
const std::vector< std::shared_ptr< MuonHoughHit > > & getHits () const
 returns hit vector More...
 
void addHit (const std::shared_ptr< MuonHoughHit > &hit)
 add hit to container More...
 
void removeHit (unsigned int hitno)
 remove hit from container More...
 
int getHitId (unsigned int hitno) const
 returns hitid of hit hitno More...
 
double getHitx (unsigned int hitno) const
 returns x position of hit hitno More...
 
double getHity (unsigned int hitno) const
 returns y position of hit hitno More...
 
double getHitz (unsigned int hitno) const
 returns z position of hit hitno More...
 
double getRadius (unsigned int hitno) const
 returns radius of hit hitno More...
 
double getTheta (unsigned int hitno) const
 returns theta of hit hitno More...
 
double getPhi (unsigned int hitno) const
 returns phi of hit hitno More...
 
double getWeight (unsigned int hitno) const
 returns weight of hit hitno More...
 
double getOrigWeight (unsigned int hitno) const
 returns the orignal weight of hit hitno More...
 
bool getMeasuresPhi (unsigned int hitno) const
 returns if hit hitno measures phi More...
 
const Trk::PrepRawDatagetPrd (unsigned int hitno) const
 returns preprawdata pointer of hit hitno More...
 
std::string getWhichDetector (unsigned int hitno) const
 returns detectortechnology in string of hit hitno More...
 
MuonHough::DetectorTechnology getDetectorId (unsigned int hitno) const
 returns detectortechnology of hit hitno More...
 
unsigned int size () const
 returns size of hitcontainer More...
 
bool empty () const
 returns if hitcontainer is empty More...
 
void reserve (int size)
 allocates memory for hitvector More...
 
int getRPChitno () const
 returns number of rpc hits in container More...
 
int getRPCetahitno () const
 returns number of rpc eta hits in container More...
 
int getMDThitno () const
 returns number of mdt hits in container More...
 
int getCSChitno () const
 returns number of csc hits in container More...
 
int getTGChitno () const
 returns number of tgc hits in container More...
 

Protected Attributes

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

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 }

◆ 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 }

◆ 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 }

◆ 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:
MuonHough::CSC
@ CSC
Definition: MuonHoughHit.h:17
MuonHoughHitContainer::getMeasuresPhi
bool getMeasuresPhi(unsigned int hitno) const
returns if hit hitno measures phi
Definition: MuonHoughHitContainer.h:109
MuonHoughHitContainer::m_hit
std::vector< std::shared_ptr< MuonHoughHit > > m_hit
vector of hits in container
Definition: MuonHoughHitContainer.h:86
MuonHoughHit::setId
void setId(int id)
set id
Definition: MuonHoughHit.h:178
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonHoughHitContainer::size
unsigned int size() const
returns size of hitcontainer
Definition: MuonHoughHitContainer.h:104
MuonHough::RPC
@ RPC
Definition: MuonHoughHit.h:17
MuonHoughHitContainer::getDetectorId
MuonHough::DetectorTechnology getDetectorId(unsigned int hitno) const
returns detectortechnology of hit hitno
Definition: MuonHoughHitContainer.h:107
MuonHough::TGC
@ TGC
Definition: MuonHoughHit.h:17
MuonHough::MDT
@ MDT
Definition: MuonHoughHit.h:17
MuonHoughHit::getId
int getId() const
returns id
Definition: MuonHoughHit.h:156