PandaRoot
PndGemSensorMonitor.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndGemSensorMonitor header file -----
15 // ----- Created 12/02/2009 by R. Karabowicz -----
16 // -------------------------------------------------------------------------
17 
28 #ifndef PNDGEMSENSORMONITOR_H
29 #define PNDGEMSENSORMONITOR_H 1
30 
31 #include "TNamed.h"
32 #include "PndDetectorList.h"
33 #include "PndGemSensor.h"
34 
35 #include <map>
36 #include <list>
37 #include <set>
38 #include <vector>
39 
41 
42  public:
45 
60  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,
61  Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
62  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,
63  Double_t outerRad, Double_t d, Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
64  PndGemSensorMonitor(const PndGemSensor &tempSensor);
65 
67  virtual ~PndGemSensorMonitor();
68 
71  // Make a channel active
72  void ActivateChannel(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge);
73 
74  void CheckNeighbours(Int_t channelNr, Int_t sideId, Int_t eventNr, Int_t digiNr, Double_t channelTime, Double_t channelCharge);
75 
78  // Return kTRUE if channel was activated no more than fSensorRecoveryTime nanoseconds before
79  Bool_t ChannelIsActive(Int_t channelNr, Int_t sideId, Double_t timeNow);
80 
81  // Return number of seconds between now and last activation
82  Double_t ChannelLastActiveAt(Int_t channelNr, Int_t sideId, Double_t timeNow, Int_t eventNr = -1);
83 
84  // Return last activation time
85  Double_t ChannelLastActiveAt(Int_t channelNr, Int_t sideId);
86 
87  // Return last activation data
88  Bool_t ChannelLastActivation(Int_t channelNr, Int_t sideId, Int_t &eventNr, Int_t &digiNr, Double_t &channelTime, Double_t &channelCharge);
89 
91  void Print();
92 
93  private:
96  // LA: LastActivation
97  // Front
98  std::vector<Double_t> fFLATime;
99  std::vector<Double_t> fFLACharge;
100  std::vector<Int_t> fFLADigiNr;
101  std::vector<Int_t> fFLAEventNr;
102  std::vector<Double_t> fFMeanTimeD;
103  std::vector<Int_t> fFNofDigis;
104  Int_t fFSLChan;
105  // Back
106  std::vector<Double_t> fBLATime;
107  std::vector<Double_t> fBLACharge;
108  std::vector<Int_t> fBLADigiNr;
109  std::vector<Int_t> fBLAEventNr;
110  std::vector<Double_t> fBMeanTimeD;
111  std::vector<Int_t> fBNofDigis;
112  Int_t fBSLChan;
113 
114  Double_t fSensorRecoveryTime;
115  Double_t fSensorFirstTime;
116  Double_t fSensorLastTime;
117 
118  ClassDef(PndGemSensorMonitor, 1);
119 };
120 
121 #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)