ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
HLT::MET::PufitGrid::Tower Class Reference

Describes a single element of the grid. More...

#include <PufitGrid.h>

Inheritance diagram for HLT::MET::PufitGrid::Tower:
Collaboration diagram for HLT::MET::PufitGrid::Tower:

Public Member Functions

 Tower (const PufitGrid *parent, std::size_t index)
 Create a tower with its parent. More...
 
 Tower (const Tower &)=default
 
Toweroperator= (const Tower &other)
 Copy assignment operator. More...
 
double ex () const
 The x-component of this tower's energy. More...
 
double ey () const
 The y-component of this tower's energy. More...
 
double ez () const
 The z-component of this tower's energy. More...
 
double sumEt () const
 The total sumEt in this tower. More...
 
double sumE () const
 The total sumE in this tower. More...
 
double phi () const
 This tower's kinematic phi. More...
 
double eta () const
 This tower's kinematic eta. More...
 
bool masked () const
 Whether or not this tower was masked. More...
 
void mask (bool value=true)
 Set the mask on this tower. More...
 
virtual const PufitGridgrid () const override
 The parent grid of this tower. More...
 
SignedKinematics kinematics () const
 Build a kinematics object from this tower. More...
 
 operator SignedKinematics () const
 Conversion operator. More...
 
Toweroperator+= (const SignedKinematics &kin)
 Add a signed object to this tower. More...
 
Toweroperator-= (const SignedKinematics &kin)
 Remove the energy of a signed object from this tower. More...
 
Toweroperator+= (const Tower &other)
 Add another tower's energies into this one. More...
 
Toweroperator-= (const Tower &other)
 Subtract another tower's energies from this one. More...
 
double towerPhi () const
 The central phi coordinate of this tower. More...
 
double towerEta () const
 The central eta coordinate of this tower. More...
 
std::size_t index () const
 The global index of this tower. More...
 
std::size_t etaIndex () const
 The eta index of this tower. More...
 
std::size_t phiIndex () const
 The phi index of this tower. More...
 
std::pair< std::size_t, std::size_t > etaPhiIndex () const
 The eta/phi indices of the tower together. More...
 

Private Attributes

const PufitGrid *const m_parent
 The parent grid. More...
 
SignedKinematics m_kin
 
double m_sumEt {0.}
 The summed et. More...
 
double m_sumE {0.}
 The summed energy. More...
 
bool m_mask {false}
 The mask value. More...
 
std::size_t m_index
 

Detailed Description

Describes a single element of the grid.

There are two sets of directions here - the 'kinematic' directions which result from the sums of objects going into the towers and the tower coordinates themselves.

Definition at line 59 of file PufitGrid.h.

Constructor & Destructor Documentation

◆ Tower() [1/2]

HLT::MET::PufitGrid::Tower::Tower ( const PufitGrid parent,
std::size_t  index 
)

Create a tower with its parent.

Parameters
parentThe parent grid of this tower
indexThe index of this tower in its parent's grid

Definition at line 15 of file PufitGrid.cxx.

17  {
18  }

◆ Tower() [2/2]

HLT::MET::PufitGrid::Tower::Tower ( const Tower )
default

Member Function Documentation

◆ eta()

double HLT::MET::PufitGrid::Tower::eta ( ) const

This tower's kinematic eta.

Definition at line 35 of file PufitGrid.cxx.

35 { return kinematics().eta(); }

◆ etaIndex()

std::size_t HLT::MET::PeriodicGridBase::Tower::etaIndex ( ) const
inherited

The eta index of this tower.

Definition at line 49 of file PeriodicGridBase.cxx.

50  {
51  return etaPhiIndex().first;
52  }

◆ etaPhiIndex()

std::pair< std::size_t, std::size_t > HLT::MET::PeriodicGridBase::Tower::etaPhiIndex ( ) const
inherited

The eta/phi indices of the tower together.

Definition at line 59 of file PeriodicGridBase.cxx.

60  {
61  return grid()->etaPhiIndex(m_index);
62  }

◆ ex()

double HLT::MET::PufitGrid::Tower::ex ( ) const

The x-component of this tower's energy.

Definition at line 29 of file PufitGrid.cxx.

29 { return m_kin.px(); }

◆ ey()

double HLT::MET::PufitGrid::Tower::ey ( ) const

The y-component of this tower's energy.

Definition at line 30 of file PufitGrid.cxx.

30 { return m_kin.py(); }

◆ ez()

double HLT::MET::PufitGrid::Tower::ez ( ) const

The z-component of this tower's energy.

Definition at line 31 of file PufitGrid.cxx.

31 { return m_kin.pz(); }

◆ grid()

const PufitGrid * HLT::MET::PufitGrid::Tower::grid ( ) const
overridevirtual

The parent grid of this tower.

Implements HLT::MET::PeriodicGridBase::Tower.

Definition at line 39 of file PufitGrid.cxx.

39 { return m_parent; }

◆ index()

std::size_t HLT::MET::PeriodicGridBase::Tower::index ( ) const
inherited

The global index of this tower.

Definition at line 44 of file PeriodicGridBase.cxx.

45  {
46  return m_index;
47  }

◆ kinematics()

SignedKinematics HLT::MET::PufitGrid::Tower::kinematics ( ) const

Build a kinematics object from this tower.

Definition at line 41 of file PufitGrid.cxx.

42  {
43  return m_kin;
44  }

◆ mask()

void HLT::MET::PufitGrid::Tower::mask ( bool  value = true)

Set the mask on this tower.

Definition at line 37 of file PufitGrid.cxx.

37 { m_mask = value; }

◆ masked()

bool HLT::MET::PufitGrid::Tower::masked ( ) const

Whether or not this tower was masked.

Definition at line 36 of file PufitGrid.cxx.

36 { return m_mask; }

◆ operator SignedKinematics()

HLT::MET::PufitGrid::Tower::operator SignedKinematics ( ) const

Conversion operator.

Definition at line 45 of file PufitGrid.cxx.

45 { return kinematics(); }

◆ operator+=() [1/2]

PufitGrid::Tower & HLT::MET::PufitGrid::Tower::operator+= ( const SignedKinematics kin)

Add a signed object to this tower.

No check is done to make sure that this is the right bin. The momentum of the kinematics will be used. If you do not want this (i.e. you want mass to be ignored) you should construct the kinematics without mass.

Definition at line 47 of file PufitGrid.cxx.

48  {
49  m_kin += kin;
50  m_sumEt += kin.pt();
51  m_sumE += kin.energy();
52  return *this;
53  }

◆ operator+=() [2/2]

PufitGrid::Tower & HLT::MET::PufitGrid::Tower::operator+= ( const Tower other)

Add another tower's energies into this one.

Definition at line 61 of file PufitGrid.cxx.

62  {
63  m_kin += other.kinematics();
64  m_sumEt += other.sumEt();
65  m_sumE += other.sumE();
66  return *this;
67  }

◆ operator-=() [1/2]

PufitGrid::Tower & HLT::MET::PufitGrid::Tower::operator-= ( const SignedKinematics kin)

Remove the energy of a signed object from this tower.

No check is done to make sure that this is the right bin. The momentum of the kinematics will be used. If you do not want this (i.e. you want mass to be ignored) you should construct the kinematics without mass.

Definition at line 54 of file PufitGrid.cxx.

55  {
56  m_kin -= kin;
57  m_sumEt -= kin.pt();
58  m_sumE -= kin.energy();
59  return *this;
60  }

◆ operator-=() [2/2]

PufitGrid::Tower & HLT::MET::PufitGrid::Tower::operator-= ( const Tower other)

Subtract another tower's energies from this one.

Definition at line 68 of file PufitGrid.cxx.

69  {
70  m_kin -= other.kinematics();
71  m_sumEt -= other.sumEt();
72  m_sumE -= other.sumE();
73  return *this;
74  }

◆ operator=()

PufitGrid::Tower & HLT::MET::PufitGrid::Tower::operator= ( const Tower other)

Copy assignment operator.

This will not copy the other tower's parent. Each tower's parent is fixed from construction! This only copies the energy and masking information over.

Definition at line 20 of file PufitGrid.cxx.

21  {
22  m_kin = other.kinematics();
23  m_sumEt = other.sumEt();
24  m_sumE = other.sumE();
25  m_mask = other.masked();
26  return *this;
27  }

◆ phi()

double HLT::MET::PufitGrid::Tower::phi ( ) const

This tower's kinematic phi.

Definition at line 34 of file PufitGrid.cxx.

34 { return kinematics().phi(); }

◆ phiIndex()

std::size_t HLT::MET::PeriodicGridBase::Tower::phiIndex ( ) const
inherited

The phi index of this tower.

Definition at line 54 of file PeriodicGridBase.cxx.

55  {
56  return etaPhiIndex().second;
57  }

◆ sumE()

double HLT::MET::PufitGrid::Tower::sumE ( ) const

The total sumE in this tower.

Definition at line 33 of file PufitGrid.cxx.

33 { return m_sumE; }

◆ sumEt()

double HLT::MET::PufitGrid::Tower::sumEt ( ) const

The total sumEt in this tower.

Definition at line 32 of file PufitGrid.cxx.

32 { return m_sumEt; }

◆ towerEta()

double HLT::MET::PeriodicGridBase::Tower::towerEta ( ) const
inherited

The central eta coordinate of this tower.

Definition at line 39 of file PeriodicGridBase.cxx.

40  {
41  return grid()->centralEta(m_index);
42  }

◆ towerPhi()

double HLT::MET::PeriodicGridBase::Tower::towerPhi ( ) const
inherited

The central phi coordinate of this tower.

Definition at line 34 of file PeriodicGridBase.cxx.

35  {
36  return grid()->centralPhi(m_index);
37  }

Member Data Documentation

◆ m_index

std::size_t HLT::MET::PeriodicGridBase::Tower::m_index
privateinherited

Definition at line 109 of file PeriodicGridBase.h.

◆ m_kin

SignedKinematics HLT::MET::PufitGrid::Tower::m_kin
private

Definition at line 147 of file PufitGrid.h.

◆ m_mask

bool HLT::MET::PufitGrid::Tower::m_mask {false}
private

The mask value.

Definition at line 153 of file PufitGrid.h.

◆ m_parent

const PufitGrid* const HLT::MET::PufitGrid::Tower::m_parent
private

The parent grid.

Definition at line 145 of file PufitGrid.h.

◆ m_sumE

double HLT::MET::PufitGrid::Tower::m_sumE {0.}
private

The summed energy.

Definition at line 151 of file PufitGrid.h.

◆ m_sumEt

double HLT::MET::PufitGrid::Tower::m_sumEt {0.}
private

The summed et.

Definition at line 149 of file PufitGrid.h.


The documentation for this class was generated from the following files:
HLT::MET::SignedKinematics::px
double px() const
Definition: SignedKinematics.cxx:121
HLT::MET::PeriodicGridBase::Tower::etaPhiIndex
std::pair< std::size_t, std::size_t > etaPhiIndex() const
The eta/phi indices of the tower together.
Definition: PeriodicGridBase.cxx:59
HLT::MET::PufitGrid::Tower::m_mask
bool m_mask
The mask value.
Definition: PufitGrid.h:153
HLT::MET::PufitGrid::Tower::m_sumE
double m_sumE
The summed energy.
Definition: PufitGrid.h:151
index
Definition: index.py:1
athena.value
value
Definition: athena.py:124
HLT::MET::PeriodicGridBase::etaPhiIndex
std::pair< std::size_t, std::size_t > etaPhiIndex(std::size_t index) const
Convert a global index to an eta/phi index pair.
Definition: PeriodicGridBase.cxx:124
HLT::MET::PeriodicGridBase::Tower::grid
virtual const PeriodicGridBase * grid() const =0
The grid which owns this tower.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HLT::MET::PufitGrid::Tower::m_sumEt
double m_sumEt
The summed et.
Definition: PufitGrid.h:149
HLT::MET::PeriodicGridBase::centralPhi
double centralPhi(std::size_t iPhi) const
Central phi coordinate of the given phi.
Definition: PeriodicGridBase.cxx:133
HLT::MET::PeriodicGridBase::centralEta
double centralEta(std::size_t iEta) const
Central eta coordinate of the given eta index.
Definition: PeriodicGridBase.cxx:129
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
HLT::MET::PufitGrid::Tower::kinematics
SignedKinematics kinematics() const
Build a kinematics object from this tower.
Definition: PufitGrid.cxx:41
HLT::MET::PufitGrid::Tower::m_kin
SignedKinematics m_kin
Definition: PufitGrid.h:147
HLT::MET::PeriodicGridBase::Tower::m_index
std::size_t m_index
Definition: PeriodicGridBase.h:109
HLT::MET::SignedKinematics::phi
double phi() const
Definition: SignedKinematics.cxx:66
HLT::MET::SignedKinematics::pz
double pz() const
Definition: SignedKinematics.cxx:127
xAOD::JetInput::Tower
@ Tower
Definition: JetContainerInfo.h:58
HLT::MET::PufitGrid::Tower::m_parent
const PufitGrid *const m_parent
The parent grid.
Definition: PufitGrid.h:145
HLT::MET::SignedKinematics::eta
double eta() const
Direction.
Definition: SignedKinematics.cxx:62
HLT::MET::SignedKinematics::py
double py() const
Definition: SignedKinematics.cxx:124