1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package. If you use all or part
5 // of it, please give an appropriate acknowledgement.
7 // Copyright Information: See EvtGen/COPYRIGHT
8 // Copyright (C) 2012 University of Warwick, UK
10 // Module: EvtPythia6CommandConverter
12 // Description: Function to replace Pythia 6 commands with the
13 // corresponding Pythia 8 commands.
15 // Modification history:
17 // Daniel Craik March 2012 Module created
19 //------------------------------------------------------------------------
21 #include "EvtGenExternal/EvtPythia6CommandConverter.hh"
23 #include "EvtGenBase/EvtReport.hh"
30 std::vector<std::string> convertPythia6Command(Command command) {
31 std::string module = command["MODULE"];
32 std::string param = command["PARAM"];
33 std::string value = command["VALUE"];
34 std::vector<std::string> commandStrings;
35 if(module == "MSTJ") {
36 switch(atoi(param.c_str())) {
39 switch(atoi(value.c_str())) {
41 commandStrings.push_back("StringZ:usePetersonC = on");
42 commandStrings.push_back("StringZ:usePetersonB = on");
43 commandStrings.push_back("StringZ:usePetersonH = on");
47 report(ERROR,"EvtGen")<<"Pythia6 parameter: MSTJ(11)="<<value<<" is only implicitly supported."<<endl;
48 report(ERROR,"EvtGen")<<"Please use MSTJ(11)=5 and ensure PARJ(46) and PARJ(47) are both set appropriately."<<endl;
51 commandStrings.push_back("StringZ:usePetersonC = off");
52 commandStrings.push_back("StringZ:usePetersonB = off");
53 commandStrings.push_back("StringZ:usePetersonH = off");
56 report(ERROR,"EvtGen")<<"Pythia6 parameter: MSTJ(11)="<<value<<" is not currently supported."<<endl;
57 report(ERROR,"EvtGen")<<"Please use MSTJ(11)=3 or MSTJ(11)=5."<<endl;
62 switch(atoi(value.c_str())) {
64 commandStrings.push_back("StringFlav:suppressLeadingB = off");
67 commandStrings.push_back("StringFlav:suppressLeadingB = on");
70 report(ERROR,"EvtGen")<<"Pythia6 parameter: MSTJ(12)="<<value<<" is not currently supported."<<endl;
71 report(ERROR,"EvtGen")<<"Please use MSTJ(12)=2 or MSTJ(12)=3."<<endl;
77 switch(atoi(value.c_str())) {
79 commandStrings.push_back("ParticleDecays:mixB = off");
83 commandStrings.push_back("ParticleDecays:mixB = on");
88 //51 Inclusion of BE effects - TODO
90 switch(atoi(value.c_str())) {
92 commandStrings.push_back("BoseEinstein:Eta = on");
94 commandStrings.push_back("BoseEinstein:Kaon = on");
96 commandStrings.push_back("BoseEinstein:Pion = on");
99 report(ERROR,"EvtGen")<<"Pythia6 parameter: MSTJ(52)="<<value<<" is not allowed."<<endl;
100 report(ERROR,"EvtGen")<<"Please select 3,7 or 9."<<endl;
104 //53-57,91-93,101-121
106 report(WARNING,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
107 report(WARNING,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
109 } else if(module == "PARJ") {
110 switch(atoi(param.c_str())) {
112 commandStrings.push_back("StringFlav:probQQtoQ = "+value);
115 commandStrings.push_back("StringFlav:probStoUD = "+value);
118 commandStrings.push_back("StringFlav:probSQtoQQ = "+value);
121 commandStrings.push_back("StringFlav:probQQ1toQQ0 = "+value);
124 commandStrings.push_back("StringFlav:popcornRate = "+value);
127 commandStrings.push_back("StringFlav:popcornSpair = "+value);
130 commandStrings.push_back("StringFlav:popcornSmeson = "+value);
132 //8-10 Advanced popcorn model - can't find these in Pythia8 (unsupported?)
134 commandStrings.push_back("StringFlav:mesonUDvector = "+value);
137 commandStrings.push_back("StringFlav:mesonSvector = "+value);
140 commandStrings.push_back("StringFlav:mesonCvector = "+value);
141 commandStrings.push_back("StringFlav:mesonBvector = "+value);
144 commandStrings.push_back("StringFlav:mesonUDL1S0J1 = "+value);
145 commandStrings.push_back("StringFlav:mesonSL1S0J1 = "+value);
146 commandStrings.push_back("StringFlav:mesonCL1S0J1 = "+value);
147 commandStrings.push_back("StringFlav:mesonBL1S0J1 = "+value);
150 commandStrings.push_back("StringFlav:mesonUDL1S1J0 = "+value);
151 commandStrings.push_back("StringFlav:mesonSL1S1J0 = "+value);
152 commandStrings.push_back("StringFlav:mesonCL1S1J0 = "+value);
153 commandStrings.push_back("StringFlav:mesonBL1S1J0 = "+value);
156 commandStrings.push_back("StringFlav:mesonUDL1S1J1 = "+value);
157 commandStrings.push_back("StringFlav:mesonSL1S1J1 = "+value);
158 commandStrings.push_back("StringFlav:mesonCL1S1J1 = "+value);
159 commandStrings.push_back("StringFlav:mesonBL1S1J1 = "+value);
162 commandStrings.push_back("StringFlav:mesonUDL1S1J2 = "+value);
163 commandStrings.push_back("StringFlav:mesonSL1S1J2 = "+value);
164 commandStrings.push_back("StringFlav:mesonCL1S1J2 = "+value);
165 commandStrings.push_back("StringFlav:mesonBL1S1J2 = "+value);
168 commandStrings.push_back("StringFlav:decupletSup = "+value);
171 commandStrings.push_back("StringFlav:lightLeadingBSup = "+value);
172 commandStrings.push_back("StringFlav:heavyLeadingBSup = "+value);
174 //21-24 Gaussian PT distributions for primary hadrons - can't find these in Pythia8
176 commandStrings.push_back("StringFlav:etaSup = "+value);
179 commandStrings.push_back("StringFlav:etaPrimeSup = "+value);
183 commandStrings.push_back("StringFragmentation:stopMass = "+value);
185 //34 Stop mass for MSTJ(11)=2 - can't find MSTJ(11)=2 analogue in Pythia 8 so leaving this out too
188 commandStrings.push_back("StringFragmentation:stopSmear = "+value);
192 commandStrings.push_back("StringZ:aLund = "+value);
195 commandStrings.push_back("StringZ:bLund = "+value);
199 commandStrings.push_back("StringZ:aExtraDiquark = "+value);
202 commandStrings.push_back("StringZ:rFactC = "+value);
205 commandStrings.push_back("StringZ:rFactB = "+value);
207 //48,49,50,51-55,59,61-63,64,65,66,71,72,73,74
209 commandStrings.push_back("ParticleDecays:xBdMix = "+value);
212 commandStrings.push_back("ParticleDecays:xBsMix = "+value);
214 //80-90 Time-like parton showers - can't find these in Pythia8
216 commandStrings.push_back("BoseEinstein:widthSep = "+value);
219 commandStrings.push_back("BoseEinstein:lambda = "+value);
222 commandStrings.push_back("BoseEinstein:QRef = "+value);
224 //94-96 Further BE parameters - can't find these in Pythia8
225 //121-171 parameters for ee event generation - can't find these in Pythia8
226 //180-195 Various coupling constants & parameters related to couplings - can't find these in Pythia8
228 report(WARNING,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
229 report(WARNING,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
232 report(WARNING,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
233 report(WARNING,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
235 return commandStrings;