Project
Loading...
Searching...
No Matches
o2::steer::InteractionSampler Class Reference

#include <InteractionSampler.h>

Public Member Functions

const o2::InteractionTimeRecordgenerateCollisionTime ()
 
void generateCollisionTimes (std::vector< o2::InteractionTimeRecord > &dest)
 
void init ()
 
void setInteractionRate (float rateHz)
 
float getInteractionRate () const
 
void setFirstIR (const o2::InteractionRecord &ir)
 
const o2::InteractionRecordgetFirstIR () const
 
void setMuPerBC (float mu)
 
float getMuPerBC () const
 
void setBCTimeRMS (float tNS=0.2)
 
float getBCTimeRMS () const
 
const BunchFillinggetBunchFilling () const
 
BunchFillinggetBunchFilling ()
 
void setBunchFilling (const BunchFilling &bc)
 
void setBunchFilling (const std::string &bcFillingFile)
 
void print () const
 

Static Public Attributes

static constexpr float Sec2NanoSec = 1.e9
 

Protected Member Functions

int simulateInteractingBC ()
 
void nextCollidingBC (int n)
 
 ClassDefNV (InteractionSampler, 1)
 

Protected Attributes

o2::math_utils::RandomRing< 10000 > mBCJumpGenerator
 
o2::math_utils::RandomRing< 1000 > mNCollBCGenerator
 
o2::math_utils::RandomRing< 1000 > mCollTimeGenerator
 
o2::InteractionTimeRecord mIR {{0, 0}, 0.}
 
o2::InteractionTimeRecord mFirstIR {{4, 0}, 0.}
 
int mIntBCCache = 0
 N interactions left for current BC.
 
float mIntRate = -1.
 total interaction rate in Hz
 
float mBCTimeRMS = 0.2
 BC time spread in NANOSECONDS.
 
double mMuBC = -1.
 interaction probability per BC
 
o2::BunchFilling mBCFilling
 patter of active BCs
 
std::vector< float > mTimeInBC
 interaction times within single BC
 
std::vector< uint16_t > mInteractingBCs
 
int mCurrBCIdx = 0
 counter for current interacting bunch
 

Static Protected Attributes

static constexpr float DefIntRate = 50e3
 default interaction rate
 

Detailed Description

Definition at line 30 of file InteractionSampler.h.

Member Function Documentation

◆ ClassDefNV()

o2::steer::InteractionSampler::ClassDefNV ( InteractionSampler  ,
 
)
protected

◆ generateCollisionTime()

const o2::InteractionTimeRecord & InteractionSampler::generateCollisionTime ( )

Definition at line 97 of file InteractionSampler.cxx.

◆ generateCollisionTimes()

void o2::steer::InteractionSampler::generateCollisionTimes ( std::vector< o2::InteractionTimeRecord > &  dest)
inline

Definition at line 96 of file InteractionSampler.h.

◆ getBCTimeRMS()

float o2::steer::InteractionSampler::getBCTimeRMS ( ) const
inline

Definition at line 61 of file InteractionSampler.h.

◆ getBunchFilling() [1/2]

BunchFilling & o2::steer::InteractionSampler::getBunchFilling ( )
inline

Definition at line 63 of file InteractionSampler.h.

◆ getBunchFilling() [2/2]

const BunchFilling & o2::steer::InteractionSampler::getBunchFilling ( ) const
inline

Definition at line 62 of file InteractionSampler.h.

◆ getFirstIR()

const o2::InteractionRecord & o2::steer::InteractionSampler::getFirstIR ( ) const
inline

Definition at line 52 of file InteractionSampler.h.

◆ getInteractionRate()

float o2::steer::InteractionSampler::getInteractionRate ( ) const
inline

Definition at line 44 of file InteractionSampler.h.

◆ getMuPerBC()

float o2::steer::InteractionSampler::getMuPerBC ( ) const
inline

Definition at line 59 of file InteractionSampler.h.

◆ init()

void InteractionSampler::init ( )

Definition at line 18 of file InteractionSampler.cxx.

◆ nextCollidingBC()

void o2::steer::InteractionSampler::nextCollidingBC ( int  n)
inlineprotected

get colliding BC as n-th after current one

Definition at line 106 of file InteractionSampler.h.

◆ print()

void InteractionSampler::print ( ) const

Definition at line 85 of file InteractionSampler.cxx.

◆ setBCTimeRMS()

void o2::steer::InteractionSampler::setBCTimeRMS ( float  tNS = 0.2)
inline

Definition at line 60 of file InteractionSampler.h.

◆ setBunchFilling() [1/2]

void o2::steer::InteractionSampler::setBunchFilling ( const BunchFilling bc)
inline

Definition at line 64 of file InteractionSampler.h.

◆ setBunchFilling() [2/2]

void InteractionSampler::setBunchFilling ( const std::string &  bcFillingFile)

Definition at line 134 of file InteractionSampler.cxx.

◆ setFirstIR()

void o2::steer::InteractionSampler::setFirstIR ( const o2::InteractionRecord ir)
inline

Definition at line 45 of file InteractionSampler.h.

◆ setInteractionRate()

void o2::steer::InteractionSampler::setInteractionRate ( float  rateHz)
inline

Definition at line 39 of file InteractionSampler.h.

◆ setMuPerBC()

void o2::steer::InteractionSampler::setMuPerBC ( float  mu)
inline

Definition at line 54 of file InteractionSampler.h.

◆ simulateInteractingBC()

int InteractionSampler::simulateInteractingBC ( )
protected

Definition at line 115 of file InteractionSampler.cxx.

Member Data Documentation

◆ DefIntRate

constexpr float o2::steer::InteractionSampler::DefIntRate = 50e3
staticconstexprprotected

default interaction rate

Definition at line 90 of file InteractionSampler.h.

◆ mBCFilling

o2::BunchFilling o2::steer::InteractionSampler::mBCFilling
protected

patter of active BCs

Definition at line 85 of file InteractionSampler.h.

◆ mBCJumpGenerator

o2::math_utils::RandomRing<10000> o2::steer::InteractionSampler::mBCJumpGenerator
protected

Definition at line 73 of file InteractionSampler.h.

◆ mBCTimeRMS

float o2::steer::InteractionSampler::mBCTimeRMS = 0.2
protected

BC time spread in NANOSECONDS.

Definition at line 82 of file InteractionSampler.h.

◆ mCollTimeGenerator

o2::math_utils::RandomRing<1000> o2::steer::InteractionSampler::mCollTimeGenerator
protected

Definition at line 75 of file InteractionSampler.h.

◆ mCurrBCIdx

int o2::steer::InteractionSampler::mCurrBCIdx = 0
protected

counter for current interacting bunch

Definition at line 88 of file InteractionSampler.h.

◆ mFirstIR

o2::InteractionTimeRecord o2::steer::InteractionSampler::mFirstIR {{4, 0}, 0.}
protected

Definition at line 78 of file InteractionSampler.h.

◆ mIntBCCache

int o2::steer::InteractionSampler::mIntBCCache = 0
protected

N interactions left for current BC.

Definition at line 79 of file InteractionSampler.h.

◆ mInteractingBCs

std::vector<uint16_t> o2::steer::InteractionSampler::mInteractingBCs
protected

Definition at line 87 of file InteractionSampler.h.

◆ mIntRate

float o2::steer::InteractionSampler::mIntRate = -1.
protected

total interaction rate in Hz

Definition at line 81 of file InteractionSampler.h.

◆ mIR

o2::InteractionTimeRecord o2::steer::InteractionSampler::mIR {{0, 0}, 0.}
protected

Definition at line 77 of file InteractionSampler.h.

◆ mMuBC

double o2::steer::InteractionSampler::mMuBC = -1.
protected

interaction probability per BC

Definition at line 83 of file InteractionSampler.h.

◆ mNCollBCGenerator

o2::math_utils::RandomRing<1000> o2::steer::InteractionSampler::mNCollBCGenerator
protected

Definition at line 74 of file InteractionSampler.h.

◆ mTimeInBC

std::vector<float> o2::steer::InteractionSampler::mTimeInBC
protected

interaction times within single BC

Definition at line 86 of file InteractionSampler.h.

◆ Sec2NanoSec

constexpr float o2::steer::InteractionSampler::Sec2NanoSec = 1.e9
staticconstexpr

Definition at line 33 of file InteractionSampler.h.


The documentation for this class was generated from the following files: