HerdSoftware  0.1.1
CaloPMTTriggerGeoInfo.h
Go to the documentation of this file.
1 
3 #ifndef HERD_CALOPMTTRIGGERGEOINFO_H_
4 #define HERD_CALOPMTTRIGGERGEOINFO_H_
5 
7 
8 #include "core/ObserverPtr.h"
9 
10 #include <array>
11 #include <vector>
12 
13 #ifdef HS_USE_ROOT
14 #include "Rtypes.h"
15 #endif
16 
17 namespace Herd {
18 
22 enum class CaloPMTTriggerRegion : int { NONE = -1, Core = 0, Ztop = 1, Zbot = 2, Xp = 3, Yp = 4, Yn = 5 };
24 constexpr int NCaloPMTTriggerRegions = 6;
28 constexpr std::array<CaloPMTTriggerRegion, NCaloPMTTriggerRegions> CaloPMTTriggerRegions{
31 
36 public:
41  CaloPMTTriggerGeoInfo() = default;
42 
44  virtual ~CaloPMTTriggerGeoInfo() = default;
45 
55  CaloPMTTriggerRegion TriggerRegionID(unsigned int volID);
56 
62  void SetCaloGeoParams(EA::observer_ptr<CaloGeoParams> caloGeoParams) { _caloGeoParams = caloGeoParams; };
63 
64 private:
65  EA::observer_ptr<CaloGeoParams> _caloGeoParams = nullptr;
66 
71  void FillVolID2CaloPMTTriggerRegion();
72 
73  std::vector<CaloPMTTriggerRegion>
75 
76 #ifdef HS_USE_ROOT
77  ClassDef(CaloPMTTriggerGeoInfo, 1)
78 #endif
79 };
80 
81 } // namespace Herd
82 
83 #endif /* HERD_CALOPMTTRIGGERGEOINFO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
CaloPMTTriggerRegion
Definition: CaloPMTTriggerGeoInfo.h:22
Data structure for the CaloPMT trigger geometric info (trigger regions).
Definition: CaloPMTTriggerGeoInfo.h:35
void SetCaloGeoParams(EA::observer_ptr< CaloGeoParams > caloGeoParams)
Sets the CaloGeoParams to use.
Definition: CaloPMTTriggerGeoInfo.h:62
constexpr int NCaloPMTTriggerRegions
The number of trigger regions for CaloPMT.
Definition: CaloPMTTriggerGeoInfo.h:24
std::vector< CaloPMTTriggerRegion > _crystalTrigRegions
Vector with the associated trigger region for each crystal ID.
Definition: CaloPMTTriggerGeoInfo.h:74
constexpr std::array< CaloPMTTriggerRegion, NCaloPMTTriggerRegions > CaloPMTTriggerRegions
Array of all the CaloPMT trigger regions. This array can be used to iterate over all the trigger regi...
Definition: CaloPMTTriggerGeoInfo.h:28