Belle II Software  release-06-00-14
EvtGenInputModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <generators/evtgen/EvtGenInterface.h>
12 
13 #include <generators/utilities/InitialParticleGeneration.h>
14 #include <mdst/dataobjects/MCParticleGraph.h>
15 
16 #include <framework/core/Module.h>
17 
18 #include <string>
19 
20 namespace Belle2 {
33  class EvtGenInputModule : public Module {
34 
35  public:
36 
42 
44  virtual ~EvtGenInputModule() {}
45 
47  virtual void initialize() override;
48 
50  virtual void beginRun() override;
51 
53  virtual void event() override;
54 
55  protected:
56 
64  TLorentzVector createBeamParticle(double minMass = 0.0,
65  double maxMass = std::numeric_limits<double>::infinity());
66 
69  std::string m_DECFileName;
70  std::string m_userDECFileName;
71  std::string m_parentParticle;
73  bool m_coherentMixing = true;
74  std::string m_inclusiveParticle;
75  int m_maxTries;
76  EvtId m_parentId;
77  TVector3 m_PrimaryVertex;
79  private:
80 
82  void initializeGenerator();
83 
84  bool m_initialized{false};
88  };
89 
91 } // end namespace Belle2
92 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
The EvtGenInput module.
std::string m_parentParticle
Standard input parent particle.
EvtGenInterface m_Ievtgen
An instance of the EvtGen Interface.
bool m_coherentMixing
Decay the B's in coherent or incoherent mode.
DBObjPtr< BeamParameters > m_beamParams
BeamParameter.
bool m_initialized
True if generator has been initialized.
virtual void initialize() override
Initializes the module.
TLorentzVector createBeamParticle(double minMass=0.0, double maxMass=std::numeric_limits< double >::infinity())
Create a "beam particle" from LER and HER direction, energy and energy spread and make sure it's insi...
virtual void event() override
Method is called for each event.
virtual ~EvtGenInputModule()
Destructor.
std::string m_userDECFileName
Standard input user decay file.
int m_maxTries
Maximum number of tries for generating the parent particle.
std::string m_DECFileName
Standard input decay file.
virtual void beginRun() override
Method is called for each run.
std::string m_inclusiveParticle
inclusive Particle
int m_inclusiveType
Inclusive type 0 : generic, 1 : m_inclusiveParticle inclusive, 2 : m_inclusiveParticle + c....
InitialParticleGeneration m_initial
initial particle used by BeamParameter class
MCParticleGraph mpg
An instance of the MCParticle graph.
EvtId m_parentId
EvtGen Id of the parent particle we want to generate.
void initializeGenerator()
Method is called to initialize the generator.
TVector3 m_PrimaryVertex
primary vertex incl.
Class to interface EvtGen.
Class to build, validate and sort a particle decay chain.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.