TankTriggerSimulator.h
Go to the documentation of this file.
1 #ifndef _TankTriggerSimulatorOG_TankTriggerSimulator_h_
2 #define _TankTriggerSimulatorOG_TankTriggerSimulator_h_
3 
4 #include <fwk/VModule.h>
5 #include <sevt/StationTriggerData.h>
6 #include <utl/TimeDistribution-fwd.h>
7 #include <vector>
8 #include <limits>
9 
10 
11 namespace sevt {
12  class PMT;
13  class Station;
14 }
15 
16 namespace utl {
17  class TimeStamp;
18 }
19 
20 namespace TankTriggerSimulatorOG {
21 
33 
34  public:
35  TankTriggerSimulator() = default;
36  virtual ~TankTriggerSimulator() = default;
37 
38  fwk::VModule::ResultFlag Init() override;
39  fwk::VModule::ResultFlag Run(evt::Event& event) override;
40  fwk::VModule::ResultFlag Finish() override { return eSuccess; }
41 
42  private:
43  // data for triggers
44  struct FADCCalibInfo {
45  double fBaseline[3] = { 0 };
46  int fT1Threshold[3] = { 0 };
47  int fT2Threshold[3] = { 0 };
48  int fTOTThreshold[3] = { 0 };
49  int fTOTdThreshold[3] = { 0 };
50  };
51 
54  int GetCalibInfo(const sevt::Station& station, FADCCalibInfo& calib) const;
55 
57  void Set(const utl::Branch& b);
58  //
59  double fLevelVEM = 0;
60  unsigned int fMultiplicity = 0;
61  };
62 
64  void Set(const utl::Branch& b);
65  //
66  double fLevelVEM = 0;
67  unsigned int fMultiplicity = 0;
68  };
69 
70  struct TOTParameters {
71  void Set(const utl::Branch& b);
72  //
73  double fLevelVEM = 0;
74  unsigned int fOccupancy = 0;
75  unsigned int fWindow = 0;
76  unsigned int fMultiplicity = 0;
77  };
78 
80  void Set(const utl::Branch& b);
81  //
82  unsigned int fWindow = 0;
83  double fDecrement = 0;
84  double fThreshold = 0;
85  double fBaselineTolerance = 0;
86  double fBaselineStep = 0;
87  };
88 
89  struct TOTdParameters {
90  void Set(const utl::Branch& b);
91  //
92  double fLevelVEM = 0;
93  int fDecayFD = 0;
94  int fDecayFN = 0;
95  int fOccupancy = 0;
96  int fWindow = 0;
97  int fMultiplicity = 0;
98  };
99 
100  struct MOPSParameters {
101  void Set(const utl::Branch& b);
102  //
103  int fOccupancy = 0;
104  int fWindow = 0;
105  int fMinUp = 0;
106  int fMaxUp = 0;
107  int fVetoOffset = 0;
108  int fMultiplicity = 0;
109  };
110 
112 
114 
116 
118 
120 
122 
123  REGISTER_MODULE("TankTriggerSimulatorOG", TankTriggerSimulator);
124 
125  };
126 
127 }
128 
129 
130 #endif
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
Report success to RunController.
Definition: VModule.h:62
Class representing a document branch.
Definition: Branch.h:107
class to hold data at Station level
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
int GetCalibInfo(const sevt::Station &station, FADCCalibInfo &calib) const
This module simulates the local station trigger.
REGISTER_MODULE("TankTriggerSimulatorOG", TankTriggerSimulator)
Module interface.
Definition: VModule.h:53
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Definition: XbArray.h:7

, generated on Tue Sep 26 2023.