 |
Belle II Software
release-05-01-25
|
14 #include <EvtGen/EvtGen.hh>
15 #include <EvtGenBase/EvtParticle.hh>
16 #include <EvtGenBase/EvtVector4R.hh>
17 #include <generators/evtgen/EvtGenFwRandEngine.h>
18 #include <mdst/dataobjects/MCParticleGraph.h>
20 #include <framework/utilities/IOIntercept.h>
36 class EvtGenInterface {
45 static EvtGen*
createEvtGen(
const std::string& decayFileName,
bool coherentMixing);
52 m_logCapture(
"EvtGen", LogConfig::c_Debug, LogConfig::c_Warning, 100, 100) {}
60 int setup(
const std::string& decayFileName,
const std::string& parentParticle,
61 const std::string& userFileName = std::string(
""),
bool coherentMixing =
true);
65 TVector3 pPrimaryVertex,
int inclusiveType,
const std::string& inclusiveParticle);
78 TVector3 pPrimaryVertex,
double timeOffset = 0);
int simulateDecay(MCParticleGraph &graph, MCParticleGraph::GraphParticle &parent)
Simulate a particle decay.
static EvtGen * createEvtGen(const std::string &decayFileName, bool coherentMixing)
Create and initialize an EvtGen instance:
Class to build, validate and sort a particle decay chain.
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
EvtVector4R m_pinit
Variable needed for initial momentum.
~EvtGenInterface()
Destructor.
EvtId m_ParentParticle
Variable needed for parent particle ID.
Abstract base class for different kinds of events.
bool m_ParentInitialized
Whether parent particle is initialized.
EvtParticle * m_parent
Variable needed for parent particle.
Capture stdout and stderr and convert into log messages.
int addParticles2Graph(EvtParticle *particle, MCParticleGraph &graph, TVector3 pPrimaryVertex, MCParticleGraph::GraphParticle *parent, double timeOffset=0)
Convert EvtParticle structure to flat MCParticle list.
EvtGenInterface()
Constructor.
void updateGraphParticle(EvtParticle *eParticle, MCParticleGraph::GraphParticle *gParticle, TVector3 pPrimaryVertex, double timeOffset=0)
Copy parameters from EvtParticle to MCParticle.
int simulateEvent(MCParticleGraph &graph, TLorentzVector pParentParticle, TVector3 pPrimaryVertex, int inclusiveType, const std::string &inclusiveParticle)
Generate a single event.
Class to represent Particle data in graph.
IOIntercept::OutputToLogMessages m_logCapture
Capture evtgen log and transform into basf2 logging.
static EvtGenFwRandEngine m_eng
Variable needed for random generator.
EvtGen * m_Generator
Variable needed for EvtGen generator.