ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
eflowCellPosition Class Reference

This class stores the eta,phi and layer of the calorimeter cell and defines a "<" operator which can be used to order the eflowCellPosition based on eta,phi and layer. More...

#include <eflowCellPosition.h>

Collaboration diagram for eflowCellPosition:

Public Member Functions

 eflowCellPosition (const eflowAbstractCellList *deposit, eflowCaloENUM layer, double dR)
 
 eflowCellPosition (const eflowAbstractCellList *deposit, const CaloCell *cell)
 
 ~eflowCellPosition ()
 
bool operator< (const eflowCellPosition &rhs) const
 
double dR () const
 

Private Attributes

eflowCaloENUM m_layer
 
double m_eta
 
double m_phi
 
const eflowAbstractCellListm_deposit
 

Detailed Description

This class stores the eta,phi and layer of the calorimeter cell and defines a "<" operator which can be used to order the eflowCellPosition based on eta,phi and layer.

The < operator makes use of a stored pointer to the eflowAbstractCellList that the eflowCellPosition is in, in order to use eflowCellList::DR2 inside the < operator.

So conceptually we can consider that a track has some list of associated calorimeter cells in the eflowCellList, where the information that we need for each cell is stored in the eflowCellPosition. A map is kept to link the eflowCellPosition back to the actual CaloCell.

Definition at line 35 of file eflowCellPosition.h.

Constructor & Destructor Documentation

◆ eflowCellPosition() [1/2]

eflowCellPosition::eflowCellPosition ( const eflowAbstractCellList deposit,
eflowCaloENUM  layer,
double  dR 
)

Definition at line 27 of file eflowCellPosition.cxx.

27  :
28  m_layer(layer),m_deposit(deposit) {
29  m_eta = deposit->etaFF(layer) + dR;
30  m_phi = deposit->phiFF(layer);
31 }

◆ eflowCellPosition() [2/2]

eflowCellPosition::eflowCellPosition ( const eflowAbstractCellList deposit,
const CaloCell cell 
)

Definition at line 33 of file eflowCellPosition.cxx.

33  :
34  m_eta(cell->eta()), m_phi(cell->phi()), m_deposit(deposit) {
35  const CaloDetDescrElement* caloDDE = cell->caloDDE();
36 
37  if (caloDDE) {
38  CaloCell_ID::CaloSample caloSampl = caloDDE->getSampling();
40  } else {
42  }
43 }

◆ ~eflowCellPosition()

eflowCellPosition::~eflowCellPosition ( )
inline

Definition at line 43 of file eflowCellPosition.h.

43 {}

Member Function Documentation

◆ dR()

double eflowCellPosition::dR ( ) const

Definition at line 64 of file eflowCellPosition.cxx.

64  {
65  return m_deposit->dR(m_eta, m_phi, m_layer);
66 }

◆ operator<()

bool eflowCellPosition::operator< ( const eflowCellPosition rhs) const

Definition at line 45 of file eflowCellPosition.cxx.

45  {
46  if (m_layer != rhs.m_layer) {
47  return m_layer < rhs.m_layer;
48  } else {
49  double r1 = m_deposit->dR2(m_eta, m_phi, m_layer);
50  double r2 = m_deposit->dR2(rhs.m_eta, rhs.m_phi, m_layer);
51 
52  if (fabs(r1 - r2) < 1.0e-12) {
53  if (fabs(m_eta - rhs.m_eta) < 1.0e-6) {
55  } else {
56  return (m_eta < rhs.m_eta);
57  }
58  } else {
59  return (r1 < r2);
60  }
61  }
62 }

Member Data Documentation

◆ m_deposit

const eflowAbstractCellList* eflowCellPosition::m_deposit
private

Definition at line 52 of file eflowCellPosition.h.

◆ m_eta

double eflowCellPosition::m_eta
private

Definition at line 51 of file eflowCellPosition.h.

◆ m_layer

eflowCaloENUM eflowCellPosition::m_layer
private

Definition at line 50 of file eflowCellPosition.h.

◆ m_phi

double eflowCellPosition::m_phi
private

Definition at line 51 of file eflowCellPosition.h.


The documentation for this class was generated from the following files:
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
eflowAbstractCellList::dR2
virtual double dR2(double eta, double phi, eflowCaloENUM layer) const =0
eflowCellPosition::dR
double dR() const
Definition: eflowCellPosition.cxx:64
eflowCalo::Unknown
@ Unknown
Definition: eflowCaloRegions.h:50
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
MCP::ScaleSmearParam::r2
@ r2
CxxUtils::fpcompare::greater
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:140
eflowCellPosition::m_deposit
const eflowAbstractCellList * m_deposit
Definition: eflowCellPosition.h:52
eflowAbstractCellList::dR
virtual double dR(double eta, double phi, eflowCaloENUM layer) const =0
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
eflowAbstractCellList::phiFF
virtual double phiFF(eflowCaloENUM layer) const =0
eflowCellPosition::m_layer
eflowCaloENUM m_layer
Definition: eflowCellPosition.h:50
eflowAbstractCellList::etaFF
virtual double etaFF(eflowCaloENUM layer) const =0
eflowCellPosition::m_phi
double m_phi
Definition: eflowCellPosition.h:51
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
MCP::ScaleSmearParam::r1
@ r1
eflowCalo::translateSampl
static LAYER translateSampl(CaloCell_ID::CaloSample sampl)
Definition: eflowCaloRegions.cxx:45
eflowCellPosition::m_eta
double m_eta
Definition: eflowCellPosition.h:51