Project
Loading...
Searching...
No Matches
o2::eventgen::BoxGenerator Class Reference

#include <BoxGenerator.h>

Inherits o2::eventgen::Generator.

Public Member Functions

 BoxGenerator ()=default
 
 BoxGenerator (int pdgid, int mult=1)
 
 BoxGenerator (int pdgid, int mult, double etamin, double etamax, double pmin, double pmax, double phimin, double phimax, bool sampleYAndPt=false)
 With sampleYAndPt, eta bounds specify rapidity and p bounds specify pT.
 
 BoxGenerator (BoxGenConfig const &config)
 
void SetPRange (Double32_t pmin=0, Double32_t pmax=10)
 
void SetPtRange (Double32_t ptmin=0, Double32_t ptmax=10)
 
void SetPhiRange (double phimin=0, double phimax=360)
 
void SetEtaRange (double etamin=-5, double etamax=5)
 
void SetYRange (double ymin=-5, double ymax=5)
 Sample rapidity uniformly; requires a transverse momentum range.
 
TParticle sampleParticle () const
 generates a single particle conforming to particle gun parameters
 
bool generateEvent () override
 implements the main O2 generator interfaces
 
bool importParticles () override
 
void updateHeader (o2::dataformats::MCEventHeader *eventHeader) override
 
- Public Member Functions inherited from o2::eventgen::Generator
 Generator ()
 
 Generator (const Char_t *name, const Char_t *title="ALICEo2 Generator")
 
 ~Generator () override
 
Bool_t Init () override
 
Bool_t ReadEvent (FairPrimaryGenerator *primGen) final
 
Bool_t finalizeEvent ()
 
Bool_t triggerEvent ()
 
void setMomentumUnit (double val)
 
double getMomentumUnit () const
 
void setEnergyUnit (double val)
 
double getEnergyUnit () const
 
void setPositionUnit (double val)
 
double getPositionUnit () const
 
void setTimeUnit (double val)
 
double getTimeUnit () const
 
void setBoost (Double_t val)
 
void setTriggerMode (ETriggerMode_t val)
 
void addTrigger (Trigger trigger)
 
void addDeepTrigger (DeepTrigger trigger)
 
const std::vector< TParticle > & getParticles () const
 
void clearParticles ()
 
virtual void notifyEmbedding (const o2::dataformats::MCEventHeader *eventHeader)
 
virtual void stop ()
 
void setTriggerOkHook (std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
 
void setTriggerFalseHook (std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
 

Additional Inherited Members

- Public Types inherited from o2::eventgen::Generator
enum  ETriggerMode_t { kTriggerOFF , kTriggerOR , kTriggerAND }
 
- Static Public Member Functions inherited from o2::eventgen::Generator
static void setTotalNEvents (unsigned int &n)
 
static unsigned int getTotalNEvents ()
 
- Protected Member Functions inherited from o2::eventgen::Generator
 Generator (const Generator &)
 
Generator & operator= (const Generator &)
 
Bool_t addTracks (FairPrimaryGenerator *primGen)
 
Bool_t boostEvent ()
 
void addSubGenerator (int subGeneratorId, std::string const &subGeneratorDescription)
 
void notifySubGenerator (int subGeneratorId)
 
- Protected Attributes inherited from o2::eventgen::Generator
void * mInterface = nullptr
 
std::string mInterfaceName
 
ETriggerMode_t mTriggerMode = kTriggerOFF
 
std::vector< Trigger > mTriggers
 
std::vector< DeepTrigger > mDeepTriggers
 
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerOkHook = [](std::vector<TParticle> const& p, int eventCount) {}
 
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerFalseHook = [](std::vector<TParticle> const& p, int eventCount) {}
 
int mReadEventCounter = 0
 
double mMomentumUnit = 1.
 
double mEnergyUnit = 1.
 
double mPositionUnit = 0.1
 
double mTimeUnit = 3.3356410e-12
 
std::vector< TParticle > mParticles
 
Double_t mBoost
 
int mThisInstanceID = 0
 
- Static Protected Attributes inherited from o2::eventgen::Generator
static std::atomic< int > InstanceCounter {0}
 

Detailed Description

Definition at line 32 of file BoxGenerator.h.

Constructor & Destructor Documentation

◆ BoxGenerator() [1/4]

o2::eventgen::BoxGenerator::BoxGenerator ( )
default

◆ BoxGenerator() [2/4]

o2::eventgen::BoxGenerator::BoxGenerator ( int  pdgid,
int  mult = 1 
)

◆ BoxGenerator() [3/4]

o2::eventgen::BoxGenerator::BoxGenerator ( int  pdgid,
int  mult,
double  etamin,
double  etamax,
double  pmin,
double  pmax,
double  phimin,
double  phimax,
bool  sampleYAndPt = false 
)
inline

With sampleYAndPt, eta bounds specify rapidity and p bounds specify pT.

Definition at line 39 of file BoxGenerator.h.

◆ BoxGenerator() [4/4]

o2::eventgen::BoxGenerator::BoxGenerator ( BoxGenConfig const &  config)
inline

Definition at line 59 of file BoxGenerator.h.

Member Function Documentation

◆ generateEvent()

bool o2::eventgen::BoxGenerator::generateEvent ( )
inlineoverridevirtual

implements the main O2 generator interfaces

Implements o2::eventgen::Generator.

Definition at line 108 of file BoxGenerator.h.

◆ importParticles()

bool o2::eventgen::BoxGenerator::importParticles ( )
inlineoverridevirtual

Implements o2::eventgen::Generator.

Definition at line 116 of file BoxGenerator.h.

◆ sampleParticle()

TParticle o2::eventgen::BoxGenerator::sampleParticle ( ) const

generates a single particle conforming to particle gun parameters

Definition at line 33 of file BoxGenerator.cxx.

◆ SetEtaRange()

void o2::eventgen::BoxGenerator::SetEtaRange ( double  etamin = -5,
double  etamax = 5 
)
inline

Definition at line 87 of file BoxGenerator.h.

◆ SetPhiRange()

void o2::eventgen::BoxGenerator::SetPhiRange ( double  phimin = 0,
double  phimax = 360 
)
inline

Definition at line 81 of file BoxGenerator.h.

◆ SetPRange()

void o2::eventgen::BoxGenerator::SetPRange ( Double32_t  pmin = 0,
Double32_t  pmax = 10 
)
inline

Definition at line 65 of file BoxGenerator.h.

◆ SetPtRange()

void o2::eventgen::BoxGenerator::SetPtRange ( Double32_t  ptmin = 0,
Double32_t  ptmax = 10 
)
inline

Definition at line 73 of file BoxGenerator.h.

◆ SetYRange()

void o2::eventgen::BoxGenerator::SetYRange ( double  ymin = -5,
double  ymax = 5 
)
inline

Sample rapidity uniformly; requires a transverse momentum range.

Definition at line 96 of file BoxGenerator.h.

◆ updateHeader()

void o2::eventgen::BoxGenerator::updateHeader ( o2::dataformats::MCEventHeader *  eventHeader)
inlineoverridevirtual

Reimplemented from o2::eventgen::Generator.

Definition at line 131 of file BoxGenerator.h.


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