The Event
class
The Event
class is nothing more than a collection of containers
Container type |
Name |
Description |
---|---|---|
header |
Contains simple information like run number, run tag, event number and UTC time. |
|
evSummary |
Contains some aggregated variables to roughly describe the event. |
|
daq |
Contains variables describing the status of the AMS DAQ system for the event. |
|
tofBase |
Contains basic Tof variables that are accessed most frequently |
|
tofPlus |
Contains additional Tof variables that are accessed less frequently |
|
tofBaseSt |
Contains basic Tof variables that are accessed most frequently (no-tracker reconstruction) |
|
tofPlusSt |
Contains additional Tof variables that are accessed less frequently (no-tracker reconstruction) |
|
ecalBase |
Contains basic Ecal variables that are accessed most frequently |
|
ecalPlus |
Contains additional Ecal variables that are accessed less frequently |
|
trTrackBase |
Contains basic Track variables that are accessed most frequently |
|
trTrackPlus |
Contains additional Track variables that are accessed less frequently |
|
trdKBase |
Contains basic TRD variables that are accessed most frequently |
|
trdKBaseSt |
Contains basic TRD variables that are accessed most frequently (no-tracker reconstruction) |
|
richBase |
Contains basic RICH variables that are accessed most frequently |
|
richPlus |
Contains additional RICH variables that are accessed less frequently |
|
extHitBase |
Contains basic variables for unbiased external hits |
|
mcTruthBase |
Contains basic MC truth variables that are accessed most frequently |
|
mcTruthPlus |
Contains additional MC truth variables that are accessed less frequently |
The Event
class acts as an interface to group and access containers with information from the various subdetectors.
This should be provided by the chain class as a transient view of the event information.
Note
Containers are actually made up from two classes. The first one is the one holding all the variables, while the second one adds the “read-on-demand” behavior to the container.
When navigating the doxygen documentation remember to go check the XXXData class, where “XXX” is the container Class, and you’ll find the description for all the container variables.
The event Category
To avoid going through every event every single time you can perform a fast event filtering by looking at the event
Category
mask
in the Header
container.
Note
To check if an event belongs in a given set of categories you can use the Header::CheckMask
method.
Categories can be combined into a single mask, to check many of them at once
// this mask will check for charge=1 according to both tracker and tof
NAIA::Category cat = NAIA::Category::Charge1_Trk | NAIA::Category::Charge1_Tof;
for (NAIA::Event &event : chain) {
// check charge with TOF and Tracker
if (!event.header->CheckMask(cat))
continue;
CheckMask
will check that all categories are present in the event. If you want to perform the check in or rather
than and you can use the MathAnyBit
free function
// this mask will check for charge=1 according to both tracker or tof
NAIA::Category cat = NAIA::Category::Charge1_Trk | NAIA::Category::Charge1_Tof;
for (NAIA::Event &event : chain) {
// check charge with TOF or Tracker
if (!NAIA::MatchAnyBit(event.header->Mask(), cat))
continue;
(n.b: the CheckMask
method uses the MatchAllBits
free function)