ATLAS Offline Software
Loading...
Searching...
No Matches
eflowCellPosition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: eflowCellPosition.h
8PACKAGE: offline/Reconstruction/eflowRec
9
10AUTHORS: M.Hodgkinson, R Duxfield (based on R.Duxfields Root package)
11CREATED: 18th Aug, 2005
12
13********************************************************************/
14
15//Athena Headers
19
20#include "CaloEvent/CaloCell.h"
21
23
24//C++ Headers
25#include <cmath>
26
28 m_layer(layer),m_deposit(deposit) {
29 m_eta = deposit->etaFF(layer) + dR;
30 m_phi = deposit->phiFF(layer);
31}
32
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}
44
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}
63
64double eflowCellPosition::dR() const {
65 return m_deposit->dR(m_eta, m_phi, m_layer);
66}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
This class groups all DetDescr information related to a CaloCell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
virtual double etaFF(eflowCaloENUM layer) const =0
virtual double phiFF(eflowCaloENUM layer) const =0
static LAYER translateSampl(CaloCell_ID::CaloSample sampl)
eflowCellPosition(const eflowAbstractCellList *deposit, eflowCaloENUM layer, double dR)
eflowCaloENUM m_layer
const eflowAbstractCellList * m_deposit
bool operator<(const eflowCellPosition &rhs) const
eflowCalo::LAYER eflowCaloENUM
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[