ATLAS Offline Software
Loading...
Searching...
No Matches
SFGenUtils.SFGenConfig Class Reference
Collaboration diagram for SFGenUtils.SFGenConfig:

Public Member Functions

 __init__ (self, runArgs)
 toFortran (self)
 outputLHEFile (self)

Public Attributes

 sfgenpath = os.environ['SFGENPATH']
int rts = 13000
bool coll = False
str PDFname = 'SF_MSHT20qed_nnlo'
int PDFmember = 0
int proc = 1
str outtag = 'out'
str diff = 'tot'
bool SFerror = False
bool mixed = False
bool Zinit = False
bool subt = False
str lep1 = 'mu+'
str lep2 = 'mu+'
int kmu = 1.
int ncall = 50000
int itmx = 10
int prec = 1
int ncall1 = 10000
int inccall = 10000
int itend = 1000
int iseed = 13
bool genunw = False
str nev = "10"
str erec = 'lhe'
float ymin = -2.4
float ymax = 2.4
int mmin = 10.
int mmax = 1000.
bool gencuts = True
int ptamin = 20.
int ptbmin = 20.
float etaamin = -2.4
float etaamax = 2.4
float etabmin = -2.4
float etabmax = 2.4
int ptllmin = 0.

Detailed Description

Definition at line 13 of file SFGenUtils.py.

Constructor & Destructor Documentation

◆ __init__()

SFGenUtils.SFGenConfig.__init__ ( self,
runArgs )

Definition at line 17 of file SFGenUtils.py.

17 def __init__(self, runArgs):
18 self.sfgenpath = os.environ['SFGENPATH']
19
20 #SFGen specific variables for input.DAT, see writeInputDAT function for more elaboration
21
22 self.rts = 13000 #collision energy (GeV)
23 if hasattr(runArgs,"ecmEnergy"):
24 self.rts = runArgs.ecmEnergy
25
26 self.coll = False
27 self.PDFname = 'SF_MSHT20qed_nnlo'
28 self.PDFmember = 0
29 self.proc = 1 #Please consult SFGen Manual https://sfgen.hepforge.org/
30 self.outtag = 'out'
31 self.diff = 'tot' #Interaction: elastic ('el'), single ('sd','sda','sdb') and double ('dd') dissociation.
32 self.SFerror = False
33 self.mixed = False
34 self.Zinit = False
35 self.subt = False
36 self.lep1 = 'mu+'
37 self.lep2 = 'mu+'
38 self.kmu = 1.
39 self.ncall = 50000
40 self.itmx = 10
41 self.prec = 1
42 self.ncall1 = 10000
43 self.inccall = 10000
44 self.itend = 1000
45
46 self.iseed = 13
47 if hasattr(runArgs,"randomSeed"):
48 self.iseed = runArgs.randomSeed
49
50 self.genunw = False
51
52 self.nev = "10"
53 if hasattr(runArgs,"maxEvents"):
54 self.nev = runArgs.maxEvents
55
56 self.erec = 'lhe' #output file type
57 self.ymin = -2.4 # Minimum dilepton rapidity
58 self.ymax = 2.4 # Maximum dilepton rapidity
59 self.mmin = 10. # Minimum dilepton mass
60 self.mmax = 1000. # Maximum dilepton mass
61
62 self.gencuts = True # Generate cuts below
63
64 self.ptamin = 20. # Minimum pT of outgoing object a
65 self.ptbmin = 20. # Minimum pT of outgoing object b
66 self.etaamin = -2.4 # Minimum eta of outgoing object a
67 self.etaamax = 2.4 # Maximum eta of outgoing object a
68 self.etabmin = -2.4 # Minimum eta of outgoing object b
69 self.etabmax = 2.4 # Maximum eta of outgoing object b
70 self.ptllmin = 0. # Minimun pT of dilepton pair
71
72# Writing of the input.DAT file
73

Member Function Documentation

◆ outputLHEFile()

SFGenUtils.SFGenConfig.outputLHEFile ( self)

Definition at line 147 of file SFGenUtils.py.

147 def outputLHEFile(self):
148 return "evrecs/evrec"+self.outtag+".dat"
149
150

◆ toFortran()

SFGenUtils.SFGenConfig.toFortran ( self)

Definition at line 74 of file SFGenUtils.py.

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

Member Data Documentation

◆ coll

bool SFGenUtils.SFGenConfig.coll = False

Definition at line 26 of file SFGenUtils.py.

◆ diff

str SFGenUtils.SFGenConfig.diff = 'tot'

Definition at line 31 of file SFGenUtils.py.

◆ erec

str SFGenUtils.SFGenConfig.erec = 'lhe'

Definition at line 56 of file SFGenUtils.py.

◆ etaamax

float SFGenUtils.SFGenConfig.etaamax = 2.4

Definition at line 67 of file SFGenUtils.py.

◆ etaamin

float SFGenUtils.SFGenConfig.etaamin = -2.4

Definition at line 66 of file SFGenUtils.py.

◆ etabmax

float SFGenUtils.SFGenConfig.etabmax = 2.4

Definition at line 69 of file SFGenUtils.py.

◆ etabmin

float SFGenUtils.SFGenConfig.etabmin = -2.4

Definition at line 68 of file SFGenUtils.py.

◆ gencuts

bool SFGenUtils.SFGenConfig.gencuts = True

Definition at line 62 of file SFGenUtils.py.

◆ genunw

bool SFGenUtils.SFGenConfig.genunw = False

Definition at line 50 of file SFGenUtils.py.

◆ inccall

int SFGenUtils.SFGenConfig.inccall = 10000

Definition at line 43 of file SFGenUtils.py.

◆ iseed

int SFGenUtils.SFGenConfig.iseed = 13

Definition at line 46 of file SFGenUtils.py.

◆ itend

int SFGenUtils.SFGenConfig.itend = 1000

Definition at line 44 of file SFGenUtils.py.

◆ itmx

int SFGenUtils.SFGenConfig.itmx = 10

Definition at line 40 of file SFGenUtils.py.

◆ kmu

int SFGenUtils.SFGenConfig.kmu = 1.

Definition at line 38 of file SFGenUtils.py.

◆ lep1

str SFGenUtils.SFGenConfig.lep1 = 'mu+'

Definition at line 36 of file SFGenUtils.py.

◆ lep2

str SFGenUtils.SFGenConfig.lep2 = 'mu+'

Definition at line 37 of file SFGenUtils.py.

◆ mixed

bool SFGenUtils.SFGenConfig.mixed = False

Definition at line 33 of file SFGenUtils.py.

◆ mmax

int SFGenUtils.SFGenConfig.mmax = 1000.

Definition at line 60 of file SFGenUtils.py.

◆ mmin

int SFGenUtils.SFGenConfig.mmin = 10.

Definition at line 59 of file SFGenUtils.py.

◆ ncall

int SFGenUtils.SFGenConfig.ncall = 50000

Definition at line 39 of file SFGenUtils.py.

◆ ncall1

int SFGenUtils.SFGenConfig.ncall1 = 10000

Definition at line 42 of file SFGenUtils.py.

◆ nev

str SFGenUtils.SFGenConfig.nev = "10"

Definition at line 52 of file SFGenUtils.py.

◆ outtag

str SFGenUtils.SFGenConfig.outtag = 'out'

Definition at line 30 of file SFGenUtils.py.

◆ PDFmember

int SFGenUtils.SFGenConfig.PDFmember = 0

Definition at line 28 of file SFGenUtils.py.

◆ PDFname

str SFGenUtils.SFGenConfig.PDFname = 'SF_MSHT20qed_nnlo'

Definition at line 27 of file SFGenUtils.py.

◆ prec

int SFGenUtils.SFGenConfig.prec = 1

Definition at line 41 of file SFGenUtils.py.

◆ proc

int SFGenUtils.SFGenConfig.proc = 1

Definition at line 29 of file SFGenUtils.py.

◆ ptamin

int SFGenUtils.SFGenConfig.ptamin = 20.

Definition at line 64 of file SFGenUtils.py.

◆ ptbmin

int SFGenUtils.SFGenConfig.ptbmin = 20.

Definition at line 65 of file SFGenUtils.py.

◆ ptllmin

int SFGenUtils.SFGenConfig.ptllmin = 0.

Definition at line 70 of file SFGenUtils.py.

◆ rts

int SFGenUtils.SFGenConfig.rts = 13000

Definition at line 22 of file SFGenUtils.py.

◆ SFerror

bool SFGenUtils.SFGenConfig.SFerror = False

Definition at line 32 of file SFGenUtils.py.

◆ sfgenpath

SFGenUtils.SFGenConfig.sfgenpath = os.environ['SFGENPATH']

Definition at line 18 of file SFGenUtils.py.

◆ subt

bool SFGenUtils.SFGenConfig.subt = False

Definition at line 35 of file SFGenUtils.py.

◆ ymax

float SFGenUtils.SFGenConfig.ymax = 2.4

Definition at line 58 of file SFGenUtils.py.

◆ ymin

float SFGenUtils.SFGenConfig.ymin = -2.4

Definition at line 57 of file SFGenUtils.py.

◆ Zinit

bool SFGenUtils.SFGenConfig.Zinit = False

Definition at line 34 of file SFGenUtils.py.


The documentation for this class was generated from the following file: