ATLAS Offline Software
Loading...
Searching...
No Matches
EvtExternalGenList.cxx
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2024 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#include "EvtGen_i/EvtGenExternal/EvtExternalGenList.hh"
22
23#include "EvtGen_i/EvtGenExternal/EvtExternalGenFactory.hh"
24#include "EvtGen_i/EvtGenExternal/EvtPHOTOS.hh"
25#include "EvtGen_i/EvtGenExternal/EvtPythia.hh"
26#include "EvtGen_i/EvtGenExternal/EvtTauola.hh"
27
40
41using namespace Belle2;
42
43EvtExternalGenList::EvtExternalGenList( bool convertPythiaCodes,
44 const std::string& pythiaXmlDir,
45 const std::string& photonType,
46 bool useEvtGenRandom ) ATLAS_NOT_THREAD_SAFE
47{
48 // Instantiate the external generator factory
49 EvtExternalGenFactory* extFactory = EvtExternalGenFactory::getInstance_mutable();
50
51 // Define the external generator "engines" here
52 extFactory->definePhotosGenerator( photonType, useEvtGenRandom );
53
54 std::string xmlDir = pythiaXmlDir;
55 if ( pythiaXmlDir.empty() ) {
56 // If we have no string defined, check the value of the
57 // PYTHIA8DATA environment variable which should be set to the
58 // xmldoc Pythia directory
59 char* pythiaDataDir = getenv( "PYTHIA8DATA" );
60 if ( pythiaDataDir != 0 ) {
61 xmlDir = pythiaDataDir;
62 }
63 }
64
65 extFactory->definePythiaGenerator( xmlDir, convertPythiaCodes,
66 useEvtGenRandom );
67
68 extFactory->defineTauolaGenerator( useEvtGenRandom );
69}
70
71EvtExternalGenList::~EvtExternalGenList()
72{
73}
74
75EvtAbsRadCorr* EvtExternalGenList::getPhotosModel()
76{
77 // Define the Photos model, which uses the EvtPhotosEngine class.
78 EvtPHOTOS* photosModel = new EvtPHOTOS();
79 return photosModel;
80}
81
82std::list<EvtDecayBase*> EvtExternalGenList::getListOfModels()
83{
84 // Create the Pythia and Tauola models, which use their own engine classes.
85 EvtPythia* pythiaModel = new EvtPythia();
86 EvtTauola* tauolaModel = new EvtTauola();
87 EvtB0toKsKK* evtB0toKsKK = new EvtB0toKsKK();
88 EvtBCL* evtBCL = new EvtBCL();
89 EvtBGL* evtBGL = new EvtBGL();
90 EvtBSemiTauonic* evtBSemiTauonic = new EvtBSemiTauonic();
91 EvtBSemiTauonic2HDMType2* evtBSemiTauonic2HDMType2 = new EvtBSemiTauonic2HDMType2();
92 EvtEtaFullDalitz* evtEtaFullDalitz = new EvtEtaFullDalitz();
93 EvtEtaPi0Dalitz* evtEtaPi0Dalitz = new EvtEtaPi0Dalitz();
94 EvtEtaPrimeDalitz* evtEtaPrimeDalitz = new EvtEtaPrimeDalitz();
95 EvtHQET3* evtHQET3 = new EvtHQET3();
96 EvtLLSW* evtLLSW = new EvtLLSW();
97 EvtPHSPBMix* evtPHSPBMix = new EvtPHSPBMix();
98 EvtYmSToYnSpipiCLEOboost* evtYmSToYnSpipiCLEOboost = new EvtYmSToYnSpipiCLEOboost();
99
100 std::list<EvtDecayBase*> extraModels;
101 extraModels.push_back(pythiaModel);
102 extraModels.push_back(tauolaModel);
103 extraModels.push_back(evtB0toKsKK);
104 extraModels.push_back(evtBCL);
105 extraModels.push_back(evtBGL);
106 extraModels.push_back(evtBSemiTauonic);
107 extraModels.push_back(evtBSemiTauonic2HDMType2);
108 extraModels.push_back(evtEtaFullDalitz);
109 extraModels.push_back(evtEtaPi0Dalitz);
110 extraModels.push_back(evtEtaPrimeDalitz);
111 extraModels.push_back(evtHQET3);
112 extraModels.push_back(evtLLSW);
113 extraModels.push_back(evtPHSPBMix);
114 extraModels.push_back(evtYmSToYnSpipiCLEOboost);
115
116
117 // std::list<EvtDecayBase*> extraModels;
118 // extraModels.push_back( pythiaModel );
119 // extraModels.push_back( tauolaModel );
120
121 // Return the list of models
122 return extraModels;
123}
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Register Decay model EvtB0toKsKK.
Definition EvtB0toKsKK.h:19
The EvtGen model of semi-tauonic B decays including the charged higgs effect of 2HDM Type2 based on [...
The EvtGen model of semi-tauonic B decays including new physics effects based on [M.
Class for the simulation of the eta -> pi+pi-pi0 decay with an improved dalitz description.
Class for the simulation of the eta -> 3pi0 and eta'->3pi0 decays.
Class for the simulation of the eta' -> pi+ pi- eta and pi0 pi0 eta decays.
The class provides the form factors for orbitally excited semileptonic decays.
Definition EvtBCL.h:21
The class provides the form factors for orbitally excited semileptonic decays.
Definition EvtBGL.h:23
The class provides the form factors for orbitally excited semileptonic decays.
Definition EvtHQET3.h:22
The class provides the decay amplitude for orbitally excited semileptonic decays.
Definition EvtLLSW.h:22
The class provides routine to decay vector-> particle particle with B0 mixing, handles states with on...
Definition EvtPHSPBMix.h:86
Register Decay model EvtYmSToYnSpipiCLEOboost.
std::string getenv(const std::string &variableName)
get an environment variable