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

#include <GeneratorHybrid.h>

Inherits o2::eventgen::Generator.

Public Member Functions

GeneratorHybridoperator= (const GeneratorHybrid &)=delete
 
 GeneratorHybrid (const GeneratorHybrid &)=delete
 
Bool_t Init () override
 
Bool_t generateEvent () override
 
Bool_t importParticles () override
 
void updateHeader (o2::dataformats::MCEventHeader *eventHeader) override
 
Bool_t parseJSON (const std::string &path)
 
Bool_t confSetter (const auto &gen)
 
template<typename T >
std::string jsonValueToString (const T &value)
 
std::vector< std::shared_ptr< o2::eventgen::Generator > > const & getGenerators ()
 
- Public Member Functions inherited from o2::eventgen::Generator
 Generator ()
 
 Generator (const Char_t *name, const Char_t *title="ALICEo2 Generator")
 
 ~Generator () override=default
 
Bool_t Init () override
 
Bool_t ReadEvent (FairPrimaryGenerator *primGen) final
 
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)
 
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)
 

Static Public Member Functions

static GeneratorHybridInstance (const std::string &inputgens="")
 
- Static Public Member Functions inherited from o2::eventgen::Generator
static void setTotalNEvents (unsigned int &n)
 
static unsigned int getTotalNEvents ()
 

Additional Inherited Members

- Public Types inherited from o2::eventgen::Generator
enum  ETriggerMode_t { kTriggerOFF , kTriggerOR , kTriggerAND }
 
- Protected Member Functions inherited from o2::eventgen::Generator
 Generator (const Generator &)
 
Generatoroperator= (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
voidmInterface = nullptr
 
std::string mInterfaceName
 
ETriggerMode_t mTriggerMode = kTriggerOFF
 
std::vector< TriggermTriggers
 
std::vector< DeepTriggermDeepTriggers
 
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< intInstanceCounter {0}
 

Detailed Description

Definition at line 53 of file GeneratorHybrid.h.

Constructor & Destructor Documentation

◆ GeneratorHybrid()

o2::eventgen::GeneratorHybrid::GeneratorHybrid ( const GeneratorHybrid )
delete

Member Function Documentation

◆ confSetter()

Bool_t o2::eventgen::GeneratorHybrid::confSetter ( const auto &  gen)

Definition at line 501 of file GeneratorHybrid.cxx.

◆ generateEvent()

bool o2::eventgen::GeneratorHybrid::generateEvent ( )
overridevirtual

methods to override

Implements o2::eventgen::Generator.

Definition at line 335 of file GeneratorHybrid.cxx.

◆ getGenerators()

std::vector< std::shared_ptr< o2::eventgen::Generator > > const & o2::eventgen::GeneratorHybrid::getGenerators ( )
inline

Definition at line 72 of file GeneratorHybrid.h.

◆ importParticles()

bool o2::eventgen::GeneratorHybrid::importParticles ( )
overridevirtual

Implements o2::eventgen::Generator.

Definition at line 376 of file GeneratorHybrid.cxx.

◆ Init()

Bool_t o2::eventgen::GeneratorHybrid::Init ( )
override

Definition at line 174 of file GeneratorHybrid.cxx.

◆ Instance()

GeneratorHybrid & o2::eventgen::GeneratorHybrid::Instance ( const std::string &  inputgens = "")
static

Definition at line 26 of file GeneratorHybrid.cxx.

◆ jsonValueToString()

template<typename T >
std::string o2::eventgen::GeneratorHybrid::jsonValueToString ( const T &  value)

Definition at line 493 of file GeneratorHybrid.cxx.

◆ operator=()

GeneratorHybrid & o2::eventgen::GeneratorHybrid::operator= ( const GeneratorHybrid )
delete

◆ parseJSON()

Bool_t o2::eventgen::GeneratorHybrid::parseJSON ( const std::string &  path)

Definition at line 616 of file GeneratorHybrid.cxx.

◆ updateHeader()

void o2::eventgen::GeneratorHybrid::updateHeader ( o2::dataformats::MCEventHeader eventHeader)
overridevirtual

Reimplemented from o2::eventgen::Generator.

Definition at line 481 of file GeneratorHybrid.cxx.


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