PandaRoot
PndGemSensorMonitor.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGemSensorMonitor header file -----
3 // ----- Created 12/02/2009 by R. Karabowicz -----
4 // -------------------------------------------------------------------------
5 
16 #ifndef PNDGEMSENSORMONITOR_H
17 #define PNDGEMSENSORMONITOR_H 1
18 
19 #include "TNamed.h"
20 #include "PndDetectorList.h"
21 #include "PndGemSensor.h"
22 
23 #include <map>
24 #include <list>
25 #include <set>
26 #include <vector>
27 
29 
30  public:
33 
48  PndGemSensorMonitor(TString tempName, Int_t detId, Int_t iType, Double_t x0, Double_t y0, Double_t z0, Double_t rotation, Double_t innerRad, Double_t outerRad, Double_t d,
49  Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
50  PndGemSensorMonitor(TString tempName, Int_t stationNr, Int_t sectorNr, Int_t iType, Double_t x0, Double_t y0, Double_t z0, Double_t rotation, Double_t innerRad,
51  Double_t outerRad, Double_t d, Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
52  PndGemSensorMonitor(const PndGemSensor &tempSensor);
53 
55  virtual ~PndGemSensorMonitor();
56 
59  // Make a channel active
60  void ActivateChannel(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge);
61 
62  void CheckNeighbours(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge);
63 
66  // Return kTRUE if channel was activated no more than fSensorRecoveryTime nanoseconds before
67  Bool_t ChannelIsActive(Int_t channelNr, Int_t sideId, Double_t timeNow);
68 
69  // Return number of seconds between now and last activation
70  Double_t ChannelLastActiveAt(Int_t channelNr, Int_t sideId, Double_t timeNow, Int_t eventNr = -1);
71 
72  // Return last activation time
73  Double_t ChannelLastActiveAt(Int_t channelNr, Int_t sideId);
74 
75  // Return last activation data
76  Bool_t ChannelLastActivation(Int_t channelNr, Int_t sideId, Int_t &eventNr, Int_t &digiNr, Double_t &channelTime, Double_t &channelCharge);
77 
79  void Print();
80 
81  private:
84  // LA: LastActivation
85  // Front
86  std::vector<Double_t> fFLATime;
87  std::vector<Double_t> fFLACharge;
88  std::vector<Int_t> fFLADigiNr;
89  std::vector<Int_t> fFLAEventNr;
90  std::vector<Double_t> fFMeanTimeD;
91  std::vector<Int_t> fFNofDigis;
92  Int_t fFSLChan;
93  // Back
94  std::vector<Double_t> fBLATime;
95  std::vector<Double_t> fBLACharge;
96  std::vector<Int_t> fBLADigiNr;
97  std::vector<Int_t> fBLAEventNr;
98  std::vector<Double_t> fBMeanTimeD;
99  std::vector<Int_t> fBNofDigis;
100  Int_t fBSLChan;
101 
102  Double_t fSensorRecoveryTime;
103  Double_t fSensorFirstTime;
104  Double_t fSensorLastTime;
105 
106  ClassDef(PndGemSensorMonitor, 1);
107 };
108 
109 #endif
Double_t ChannelLastActiveAt(Int_t channelNr, Int_t sideId, Double_t timeNow, Int_t eventNr=-1)
void ActivateChannel(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge)
virtual ~PndGemSensorMonitor()
Bool_t ChannelIsActive(Int_t channelNr, Int_t sideId, Double_t timeNow)
Bool_t ChannelLastActivation(Int_t channelNr, Int_t sideId, Int_t &eventNr, Int_t &digiNr, Double_t &channelTime, Double_t &channelCharge)
void CheckNeighbours(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge)