BmnRoot
Loading...
Searching...
No Matches
BmnFHCalEvent.h
Go to the documentation of this file.
1
11#ifndef BMNFHCALEVENT_H
12#define BMNFHCALEVENT_H
13
14#include "BmnFHCalModule.h"
15
16#include <TClonesArray.h>
17#include <TNamed.h>
18#include <vector>
19
20class BmnFHCalEvent : public TNamed
21{
22 public:
26 : TNamed()
27 , fTotalEnergy()
28 , fModulesVec()
29 {}
30
33
37 void SetTotalModules(int TotalModules) { fModulesVec.resize(TotalModules); }
38
42 void SetTotalEnergy(float Energy) { fTotalEnergy = Energy; };
43
47 void SetModule(uint8_t mod_id, BmnFHCalModule Module) { fModulesVec.at(mod_id - 1) = Module; };
48
52 void reset()
53 {
54 fTotalEnergy = 0.;
55 fModulesVec.clear();
56 }
58 {
59 fTotalEnergy = 0.;
60 for (auto& it : fModulesVec) {
61 it.ResetSections();
62 it.ResetLinks();
63 }
64 }
65
66 void SummarizeEvent();
67 virtual void Print(Option_t* option = "") const {};
68
72 virtual const char* GetClassName() { return "BmnFHCalEvent"; }
73
77 int GetTotalModules() const { return fModulesVec.size(); };
78
82 float GetTotalEnergy() const { return fTotalEnergy; };
83
87 BmnFHCalModule* GetModule(uint8_t mod_id) { return &fModulesVec.at(mod_id - 1); };
88
89 private:
90 float fTotalEnergy;
91 std::vector<BmnFHCalModule> fModulesVec;
92
93 ClassDef(BmnFHCalEvent, 4);
94};
95
96#endif /* BMNFHCALEVENT_H */
Class for Bmn FHCal data container in event.
virtual void Print(Option_t *option="") const
void SetModule(uint8_t mod_id, BmnFHCalModule Module)
Set ModulesArrtor.
virtual const char * GetClassName()
Class name.
BmnFHCalModule * GetModule(uint8_t mod_id)
Module info.
void ResetEnergies()
BmnFHCalEvent()
Default constructor.
void SetTotalModules(int TotalModules)
Set TotalModules externally.
void reset()
Zero all fiels.
void SetTotalEnergy(float Energy)
Set Deposited Energy.
float GetTotalEnergy() const
Deposited Energy.
int GetTotalModules() const
Total number of modules.
Class for Bmn FHCal module data container in event.