ATLAS Offline Software
Public Member Functions | Protected Attributes | Friends | List of all members
FTF::LayerCalculator Class Reference

#include <SpacePointConversionUtils.h>

Collaboration diagram for FTF::LayerCalculator:

Public Member Functions

 LayerCalculator (const AtlasDetectorID *aId, const PixelID *pId, const SCT_ID *sId, int offs[3])
 
bool isPixel (const Identifier &id)
 
bool isBarrel (const Identifier &id)
 
int getLayer (const Identifier &id)
 

Protected Attributes

const AtlasDetectorIDm_atlasId
 
const PixelIDm_pixelId
 
const SCT_IDm_sctId
 
int m_offsetEndcapPixels
 
int m_offsetBarrelSCT
 
int m_offsetEndcapSCT
 

Friends

class BaseSpacePointFilter
 

Detailed Description

Definition at line 29 of file SpacePointConversionUtils.h.

Constructor & Destructor Documentation

◆ LayerCalculator()

FTF::LayerCalculator::LayerCalculator ( const AtlasDetectorID aId,
const PixelID pId,
const SCT_ID sId,
int  offs[3] 
)
inline

Definition at line 34 of file SpacePointConversionUtils.h.

34  :
35  m_atlasId(aId), m_pixelId(pId), m_sctId(sId) {
36  m_offsetEndcapPixels = offs[0];
37  m_offsetBarrelSCT = offs[1];
38  m_offsetEndcapSCT = offs[2];
39  }

Member Function Documentation

◆ getLayer()

int FTF::LayerCalculator::getLayer ( const Identifier id)
inline

Definition at line 52 of file SpacePointConversionUtils.h.

52  {
53  int layerId=-1;
54  if(isPixel(id)) {
55  layerId = m_pixelId->layer_disk(id);
56  if(!isBarrel(id)) layerId += m_offsetEndcapPixels;
57  }
58  else {
59  layerId = m_sctId->layer_disk(id);
60  if(isBarrel(id)) layerId += m_offsetBarrelSCT;
61  else layerId += m_offsetEndcapSCT;
62  }
63  return layerId;
64  }

◆ isBarrel()

bool FTF::LayerCalculator::isBarrel ( const Identifier id)
inline

Definition at line 43 of file SpacePointConversionUtils.h.

43  {
44  if(m_atlasId->is_pixel(id)) {
45  return (m_pixelId->barrel_ec(id)==0);
46  }
47  if(m_atlasId->is_sct(id)) {
48  return (m_sctId->barrel_ec(id)==0);
49  }
50  return false;
51  }

◆ isPixel()

bool FTF::LayerCalculator::isPixel ( const Identifier id)
inline

Definition at line 40 of file SpacePointConversionUtils.h.

40  {
41  return m_atlasId->is_pixel(id);
42  }

Friends And Related Function Documentation

◆ BaseSpacePointFilter

friend class BaseSpacePointFilter
friend

Definition at line 31 of file SpacePointConversionUtils.h.

Member Data Documentation

◆ m_atlasId

const AtlasDetectorID* FTF::LayerCalculator::m_atlasId
protected

Definition at line 66 of file SpacePointConversionUtils.h.

◆ m_offsetBarrelSCT

int FTF::LayerCalculator::m_offsetBarrelSCT
protected

Definition at line 69 of file SpacePointConversionUtils.h.

◆ m_offsetEndcapPixels

int FTF::LayerCalculator::m_offsetEndcapPixels
protected

Definition at line 69 of file SpacePointConversionUtils.h.

◆ m_offsetEndcapSCT

int FTF::LayerCalculator::m_offsetEndcapSCT
protected

Definition at line 69 of file SpacePointConversionUtils.h.

◆ m_pixelId

const PixelID* FTF::LayerCalculator::m_pixelId
protected

Definition at line 67 of file SpacePointConversionUtils.h.

◆ m_sctId

const SCT_ID* FTF::LayerCalculator::m_sctId
protected

Definition at line 68 of file SpacePointConversionUtils.h.


The documentation for this class was generated from the following file:
FTF::LayerCalculator::isBarrel
bool isBarrel(const Identifier &id)
Definition: SpacePointConversionUtils.h:43
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
FTF::LayerCalculator::isPixel
bool isPixel(const Identifier &id)
Definition: SpacePointConversionUtils.h:40
FTF::LayerCalculator::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: SpacePointConversionUtils.h:66
FTF::LayerCalculator::m_offsetEndcapPixels
int m_offsetEndcapPixels
Definition: SpacePointConversionUtils.h:69
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
FTF::LayerCalculator::m_pixelId
const PixelID * m_pixelId
Definition: SpacePointConversionUtils.h:67
FTF::LayerCalculator::m_offsetEndcapSCT
int m_offsetEndcapSCT
Definition: SpacePointConversionUtils.h:69
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
FTF::LayerCalculator::m_offsetBarrelSCT
int m_offsetBarrelSCT
Definition: SpacePointConversionUtils.h:69
FTF::LayerCalculator::m_sctId
const SCT_ID * m_sctId
Definition: SpacePointConversionUtils.h:68