![]() |
Project
|
#include <DigitizationContext.h>
Public Member Functions | |
DigitizationContext () | |
uint32_t | getFirstOrbitForSampling () const |
void | setFirstOrbitForSampling (uint32_t o) |
int | getNCollisions () const |
void | setNCollisions (int n) |
void | setMaxNumberParts (int maxp) |
int | getMaxNumberParts () const |
std::vector< o2::InteractionTimeRecord > & | getEventRecords (bool withQED=false) |
std::vector< std::vector< o2::steer::EventPart > > & | getEventParts (bool withQED=false) |
const std::vector< o2::InteractionTimeRecord > & | getEventRecords (bool withQED=false) const |
const std::vector< std::vector< o2::steer::EventPart > > & | getEventParts (bool withQED=false) const |
std::unordered_map< int, int > | getCollisionIndicesForSource (int source) const |
bool | isQEDProvided () const |
void | setBunchFilling (o2::BunchFilling const &bf) |
const o2::BunchFilling & | getBunchFilling () const |
void | setMuPerBC (float m) |
float | getMuPerBC () const |
float | getCalculatedInteractionRate () const |
returns the main (hadronic interaction rate) associated to this digitization context | |
void | printCollisionSummary (bool withQED=false, int truncateOutputTo=-1) const |
void | setSimPrefixes (std::vector< std::string > const &p) |
std::vector< std::string > const & | getSimPrefixes () const |
int | findSimPrefix (std::string const &prefix) const |
void | fillQED (std::string_view QEDprefix, int max_events, double qedrate) |
add QED contributions to context, giving prefix; maximal event number and qed interaction rate | |
void | fillQED (std::string_view QEDprefix, std::vector< o2::InteractionTimeRecord > const &irecord, int max_events=-1, bool fromKinematics=true) |
bool | initSimChains (o2::detectors::DetID detid, std::vector< TChain * > &simchains) const |
bool | initSimKinematicsChains (std::vector< TChain * > &simkinematicschains) const |
bool | checkVertexCompatibility (bool verbose=false) const |
Check collision parts for vertex consistency. | |
DigitizationContext | extractSingleTimeframe (int timeframeid, std::vector< std::tuple< int, int, int > > const &timeframeindices, std::vector< int > const &sources_to_offset) |
template<typename T > | |
void | retrieveHits (std::vector< TChain * > const &chains, const char *brname, int sourceID, int entryID, std::vector< T > *hits) const |
function reading the hits from a chain (previously initialized with initSimChains | |
o2::parameters::GRPObject const & | getGRP () const |
returns the GRP object associated to this context | |
void | applyMaxCollisionFilter (std::vector< std::tuple< int, int, int > > &timeframeindices, long startOrbit, long orbitsPerTF, int maxColl, double orbitsEarly=0.) |
std::vector< std::tuple< int, int, int > > | calcTimeframeIndices (long startOrbit, long orbitsPerTF, double orbitsEarly=0.) const |
get timeframe structure --> index markers where timeframe starts/ends/is_influenced_by | |
void | sampleInteractionVertices (o2::dataformats::MeanVertexObject const &v) |
void | saveToFile (std::string_view filename) const |
std::vector< math_utils::Point3D< float > > const & | getInteractionVertices () const |
void | setCTPDigits (std::vector< o2::ctp::CTPDigit > const *ctpdigits) const |
void | setDigitizerInteractionRate (float intRate) |
float | getDigitizerInteractionRate () const |
std::vector< o2::ctp::CTPDigit > const * | getCTPDigits () const |
bool | hasTriggerInput () const |
Static Public Member Functions | |
static DigitizationContext * | loadFromFile (std::string_view filename="") |
Definition at line 54 of file DigitizationContext.h.
|
inline |
Definition at line 57 of file DigitizationContext.h.
void DigitizationContext::applyMaxCollisionFilter | ( | std::vector< std::tuple< int, int, int > > & | timeframeindices, |
long | startOrbit, | ||
long | orbitsPerTF, | ||
int | maxColl, | ||
double | orbitsEarly = 0. |
||
) |
Definition at line 477 of file DigitizationContext.cxx.
std::vector< std::tuple< int, int, int > > DigitizationContext::calcTimeframeIndices | ( | long | startOrbit, |
long | orbitsPerTF, | ||
double | orbitsEarly = 0. |
||
) | const |
get timeframe structure --> index markers where timeframe starts/ends/is_influenced_by
Definition at line 578 of file DigitizationContext.cxx.
bool DigitizationContext::checkVertexCompatibility | ( | bool | verbose = false | ) | const |
Check collision parts for vertex consistency.
Definition at line 157 of file DigitizationContext.cxx.
DigitizationContext DigitizationContext::extractSingleTimeframe | ( | int | timeframeid, |
std::vector< std::tuple< int, int, int > > const & | timeframeindices, | ||
std::vector< int > const & | sources_to_offset | ||
) |
retrieves collision context for a single timeframe-id (which may be needed by simulation) (Only copies collision context without QED information. This can be added to the result with the fillQED method in a second step. Takes as input a timeframe indices collection)
Definition at line 673 of file DigitizationContext.cxx.
add QED contributions to context, giving prefix; maximal event number and qed interaction rate
Definition at line 290 of file DigitizationContext.cxx.
void DigitizationContext::fillQED | ( | std::string_view | QEDprefix, |
std::vector< o2::InteractionTimeRecord > const & | irecord, | ||
int | max_events = -1 , |
||
bool | fromKinematics = true |
||
) |
add QED contributions to context; QEDprefix is prefix of QED production irecord is vector of QED interaction times (sampled externally)
Definition at line 323 of file DigitizationContext.cxx.
int DigitizationContext::findSimPrefix | ( | std::string const & | prefix | ) | const |
Definition at line 605 of file DigitizationContext.cxx.
|
inline |
Definition at line 80 of file DigitizationContext.h.
|
inline |
returns the main (hadronic interaction rate) associated to this digitization context
Definition at line 86 of file DigitizationContext.h.
std::unordered_map< int, int > DigitizationContext::getCollisionIndicesForSource | ( | int | source | ) | const |
Definition at line 589 of file DigitizationContext.cxx.
|
inline |
Definition at line 165 of file DigitizationContext.h.
|
inline |
Definition at line 163 of file DigitizationContext.h.
|
inline |
Definition at line 69 of file DigitizationContext.h.
|
inline |
Definition at line 72 of file DigitizationContext.h.
|
inline |
Definition at line 68 of file DigitizationContext.h.
|
inline |
Definition at line 71 of file DigitizationContext.h.
|
inline |
Definition at line 59 of file DigitizationContext.h.
o2::parameters::GRPObject const & DigitizationContext::getGRP | ( | ) | const |
returns the GRP object associated to this context
Definition at line 217 of file DigitizationContext.cxx.
|
inline |
Definition at line 150 of file DigitizationContext.h.
|
inline |
Definition at line 66 of file DigitizationContext.h.
|
inline |
Definition at line 83 of file DigitizationContext.h.
|
inline |
Definition at line 62 of file DigitizationContext.h.
|
inline |
Definition at line 92 of file DigitizationContext.h.
|
inline |
Definition at line 166 of file DigitizationContext.h.
bool DigitizationContext::initSimChains | ( | o2::detectors::DetID | detid, |
std::vector< TChain * > & | simchains | ||
) | const |
Common functions the setup input TChains for reading, given the state (prefixes) encapsulated by this context. The input vector needs to be empty otherwise nothing will be done. return boolean saying if input simchains was modified or not
Definition at line 95 of file DigitizationContext.cxx.
bool DigitizationContext::initSimKinematicsChains | ( | std::vector< TChain * > & | simkinematicschains | ) | const |
Common functions the setup input TChains for reading kinematics information, given the state (prefixes) encapsulated by this context. The input vector needs to be empty otherwise nothing will be done. return boolean saying if input simchains was modified or not
Definition at line 138 of file DigitizationContext.cxx.
|
inline |
Definition at line 77 of file DigitizationContext.h.
|
static |
Definition at line 277 of file DigitizationContext.cxx.
void DigitizationContext::printCollisionSummary | ( | bool | withQED = false , |
int | truncateOutputTo = -1 |
||
) | const |
Definition at line 26 of file DigitizationContext.cxx.
|
inline |
function reading the hits from a chain (previously initialized with initSimChains
function reading the hits from a chain (previously initialized with initSimChains The hits pointer will be initialized (what to we do about ownership??)
Definition at line 206 of file DigitizationContext.h.
void DigitizationContext::sampleInteractionVertices | ( | o2::dataformats::MeanVertexObject const & | v | ) |
Definition at line 625 of file DigitizationContext.cxx.
void DigitizationContext::saveToFile | ( | std::string_view | filename | ) | const |
Definition at line 227 of file DigitizationContext.cxx.
|
inline |
Definition at line 79 of file DigitizationContext.h.
|
inline |
Definition at line 154 of file DigitizationContext.h.
|
inline |
Definition at line 162 of file DigitizationContext.h.
|
inline |
Definition at line 60 of file DigitizationContext.h.
Definition at line 65 of file DigitizationContext.h.
|
inline |
Definition at line 82 of file DigitizationContext.h.
Definition at line 63 of file DigitizationContext.h.
void DigitizationContext::setSimPrefixes | ( | std::vector< std::string > const & | p | ) |
Definition at line 90 of file DigitizationContext.cxx.