14#ifndef ALICEO2_EVENTGEN_GENERATOR_H_
15#define ALICEO2_EVENTGEN_GENERATOR_H_
17#include "FairGenerator.h"
22#include <unordered_map>
39struct EventDecayerReport;
61 Generator(
const Char_t*
name,
const Char_t* title =
"ALICEo2 Generator");
66 Bool_t
Init()
override;
136 void addSubGenerator(
int subGeneratorId, std::string
const& subGeneratorDescription);
150 std::function<
void(std::vector<TParticle>
const& p,
int eventCount)>
mTriggerOkHook = [](std::vector<TParticle>
const& p,
int eventCount) {};
151 std::function<
void(std::vector<TParticle>
const& p,
int eventCount)>
mTriggerFalseHook = [](std::vector<TParticle>
const& p,
int eventCount) {};
175 Bool_t mAddTPCLoopers = kFALSE;
177 std::unordered_map<int, std::string> mSubGeneratorsIdToDesc;
179 int mSubGeneratorId = -1;
182 static unsigned int gTotalNEvents;
185 o2::eventgen::GenTPCLoopers* mTPCLoopersGen =
nullptr;
191#ifdef GENERATORS_WITH_TPCLOOPERS
192 bool initTPCLoopersGen();
Decays unstable generator particles with Pythia8 before transport, keeping the full chain.
void setTriggerMode(ETriggerMode_t val)
virtual void updateHeader(o2::dataformats::MCEventHeader *eventHeader)
double getMomentumUnit() const
void setPositionUnit(double val)
std::string mInterfaceName
Bool_t ReadEvent(FairPrimaryGenerator *primGen) final
void setEnergyUnit(double val)
void notifySubGenerator(int subGeneratorId)
static std::atomic< int > InstanceCounter
void setBoost(Double_t val)
std::vector< Trigger > mTriggers
static unsigned int getTotalNEvents()
static constexpr int NHyperloopParallelGenerators
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerOkHook
virtual Bool_t generateEvent()=0
double getEnergyUnit() const
std::vector< DeepTrigger > mDeepTriggers
void setTimeUnit(double val)
std::function< void(std::vector< TParticle > const &p, int eventCount)> mTriggerFalseHook
void addSubGenerator(int subGeneratorId, std::string const &subGeneratorDescription)
ETriggerMode_t mTriggerMode
static bool isHyperloop()
static void setTotalNEvents(unsigned int &n)
Bool_t addTracks(FairPrimaryGenerator *primGen)
Generator & operator=(const Generator &)
virtual void notifyEmbedding(const o2::dataformats::MCEventHeader *eventHeader)
void setTriggerFalseHook(std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
const std::vector< TParticle > & getParticles() const
void setTriggerOkHook(std::function< void(std::vector< TParticle > const &p, int eventCount)> f)
std::vector< TParticle > mParticles
void setMomentumUnit(double val)
Generator(const Generator &)
void addDeepTrigger(DeepTrigger trigger)
void addTrigger(Trigger trigger)
double getPositionUnit() const
double getTimeUnit() const
virtual Bool_t importParticles()=0
GLuint const GLchar * name
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
std::function< bool(void *, std::string)> DeepTrigger
std::function< bool(const std::vector< TParticle > &)> Trigger
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Counts of what one or more EventDecayer::decay calls did, per PDG code.