NAIA  1.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
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  bool IsPhysicsTrigger() const { return (PhysBPatt & 0x3E) != 0; }
47 
54  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
unsigned short NParticle
Total number of reconstructed particles in the event.
Definition: EventSummary.h:69
unsigned short NAcc
Number of fired ACC counters.
Definition: EventSummary.h:79
OnDemandContainer container class description.
ClassDef(EventSummaryData, 1)
float TriggerWeight() const
Returns the weight associated with the trigger for this event (depends on the prescaling factor for e...
Definition: EventSummary.cpp:9
unsigned short NAntiCluster
Number of fired ACC clusters.
Definition: EventSummary.h:63
static const std::string BranchName
Definition: EventSummary.h:103
Mixin class to add &quot;read-on-demand&quot; behavior to an existing container class.
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
unsigned short NTrRecHit
Total number of Tracker hits in the event.
Definition: EventSummary.h:65
unsigned short NEcalShower
Total number of Ecal showers in the event.
Definition: EventSummary.h:68
short HighestEcalEnergyParticle
ID of the ParticleR object with the highest ECAL shower energy.
Definition: EventSummary.h:71
void Dump() const
Dump on screen container content.
short HighestInnerChargeParticle
ID of the ParticleR object with the highest Inner Tracker charge.
Definition: EventSummary.h:72
unsigned short NTrTrack
Total number of Tracker tracks in the event.
Definition: EventSummary.h:66
Accessor class for EventSummary info.
Definition: EventSummary.h:101
bool IsPhysicsTrigger() const
Checks if the trigger corresponds to any of the AMS physics triggers.
Definition: EventSummary.h:46
short HighestBetaHChargeParticle
ID of the ParticleR object with the highest BetaH charge.
Definition: EventSummary.h:73
Container class for base EventSummary info.
Definition: EventSummary.h:28
unsigned short NTofCluster
Total number of Tof clusters in the event.
Definition: EventSummary.h:64
void Clear()
Clear container content.
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
void RestorePhysBPatt(bool force=false)
Recompute the PhysBPatt variable.
unsigned short NRichRing
Total number of Rich rings in the event.
Definition: EventSummary.h:67