ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
LVL1::JGTowerHelper Class Reference

#include <JGTowerHelper.h>

Collaboration diagram for LVL1::JGTowerHelper:

Public Member Functions

 JGTowerHelper ()=delete
 
 JGTowerHelper (float eta, float deta, float phi, float dphi)
 
virtual ~JGTowerHelper ()
 
float Eta () const
 
float Phi () const
 
float dEta () const
 
float dPhi () const
 
float sampling () const
 
const std::vector< int > & GetSCIndices () const
 
const std::vector< int > & GetTileIndices () const
 
void SetSCIndices (int sc_id)
 
void SetTileIndices (int tile_id)
 
void SetSampling (int sampling)
 
bool inBox (float eta, float phi) const
 
float area () const
 
void setArea (float value)
 
std::size_t previousEtaIndex () const
 The index of the tower before this one in eta (SIZE_MAX if not valid) More...
 
bool hasPreviousEta () const
 Whether there is a previous eta tower. More...
 
std::size_t nextEtaIndex () const
 The index of the tower after this one in eta (SIZE_MAX if not valid) More...
 
bool hasNextEta () const
 Whether there is a next eta tower. More...
 
std::size_t previousPhiIndex () const
 The index of the tower before this one in phi (SIZE_MAX if not valid) More...
 
bool hasPreviousPhi () const
 Whether there is a previous phi tower. More...
 
std::size_t nextPhiIndex () const
 The index of the tower after this one in phi (SIZE_MAX if not valid) More...
 
bool hasNextPhi () const
 Whether there is a next phi tower. More...
 
std::size_t indexInFront () const
 The index of the tower in front of this one. More...
 
bool isFrontTower () const
 Whether there is a tower in front of this one. More...
 
std::size_t indexBehind () const
 The index of the tower behind this one. More...
 
bool isBackTower () const
 Whether there is a tower behind this one. More...
 
void setPreviousEtaIndex (std::size_t value)
 
void setNextEtaIndex (std::size_t value)
 
void setPreviousPhiIndex (std::size_t value)
 
void setNextPhiIndex (std::size_t value)
 
void setIndexInFront (std::size_t value)
 
void setIndexBehind (std::size_t value)
 

Static Public Member Functions

static bool inBox (float eta1, float eta2, float deta, float phi1, float phi2, float dphi)
 

Private Attributes

float m_eta {-999}
 
float m_deta {-999}
 
float m_phi {-999}
 
float m_dphi {-999}
 
int m_sampling {-999}
 
std::vector< int > m_scellIndices
 
std::vector< int > m_tileIndices
 
float m_area {-1}
 
std::size_t m_prevEtaIndex {SIZE_MAX}
 
std::size_t m_nextEtaIndex {SIZE_MAX}
 
std::size_t m_prevPhiIndex {SIZE_MAX}
 
std::size_t m_nextPhiIndex {SIZE_MAX}
 
std::size_t m_indexInFront {SIZE_MAX}
 
std::size_t m_indexBehind {SIZE_MAX}
 

Detailed Description

Definition at line 25 of file JGTowerHelper.h.

Constructor & Destructor Documentation

◆ JGTowerHelper() [1/2]

LVL1::JGTowerHelper::JGTowerHelper ( )
delete

◆ JGTowerHelper() [2/2]

LVL1::JGTowerHelper::JGTowerHelper ( float  eta,
float  deta,
float  phi,
float  dphi 
)

Definition at line 12 of file JGTowerHelper.cxx.

13  {
14  m_eta = eta;
15  m_deta = deta;
16  m_phi = phi;
17  m_dphi = dphi;
18  }

◆ ~JGTowerHelper()

LVL1::JGTowerHelper::~JGTowerHelper ( )
virtual

Definition at line 21 of file JGTowerHelper.cxx.

21 {}

Member Function Documentation

◆ area()

float LVL1::JGTowerHelper::area ( ) const
inline

Definition at line 50 of file JGTowerHelper.h.

50 { return m_area; }

◆ dEta()

float LVL1::JGTowerHelper::dEta ( ) const
inline

Definition at line 38 of file JGTowerHelper.h.

38 { return m_deta; };

◆ dPhi()

float LVL1::JGTowerHelper::dPhi ( ) const
inline

Definition at line 39 of file JGTowerHelper.h.

39 { return m_dphi; };

◆ Eta()

float LVL1::JGTowerHelper::Eta ( ) const
inline

Definition at line 36 of file JGTowerHelper.h.

36 { return m_eta; };

◆ GetSCIndices()

const std::vector<int>& LVL1::JGTowerHelper::GetSCIndices ( ) const
inline

Definition at line 41 of file JGTowerHelper.h.

41 { return m_scellIndices; };

◆ GetTileIndices()

const std::vector<int>& LVL1::JGTowerHelper::GetTileIndices ( ) const
inline

Definition at line 42 of file JGTowerHelper.h.

42 { return m_tileIndices; };

◆ hasNextEta()

bool LVL1::JGTowerHelper::hasNextEta ( ) const
inline

Whether there is a next eta tower.

Definition at line 68 of file JGTowerHelper.h.

68 { return m_nextEtaIndex != SIZE_MAX; }

◆ hasNextPhi()

bool LVL1::JGTowerHelper::hasNextPhi ( ) const
inline

Whether there is a next phi tower.

Definition at line 76 of file JGTowerHelper.h.

76 { return m_nextPhiIndex != SIZE_MAX; }

◆ hasPreviousEta()

bool LVL1::JGTowerHelper::hasPreviousEta ( ) const
inline

Whether there is a previous eta tower.

Definition at line 64 of file JGTowerHelper.h.

64 { return m_prevEtaIndex != SIZE_MAX; }

◆ hasPreviousPhi()

bool LVL1::JGTowerHelper::hasPreviousPhi ( ) const
inline

Whether there is a previous phi tower.

Definition at line 72 of file JGTowerHelper.h.

72 { return m_prevPhiIndex != SIZE_MAX; }

◆ inBox() [1/2]

bool LVL1::JGTowerHelper::inBox ( float  eta,
float  phi 
) const

Definition at line 38 of file JGTowerHelper.cxx.

39  {
40  return inBox(Eta(), eta, dEta() / 2, Phi(), phi, dPhi() / 2);
41  }

◆ inBox() [2/2]

bool LVL1::JGTowerHelper::inBox ( float  eta1,
float  eta2,
float  deta,
float  phi1,
float  phi2,
float  dphi 
)
static

Definition at line 24 of file JGTowerHelper.cxx.

25  {
26 
27  bool inEtaBox = std::abs(eta1 - eta2) < deta;
28  if (phi2 > TMath::Pi())
29  phi2 = phi2 - 2 * TMath::Pi();
30  float deltaPhi = std::abs(phi1 - phi2);
31  if (deltaPhi > TMath::Pi())
32  deltaPhi = 2 * TMath::Pi() - deltaPhi;
33  bool inPhiBox = deltaPhi < dphi;
34 
35  return inEtaBox && inPhiBox;
36  }

◆ indexBehind()

std::size_t LVL1::JGTowerHelper::indexBehind ( ) const
inline

The index of the tower behind this one.

Definition at line 82 of file JGTowerHelper.h.

82 { return m_indexBehind; }

◆ indexInFront()

std::size_t LVL1::JGTowerHelper::indexInFront ( ) const
inline

The index of the tower in front of this one.

Definition at line 78 of file JGTowerHelper.h.

78 { return m_indexInFront; }

◆ isBackTower()

bool LVL1::JGTowerHelper::isBackTower ( ) const
inline

Whether there is a tower behind this one.

Definition at line 84 of file JGTowerHelper.h.

84 { return m_indexBehind == SIZE_MAX; }

◆ isFrontTower()

bool LVL1::JGTowerHelper::isFrontTower ( ) const
inline

Whether there is a tower in front of this one.

Definition at line 80 of file JGTowerHelper.h.

80 { return m_indexInFront == SIZE_MAX; }

◆ nextEtaIndex()

std::size_t LVL1::JGTowerHelper::nextEtaIndex ( ) const
inline

The index of the tower after this one in eta (SIZE_MAX if not valid)

Definition at line 66 of file JGTowerHelper.h.

66 { return m_nextEtaIndex; }

◆ nextPhiIndex()

std::size_t LVL1::JGTowerHelper::nextPhiIndex ( ) const
inline

The index of the tower after this one in phi (SIZE_MAX if not valid)

Definition at line 74 of file JGTowerHelper.h.

74 { return m_nextPhiIndex; }

◆ Phi()

float LVL1::JGTowerHelper::Phi ( ) const
inline

Definition at line 37 of file JGTowerHelper.h.

37 { return m_phi; };

◆ previousEtaIndex()

std::size_t LVL1::JGTowerHelper::previousEtaIndex ( ) const
inline

The index of the tower before this one in eta (SIZE_MAX if not valid)

Definition at line 62 of file JGTowerHelper.h.

62 { return m_prevEtaIndex; }

◆ previousPhiIndex()

std::size_t LVL1::JGTowerHelper::previousPhiIndex ( ) const
inline

The index of the tower before this one in phi (SIZE_MAX if not valid)

Definition at line 70 of file JGTowerHelper.h.

70 { return m_prevPhiIndex; }

◆ sampling()

float LVL1::JGTowerHelper::sampling ( ) const
inline

Definition at line 40 of file JGTowerHelper.h.

40 { return m_sampling; };

◆ setArea()

void LVL1::JGTowerHelper::setArea ( float  value)
inline

Definition at line 51 of file JGTowerHelper.h.

51 { m_area = value; }

◆ setIndexBehind()

void LVL1::JGTowerHelper::setIndexBehind ( std::size_t  value)
inline

Definition at line 91 of file JGTowerHelper.h.

91 { m_indexBehind = value; }

◆ setIndexInFront()

void LVL1::JGTowerHelper::setIndexInFront ( std::size_t  value)
inline

Definition at line 90 of file JGTowerHelper.h.

90 { m_indexInFront = value; }

◆ setNextEtaIndex()

void LVL1::JGTowerHelper::setNextEtaIndex ( std::size_t  value)
inline

Definition at line 87 of file JGTowerHelper.h.

87 { m_nextEtaIndex = value; }

◆ setNextPhiIndex()

void LVL1::JGTowerHelper::setNextPhiIndex ( std::size_t  value)
inline

Definition at line 89 of file JGTowerHelper.h.

89 { m_nextPhiIndex = value; }

◆ setPreviousEtaIndex()

void LVL1::JGTowerHelper::setPreviousEtaIndex ( std::size_t  value)
inline

Definition at line 86 of file JGTowerHelper.h.

86 { m_prevEtaIndex = value; }

◆ setPreviousPhiIndex()

void LVL1::JGTowerHelper::setPreviousPhiIndex ( std::size_t  value)
inline

Definition at line 88 of file JGTowerHelper.h.

88 { m_prevPhiIndex = value; }

◆ SetSampling()

void LVL1::JGTowerHelper::SetSampling ( int  sampling)
inline

Definition at line 45 of file JGTowerHelper.h.

45 { m_sampling = sampling; };

◆ SetSCIndices()

void LVL1::JGTowerHelper::SetSCIndices ( int  sc_id)
inline

Definition at line 43 of file JGTowerHelper.h.

43 { m_scellIndices.push_back(sc_id); };

◆ SetTileIndices()

void LVL1::JGTowerHelper::SetTileIndices ( int  tile_id)
inline

Definition at line 44 of file JGTowerHelper.h.

44 { m_tileIndices.push_back(tile_id); };

Member Data Documentation

◆ m_area

float LVL1::JGTowerHelper::m_area {-1}
private

Definition at line 101 of file JGTowerHelper.h.

◆ m_deta

float LVL1::JGTowerHelper::m_deta {-999}
private

Definition at line 95 of file JGTowerHelper.h.

◆ m_dphi

float LVL1::JGTowerHelper::m_dphi {-999}
private

Definition at line 97 of file JGTowerHelper.h.

◆ m_eta

float LVL1::JGTowerHelper::m_eta {-999}
private

Definition at line 94 of file JGTowerHelper.h.

◆ m_indexBehind

std::size_t LVL1::JGTowerHelper::m_indexBehind {SIZE_MAX}
private

Definition at line 107 of file JGTowerHelper.h.

◆ m_indexInFront

std::size_t LVL1::JGTowerHelper::m_indexInFront {SIZE_MAX}
private

Definition at line 106 of file JGTowerHelper.h.

◆ m_nextEtaIndex

std::size_t LVL1::JGTowerHelper::m_nextEtaIndex {SIZE_MAX}
private

Definition at line 103 of file JGTowerHelper.h.

◆ m_nextPhiIndex

std::size_t LVL1::JGTowerHelper::m_nextPhiIndex {SIZE_MAX}
private

Definition at line 105 of file JGTowerHelper.h.

◆ m_phi

float LVL1::JGTowerHelper::m_phi {-999}
private

Definition at line 96 of file JGTowerHelper.h.

◆ m_prevEtaIndex

std::size_t LVL1::JGTowerHelper::m_prevEtaIndex {SIZE_MAX}
private

Definition at line 102 of file JGTowerHelper.h.

◆ m_prevPhiIndex

std::size_t LVL1::JGTowerHelper::m_prevPhiIndex {SIZE_MAX}
private

Definition at line 104 of file JGTowerHelper.h.

◆ m_sampling

int LVL1::JGTowerHelper::m_sampling {-999}
private

Definition at line 98 of file JGTowerHelper.h.

◆ m_scellIndices

std::vector<int> LVL1::JGTowerHelper::m_scellIndices
private

Definition at line 99 of file JGTowerHelper.h.

◆ m_tileIndices

std::vector<int> LVL1::JGTowerHelper::m_tileIndices
private

Definition at line 100 of file JGTowerHelper.h.


The documentation for this class was generated from the following files:
LVL1::JGTowerHelper::m_nextPhiIndex
std::size_t m_nextPhiIndex
Definition: JGTowerHelper.h:105
test_pyathena.eta
eta
Definition: test_pyathena.py:10
LVL1::JGTowerHelper::dPhi
float dPhi() const
Definition: JGTowerHelper.h:39
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
LVL1::JGTowerHelper::m_nextEtaIndex
std::size_t m_nextEtaIndex
Definition: JGTowerHelper.h:103
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
LVL1::JGTowerHelper::m_indexInFront
std::size_t m_indexInFront
Definition: JGTowerHelper.h:106
athena.value
value
Definition: athena.py:124
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
LVL1::JGTowerHelper::m_scellIndices
std::vector< int > m_scellIndices
Definition: JGTowerHelper.h:99
LVL1::JGTowerHelper::m_tileIndices
std::vector< int > m_tileIndices
Definition: JGTowerHelper.h:100
LVL1::JGTowerHelper::m_indexBehind
std::size_t m_indexBehind
Definition: JGTowerHelper.h:107
LVL1::JGTowerHelper::Phi
float Phi() const
Definition: JGTowerHelper.h:37
LVL1::JGTowerHelper::m_prevEtaIndex
std::size_t m_prevEtaIndex
Definition: JGTowerHelper.h:102
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
LVL1::JGTowerHelper::m_eta
float m_eta
Definition: JGTowerHelper.h:94
LVL1::JGTowerHelper::dEta
float dEta() const
Definition: JGTowerHelper.h:38
LVL1::JGTowerHelper::m_phi
float m_phi
Definition: JGTowerHelper.h:96
LVL1::JGTowerHelper::m_dphi
float m_dphi
Definition: JGTowerHelper.h:97
LVL1::JGTowerHelper::m_deta
float m_deta
Definition: JGTowerHelper.h:95
LVL1::JGTowerHelper::m_prevPhiIndex
std::size_t m_prevPhiIndex
Definition: JGTowerHelper.h:104
LVL1::JGTowerHelper::Eta
float Eta() const
Definition: JGTowerHelper.h:36
LVL1::JGTowerHelper::sampling
float sampling() const
Definition: JGTowerHelper.h:40
LVL1::JGTowerHelper::m_area
float m_area
Definition: JGTowerHelper.h:101
LVL1::JGTowerHelper::m_sampling
int m_sampling
Definition: JGTowerHelper.h:98
LVL1::JGTowerHelper::inBox
static bool inBox(float eta1, float eta2, float deta, float phi1, float phi2, float dphi)
Definition: JGTowerHelper.cxx:24