PandaRoot
PndGemStation Class Reference

#include <PndGemStation.h>

Inheritance diagram for PndGemStation:

Public Member Functions

 PndGemStation ()
 
 PndGemStation (const char *name, Int_t stationNr, Double_t z, Double_t rotation)
 
virtual ~PndGemStation ()
 
void SetDetectorId (Int_t stationNr)
 
Int_t GetDetectorId () const
 
Int_t GetSystemId () const
 
Int_t GetStationNr () const
 
Double_t GetZ (Int_t it=0)
 
Int_t GetNSensors () const
 
Int_t GetNChannels ()
 
TObjArray * GetSensors ()
 
PndGemSensorGetSensor (Int_t iSensor)
 
PndGemSensorGetSensorByNr (Int_t sensorNr)
 
void AddSensor (PndGemSensor *sensor)
 
Int_t GetNofZ ()
 
void Reset ()
 
virtual void Print (Bool_t kLong)
 

Protected Member Functions

 ClassDef (PndGemStation, 1)
 

Protected Attributes

Int_t fDetectorId
 
Double32_t fZ
 
Double32_t fRotation
 
TObjArray * fSensors
 
std::map< Int_t, Int_t > fSensorMap
 
std::map< Int_t, Int_t > fMcIdMap
 Map from sensor number to index. More...
 
Double_t fSensorZ [10]
 Map from McId to index. More...
 

Detailed Description

Definition at line 25 of file PndGemStation.h.

Constructor & Destructor Documentation

◆ PndGemStation() [1/2]

PndGemStation::PndGemStation ( )

Default constructor

◆ PndGemStation() [2/2]

PndGemStation::PndGemStation ( const char *  name,
Int_t  stationNr,
Double_t  z,
Double_t  rotation 
)

Standard constructor

Parameters
nameVolume name of station
stationNrstationNr
zz position of station centre [cm]
rotationRotation angle in global c.s. [rad]

◆ ~PndGemStation()

virtual PndGemStation::~PndGemStation ( )
virtual

Destructor

Member Function Documentation

◆ AddSensor()

void PndGemStation::AddSensor ( PndGemSensor sensor)

Add one sensor to the array

Referenced by GetSensor().

◆ ClassDef()

PndGemStation::ClassDef ( PndGemStation  ,
 
)
protected

◆ GetDetectorId()

Int_t PndGemStation::GetDetectorId ( ) const
inline

Definition at line 45 of file PndGemStation.h.

References fDetectorId.

45 { return fDetectorId; }

◆ GetNChannels()

Int_t PndGemStation::GetNChannels ( )

Referenced by GetNSensors().

◆ GetNofZ()

Int_t PndGemStation::GetNofZ ( )

Referenced by GetSensor().

◆ GetNSensors()

Int_t PndGemStation::GetNSensors ( ) const
inline

Definition at line 49 of file PndGemStation.h.

References fSensors, and GetNChannels().

49 { return fSensors->GetEntriesFast(); }
TObjArray * fSensors
Definition: PndGemStation.h:70

◆ GetSensor()

PndGemSensor* PndGemStation::GetSensor ( Int_t  iSensor)
inline

Definition at line 52 of file PndGemStation.h.

References AddSensor(), fSensors, GetNofZ(), GetSensorByNr(), Print(), and Reset().

52 { return (PndGemSensor *)fSensors->At(iSensor); }
TObjArray * fSensors
Definition: PndGemStation.h:70

◆ GetSensorByNr()

PndGemSensor* PndGemStation::GetSensorByNr ( Int_t  sensorNr)

Referenced by GetSensor().

◆ GetSensors()

TObjArray* PndGemStation::GetSensors ( )
inline

Definition at line 51 of file PndGemStation.h.

References fSensors.

51 { return fSensors; }
TObjArray * fSensors
Definition: PndGemStation.h:70

◆ GetStationNr()

Int_t PndGemStation::GetStationNr ( ) const
inline

Definition at line 47 of file PndGemStation.h.

References fDetectorId, and GetZ().

47 { return ((fDetectorId & (8191 << 8)) >> 8); }

◆ GetSystemId()

Int_t PndGemStation::GetSystemId ( ) const
inline

Definition at line 46 of file PndGemStation.h.

References fDetectorId.

46 { return ((fDetectorId & (31 << 27)) >> 27); }

◆ GetZ()

Double_t PndGemStation::GetZ ( Int_t  it = 0)

Referenced by GetStationNr().

◆ Print()

virtual void PndGemStation::Print ( Bool_t  kLong)
virtual

Output to screen

Referenced by GetSensor().

◆ Reset()

void PndGemStation::Reset ( )

Reset all eventwise counters

Referenced by GetSensor().

◆ SetDetectorId()

void PndGemStation::SetDetectorId ( Int_t  stationNr)
inline

Accessors

Definition at line 44 of file PndGemStation.h.

References fDetectorId, and kGEM.

44 { fDetectorId = static_cast<int>(DetectorId::kGEM) << 27 | 0 << 21 | stationNr << 8 | 0 << 6; }

Member Data Documentation

◆ fDetectorId

Int_t PndGemStation::fDetectorId
protected

Definition at line 67 of file PndGemStation.h.

Referenced by GetDetectorId(), GetStationNr(), GetSystemId(), and SetDetectorId().

◆ fMcIdMap

std::map<Int_t, Int_t> PndGemStation::fMcIdMap
protected

Map from sensor number to index.

Definition at line 72 of file PndGemStation.h.

◆ fRotation

Double32_t PndGemStation::fRotation
protected

Definition at line 69 of file PndGemStation.h.

◆ fSensorMap

std::map<Int_t, Int_t> PndGemStation::fSensorMap
protected

Definition at line 71 of file PndGemStation.h.

◆ fSensors

TObjArray* PndGemStation::fSensors
protected

Definition at line 70 of file PndGemStation.h.

Referenced by GetNSensors(), GetSensor(), and GetSensors().

◆ fSensorZ

Double_t PndGemStation::fSensorZ[10]
protected

Map from McId to index.

Definition at line 74 of file PndGemStation.h.

◆ fZ

Double32_t PndGemStation::fZ
protected

Definition at line 68 of file PndGemStation.h.


The documentation for this class was generated from the following file: