ATLAS Offline Software
Static Public Member Functions | List of all members
CaloCellDetPos Class Reference

#include <CaloCellDetPos.h>

Collaboration diagram for CaloCellDetPos:

Static Public Member Functions

static bool getDetPosition (const CaloDetDescrManager &mgr, CaloCell_ID::CaloSample sam, double etaAtlas, double phiAtlas, double &etaDet, double &phiDet)
 get Detector level eta-phi position from Atlas level (aligned) position More...
 
static bool getAtlasPosition (const CaloDetDescrManager &mgr, CaloCell_ID::CaloSample sam, double etaDet, double phiDet, double &etaAtlas, double &phiAtlas)
 get Atlas (aligned) level eta-phi position from detector level eta-phi positions More...
 

Detailed Description

Definition at line 20 of file CaloCellDetPos.h.

Member Function Documentation

◆ getAtlasPosition()

bool CaloCellDetPos::getAtlasPosition ( const CaloDetDescrManager mgr,
CaloCell_ID::CaloSample  sam,
double  etaDet,
double  phiDet,
double &  etaAtlas,
double &  phiAtlas 
)
static

get Atlas (aligned) level eta-phi position from detector level eta-phi positions

Parameters
constCaloDetDescrManager mgr CaloDetDescManager Instance
CaloCell_ID::CaloSamplesam layer to use
doubleetaDet : input eta detector level position
doublephiDet : input phi detector level position
doubleetaAtlas : estimated eta detector in aligned Atlas frame
doublephiAtlas : estimated phi detector in aligned Atlas frame

Definition at line 29 of file CaloCellDetPos.cxx.

33  {
34 
35  const CaloDetDescrElement* elt = mgr.get_element_raw(sam,etaDet,phiDet);
36  if (!elt) {
37  etaAtlas = etaDet;
38  phiAtlas = phiDet;
39  return false;
40  }
41  etaAtlas = etaDet + elt->eta()-elt->eta_raw();
42  phiAtlas = CaloPhiRange::fix(phiDet + elt->phi()-elt->phi_raw());
43  return true;
44 }

◆ getDetPosition()

bool CaloCellDetPos::getDetPosition ( const CaloDetDescrManager mgr,
CaloCell_ID::CaloSample  sam,
double  etaAtlas,
double  phiAtlas,
double &  etaDet,
double &  phiDet 
)
static

get Detector level eta-phi position from Atlas level (aligned) position

Parameters
constCaloDetDescrManager mgr CaloDetDescManager Instance
CaloCell_ID::CaloSamplesam layer to use
doubleetaAtlas : input eta Atlas level position
doublephiAtlas : input phi Atlas level position
doubleetaDet : estimated eta detector in nominal calo frame
doublephiDet : estimated phi detector in nominal calo frame

Definition at line 13 of file CaloCellDetPos.cxx.

16  {
17 
18  const CaloDetDescrElement* elt = mgr.get_element(sam,etaAtlas,phiAtlas);
19  if (!elt) {
20  etaDet = etaAtlas;
21  phiDet = phiAtlas;
22  return false;
23  }
24  etaDet = etaAtlas + elt->eta_raw()-elt->eta();
25  phiDet = CaloPhiRange::fix(phiAtlas + elt->phi_raw()-elt->phi());
26  return true;
27 }

The documentation for this class was generated from the following files:
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352