24 const int Info::TIMESTOPRINT = 1;
27 const double Info::CONVERTMB2PB = 1e9;
33 void Info::list(ostream& os)
const {
36 os <<
"\n -------- PYTHIA Info Listing ------------------------"
37 <<
"---------------- \n \n"
38 << scientific << setprecision(3)
39 <<
" Beam A: id = " << setw(6) << idASave <<
", pz = " << setw(10)
40 << pzASave <<
", e = " << setw(10) << eASave <<
", m = " << setw(10)
42 <<
" Beam B: id = " << setw(6) << idBSave <<
", pz = " << setw(10)
43 << pzBSave <<
", e = " << setw(10) << eBSave <<
", m = " << setw(10)
47 if (codeSave == 0 && nFinalSave == 0) {
48 os <<
" No process has been set; something must have gone wrong! \n"
49 <<
"\n -------- End PYTHIA Info Listing --------------------"
50 <<
"----------------" << endl;
56 os <<
" In 1: id = " << setw(4) << id1Save <<
", x = " << setw(10)
57 << x1Save <<
", pdf = " << setw(10) << pdf1Save <<
" at Q2 = "
58 << setw(10) << Q2FacSave <<
".\n"
59 <<
" In 2: id = " << setw(4) << id2Save <<
", x = " << setw(10)
60 << x2Save <<
", pdf = " << setw(10) << pdf2Save <<
" at same Q2.\n\n";
63 os << ((isRes && !hasSubSave) ?
" Subprocess " :
" Process ") << nameSave
64 <<
" with code " << codeSave <<
" is 2 -> " << nFinalSave <<
".\n";
68 os <<
" Subprocess " << nameSubSave <<
" with code " << codeSubSave
69 <<
" is 2 -> " << nFinalSubSave <<
".\n";
72 if (isRes && nFinalSave == 1)
73 os <<
" It has sHat = " << setw(10) << sH <<
".\n";
74 else if ( isRes && nFinalSave == 2)
75 os <<
" It has sHat = " << setw(10) << sH <<
", tHat = "
76 << setw(10) << tH <<
", uHat = " << setw(10) << uH <<
",\n"
77 <<
" pTHat = " << setw(10) << pTH <<
", m3Hat = "
78 << setw(10) << m3H <<
", m4Hat = " << setw(10) << m4H <<
",\n"
79 <<
" thetaHat = " << setw(10) << thetaH <<
", phiHat = "
80 << setw(10) << phiH <<
".\n";
81 else if ( nFinalSave == 2)
82 os <<
" It has s = " << setw(10) << sH <<
", t = " << setw(10)
83 << tH <<
", u = " << setw(10) << uH <<
",\n"
84 <<
" pT = " << setw(10) << pTH <<
", m3 = " << setw(10)
85 << m3H <<
", m4 = " << setw(10) << m4H <<
",\n"
86 <<
" theta = " << setw(10) << thetaH <<
", phi = " << setw(10)
88 else if ( isRes && nFinalSave == 3)
89 os <<
" It has sHat = " << setw(10) << sH <<
", <pTHat> = "
90 << setw(10) << pTH <<
".\n";
93 if (isRes) os <<
" alphaEM = " << setw(10) << alphaEMSave
94 <<
", alphaS = " << setw(10) << alphaSSave <<
" at Q2 = "
95 << setw(10) << Q2RenSave <<
".\n";
98 if (bIsSet) os <<
"\n Impact parameter b = " << setw(10) << bMPISave
99 <<
" gives enhancement factor = " << setw(10) << enhanceMPISave
103 if (evolIsSet) os <<
" Max pT scale for MPI = " << setw(10) << pTmaxMPISave
104 <<
", ISR = " << setw(10) << pTmaxISRSave <<
", FSR = " << setw(10)
105 << pTmaxISRSave <<
".\n Number of MPI = " << setw(5) << nMPISave
106 <<
", ISR = " << setw(5) << nISRSave <<
", FSRproc = " << setw(5)
107 << nFSRinProcSave <<
", FSRreson = " << setw(5) << nFSRinResSave
111 os <<
"\n -------- End PYTHIA Info Listing --------------------"
112 <<
"----------------" << endl;
120 double Info::weight()
const {
return (abs(lhaStrategySave) == 4)
121 ? CONVERTMB2PB * weightSave : weightSave;
124 double Info::weightSum()
const {
return (abs(lhaStrategySave) == 4)
125 ? CONVERTMB2PB * wtAccSum : wtAccSum;
132 void Info::errorMsg(
string messageIn,
string extraIn,
bool showAlways,
136 int times = messages[messageIn];
137 ++messages[messageIn];
140 if (times < TIMESTOPRINT || showAlways) os <<
" PYTHIA "
141 << messageIn <<
" " << extraIn << endl;
149 int Info::errorTotalNumber() {
152 for ( map<string, int>::iterator messageEntry = messages.begin();
153 messageEntry != messages.end(); ++messageEntry)
154 nTot += messageEntry->second;
163 void Info::errorStatistics(ostream& os) {
166 os <<
"\n *------- PYTHIA Error and Warning Messages Statistics "
167 <<
"----------------------------------------------------------* \n"
170 <<
" | times message "
176 map<string, int>::iterator messageEntry = messages.begin();
177 if (messageEntry == messages.end())
178 os <<
" | 0 no errors or warnings to report "
180 while (messageEntry != messages.end()) {
182 string temp = messageEntry->first;
183 int len = temp.length();
184 temp.insert( len, max(0, 102 - len),
' ');
185 os <<
" | " << setw(6) << messageEntry->second <<
" "
193 <<
" *------- End PYTHIA Error and Warning Messages Statistics"
194 <<
" ------------------------------------------------------* "