Belle II Software development
FragmentationModule.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 <framework/core/Module.h>
12#include <framework/datastore/StoreArray.h>
13#include <mdst/dataobjects/MCParticle.h>
14#include <mdst/dataobjects/MCParticleGraph.h>
15
16#include <Pythia8/Pythia.h>
17#include <generators/modules/fragmentation/EvtGenDecays.h>
18
19#include <string>
20
21namespace Belle2 {
29 class FragmentationRndm : public Pythia8::RndmEngine {
30
31 public:
32 // Constructor
34
35 // in PYTHIA, there is one pure virtual method in RndmEngine,
36 // to generate one random number flat in the range between 0 and 1:
37 double flat();
39 private:
40
41 };
42
43
46 class FragmentationModule : public Module {
47
48 public:
54
56 virtual ~FragmentationModule();
57
58 virtual void event() override;
59 virtual void initialize() override;
60 virtual void terminate() override;
62 protected:
63
68 void loadEvtGenParticleData(Pythia8::Pythia* pythia);
69
74 int addParticleToPYTHIA(const MCParticle& mcParticle);
75
77 Pythia8::Pythia* m_Pythia = nullptr;
78
80 Pythia8::Event* m_PythiaEvent = nullptr;
81
85 std::string m_parameterfile;
88 std::string m_DecFile;
89 std::string m_UserDecFile;
94 int nAll;
95 int nGood;
97 int nAdded;
98 int nQuarks;
99 int nVpho;
101 std::string m_particleList;
103 };
104
106} // end namespace Belle2
The Fragmentation module.
EvtGenDecays * evtgen
EvtGen decay engine inside PYTHIA8.
int nGood
number of events with successful fragmentation.
void loadEvtGenParticleData(Pythia8::Pythia *pythia)
Load EvtGen particle data.
bool m_coherentMixing
decay the B0-B0bar coherently.
int nVpho
number of virtual exchange particles.
virtual void initialize() override
Initialize the module.
virtual void event() override
Event method (process events)
Pythia8::Pythia * m_Pythia
Pythia generator.
StoreArray< MCParticle > m_mcparticles
store array for the MCParticles
virtual ~FragmentationModule()
Destructor.
virtual void terminate() override
terminate the module
Pythia8::Event * m_PythiaEvent
Pythia event.
int addParticleToPYTHIA(const MCParticle &mcParticle)
Add particle to Pythia event.
std::string m_DecFile
EvtGen decay file.
int m_useEvtGen
use EvtGen for some decays.
int nAll
number of events created.
std::string m_UserDecFile
User EvtGen decay file.
std::string m_particleList
The name of the MCParticle collection.
int nQuarks
number of quarks.
MCParticleGraph mcParticleGraph
An instance of the MCParticle graph.
std::string m_parameterfile
Module parameters.
int nAdded
number of added particles.
int m_listEvent
list event generated by PYTHIA.
Minimal class for external random generator to be used in PYTHIA.
double flat()
flat random generator.
Class to build, validate and sort a particle decay chain.
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
A class to perform decays via the external EvtGen decay program, see http://evtgen....
Definition: EvtGenDecays.h:88
Abstract base class for different kinds of events.