74 def toFortran(self):
75
76 def fortDouble(x):
77 return str(x)+"d0"
78 def fortInt(x):
79 return str(x)
80 def fortBool(x):
81 return '.true.' if x else '.false.'
82 def fortStr(x):
83 return "'{}'".format(x)
84
85 conf = ""
86 conf+="***********************************************************************************\n"
87 conf+="***********************************************************************************\n"
88 conf+="***********************************************************************************\n"
89 conf+=fortDouble(self.rts) + " ! [rts] : CMS collision energy (GeV) \n"
90 conf+="***********************************************************************************\n"
91 conf+="***********************************************************************************\n"
92 conf+=fortInt(self.proc) + " ! [proc] : Process number \n"
93 conf+=fortStr(self.outtag) + " ! [outtag] : for output file \n"
94 conf+=fortStr(self.diff) + " ! [diff] : elastic ('el'), single/double dissociation ('sd'/'dd') \n"
95 conf+=fortBool(self.SFerror) + " ! [SFerror] : Include error from SF input - increases run time \n"
96 conf+=fortBool(self.mixed) + " ! [mixed] : include mixed gam/Z + q diagrams \n"
97 conf+=fortBool(self.Zinit) + " ! [Zinit] : include Z bosons in initial state \n"
98 conf+=fortBool(self.subt) + " ! [subt] : calculate *only* (positive) subtraction term \n"
99 conf+=fortStr(self.lep1) + " ! [lep1] : for lepton-lepton scattering (proc=4) \n"
100 conf+=fortStr(self.lep2) + " ! [lep2] : for lepton-lepton scattering (proc=4) \n"
101 conf+=fortDouble(self.kmu) + " ! [kmu] : = mu(f,r)/mu0 \n"
102 conf+="***********************************************************************************\n"
103 conf+="************************** To run in collinear mode *****************************\n"
104 conf+="***********************************************************************************\n"
105 conf+=fortBool(self.coll) + " ! [coll] : use collinear approach + lhapdf \n"
106 conf+=fortStr(self.PDFname) + " ! [PDFname] : PDF set \n"
107 conf+=fortInt(self.PDFmember) + " ! [PDFmember] : PDF member \n"
108 conf+="***********************************************************************************\n"
109 conf+="*************Integration parameters************************************************\n"
110 conf+="***********************************************************************************\n"
111 conf+=fortInt(self.ncall) + " ! [ncall] : Number of calls for preconditioning \n"
112 conf+=fortInt(self.itmx) + " ! [itmx] : Number of iterations for preconditioning \n"
113 conf+=fortDouble(self.prec) + " ! [prec] : Relative accuracy (in %) in main run \n"
114 conf+=fortInt(self.ncall1) + " ! [ncall1] : Number of calls in first iteration \n"
115 conf+=fortInt(self.inccall) + " ! [inccall] : Number of increase calls per iteration \n"
116 conf+=fortInt(self.itend) + " ! [itend] : Maximum number of iterations \n"
117 conf+=fortInt(self.iseed) + " ! [iseed] : Random number seed (integer > 0) \n"
118 conf+="***********************************************************************************\n"
119 conf+="********************Unweighted events**********************************************\n"
120 conf+="***********************************************************************************\n"
121 conf+=fortBool(self.genunw) + " ! [genunw] : Generate unweighted events \n"
122 conf+=fortInt(int(self.nev)) + " ! [nev] : Number of events (preferably controlled by maxEvents option in Gen_tf command) \n"
123 conf+=fortStr(self.erec) + " ! [erec] : Event record format ('hepmc','lhe','hepevt') \n"
124 conf+="***********************************************************************************\n"
125 conf+="******************* general cuts ************************************************\n"
126 conf+="***********************************************************************************\n"
127 conf+=fortDouble(self.ymin) + " ! [ymin] : Minimum dilepton rapidity \n"
128 conf+=fortDouble(self.ymax) + " ! [ymax] : Maximum dilepton rapidity \n"
129 conf+=fortDouble(self.mmin) + " ! [mmin] : Minimum dilepton mass \n"
130 conf+=fortDouble(self.mmax) + " ! [mmax] : Maximum dilepton mass \n"
131 conf+=fortBool(self.gencuts) + " ! [gencuts] : Generate cuts below \n"
132 conf+="***********************************************************************************\n"
133 conf+="********** 2 body final states : p(a) + p(b) **************************************\n"
134 conf+="***********************************************************************************\n"
135 conf+=fortDouble(self.ptamin) + " ! [ptamin] \n"
136 conf+=fortDouble(self.ptbmin) + " ! [ptbmin] \n"
137 conf+=fortDouble(self.etaamin) + " ! [etaamin] \n"
138 conf+=fortDouble(self.etaamax) + " ! [etaamax] \n"
139 conf+=fortDouble(self.etabmin) + " ! [etabmin] \n"
140 conf+=fortDouble(self.etabmax) + " ! [etabmax] \n"
141 conf+=fortDouble(self.ptllmin) + " ! [ptllmin] \n"
142 conf+="***********************************************************************************\n"
143 conf+="***********************************************************************************\n"
144
145 return conf
146