StationTriggerInfo.h
Go to the documentation of this file.
1 #ifndef _sdet_StationTriggerInfo_h_
2 #define _sdet_StationTriggerInfo_h_
3 
4 #include <sevt/StationTriggerData.h>
5 
6 
7 namespace sdet {
8 
10  public:
12 
13  StationTriggerInfo(const int pld, const bool t2th,
14  const int start, const int latch, const int stop) :
15  fPLDBits(pld),
16  fIsT2Threshold(t2th),
17  fStart(start),
18  fLatch(latch),
19  fStop(stop)
20  { }
21 
22  int GetPLDBits() const { return fPLDBits; }
23  void SetPLDBits(const int bits) { fPLDBits = bits; }
24 
25  bool
26  IsT1()
27  const
28  {
29  return fPLDBits &
34  }
35 
36  bool
37  IsT1Threshold()
38  const
39  {
41  !IsTimeOverThreshold() && !IsTimeOverThresholdDeconvoluted() && !IsMultiplicityOfPositiveSteps();
42  }
43 
44  bool
45  IsTimeOverThreshold()
46  const
47  {
48  return fPLDBits &
50  }
51 
52  bool
53  IsTimeOverThresholdDeconvoluted()
54  const
55  {
56  return fPLDBits &
58  !IsTimeOverThreshold();
59  }
60 
61  bool
62  IsMultiplicityOfPositiveSteps()
63  const
64  {
65  return fPLDBits &
67  !IsTimeOverThreshold();
68  }
69 
70  bool IsT2() const
71  { return IsTimeOverThreshold() || IsTimeOverThresholdDeconvoluted() || IsMultiplicityOfPositiveSteps() || IsT2Threshold(); }
72 
73  bool IsT2Threshold() const { return fIsT2Threshold; }
74 
75  void SetIsT2Threshold(const bool isT2Th) { fIsT2Threshold = isT2Th; }
76 
78  GetTrigger()
79  const
80  {
81  if (IsTimeOverThreshold())
83  else if (IsTimeOverThresholdDeconvoluted())
85  else if (IsMultiplicityOfPositiveSteps())
87  else if (IsT2Threshold())
89  else if (IsT1Threshold())
91  else
93  }
94 
96  int GetStart() const { return fStart; }
97  void SetStart(const int start) { fStart = start; }
98 
99  int GetLatch() const { return fLatch; }
100  void SetLatch(const int latch) { fLatch = latch; }
101 
103  int GetStop() const { return fStop; }
104  void SetStop(const int stop) { fStop = stop; }
105 
106  void SetStartLatchStop(const int start, const int latch, const int stop)
107  { fStart = start; fLatch = latch; fStop = stop; }
108 
109  private:
110  int fPLDBits = 0;
111  bool fIsT2Threshold = false;
112  int fStart = 0;
113  int fLatch = 0;
114  int fStop = 0;
115  };
116 
117 }
118 
119 
120 #endif
void SetStop(const int stop)
StationTriggerInfo(const int pld, const bool t2th, const int start, const int latch, const int stop)
int GetStart() const
First bin of trace.
void SetStart(const int start)
int GetStop() const
Last+1 bin of trace.
void SetLatch(const int latch)
void SetPLDBits(const int bits)
void SetIsT2Threshold(const bool isT2Th)
void SetStartLatchStop(const int start, const int latch, const int stop)

, generated on Tue Sep 26 2023.