FairRoot/PandaRoot
PndGemStation.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGemStation header file -----
3 // ----- Created 12/02/2009 by R. Karabowicz -----
4 // -------------------------------------------------------------------------
5 
6 
15 #ifndef PNDGEMSTATION_H
16 #define PNDGEMSTATION_H 1
17 
18 
19 #include "TObjArray.h"
20 #include "TNamed.h"
21 #include "TString.h"
22 #include "PndDetectorList.h"
23 
24 #include <map>
25 
26 class PndGemSensor;
27 
28 class PndGemStation : public TNamed
29 {
30 
31  public:
32 
34  PndGemStation();
35 
36 
43  PndGemStation(const char* name, Int_t stationNr, Double_t z,
45 
46 
48  virtual ~PndGemStation();
49 
52  void SetDetectorId(Int_t stationNr) {
53  fDetectorId = kGEM << 27 | 0 << 21 | stationNr << 8 | 0 << 6; }
54  Int_t GetDetectorId() const { return fDetectorId; }
55  Int_t GetSystemId() const {
56  return ( ( fDetectorId & ( 31<<27) ) >> 27); }
57  Int_t GetStationNr() const {
58  return ( ( fDetectorId & (8191<< 8) ) >> 8 ); }
59  Double_t GetZ(Int_t it=0);
60  Int_t GetNSensors() const { return fSensors->GetEntriesFast(); }
61  Int_t GetNChannels();
62  TObjArray* GetSensors() { return fSensors; }
63  PndGemSensor* GetSensor(Int_t iSensor) {
64  return (PndGemSensor*) fSensors->At(iSensor); }
65  PndGemSensor* GetSensorByNr(Int_t sensorNr);
66 
69 
70  Int_t GetNofZ();
71 
73  void Reset();
74 
76  virtual void Print(Bool_t kLong);
77 
78 
79  protected:
80 
81  Int_t fDetectorId; // Unique detector ID
82  Double32_t fZ; // z position of station centre [cm]
83  Double32_t fRotation; // Rotation angle in global c.s [rad]
84  TObjArray* fSensors; // Array of PndGemSensors
85  std::map<Int_t, Int_t> fSensorMap;
86  std::map<Int_t, Int_t> fMcIdMap;
87 
89 
91 
92 };
93 
94 
95 
96 #endif
Int_t GetSystemId() const
Definition: PndGemStation.h:55
std::map< Int_t, Int_t > fMcIdMap
Map from sensor number to index.
Definition: PndGemStation.h:86
Int_t GetStationNr() const
Definition: PndGemStation.h:57
Double_t GetZ(Int_t it=0)
TGeoRotation rotation
TGeoVolume * sensor
void AddSensor(PndGemSensor *sensor)
PndGemSensor * GetSensor(Int_t iSensor)
Definition: PndGemStation.h:63
TObjArray * GetSensors()
Definition: PndGemStation.h:62
ClassDef(PndGemStation, 1)
Int_t GetNSensors() const
Definition: PndGemStation.h:60
PndGemSensor * GetSensorByNr(Int_t sensorNr)
Double32_t fRotation
Definition: PndGemStation.h:83
Double_t
Int_t GetDetectorId() const
Definition: PndGemStation.h:54
Double_t fSensorZ[10]
Map from McId to index.
Definition: PndGemStation.h:88
Int_t GetNChannels()
Double_t z
TString name
TObjArray * fSensors
Definition: PndGemStation.h:84
Double32_t fZ
Definition: PndGemStation.h:82
virtual void Print(Bool_t kLong)
std::map< Int_t, Int_t > fSensorMap
Definition: PndGemStation.h:85
void SetDetectorId(Int_t stationNr)
Definition: PndGemStation.h:52
virtual ~PndGemStation()