ATLAS Offline Software
Loading...
Searching...
No Matches
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)
bool hasPreviousEta () const
 Whether there is a previous eta tower.
std::size_t nextEtaIndex () const
 The index of the tower after this one in eta (SIZE_MAX if not valid)
bool hasNextEta () const
 Whether there is a next eta tower.
std::size_t previousPhiIndex () const
 The index of the tower before this one in phi (SIZE_MAX if not valid)
bool hasPreviousPhi () const
 Whether there is a previous phi tower.
std::size_t nextPhiIndex () const
 The index of the tower after this one in phi (SIZE_MAX if not valid)
bool hasNextPhi () const
 Whether there is a next phi tower.
std::size_t indexInFront () const
 The index of the tower in front of this one.
bool isFrontTower () const
 Whether there is a tower in front of this one.
std::size_t indexBehind () const
 The index of the tower behind this one.
bool isBackTower () const
 Whether there is a tower behind this one.
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 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ ~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; };
std::vector< int > m_scellIndices

◆ GetTileIndices()

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

Definition at line 42 of file JGTowerHelper.h.

42{ return m_tileIndices; };
std::vector< int > 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; }
std::size_t m_nextEtaIndex

◆ 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; }
std::size_t m_nextPhiIndex

◆ 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; }
std::size_t m_prevEtaIndex

◆ 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; }
std::size_t m_prevPhiIndex

◆ 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 }
float dPhi() const
float Eta() const
float dEta() const
float Phi() const
static bool inBox(float eta1, float eta2, float deta, float phi1, float phi2, float dphi)

◆ 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 }
Scalar deltaPhi(const MatrixBase< Derived > &vec) const

◆ 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; }
std::size_t 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; }
std::size_t 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.

◆ setIndexInFront()

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

Definition at line 90 of file JGTowerHelper.h.

◆ setNextEtaIndex()

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

Definition at line 87 of file JGTowerHelper.h.

◆ setNextPhiIndex()

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

Definition at line 89 of file JGTowerHelper.h.

◆ setPreviousEtaIndex()

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

Definition at line 86 of file JGTowerHelper.h.

◆ setPreviousPhiIndex()

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

Definition at line 88 of file JGTowerHelper.h.

◆ SetSampling()

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

Definition at line 45 of file JGTowerHelper.h.

45{ m_sampling = sampling; };
float sampling() const

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

101{-1};

◆ m_deta

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

Definition at line 95 of file JGTowerHelper.h.

95{-999};

◆ m_dphi

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

Definition at line 97 of file JGTowerHelper.h.

97{-999};

◆ m_eta

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

Definition at line 94 of file JGTowerHelper.h.

94{-999};

◆ m_indexBehind

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

Definition at line 107 of file JGTowerHelper.h.

107{SIZE_MAX};

◆ m_indexInFront

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

Definition at line 106 of file JGTowerHelper.h.

106{SIZE_MAX};

◆ m_nextEtaIndex

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

Definition at line 103 of file JGTowerHelper.h.

103{SIZE_MAX};

◆ m_nextPhiIndex

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

Definition at line 105 of file JGTowerHelper.h.

105{SIZE_MAX};

◆ m_phi

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

Definition at line 96 of file JGTowerHelper.h.

96{-999};

◆ m_prevEtaIndex

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

Definition at line 102 of file JGTowerHelper.h.

102{SIZE_MAX};

◆ m_prevPhiIndex

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

Definition at line 104 of file JGTowerHelper.h.

104{SIZE_MAX};

◆ m_sampling

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

Definition at line 98 of file JGTowerHelper.h.

98{-999};

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