12 #include <EvtGen/EvtGen.hh>
13 #include <EvtGenBase/EvtParticle.hh>
14 #include <EvtGenBase/EvtVector4R.hh>
15 #include <generators/evtgen/EvtGenFwRandEngine.h>
16 #include <mdst/dataobjects/MCParticleGraph.h>
18 #include <framework/utilities/IOIntercept.h>
20 #include <Math/Vector3D.h>
44 static EvtGen*
createEvtGen(
const std::string& decayFileName,
bool coherentMixing);
63 int setup(
const std::string& decayFileName,
const std::string& parentParticle,
64 const std::string& userFileName = std::string(
""),
bool coherentMixing =
true);
68 ROOT::Math::XYZVector pPrimaryVertex,
int inclusiveType,
const std::string& inclusiveParticle);
81 ROOT::Math::XYZVector pPrimaryVertex,
double timeOffset = 0);
Class to interface EvtGen.
EvtVector4R m_pinit
Variable needed for initial momentum.
int simulateDecay(MCParticleGraph &graph, MCParticleGraph::GraphParticle &parent)
Simulate a particle decay.
EvtGen * m_Generator
Variable needed for EvtGen generator.
~EvtGenInterface()
Destructor.
int simulateEvent(MCParticleGraph &graph, ROOT::Math::PxPyPzEVector pParentParticle, ROOT::Math::XYZVector pPrimaryVertex, int inclusiveType, const std::string &inclusiveParticle)
Generate a single event.
IOIntercept::OutputToLogMessages m_logCaptureDebug
Capture EvtGen log and transform into basf2 logging as B2DEBUG messages.
int setup(const std::string &decayFileName, const std::string &parentParticle, const std::string &userFileName=std::string(""), bool coherentMixing=true)
Setup evtgen with the given decay files
static EvtGenFwRandEngine m_eng
Variable needed for random generator.
EvtParticle * m_parent
Variable needed for parent particle.
static EvtGen * createEvtGen(const std::string &decayFileName, bool coherentMixing)
Create and initialize an EvtGen instance:
EvtId m_ParentParticle
Variable needed for parent particle ID.
bool m_ParentInitialized
Whether parent particle is initialized.
void updateGraphParticle(EvtParticle *eParticle, MCParticleGraph::GraphParticle *gParticle, ROOT::Math::XYZVector pPrimaryVertex, double timeOffset=0)
Copy parameters from EvtParticle to MCParticle.
EvtGenInterface()
Constructor.
int addParticles2Graph(EvtParticle *particle, MCParticleGraph &graph, ROOT::Math::XYZVector pPrimaryVertex, MCParticleGraph::GraphParticle *parent, double timeOffset=0)
Convert EvtParticle structure to flat MCParticle list.
Capture stdout and stderr and convert into log messages.
Class to represent Particle data in graph.
Class to build, validate and sort a particle decay chain.
Abstract base class for different kinds of events.