NAIA  1.1.1
EventSummary.h
Go to the documentation of this file.
1 
8 #ifndef NAIA_EVENTSUMMARY_H
9 #define NAIA_EVENTSUMMARY_H
10 
11 // gbatch headers
12 #ifdef ENABLE_PRODUCTION_CODE
13 #include "root.h"
14 #endif
15 
17 #include "Containers/Utils.h"
18 
19 namespace NAIA {
20 
28 class EventSummaryData : public TObject {
29 public:
34  void Clear();
35 
40  void Dump() const;
41 
46  [[nodiscard]] bool IsPhysicsTrigger() const { return (PhysBPatt & 0x3E) != 0; }
47 
54  [[nodiscard]] float TriggerWeight() const;
55 
61  void RestorePhysBPatt(bool force = false);
62 
63  unsigned short NAntiCluster = 0;
64  unsigned short NTofCluster = 0;
65  unsigned short NTrRecHit = 0;
66  unsigned short NTrTrack = 0;
67  unsigned short NRichRing = 0;
68  unsigned short NEcalShower = 0;
69  unsigned short NParticle = 0;
70 
74 
75  // clang-format off
76  unsigned short PhysBPatt = 0;
77  unsigned short JMembPatt = 0;
78  // clang-format on
79  unsigned short NAcc = 0;
80 
81 #ifdef ENABLE_PRODUCTION_CODE
82  bool Fill(AMSEventR *evPtr);
83 
84  void SetMC(bool isMC) { _isMC = isMC; }
85 #endif
86 
87 private:
89 
90  bool _isMC = false;
91 };
92 
101 class EventSummary : public OnDemandContainer<EventSummary>, public EventSummaryData {
102 public:
103  static const std::string BranchName;
104 
106 };
107 } // namespace NAIA
108 
109 #endif
NAIA::EventSummaryData::NEcalShower
unsigned short NEcalShower
Total number of Ecal showers in the event.
Definition: EventSummary.h:68
NAIA::EventSummaryData::NAcc
unsigned short NAcc
Number of fired ACC counters.
Definition: EventSummary.h:79
NAIA::EventSummaryData
Container class for base EventSummary info.
Definition: EventSummary.h:28
NAIA::EventSummaryData::_isMC
bool _isMC
Definition: EventSummary.h:90
NAIA::EventSummaryData::HighestInnerChargeParticle
short HighestInnerChargeParticle
ID of the ParticleR object with the highest Inner Tracker charge.
Definition: EventSummary.h:72
NAIA::EventSummaryData::NTofCluster
unsigned short NTofCluster
Total number of Tof clusters in the event.
Definition: EventSummary.h:64
NAIA::EventSummaryData::Clear
void Clear()
Clear container content.
Definition: EventSummary.cpp:57
NAIA::EventSummary
Accessor class for EventSummary info.
Definition: EventSummary.h:101
NAIA::EventSummaryData::IsPhysicsTrigger
bool IsPhysicsTrigger() const
Checks if the trigger corresponds to any of the AMS physics triggers.
Definition: EventSummary.h:46
NAIA
Definition: Event.h:13
NAIA::OnDemandContainer
Mixin class to add "read-on-demand" behavior to an existing container class.
Definition: OnDemandContainer.h:44
NAIA::EventSummaryData::NTrRecHit
unsigned short NTrRecHit
Total number of Tracker hits in the event.
Definition: EventSummary.h:65
Utils.h
NAIA::EventSummaryData::HighestEcalEnergyParticle
short HighestEcalEnergyParticle
ID of the ParticleR object with the highest ECAL shower energy.
Definition: EventSummary.h:71
NAIA::EventSummaryData::Dump
void Dump() const
Dump on screen container content.
Definition: EventSummary.cpp:75
NAIA::EventSummary::EventSummary
EventSummary()
Definition: EventSummary.h:105
NAIA::EventSummaryData::NRichRing
unsigned short NRichRing
Total number of Rich rings in the event.
Definition: EventSummary.h:67
NAIA::EventSummary::BranchName
static const std::string BranchName
Definition: EventSummary.h:103
NAIA::EventSummaryData::TriggerWeight
float TriggerWeight() const
Returns the weight associated with the trigger for this event (depends on the prescaling factor for e...
Definition: EventSummary.cpp:9
NAIA::EventSummaryData::HighestBetaHChargeParticle
short HighestBetaHChargeParticle
ID of the ParticleR object with the highest BetaH charge.
Definition: EventSummary.h:73
NAIA::EventSummaryData::ClassDef
ClassDef(EventSummaryData, 1)
NAIA::EventSummaryData::NTrTrack
unsigned short NTrTrack
Total number of Tracker tracks in the event.
Definition: EventSummary.h:66
NAIA::EventSummaryData::PhysBPatt
unsigned short PhysBPatt
same as in gbatch, see https://ams.cern.ch/AMS/Analysis/hpl3itp1/root02_v5/html/development/html/clas...
Definition: EventSummary.h:76
NAIA::EventSummaryData::NAntiCluster
unsigned short NAntiCluster
Number of fired ACC clusters.
Definition: EventSummary.h:63
NAIA::EventSummaryData::NParticle
unsigned short NParticle
Total number of reconstructed particles in the event.
Definition: EventSummary.h:69
OnDemandContainer.h
OnDemandContainer container class description.
NAIA::EventSummaryData::JMembPatt
unsigned short JMembPatt
same as in gbatch, see https://ams.cern.ch/AMS/Analysis/hpl3itp1/root02_v5/html/development/html/clas...
Definition: EventSummary.h:77
NAIA::EventSummaryData::RestorePhysBPatt
void RestorePhysBPatt(bool force=false)
Recompute the PhysBPatt variable.
Definition: EventSummary.cpp:36