ATLAS Offline Software
Loading...
Searching...
No Matches
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}
virtual double etaFF(eflowCaloENUM layer) const =0
virtual double phiFF(eflowCaloENUM layer) const =0
eflowCaloENUM m_layer
const eflowAbstractCellList * m_deposit

◆ 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}
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
CaloCell_ID::CaloSample getSampling() const
cell sampling
static LAYER translateSampl(CaloCell_ID::CaloSample sampl)

◆ ~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}
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition fpcompare.h:140
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[

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: