Belle II Software development
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/modules/GeneratorBaseModule.h>
12#include <generators/evtgen/EvtGenInterface.h>
13#include <generators/utilities/InitialParticleGeneration.h>
14#include <framework/dataobjects/MCInitialParticles.h>
15
16#include <string>
17#include <utility>
18
19namespace Belle2 {
30
31 public:
32
38
40 virtual ~EvtGenInputModule() {}
41
43 virtual void generatorInitialize() override;
44
46 virtual void beginRun() override;
47
49 virtual void generatorEvent() override;
50
51 protected:
52
60 MCInitialParticles createBeamParticle(double minMass = 0.0,
61 double maxMass = std::numeric_limits<double>::infinity());
62
64 std::string m_userDECFileName;
65 std::string m_DECFileName;
66 std::string m_parentParticle;
68 bool m_coherentMixing = true;
69 std::string m_inclusiveParticle;
71 EvtId m_parentId;
73 private:
74
77
78 bool m_initialized{false};
82 };
83
85} // end namespace Belle2
86
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 ~EvtGenInputModule()
Destructor.
std::string m_userDECFileName
Standard input user decay file.
MCInitialParticles 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...
int m_maxTries
Maximum number of tries for generating the parent particle.
virtual void generatorInitialize() override
Initializes the module.
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
EvtId m_parentId
EvtGen Id of the parent particle we want to generate.
void initializeGenerator()
Method is called to initialize the generator.
virtual void generatorEvent() override
Method is called for each event.
Class to interface EvtGen.
The base module for generator modules, which sets the generator information as EventExtraInfo.
This class contains the initial state for the given event.
Abstract base class for different kinds of events.