]>
Commit | Line | Data |
---|---|---|
0ca57c2f | 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 | 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())) { | |
37 | //1,2,3 | |
38 | case 11: | |
39 | switch(atoi(value.c_str())) { | |
40 | case 3: | |
41 | commandStrings.push_back("StringZ:usePetersonC = on"); | |
42 | commandStrings.push_back("StringZ:usePetersonB = on"); | |
43 | commandStrings.push_back("StringZ:usePetersonH = on"); | |
44 | break; | |
45 | case 1: | |
46 | case 4: | |
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; | |
49 | ::abort(); | |
50 | case 5: | |
51 | commandStrings.push_back("StringZ:usePetersonC = off"); | |
52 | commandStrings.push_back("StringZ:usePetersonB = off"); | |
53 | commandStrings.push_back("StringZ:usePetersonH = off"); | |
54 | break; | |
55 | default: | |
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; | |
58 | ::abort(); | |
59 | } | |
60 | break; | |
61 | case 12: | |
62 | switch(atoi(value.c_str())) { | |
63 | case 2: | |
64 | commandStrings.push_back("StringFlav:suppressLeadingB = off"); | |
65 | break; | |
66 | case 3: | |
67 | commandStrings.push_back("StringFlav:suppressLeadingB = on"); | |
68 | break; | |
69 | default: | |
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; | |
72 | ::abort(); | |
73 | } | |
74 | break; | |
75 | //13-19,21-24 | |
76 | case 26: | |
77 | switch(atoi(value.c_str())) { | |
78 | case 0: | |
79 | commandStrings.push_back("ParticleDecays:mixB = off"); | |
80 | break; | |
81 | case 1: | |
82 | case 2: | |
83 | commandStrings.push_back("ParticleDecays:mixB = on"); | |
84 | break; | |
85 | } | |
86 | break; | |
87 | //28,38-50 | |
88 | //51 Inclusion of BE effects - TODO | |
89 | case 52: | |
90 | switch(atoi(value.c_str())) { | |
91 | case 9: | |
92 | commandStrings.push_back("BoseEinstein:Eta = on"); | |
93 | case 7: | |
94 | commandStrings.push_back("BoseEinstein:Kaon = on"); | |
95 | case 3: | |
96 | commandStrings.push_back("BoseEinstein:Pion = on"); | |
97 | break; | |
98 | default: | |
99 | report(ERROR,"EvtGen")<<"Pythia6 parameter: MSTJ(52)="<<value<<" is not allowed."<<endl; | |
100 | report(ERROR,"EvtGen")<<"Please select 3,7 or 9."<<endl; | |
101 | ::abort(); | |
102 | } | |
103 | break; | |
104 | //53-57,91-93,101-121 | |
105 | default: | |
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; | |
108 | } | |
109 | } else if(module == "PARJ") { | |
110 | switch(atoi(param.c_str())) { | |
111 | case 1: | |
112 | commandStrings.push_back("StringFlav:probQQtoQ = "+value); | |
113 | break; | |
114 | case 2: | |
115 | commandStrings.push_back("StringFlav:probStoUD = "+value); | |
116 | break; | |
117 | case 3: | |
118 | commandStrings.push_back("StringFlav:probSQtoQQ = "+value); | |
119 | break; | |
120 | case 4: | |
121 | commandStrings.push_back("StringFlav:probQQ1toQQ0 = "+value); | |
122 | break; | |
123 | case 5: | |
124 | commandStrings.push_back("StringFlav:popcornRate = "+value); | |
125 | break; | |
126 | case 6: | |
127 | commandStrings.push_back("StringFlav:popcornSpair = "+value); | |
128 | break; | |
129 | case 7: | |
130 | commandStrings.push_back("StringFlav:popcornSmeson = "+value); | |
131 | break; | |
132 | //8-10 Advanced popcorn model - can't find these in Pythia8 (unsupported?) | |
133 | case 11: | |
134 | commandStrings.push_back("StringFlav:mesonUDvector = "+value); | |
135 | break; | |
136 | case 12: | |
137 | commandStrings.push_back("StringFlav:mesonSvector = "+value); | |
138 | break; | |
139 | case 13: | |
140 | commandStrings.push_back("StringFlav:mesonCvector = "+value); | |
141 | commandStrings.push_back("StringFlav:mesonBvector = "+value); | |
142 | break; | |
143 | case 14: | |
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); | |
148 | break; | |
149 | case 15: | |
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); | |
154 | break; | |
155 | case 16: | |
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); | |
160 | break; | |
161 | case 17: | |
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); | |
166 | break; | |
167 | case 18: | |
168 | commandStrings.push_back("StringFlav:decupletSup = "+value); | |
169 | break; | |
170 | case 19: | |
171 | commandStrings.push_back("StringFlav:lightLeadingBSup = "+value); | |
172 | commandStrings.push_back("StringFlav:heavyLeadingBSup = "+value); | |
173 | break; | |
174 | //21-24 Gaussian PT distributions for primary hadrons - can't find these in Pythia8 | |
175 | case 25: | |
176 | commandStrings.push_back("StringFlav:etaSup = "+value); | |
177 | break; | |
178 | case 26: | |
179 | commandStrings.push_back("StringFlav:etaPrimeSup = "+value); | |
180 | break; | |
181 | //31,32 | |
182 | case 33: | |
183 | commandStrings.push_back("StringFragmentation:stopMass = "+value); | |
184 | 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 | commandStrings.push_back("StringFragmentation:stopSmear = "+value); | |
189 | break; | |
190 | //39,40 | |
191 | case 41: | |
192 | commandStrings.push_back("StringZ:aLund = "+value); | |
193 | break; | |
194 | case 42: | |
195 | commandStrings.push_back("StringZ:bLund = "+value); | |
196 | break; | |
197 | //43,44 | |
198 | case 45: | |
199 | commandStrings.push_back("StringZ:aExtraDiquark = "+value); | |
200 | break; | |
201 | case 46: | |
202 | commandStrings.push_back("StringZ:rFactC = "+value); | |
203 | break; | |
204 | case 47: | |
205 | commandStrings.push_back("StringZ:rFactB = "+value); | |
206 | break; | |
207 | //48,49,50,51-55,59,61-63,64,65,66,71,72,73,74 | |
208 | case 76: | |
209 | commandStrings.push_back("ParticleDecays:xBdMix = "+value); | |
210 | break; | |
211 | case 77: | |
212 | commandStrings.push_back("ParticleDecays:xBsMix = "+value); | |
213 | break; | |
214 | //80-90 Time-like parton showers - can't find these in Pythia8 | |
215 | case 91: | |
216 | commandStrings.push_back("BoseEinstein:widthSep = "+value); | |
217 | break; | |
218 | case 92: | |
219 | commandStrings.push_back("BoseEinstein:lambda = "+value); | |
220 | break; | |
221 | case 93: | |
222 | commandStrings.push_back("BoseEinstein:QRef = "+value); | |
223 | 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 | 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; | |
230 | } | |
231 | } else { | |
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; | |
234 | } | |
235 | return commandStrings; | |
236 | } |