Skip to content

Latest commit

 

History

History
115 lines (96 loc) · 5.95 KB

event.rst

File metadata and controls

115 lines (96 loc) · 5.95 KB

The Event class

The Event class is nothing more than a collection of containers

Event class layout
Container type Name Description
Header header Contains simple information like run number, run tag, event number and UTC time.
EventSummary evSummary Contains some aggregated variables to roughly describe the event.
DAQ daq Contains variables describing the status of the AMS DAQ system for the event.
TofBase tofBase Contains basic Tof variables that are accessed most frequently
TofPlus tofPlus Contains additional Tof variables that are accessed less frequently
TofBaseStandalone tofBaseSt Contains basic Tof variables that are accessed most frequently (no-tracker reconstruction)
TofPlusStandalone tofPlusSt Contains additional Tof variables that are accessed less frequently (no-tracker reconstruction)
EcalBase ecalBase Contains basic Ecal variables that are accessed most frequently
EcalPlus ecalPlus Contains additional Ecal variables that are accessed less frequently
TrTrackBase trTrackBase Contains basic Track variables that are accessed most frequently
TrTrackPlus trTrackPlus Contains additional Track variables that are accessed less frequently
TrdKBase trdKBase Contains basic TRD variables that are accessed most frequently
TrdKBaseStandalone trdKBaseSt Contains basic TRD variables that are accessed most frequently (no-tracker reconstruction)
RichBase richBase Contains basic RICH variables that are accessed most frequently
RichPlus richPlus Contains additional RICH variables that are accessed less frequently
UnbExtHitBase extHitBase Contains basic variables for unbiased external hits
MCTruthBase mcTruthBase Contains basic MC truth variables that are accessed most frequently
MCTruthPlus 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)