![]() |
Project
|
#include <MCKinematicsReader.h>
Public Types | |
| enum class | Mode { kDigiContext , kMCKine } |
Public Member Functions | |
| MCKinematicsReader ()=default | |
| default constructor | |
| ~MCKinematicsReader () | |
| destructor | |
| MCKinematicsReader (const MCKinematicsReader &)=delete | |
| the reader owns cached track vectors, so it must not be copied | |
| MCKinematicsReader & | operator= (const MCKinematicsReader &)=delete |
| MCKinematicsReader (std::string_view name, Mode mode=Mode::kDigiContext) | |
| MCKinematicsReader (o2::steer::DigitizationContext const *context) | |
| constructing directly from a digitization context | |
| bool | initFromDigitContext (std::string_view filename) |
| bool | initFromDigitContext (o2::steer::DigitizationContext const *digicontext) |
| bool | initFromKinematics (std::string_view filename) |
| inits the reader from a simple kinematics file | |
| bool | isInitialized () const |
| MCTrack const * | getTrack (o2::MCCompLabel const &) const |
| MCTrack const * | getTrack (int source, int event, int track) const |
| MCTrack const * | getTrack (int event, int track) const |
| std::vector< MCTrack > const & | getTracks (int source, int event) const |
| variant returning all tracks for source and event at once | |
| void | releaseTracksForSourceAndEvent (int source, int event) |
| API to ask releasing tracks and track references (freeing memory) for source + event. | |
| std::vector< MCTrack > const & | getTracks (int event) const |
| variant returning all tracks for an event id (source = 0) at once | |
| gsl::span< o2::TrackReference > | getTrackRefs (int source, int event, int track) const |
| get all primaries for a certain event | |
| const std::vector< o2::TrackReference > & | getTrackRefsByEvent (int source, int event) const |
| return all track references associated to a source/event | |
| gsl::span< o2::TrackReference > | getTrackRefs (int event, int track) const |
| return all track references associated to a event/track (when initialized from kinematics directly) | |
| o2::dataformats::MCEventHeader const & | getMCEventHeader (int source, int event) const |
| retrieves the MCEventHeader for a given eventID and sourceID | |
| size_t | getNSources () const |
| Get number of sources. | |
| size_t | getNEvents (int source) const |
| Get number of events. | |
| DigitizationContext const * | getDigitizationContext () const |
Definition at line 31 of file MCKinematicsReader.h.
|
strong |
| Enumerator | |
|---|---|
| kDigiContext | |
| kMCKine | |
Definition at line 34 of file MCKinematicsReader.h.
|
default |
default constructor
| MCKinematicsReader::~MCKinematicsReader | ( | ) |
destructor
Definition at line 44 of file MCKinematicsReader.cxx.
|
delete |
the reader owns cached track vectors, so it must not be copied
|
inline |
constructor taking a name and mode (either kDigiContext or kMCKine) In case of "context", the name is the filename of the digitization context. In case of MCKine mode, the name is the "prefix" referencing a single simulation production. The default mode is kDigiContext.
Definition at line 53 of file MCKinematicsReader.h.
|
inline |
constructing directly from a digitization context
Definition at line 63 of file MCKinematicsReader.h.
|
inline |
Definition at line 122 of file MCKinematicsReader.h.
|
inline |
retrieves the MCEventHeader for a given eventID and sourceID
Definition at line 196 of file MCKinematicsReader.h.
|
inline |
Get number of events.
Definition at line 251 of file MCKinematicsReader.h.
|
inline |
Get number of sources.
Definition at line 246 of file MCKinematicsReader.h.
|
inline |
query an MC track given event, track IDs returns nullptr if no track was found
Definition at line 170 of file MCKinematicsReader.h.
|
inline |
query an MC track given source, event, track IDs returns nullptr if no track was found
Definition at line 163 of file MCKinematicsReader.h.
|
inline |
query an MC track given a basic label object returns nullptr if no track was found
Definition at line 155 of file MCKinematicsReader.h.
|
inline |
return all track references associated to a event/track (when initialized from kinematics directly)
Definition at line 241 of file MCKinematicsReader.h.
|
inline |
get all primaries for a certain event
get all secondaries of the given label get all mothers/daughters of the given label return all track references associated to a source/event/track
Definition at line 208 of file MCKinematicsReader.h.
|
inline |
return all track references associated to a source/event
Definition at line 226 of file MCKinematicsReader.h.
|
inline |
variant returning all tracks for an event id (source = 0) at once
Definition at line 191 of file MCKinematicsReader.h.
|
inline |
variant returning all tracks for source and event at once
Definition at line 175 of file MCKinematicsReader.h.
| bool MCKinematicsReader::initFromDigitContext | ( | o2::steer::DigitizationContext const * | digicontext | ) |
Definition at line 187 of file MCKinematicsReader.cxx.
| bool MCKinematicsReader::initFromDigitContext | ( | std::string_view | filename | ) |
inits the reader from a digitization context returns true if successful
Definition at line 212 of file MCKinematicsReader.cxx.
| bool MCKinematicsReader::initFromKinematics | ( | std::string_view | filename | ) |
inits the reader from a simple kinematics file
Definition at line 227 of file MCKinematicsReader.cxx.
|
inline |
Definition at line 77 of file MCKinematicsReader.h.
|
delete |
| void MCKinematicsReader::releaseTracksForSourceAndEvent | ( | int | source, |
| int | event | ||
| ) |
API to ask releasing tracks and track references (freeing memory) for source + event.
Definition at line 115 of file MCKinematicsReader.cxx.