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