119 def toFortran(self):
120
121 def fortDouble(x):
122 return str(x)+"d0"
123 def fortInt(x):
124 return str(x)
125 def fortBool(x):
126 return '.true.' if x else '.false.'
127 def fortStr(x):
128 return "'{}'".format(x)
129
130 conf = ""
131 conf+="***********************************************************************************\n"
132 conf+="****** Initialize afain if FIRST FIVE PARAMETERS ARE CHANGED (and beam = 'prot'):******\n"
133 conf+="***********************************************************************************\n"
134 conf+=fortDouble(self.rts) + " ! [rts] : CMS collision energy (GeV) \n"
135 conf+=fortInt(self.isurv) + " ! [isurv] : Model of soft survival (from 1 -> 4)\n"
136 conf+=fortStr(self.intag) + " ! [intag] for input files \n"
137 conf+="***********************************************************************************\n"
138 conf+="***********************************************************************************\n"
139 conf+=fortStr(self.PDFname) + " ! [PDFname] : PDF set \n"
140 conf+=fortInt(self.PDFmember) + " ! [PDFmember] : PDF member \n"
141 conf+="***********************************************************************************\n"
142 conf+=fortInt(self.proc) + " ! [proc] : Process number \n"
143 conf+=fortStr(self.beam) + " ! [beam] : Beam type ('prot', 'ion', 'ionp' or 'el') \n"
144 conf+=fortStr(self.outtg) + " ! [outtg] : for output file \n"
145 conf+=fortBool(self.sfaci) + " ! [sfaci] : Include soft survival effects \n"
146 conf+="***********************************************************************************\n"
147 conf+="***********************************************************************************\n"
148 conf+="***********************************************************************************\n"
149 conf+=fortStr(self.diff) + " ! [diff] : dissociation flag \n"
150 conf+="***********************************************************************************\n"
151 conf+=fortDouble(self.an) + " ! [an] : Ion mass number \n"
152 conf+=fortDouble(self.az) + " ! [az] : Ion atomic number \n"
153 conf+=fortDouble(self.rz) + " ! [rz] : Ion proton density - radius \n"
154 conf+=fortDouble(self.dz) + " ! [dz] : Ion proton density - skin thickness \n"
155 conf+=fortDouble(self.rn) + " ! [rn] : Ion neutron density - radius \n"
156 conf+=fortDouble(self.dn) + " ! [dn] : Ion neutron density - skin thickness \n"
157 conf+=fortStr(self.ionqcd) + " ! [ionqcd] : Coherent ('coh') or incoherent ('incoh') for QCD-induced processes \n"
158 conf+=fortBool(self.ionbreakup) + " ! [ionbreakup] \n"
159 conf+=fortStr(self.fAA) + " ! [fAA] \n"
160 conf+=fortDouble(self.fracsigX) + " ! [fracsigX] : multiply sig_(gamA) by this factor (1d0 - default) \n"
161 if (Version(os.environ['SUPERCHICVER']) >= Version("5.5.1")):
162 conf+=fortBool(self.wrho) + " ! [wrho] : generate concident rho production in AA collisions \n"
163 conf+=fortDouble(self.yrho) + " ! [yrho] : maximum rho |y| \n"
164 conf+=fortDouble(self.accrho) + " ! [accrho] : additional correction factor to account for rho->pipi acceptance, non-resonant dipions and different beams \n"
165 if (Version(os.environ['SUPERCHICVER']) >= Version("5.6.1")):
166 conf+=fortBool(self.ion_incoh) + " ! [ion_incoh] \n"
167 conf+=fortStr(self.ion_incoh_type) + " ! [ion_incoh_type] \n"
168 conf+="***********************************************************************************\n"
169 conf+="*************Integration parameters************************************************\n"
170 conf+="***********************************************************************************\n"
171 conf+=fortInt(self.ncall) + " ! [ncall] : Number of calls for preconditioning \n"
172 conf+=fortInt(self.itmx) + " ! [itmx] : Number of iterations for preconditioning \n"
173 conf+=fortDouble(self.prec) + " ! [prec] : Relative accuracy (in %) in main run \n"
174 conf+=fortInt(self.ncall1) + " ! [ncall1] : Number of calls in first iteration \n"
175 conf+=fortInt(self.inccall) + " ! [inccall] : Number of increase calls per iteration \n"
176 conf+=fortInt(self.itend) + " ! [itend] : Maximum number of iterations \n"
177 conf+=fortInt(self.iseed) + " ! [iseed] : Random number seed (integer > 0) \n"
178 conf+="***********************************************************************************\n"
179 conf+="********************Unweighted events**********************************************\n"
180 conf+="***********************************************************************************\n"
181 conf+=fortBool(self.genunw) + " ! [genunw] : Generate unweighted events \n"
182 conf+=fortInt(int(self.nev*1.01)) + " ! [nev] : Number of events (preferably controlled by maxEvents option in Gen_tf command) \n"
183 conf+=fortStr(self.erec) + " ! [erec] : Event record format ('hepmc','lhe','hepevt') \n"
184 conf+=fortBool(self.readwt) + " ! [readwt] : Set to true to read in pre-calculated maxium weight below \n"
185 conf+=fortDouble(self.wtmax) + " ! [wtmax] : Maximum weight \n"
186 conf+="***********************************************************************************\n"
187 conf+="***********************************************************************************\n"
188 conf+="******************* general cuts ************************************************\n"
189 conf+=fortDouble(self.ymin) + " ! [ymin] : Minimum object rapidity Y_X \n"
190 conf+=fortDouble(self.ymax) + " ! [ymax] : Maximum object rapidity Y_X \n"
191 conf+=fortDouble(self.mmin) + " ! [mmin] : Minimum object mass M_X (redundant for resonance production) \n"
192 conf+=fortDouble(self.mmax) + " ! [mmax] : Maximum object mass M_X (redundant for resonance production) \n"
193 conf+=fortBool(self.gencuts) + " ! [gencuts] : Generate cuts below \n"
194 conf+=fortBool(self.scorr) + " ! [scorr] : Include spin correlations (for chi_c/b decays) \n"
195 conf+=fortBool(self.fwidth) + " ! [fwidth] : Include finite width (for chi_c decays) \n"
196 conf+="***********************************************************************************\n"
197 conf+="************ See manual for momentum assignments***********************************\n"
198 conf+="***********************************************************************************\n"
199 conf+="******************* Proton Cuts ***************************************************\n"
200 conf+="***********************************************************************************\n"
201 conf+=fortDouble(self.ptxmax) + " ! [ptxmax] : max pT of the system \n"
202 conf+="***********************************************************************************\n"
203 conf+="**********2 body final states : p(a) + p(b) ***************************************\n"
204 conf+="***********************************************************************************\n"
205 conf+=fortDouble(self.ptamin) + " ! [ptamin] \n"
206 conf+=fortDouble(self.ptbmin) + " ! [ptbmin] \n"
207 conf+=fortDouble(self.etaamin) + " ! [etaamin] \n"
208 conf+=fortDouble(self.etaamax) + " ! [etaamax] \n"
209 conf+=fortDouble(self.etabmin) + " ! [etabmin] \n"
210 conf+=fortDouble(self.etabmax) + " ! [etabmax] \n"
211 conf+=fortDouble(self.acoabmax) + " ! [acoabmax] \n"
212 conf+="***********************************************************************************\n"
213 conf+="****** 3 body final states : p(a) + p(b) + p(c) ***********************************\n"
214 conf+="***********************************************************************************\n"
215 conf+=fortDouble(self.ptamin) + " ! [ptamin] \n"
216 conf+=fortDouble(self.ptbmin) + " ! [ptbmin] \n"
217 conf+=fortDouble(self.ptcmin) + " ! [ptcmin] \n"
218 conf+=fortDouble(self.etaamin) + " ! [etaamin] \n"
219 conf+=fortDouble(self.etaamax) + " ! [etaamax] \n"
220 conf+=fortDouble(self.etabmin) + " ! [etabmin] \n"
221 conf+=fortDouble(self.etabmax) + " ! [etabmax] \n"
222 conf+=fortDouble(self.etacmin) + " ! [etacmin] \n"
223 conf+=fortDouble(self.etacmax) + " ! [etacmax] \n"
224 conf+="***********************************************************************************\n"
225 conf+="****** 4 body final states : p(a) + p(b) + p(c) + p(d) ****************************\n"
226 conf+="***********************************************************************************\n"
227 conf+=fortDouble(self.ptamin) + " ! [ptamin] \n"
228 conf+=fortDouble(self.ptbmin) + " ! [ptbmin] \n"
229 conf+=fortDouble(self.ptcmin) + " ! [ptcmin] \n"
230 conf+=fortDouble(self.ptdmin) + " ! [ptdmin] \n"
231 conf+=fortDouble(self.etaamin) + " ! [etaamin] \n"
232 conf+=fortDouble(self.etaamax) + " ! [etaamax] \n"
233 conf+=fortDouble(self.etabmin) + " ! [etabmin] \n"
234 conf+=fortDouble(self.etabmax) + " ! [etabmax] \n"
235 conf+=fortDouble(self.etacmin) + " ! [etacmin] \n"
236 conf+=fortDouble(self.etacmax) + " ! [etacmax] \n"
237 conf+=fortDouble(self.etadmin) + " ! [etadmin] \n"
238 conf+=fortDouble(self.etadmax) + " ! [etadmax] \n"
239 conf+="***********************************************************************************\n"
240 conf+="****** 6 body final states : p(a) + p(b) + p(c) + p(d) + p(e) + p(f) **************\n"
241 conf+="***********************************************************************************\n"
242 conf+=fortDouble(self.ptamin) + " ! [ptamin] \n"
243 conf+=fortDouble(self.ptbmin) + " ! [ptbmin] \n"
244 conf+=fortDouble(self.ptcmin) + " ! [ptcmin] \n"
245 conf+=fortDouble(self.ptdmin) + " ! [ptdmin] \n"
246 conf+=fortDouble(self.ptemin) + " ! [ptemin] \n"
247 conf+=fortDouble(self.ptfmin) + " ! [ptfmin] \n"
248 conf+=fortDouble(self.etaamin) + " ! [etaamin] \n"
249 conf+=fortDouble(self.etaamax) + " ! [etaamax] \n"
250 conf+=fortDouble(self.etabmin) + " ! [etabmin] \n"
251 conf+=fortDouble(self.etabmax) + " ! [etabmax] \n"
252 conf+=fortDouble(self.etacmin) + " ! [etacmin] \n"
253 conf+=fortDouble(self.etacmax) + " ! [etacmax] \n"
254 conf+=fortDouble(self.etadmin) + " ! [etadmin] \n"
255 conf+=fortDouble(self.etadmax) + " ! [etadmax] \n"
256 conf+=fortDouble(self.etaemin) + " ! [etaemin] \n"
257 conf+=fortDouble(self.etaemax) + " ! [etaemax] \n"
258 conf+=fortDouble(self.etaemin) + " ! [etafmin] \n"
259 conf+=fortDouble(self.etafmax) + " ! [etafmax] \n"
260 conf+="***********************************************************************************\n"
261 conf+="******************* jet algorithm parameters **************************************\n"
262 conf+="***********************************************************************************\n"
263 conf+=fortDouble(self.rjet) + " ! [rjet] : Jet Radius \n"
264 conf+=fortStr(self.jalg) + " ! [jalg] : Jet algorithm ('antikt','kt') \n"
265 conf+="***********************************************************************************\n"
266 conf+="***** chi_c/b two-body decays *****************************************************\n"
267 conf+="***********************************************************************************\n"
268 conf+=fortDouble(self.m2b) + " ! [m2b] : mass of decay particles \n"
269 conf+=fortInt(self.pdgid1) + " ! [pdgid1] : PDG number particle 1 \n"
270 conf+=fortInt(self.pdgid2) + " ! [pdgid2] : PDG number particle 2 \n"
271 conf+="***********************************************************************************\n"
272 conf+="******* ALP Parameters ***********************************************************\n"
273 conf+="***********************************************************************************\n"
274 conf+=fortDouble(self.malp) + " ! [malp] : ALP mass (GeV) \n"
275 conf+=fortDouble(self.gax) + " ! [gax] : ALP coupling (GeV^-1) \n"
276 conf+=fortStr(self.alpt) + " ! [alpt] : AlP type (scalar - 'sc', pseudoscalar - 'ps') \n"
277 conf+="***********************************************************************************\n"
278 conf+="**** Monopole Parameters **********************************************************\n"
279 conf+="***********************************************************************************\n"
280 conf+=fortDouble(self.mpol) + " ! [mpol] : Monopole mass \n"
281 conf+=fortDouble(self.mmon) + " ! [mmon] : Monopolium mass \n"
282 conf+=fortDouble(self.gamm) + " ! [gamm] : Monopolium width \n"
283 conf+="***********************************************************************************\n"
284 conf+="**** SUSY Parameters ************************************************************\n"
285 conf+="***********************************************************************************\n"
286 conf+=fortDouble(self.mcharg) + " ! [mcharg] : Chargino/Slepton mass \n"
287 conf+=fortDouble(self.mneut) + " ! [mneut] : Neutralino mass \n"
288 conf+="***********************************************************************************\n"
289 conf+="***********************************************************************************\n"
290 conf+="***********************************************************************************\n"
291 conf+=fortStr(self.wlp) + " ! [wlp] : leptonic decay (either 'mu' or 'el') for Wplus \n"
292 conf+=fortStr(self.wlm) + " ! [wlm] : leptonic decay (either 'mu' or 'el') for Wminus \n"
293
294 conf+="****************************************************************************************\n"
295 conf+="****** V+X simplified model \n"
296 conf+="****************************************************************************************\n"
297 conf+=fortDouble(self.tau) + " ! [tau] : mass distribution decay constant (GeV^-1) \n"
298 conf+=fortDouble(self.mxs) + " ! [mxs] : mass of MX \n"
299
300 conf+="****************************************************************************************\n"
301 conf+="****** tau anomalous moments\n"
302 conf+="****************************************************************************************\n"
303 conf+=fortDouble(self.atau) + " ! [atau] : magnetic dipole moment\n"
304 conf+=fortDouble(self.dtau) + " ! [dtau] : electric dipole moment [e cm]\n"
305 conf+="****** flags for calculating individual coeffs - SEE MANUAL for explanation\n"
306 conf+=fortBool(self.calc_tau_coeff) + " ! [calc_tau_coeff] : if true calculate O(a_tau^n) or O(d_tau^n) coefficients\n"
307 conf+=fortStr(self.atau) + " ! [tau_mom] : 'atau','dtau' - coeffecients for magnetic/electric dipole moments\n"
308 conf+=fortInt(self.tau_coeff) + " ! [tau_coeff] : order 'n' in coefficient (0-4)\n"
309
310 return conf
311