EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenExternal
EvtPythiaEngine.hh
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#ifdef EVTGEN_PYTHIA
22
23
#ifndef EVTPYTHIAENGINE_HH
24
#define EVTPYTHIAENGINE_HH
25
26
#include "
EvtGenBase/EvtDecayBase.hh
"
27
#include "
EvtGenBase/EvtId.hh
"
28
#include "
EvtGenBase/EvtParticle.hh
"
29
#include "
EvtGenBase/EvtVector4R.hh
"
30
31
#include "
EvtGenModels/EvtAbsExternalGen.hh
"
32
33
#include "
EvtGenExternal/EvtPythiaRandom.hh
"
34
35
#include "Pythia8/ParticleData.h"
36
#include "Pythia8/Pythia.h"
37
38
#include <map>
39
#include <memory>
40
#include <string>
41
#include <vector>
42
43
// Description: Interface to the Pytha 8 external generator
44
45
class
EvtPythiaEngine
:
public
EvtAbsExternalGen
{
46
public
:
47
EvtPythiaEngine
( std::string xmlDir =
"./xmldoc"
,
48
bool
convertPhysCodes =
false
,
bool
useEvtGenRandom =
true
);
49
50
bool
doDecay
(
EvtParticle
* theMother )
override
;
51
52
void
initialise
()
override
;
53
54
protected
:
55
private
:
56
void
updateParticleLists
();
57
void
updatePhysicsParameters
();
58
59
bool
validPDGCode
(
int
PDGCode );
60
void
createPythiaParticle
( Pythia8::Pythia& thePythiaGenerator,
61
EvtId
& particleId,
int
PDGCode );
62
void
updatePythiaDecayTable
( Pythia8::Pythia& thePythiaGenerator,
63
EvtId
& particleId,
int
aliasInt,
int
PDGCode );
64
void
storeDaughterInfo
( Pythia8::Event& theEvent,
EvtParticle
* theParticle,
65
int
startInt );
66
67
void
clearDaughterVectors
();
68
void
clearPythiaModeMap
();
69
70
void
createDaughterEvtParticles
(
EvtParticle
* theParent );
71
72
int
getModeInt
(
EvtDecayBase
* decayModel );
73
74
bool
m_convertPhysCodes
;
75
// Specify if we are going to use the random number generator (engine) from EvtGen for Pythia 8.
76
bool
m_useEvtGenRandom
;
77
bool
m_initialised
{
false
};
78
79
std::unique_ptr<Pythia8::Pythia>
m_genericPythiaGen
;
80
std::unique_ptr<Pythia8::Pythia>
m_aliasPythiaGen
;
81
82
std::shared_ptr<EvtPythiaRandom>
m_evtgenRandom
;
83
84
std::vector<int>
m_daugPDGVector
;
85
std::vector<EvtVector4R>
m_daugP4Vector
;
86
87
std::map<int, std::vector<int>>
m_pythiaModeMap
;
88
89
std::map<int, int>
m_addedPDGCodes
;
90
};
91
92
#endif
93
94
#endif
EvtAbsExternalGen.hh
EvtDecayBase.hh
EvtId.hh
EvtParticle.hh
EvtPythiaRandom.hh
EvtVector4R.hh
EvtAbsExternalGen
Definition
EvtAbsExternalGen.hh:28
EvtDecayBase
Definition
EvtDecayBase.hh:33
EvtId
Definition
EvtId.hh:27
EvtParticle
Definition
EvtParticle.hh:45
EvtPythiaEngine::updatePythiaDecayTable
void updatePythiaDecayTable(Pythia8::Pythia &thePythiaGenerator, EvtId &particleId, int aliasInt, int PDGCode)
Definition
EvtPythiaEngine.cpp:517
EvtPythiaEngine::m_evtgenRandom
std::shared_ptr< EvtPythiaRandom > m_evtgenRandom
Definition
EvtPythiaEngine.hh:82
EvtPythiaEngine::m_useEvtGenRandom
bool m_useEvtGenRandom
Definition
EvtPythiaEngine.hh:76
EvtPythiaEngine::getModeInt
int getModeInt(EvtDecayBase *decayModel)
Definition
EvtPythiaEngine.cpp:630
EvtPythiaEngine::EvtPythiaEngine
EvtPythiaEngine(std::string xmlDir="./xmldoc", bool convertPhysCodes=false, bool useEvtGenRandom=true)
Definition
EvtPythiaEngine.cpp:49
EvtPythiaEngine::initialise
void initialise() override
Definition
EvtPythiaEngine.cpp:85
EvtPythiaEngine::m_addedPDGCodes
std::map< int, int > m_addedPDGCodes
Definition
EvtPythiaEngine.hh:89
EvtPythiaEngine::m_pythiaModeMap
std::map< int, std::vector< int > > m_pythiaModeMap
Definition
EvtPythiaEngine.hh:87
EvtPythiaEngine::validPDGCode
bool validPDGCode(int PDGCode)
Definition
EvtPythiaEngine.cpp:496
EvtPythiaEngine::clearPythiaModeMap
void clearPythiaModeMap()
Definition
EvtPythiaEngine.cpp:80
EvtPythiaEngine::m_aliasPythiaGen
std::unique_ptr< Pythia8::Pythia > m_aliasPythiaGen
Definition
EvtPythiaEngine.hh:80
EvtPythiaEngine::createPythiaParticle
void createPythiaParticle(Pythia8::Pythia &thePythiaGenerator, EvtId &particleId, int PDGCode)
Definition
EvtPythiaEngine.cpp:714
EvtPythiaEngine::updatePhysicsParameters
void updatePhysicsParameters()
Definition
EvtPythiaEngine.cpp:765
EvtPythiaEngine::m_convertPhysCodes
bool m_convertPhysCodes
Definition
EvtPythiaEngine.hh:74
EvtPythiaEngine::createDaughterEvtParticles
void createDaughterEvtParticles(EvtParticle *theParent)
Definition
EvtPythiaEngine.cpp:269
EvtPythiaEngine::m_genericPythiaGen
std::unique_ptr< Pythia8::Pythia > m_genericPythiaGen
Definition
EvtPythiaEngine.hh:79
EvtPythiaEngine::m_initialised
bool m_initialised
Definition
EvtPythiaEngine.hh:77
EvtPythiaEngine::doDecay
bool doDecay(EvtParticle *theMother) override
Definition
EvtPythiaEngine.cpp:124
EvtPythiaEngine::clearDaughterVectors
void clearDaughterVectors()
Definition
EvtPythiaEngine.cpp:74
EvtPythiaEngine::m_daugPDGVector
std::vector< int > m_daugPDGVector
Definition
EvtPythiaEngine.hh:84
EvtPythiaEngine::updateParticleLists
void updateParticleLists()
Definition
EvtPythiaEngine.cpp:382
EvtPythiaEngine::m_daugP4Vector
std::vector< EvtVector4R > m_daugP4Vector
Definition
EvtPythiaEngine.hh:85
EvtPythiaEngine::storeDaughterInfo
void storeDaughterInfo(Pythia8::Event &theEvent, EvtParticle *theParticle, int startInt)
Definition
EvtPythiaEngine.cpp:222
Generated by
1.17.0