Line data Source code
1 : //--------------------------------------------------------------------------
2 : //
3 : // Environment:
4 : // This software is part of the EvtGen package. If you use all or part
5 : // of it, please give an appropriate acknowledgement.
6 : //
7 : // Copyright Information: See EvtGen/COPYRIGHT
8 : // Copyright (C) 2012 University of Warwick, UK
9 : //
10 : // Module: EvtPythia6CommandConverter
11 : //
12 : // Description: Function to replace Pythia 6 commands with the
13 : // corresponding Pythia 8 commands.
14 : //
15 : // Modification history:
16 : //
17 : // Daniel Craik March 2012 Module created
18 : //
19 : //------------------------------------------------------------------------
20 :
21 : #include "EvtGenExternal/EvtPythia6CommandConverter.hh"
22 :
23 : #include "EvtGenBase/EvtReport.hh"
24 :
25 : #include <iostream>
26 : #include <stdlib.h>
27 :
28 : using std::endl;
29 :
30 : std::vector<std::string> convertPythia6Command(Command command) {
31 0 : std::string module = command["MODULE"];
32 0 : std::string param = command["PARAM"];
33 0 : std::string value = command["VALUE"];
34 0 : std::vector<std::string> commandStrings;
35 0 : if(module == "MSTJ") {
36 0 : switch(atoi(param.c_str())) {
37 : //1,2,3
38 : case 11:
39 0 : switch(atoi(value.c_str())) {
40 : case 3:
41 0 : commandStrings.push_back("StringZ:usePetersonC = on");
42 0 : commandStrings.push_back("StringZ:usePetersonB = on");
43 0 : commandStrings.push_back("StringZ:usePetersonH = on");
44 0 : break;
45 : case 1:
46 : case 4:
47 0 : report(Severity::Error,"EvtGen")<<"Pythia6 parameter: MSTJ(11)="<<value<<" is only implicitly supported."<<endl;
48 0 : report(Severity::Error,"EvtGen")<<"Please use MSTJ(11)=5 and ensure PARJ(46) and PARJ(47) are both set appropriately."<<endl;
49 0 : ::abort();
50 : case 5:
51 0 : commandStrings.push_back("StringZ:usePetersonC = off");
52 0 : commandStrings.push_back("StringZ:usePetersonB = off");
53 0 : commandStrings.push_back("StringZ:usePetersonH = off");
54 0 : break;
55 : default:
56 0 : report(Severity::Error,"EvtGen")<<"Pythia6 parameter: MSTJ(11)="<<value<<" is not currently supported."<<endl;
57 0 : report(Severity::Error,"EvtGen")<<"Please use MSTJ(11)=3 or MSTJ(11)=5."<<endl;
58 0 : ::abort();
59 : }
60 : break;
61 : case 12:
62 0 : switch(atoi(value.c_str())) {
63 : case 2:
64 0 : commandStrings.push_back("StringFlav:suppressLeadingB = off");
65 0 : break;
66 : case 3:
67 0 : commandStrings.push_back("StringFlav:suppressLeadingB = on");
68 0 : break;
69 : default:
70 0 : report(Severity::Error,"EvtGen")<<"Pythia6 parameter: MSTJ(12)="<<value<<" is not currently supported."<<endl;
71 0 : report(Severity::Error,"EvtGen")<<"Please use MSTJ(12)=2 or MSTJ(12)=3."<<endl;
72 0 : ::abort();
73 : }
74 : break;
75 : //13-19,21-24
76 : case 26:
77 0 : switch(atoi(value.c_str())) {
78 : case 0:
79 0 : commandStrings.push_back("ParticleDecays:mixB = off");
80 0 : break;
81 : case 1:
82 : case 2:
83 0 : commandStrings.push_back("ParticleDecays:mixB = on");
84 0 : break;
85 : }
86 : break;
87 : //28,38-50
88 : //51 Inclusion of BE effects - TODO
89 : case 52:
90 0 : switch(atoi(value.c_str())) {
91 : case 9:
92 0 : commandStrings.push_back("BoseEinstein:Eta = on");
93 : case 7:
94 0 : commandStrings.push_back("BoseEinstein:Kaon = on");
95 : case 3:
96 0 : commandStrings.push_back("BoseEinstein:Pion = on");
97 : break;
98 : default:
99 0 : report(Severity::Error,"EvtGen")<<"Pythia6 parameter: MSTJ(52)="<<value<<" is not allowed."<<endl;
100 0 : report(Severity::Error,"EvtGen")<<"Please select 3,7 or 9."<<endl;
101 0 : ::abort();
102 : }
103 0 : break;
104 : //53-57,91-93,101-121
105 : default:
106 0 : report(Severity::Warning,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
107 0 : report(Severity::Warning,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
108 : }
109 0 : } else if(module == "PARJ") {
110 0 : switch(atoi(param.c_str())) {
111 : case 1:
112 0 : commandStrings.push_back("StringFlav:probQQtoQ = "+value);
113 0 : break;
114 : case 2:
115 0 : commandStrings.push_back("StringFlav:probStoUD = "+value);
116 0 : break;
117 : case 3:
118 0 : commandStrings.push_back("StringFlav:probSQtoQQ = "+value);
119 0 : break;
120 : case 4:
121 0 : commandStrings.push_back("StringFlav:probQQ1toQQ0 = "+value);
122 0 : break;
123 : case 5:
124 0 : commandStrings.push_back("StringFlav:popcornRate = "+value);
125 0 : break;
126 : case 6:
127 0 : commandStrings.push_back("StringFlav:popcornSpair = "+value);
128 0 : break;
129 : case 7:
130 0 : commandStrings.push_back("StringFlav:popcornSmeson = "+value);
131 0 : break;
132 : //8-10 Advanced popcorn model - can't find these in Pythia8 (unsupported?)
133 : case 11:
134 0 : commandStrings.push_back("StringFlav:mesonUDvector = "+value);
135 0 : break;
136 : case 12:
137 0 : commandStrings.push_back("StringFlav:mesonSvector = "+value);
138 0 : break;
139 : case 13:
140 0 : commandStrings.push_back("StringFlav:mesonCvector = "+value);
141 0 : commandStrings.push_back("StringFlav:mesonBvector = "+value);
142 0 : break;
143 : case 14:
144 0 : commandStrings.push_back("StringFlav:mesonUDL1S0J1 = "+value);
145 0 : commandStrings.push_back("StringFlav:mesonSL1S0J1 = "+value);
146 0 : commandStrings.push_back("StringFlav:mesonCL1S0J1 = "+value);
147 0 : commandStrings.push_back("StringFlav:mesonBL1S0J1 = "+value);
148 0 : break;
149 : case 15:
150 0 : commandStrings.push_back("StringFlav:mesonUDL1S1J0 = "+value);
151 0 : commandStrings.push_back("StringFlav:mesonSL1S1J0 = "+value);
152 0 : commandStrings.push_back("StringFlav:mesonCL1S1J0 = "+value);
153 0 : commandStrings.push_back("StringFlav:mesonBL1S1J0 = "+value);
154 0 : break;
155 : case 16:
156 0 : commandStrings.push_back("StringFlav:mesonUDL1S1J1 = "+value);
157 0 : commandStrings.push_back("StringFlav:mesonSL1S1J1 = "+value);
158 0 : commandStrings.push_back("StringFlav:mesonCL1S1J1 = "+value);
159 0 : commandStrings.push_back("StringFlav:mesonBL1S1J1 = "+value);
160 0 : break;
161 : case 17:
162 0 : commandStrings.push_back("StringFlav:mesonUDL1S1J2 = "+value);
163 0 : commandStrings.push_back("StringFlav:mesonSL1S1J2 = "+value);
164 0 : commandStrings.push_back("StringFlav:mesonCL1S1J2 = "+value);
165 0 : commandStrings.push_back("StringFlav:mesonBL1S1J2 = "+value);
166 0 : break;
167 : case 18:
168 0 : commandStrings.push_back("StringFlav:decupletSup = "+value);
169 0 : break;
170 : case 19:
171 0 : commandStrings.push_back("StringFlav:lightLeadingBSup = "+value);
172 0 : commandStrings.push_back("StringFlav:heavyLeadingBSup = "+value);
173 0 : break;
174 : //21-24 Gaussian PT distributions for primary hadrons - can't find these in Pythia8
175 : case 25:
176 0 : commandStrings.push_back("StringFlav:etaSup = "+value);
177 0 : break;
178 : case 26:
179 0 : commandStrings.push_back("StringFlav:etaPrimeSup = "+value);
180 0 : break;
181 : //31,32
182 : case 33:
183 0 : commandStrings.push_back("StringFragmentation:stopMass = "+value);
184 0 : break;
185 : //34 Stop mass for MSTJ(11)=2 - can't find MSTJ(11)=2 analogue in Pythia 8 so leaving this out too
186 : //36
187 : case 37:
188 0 : commandStrings.push_back("StringFragmentation:stopSmear = "+value);
189 0 : break;
190 : //39,40
191 : case 41:
192 0 : commandStrings.push_back("StringZ:aLund = "+value);
193 0 : break;
194 : case 42:
195 0 : commandStrings.push_back("StringZ:bLund = "+value);
196 0 : break;
197 : //43,44
198 : case 45:
199 0 : commandStrings.push_back("StringZ:aExtraDiquark = "+value);
200 0 : break;
201 : case 46:
202 0 : commandStrings.push_back("StringZ:rFactC = "+value);
203 0 : break;
204 : case 47:
205 0 : commandStrings.push_back("StringZ:rFactB = "+value);
206 0 : break;
207 : //48,49,50,51-55,59,61-63,64,65,66,71,72,73,74
208 : case 76:
209 0 : commandStrings.push_back("ParticleDecays:xBdMix = "+value);
210 0 : break;
211 : case 77:
212 0 : commandStrings.push_back("ParticleDecays:xBsMix = "+value);
213 0 : break;
214 : //80-90 Time-like parton showers - can't find these in Pythia8
215 : case 91:
216 0 : commandStrings.push_back("BoseEinstein:widthSep = "+value);
217 0 : break;
218 : case 92:
219 0 : commandStrings.push_back("BoseEinstein:lambda = "+value);
220 0 : break;
221 : case 93:
222 0 : commandStrings.push_back("BoseEinstein:QRef = "+value);
223 0 : break;
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
227 : default:
228 0 : report(Severity::Warning,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
229 0 : report(Severity::Warning,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
230 : }
231 : } else {
232 0 : report(Severity::Warning,"EvtGen")<<"Pythia6 parameter: "<<module<<"("<<param<<") is not currently supported and will be ignored."<<endl;
233 0 : report(Severity::Warning,"EvtGen")<<"A similar Pythia8 parameter may be available."<<endl;
234 : }
235 : return commandStrings;
236 0 : }
|