8 #include "Pythia8/Settings.h"
24 bool Settings::init(
string startFile,
bool append) {
27 if (isInit && !append)
return true;
32 readStringHistory.resize(0);
33 readStringSubrun.clear();
38 files.push_back(startFile);
42 if (startFile.rfind(
"/") != string::npos)
43 pathName = startFile.substr(0, startFile.rfind(
"/") + 1);
46 for (
int i = 0; i < int(files.size()); ++i) {
47 const char* cstring = files[i].c_str();
52 cout <<
"\n PYTHIA Error: settings file " << files[i]
53 <<
" not found" << endl;
59 while ( getline(is, line) ) {
62 istringstream getfirst(line);
65 if (tag.find(
"more") != string::npos) tag.erase( tag.find(
"more"), 4);
68 if (tag !=
"<flag" && tag !=
"<flagfix" && tag !=
"<mode"
69 && tag !=
"<modeopen" && tag !=
"<modepick" && tag !=
"<modefix"
70 && tag !=
"<parm" && tag !=
"<parmfix" && tag !=
"<word"
71 && tag !=
"<wordfix" && tag !=
"<fvec" && tag !=
"<fvecfix"
72 && tag !=
"<mvec" && tag !=
"<mvecfix"
73 && tag !=
"<pvec" && tag !=
"<pvecfix"
74 && tag !=
"<wvec" && tag !=
"<wvecfix" && tag !=
"<aidx")
continue;
77 while (line.find(
">") == string::npos) {
80 line +=
" " + addLine;
84 while (line.find(
" =") != string::npos) line.erase( line.find(
" ="), 1);
88 string name = attributeValue( line,
"href");
90 cout <<
" PYTHIA Error: failed to find name attribute in line "
95 files.push_back(pathName + name +
".xml");
100 string name = attributeValue( line,
"name=");
102 cout <<
" PYTHIA Error: failed to find name attribute in line "
109 if (line.find(
"default=") == string::npos) {
110 cout <<
" PYTHIA Error: failed to find default value token in line "
115 bool hasMin = (line.find(
"min=") != string::npos);
116 bool hasMax = (line.find(
"max=") != string::npos);
119 if (tag ==
"<flag" || tag ==
"<flagfix") {
120 bool value = boolAttributeValue( line,
"default=");
121 addFlag( name, value);
124 }
else if (tag ==
"<mode" || tag ==
"<modeopen"
125 || tag ==
"<modepick" || tag ==
"<modefix") {
126 int value = intAttributeValue( line,
"default=");
127 int minVal = intAttributeValue( line,
"min=");
128 int maxVal = intAttributeValue( line,
"max=");
130 bool optOnly =
false;
131 if (tag ==
"<modepick" && hasMin && hasMax) optOnly =
true;
132 if (tag ==
"<modefix") {
139 addMode( name, value, hasMin, hasMax, minVal, maxVal, optOnly);
142 }
else if (tag ==
"<parm" || tag ==
"<parmfix") {
143 double value = doubleAttributeValue( line,
"default=");
144 double minVal = doubleAttributeValue( line,
"min=");
145 double maxVal = doubleAttributeValue( line,
"max=");
146 addParm( name, value, hasMin, hasMax, minVal, maxVal);
149 }
else if (tag ==
"<word" || tag ==
"<wordfix") {
150 string value = attributeValue( line,
"default=");
151 addWord( name, value);
154 }
else if (tag ==
"<fvec" || tag ==
"<fvecfix") {
155 vector<bool> value = boolVectorAttributeValue( line,
"default=");
156 addFVec( name, value);
159 }
else if (tag ==
"<mvec" || tag ==
"<mvecfix") {
160 vector<int> value = intVectorAttributeValue( line,
"default=");
161 int minVal = intAttributeValue( line,
"min=");
162 int maxVal = intAttributeValue( line,
"max=");
163 addMVec( name, value, hasMin, hasMax, minVal, maxVal);
166 }
else if (tag ==
"<pvec" || tag ==
"<pvecfix") {
167 vector<double> value = doubleVectorAttributeValue( line,
"default=");
168 double minVal = doubleAttributeValue( line,
"min=");
169 double maxVal = doubleAttributeValue( line,
"max=");
170 addPVec( name, value, hasMin, hasMax, minVal, maxVal);
173 }
else if (tag ==
"<wvec" || tag ==
"<wvecfix") {
174 vector<string> value = stringVectorAttributeValue( line,
"default=");
175 addWVec( name, value);
183 int eeTune = mode(
"Tune:ee");
184 if (eeTune > 0) initTuneEE( eeTune);
185 int ppTune = mode(
"Tune:pp");
186 if (ppTune > 0) initTunePP( ppTune);
189 if (nError > 0)
return false;
200 bool Settings::init(istream& is,
bool append) {
203 if (isInit && !append)
return true;
208 cout <<
"\n PYTHIA Error: settings stream not found " << endl;
214 readStringHistory.resize(0);
215 readStringSubrun.clear();
220 while ( getline(is, line) ) {
223 istringstream getfirst(line);
226 if (tag.find(
"more") != string::npos) tag.erase( tag.find(
"more"), 4);
229 if (tag !=
"<flag" && tag !=
"<flagfix" && tag !=
"<mode"
230 && tag !=
"<modeopen" && tag !=
"<modepick" && tag !=
"<modefix"
231 && tag !=
"<parm" && tag !=
"<parmfix" && tag !=
"<word"
232 && tag !=
"<wordfix" && tag !=
"<fvec" && tag !=
"<fvecfix"
233 && tag !=
"<mvec" && tag !=
"<mvecfix"
234 && tag !=
"<pvec" && tag !=
"<pvecfix"
235 && tag !=
"<wvec" && tag !=
"<wvecfix" && tag !=
"<aidx")
continue;
238 while (line.find(
">") == string::npos) {
240 getline(is, addLine);
241 line +=
" " + addLine;
245 while (line.find(
" =") != string::npos) line.erase( line.find(
" ="), 1);
248 string name = attributeValue( line,
"name=");
250 cout <<
" PYTHIA Error: failed to find name attribute in line "
257 if (line.find(
"default=") == string::npos) {
258 cout <<
" PYTHIA Error: failed to find default value token in line "
263 bool hasMin = (line.find(
"min=") != string::npos);
264 bool hasMax = (line.find(
"max=") != string::npos);
267 if (tag ==
"<flag" || tag ==
"<flagfix") {
268 bool value = boolAttributeValue( line,
"default=");
269 addFlag( name, value);
272 }
else if (tag ==
"<mode" || tag ==
"<modeopen"
273 || tag ==
"<modepick" || tag ==
"<modefix") {
274 int value = intAttributeValue( line,
"default=");
275 int minVal = intAttributeValue( line,
"min=");
276 int maxVal = intAttributeValue( line,
"max=");
279 bool optOnly =
false;
280 if (tag ==
"<modepick" && hasMin && hasMax) optOnly =
true;
281 if (tag ==
"<modefix") {
288 addMode( name, value, hasMin, hasMax, minVal, maxVal, optOnly);
291 }
else if (tag ==
"<parm" || tag ==
"<parmfix") {
292 double value = doubleAttributeValue( line,
"default=");
293 double minVal = doubleAttributeValue( line,
"min=");
294 double maxVal = doubleAttributeValue( line,
"max=");
295 addParm( name, value, hasMin, hasMax, minVal, maxVal);
298 }
else if (tag ==
"<word" || tag ==
"<wordfix") {
299 string value = attributeValue( line,
"default=");
300 addWord( name, value);
303 }
else if (tag ==
"<fvec" || tag ==
"<fvecfix") {
304 vector<bool> value = boolVectorAttributeValue( line,
"default=");
305 addFVec( name, value);
308 }
else if (tag ==
"<mvec" || tag ==
"<mvecfix") {
309 vector<int> value = intVectorAttributeValue( line,
"default=");
310 int minVal = intAttributeValue( line,
"min=");
311 int maxVal = intAttributeValue( line,
"max=");
312 addMVec( name, value, hasMin, hasMax, minVal, maxVal);
315 }
else if (tag ==
"<pvec" || tag ==
"<pvecfix") {
316 vector<double> value = doubleVectorAttributeValue( line,
"default=");
317 double minVal = doubleAttributeValue( line,
"min=");
318 double maxVal = doubleAttributeValue( line,
"max=");
319 addPVec( name, value, hasMin, hasMax, minVal, maxVal);
322 }
else if (tag ==
"<wvec" || tag ==
"<wvecfix") {
323 vector<string> value = stringVectorAttributeValue( line,
"default=");
324 addWVec( name, value);
331 int eeTune = mode(
"Tune:ee");
332 if (eeTune > 0) initTuneEE( eeTune);
333 int ppTune = mode(
"Tune:pp");
334 if (ppTune > 0) initTunePP( ppTune);
337 if (nError > 0)
return false;
347 bool Settings::reInit(
string startFile) {
361 return init(startFile,
false);
370 bool Settings::readString(
string line,
bool warn) {
373 if (line.find_first_not_of(
" \n\t\v\b\r\f\a") == string::npos)
return true;
376 string lineNow = (lineSaved) ? savedLine + line : line;
380 int firstChar = lineNow.find_first_not_of(
" \n\t\v\b\r\f\a");
381 if (!isalpha(lineNow[firstChar]))
return true;
384 size_t iBrace = (lineNow.find_first_of(
"{") == string::npos) ? lineNow.size()
385 : lineNow.find_first_of(
"{");
386 while (lineNow.find(
"=") != string::npos
387 && lineNow.find_first_of(
"=") < iBrace) {
388 int firstEqual = lineNow.find_first_of(
"=");
389 lineNow.replace(firstEqual, 1,
" ");
393 istringstream splitLine(lineNow);
398 while (name.find(
"::") != string::npos) {
399 int firstColonColon = name.find_first_of(
"::");
400 name.replace(firstColonColon, 2,
":");
405 if (isFlag(name)) inDataBase = 1;
406 else if (isMode(name)) inDataBase = 2;
407 else if (isParm(name)) inDataBase = 3;
408 else if (isWord(name)) inDataBase = 4;
409 else if (isFVec(name)) inDataBase = 5;
410 else if (isMVec(name)) inDataBase = 6;
411 else if (isPVec(name)) inDataBase = 7;
412 else if (isWVec(name)) inDataBase = 8;
440 if (inDataBase == 0) {
441 if (warn) cout <<
"\n PYTHIA Error: input string not found in settings"
442 <<
" databases::\n " << line << endl;
443 readingFailedSave =
true;
449 splitLine >> valueString;
451 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
452 <<
" not meaningful:\n " << line << endl;
453 readingFailedSave =
true;
458 if (valueString ==
"?") {
459 cout << output(name);
465 if (valueString.find(
"force") != string::npos) {
468 splitLine >> valueString;
470 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
471 <<
" not meaningful:\n " << line << endl;
472 readingFailedSave =
true;
479 if (valueString[0] ==
'{') {
480 size_t openBrace = lineNow.find_first_of(
"{");
481 size_t closeBrace = lineNow.find_first_of(
"}");
483 if (closeBrace == string::npos) {
488 valueString = lineNow.substr(openBrace, closeBrace - openBrace + 1);
492 if (inDataBase == 1) {
493 bool value = boolString(valueString);
494 flag(name, value, force);
497 }
else if (inDataBase == 2) {
498 istringstream modeData(valueString);
502 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
503 <<
" not meaningful:\n " << line << endl;
504 readingFailedSave =
true;
507 if (!mode(name, value, force)) {
508 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
509 <<
" non-existing option:\n " << line << endl;
510 readingFailedSave =
true;
515 }
else if (inDataBase == 3) {
516 istringstream parmData(valueString);
520 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
521 <<
" not meaningful:\n " << line << endl;
522 readingFailedSave =
true;
525 parm(name, value, force);
528 }
else if (inDataBase == 4) {
529 word(name, valueString, force);
532 }
else if (inDataBase == 5) {
533 istringstream fvecData(valueString);
534 vector<bool> value(boolVectorAttributeValue(
535 "value=\"" + valueString +
"\"",
"value="));
537 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
538 <<
" not meaningful:\n " << line << endl;
539 readingFailedSave =
true;
542 fvec(name, value, force);
545 }
else if (inDataBase == 6) {
546 istringstream mvecData(valueString);
547 vector<int> value(intVectorAttributeValue(
548 "value=\"" + valueString +
"\"",
"value="));
550 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
551 <<
" not meaningful:\n " << line << endl;
552 readingFailedSave =
true;
555 mvec(name, value, force);
558 }
else if (inDataBase == 7) {
559 istringstream pvecData(valueString);
560 vector<double> value(doubleVectorAttributeValue(
561 "value=\"" + valueString +
"\"",
"value="));
563 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
564 <<
" not meaningful:\n " << line << endl;
565 readingFailedSave =
true;
568 pvec(name, value, force);
571 }
else if (inDataBase == 8) {
572 istringstream wvecData(valueString);
573 vector<string> value(stringVectorAttributeValue(
574 "value=\"" + valueString +
"\"",
"value="));
576 if (warn) cout <<
"\n PYTHIA Error: variable recognized, but its value"
577 <<
" not meaningful:\n " << line << endl;
578 readingFailedSave =
true;
581 wvec(name, value, force);
585 readStringHistory.push_back(lineNow);
586 int subrun = max(-1,mode(
"Main:subrun"));
587 if (readStringSubrun.find(subrun) == readStringSubrun.end())
588 readStringSubrun[subrun] = vector<string>();
589 readStringSubrun[subrun].push_back(lineNow);
599 bool Settings::writeFile(
string toFile,
bool writeAll) {
602 const char* cstring = toFile.c_str();
603 ofstream os(cstring);
605 infoPtr->errorMsg(
"Error in Settings::writeFile:"
606 " could not open file", toFile);
611 return writeFile( os, writeAll);
619 bool Settings::writeFile(ostream& os,
bool writeAll) {
622 if (writeAll) os <<
"! List of all current PYTHIA ";
623 else os <<
"! List of all modified PYTHIA ";
624 os << fixed << setprecision(3) << parm(
"Pythia:versionNumber")
628 map<string, Flag>::iterator flagEntry = flags.begin();
629 map<string, Mode>::iterator modeEntry = modes.begin();
630 map<string, Parm>::iterator parmEntry = parms.begin();
631 map<string, Word>::iterator wordEntry = words.begin();
632 map<string, FVec>::iterator fvecEntry = fvecs.begin();
633 map<string, MVec>::iterator mvecEntry = mvecs.begin();
634 map<string, PVec>::iterator pvecEntry = pvecs.begin();
635 map<string, WVec>::iterator wvecEntry = wvecs.begin();
638 while (flagEntry != flags.end() || modeEntry != modes.end()
639 || parmEntry != parms.end() || wordEntry != words.end()
640 || fvecEntry != fvecs.end() || mvecEntry != mvecs.end()
641 || pvecEntry != pvecs.end() || wvecEntry != wvecs.end() ) {
644 if ( flagEntry != flags.end()
645 && ( modeEntry == modes.end() || flagEntry->first < modeEntry->first )
646 && ( parmEntry == parms.end() || flagEntry->first < parmEntry->first )
647 && ( wordEntry == words.end() || flagEntry->first < wordEntry->first )
648 && ( fvecEntry == fvecs.end() || flagEntry->first < fvecEntry->first )
649 && ( mvecEntry == mvecs.end() || flagEntry->first < mvecEntry->first )
650 && ( pvecEntry == pvecs.end() || flagEntry->first < pvecEntry->first )
651 && ( wvecEntry == wvecs.end() || flagEntry->first < wvecEntry->first )
653 string state[2] = {
"off",
"on"};
654 bool valNow = flagEntry->second.valNow;
655 bool valDefault = flagEntry->second.valDefault;
656 if ( writeAll || valNow != valDefault )
657 os << flagEntry->second.name <<
" = " << state[valNow] <<
"\n";
661 }
else if ( modeEntry != modes.end()
662 && ( parmEntry == parms.end() || modeEntry->first < parmEntry->first )
663 && ( wordEntry == words.end() || modeEntry->first < wordEntry->first )
664 && ( fvecEntry == fvecs.end() || modeEntry->first < fvecEntry->first )
665 && ( mvecEntry == mvecs.end() || modeEntry->first < mvecEntry->first )
666 && ( pvecEntry == pvecs.end() || modeEntry->first < pvecEntry->first )
667 && ( wvecEntry == wvecs.end() || modeEntry->first < wvecEntry->first )
669 int valNow = modeEntry->second.valNow;
670 int valDefault = modeEntry->second.valDefault;
671 if ( writeAll || valNow != valDefault )
672 os << modeEntry->second.name <<
" = " << valNow <<
"\n";
676 }
else if ( parmEntry != parms.end()
677 && ( wordEntry == words.end() || parmEntry->first < wordEntry->first )
678 && ( fvecEntry == fvecs.end() || parmEntry->first < fvecEntry->first )
679 && ( mvecEntry == mvecs.end() || parmEntry->first < mvecEntry->first )
680 && ( pvecEntry == pvecs.end() || parmEntry->first < pvecEntry->first )
681 && ( wvecEntry == wvecs.end() || parmEntry->first < wvecEntry->first )
683 double valNow = parmEntry->second.valNow;
684 double valDefault = parmEntry->second.valDefault;
685 if ( writeAll || valNow != valDefault ) {
686 os << parmEntry->second.name <<
" = ";
687 if ( valNow == 0. ) os << fixed << setprecision(1);
688 else if ( abs(valNow) < 0.001 ) os << scientific << setprecision(4);
689 else if ( abs(valNow) < 0.1 ) os << fixed << setprecision(7);
690 else if ( abs(valNow) < 1000. ) os << fixed << setprecision(5);
691 else if ( abs(valNow) < 1000000. ) os << fixed << setprecision(3);
692 else os << scientific << setprecision(4);
693 os << valNow <<
"\n";
698 }
else if ( wordEntry != words.end()
699 && ( fvecEntry == fvecs.end() || wordEntry->first < fvecEntry->first )
700 && ( mvecEntry == mvecs.end() || wordEntry->first < mvecEntry->first )
701 && ( pvecEntry == pvecs.end() || wordEntry->first < pvecEntry->first )
702 && ( wvecEntry == wvecs.end() || wordEntry->first < wvecEntry->first )
704 string valNow = wordEntry->second.valNow;
705 string valDefault = wordEntry->second.valDefault;
706 if ( writeAll || valNow != valDefault )
707 os << wordEntry->second.name <<
" = " << valNow <<
"\n";
711 }
else if ( fvecEntry != fvecs.end()
712 && ( mvecEntry == mvecs.end() || fvecEntry->first < mvecEntry->first )
713 && ( pvecEntry == pvecs.end() || fvecEntry->first < pvecEntry->first )
714 && ( wvecEntry == wvecs.end() || fvecEntry->first < wvecEntry->first )
716 string state[2] = {
"off",
"on"};
717 vector<bool> valNow = fvecEntry->second.valNow;
718 vector<bool> valDefault = fvecEntry->second.valDefault;
719 if ( writeAll || valNow != valDefault ) {
720 os << fvecEntry->second.name <<
" = {";
721 if (valNow.size() > 0) {
722 for (vector<bool>::iterator val = valNow.begin();
723 val != --valNow.end(); ++val) os << state[*val] <<
",";
724 os << state[*(--valNow.end())] <<
"}\n";
730 }
else if ( mvecEntry != mvecs.end()
731 && ( pvecEntry == pvecs.end() || mvecEntry->first < pvecEntry->first )
732 && ( wvecEntry == wvecs.end() || mvecEntry->first < wvecEntry->first )
734 vector<int> valNow = mvecEntry->second.valNow;
735 vector<int> valDefault = mvecEntry->second.valDefault;
736 if ( writeAll || valNow != valDefault ) {
737 os << mvecEntry->second.name <<
" = {";
738 if (valNow.size() > 0) {
739 for (vector<int>::iterator val = valNow.begin();
740 val != --valNow.end(); ++val) os << *val <<
",";
741 os << *(--valNow.end()) <<
"}\n";
747 }
else if ( pvecEntry != pvecs.end()
748 && ( wvecEntry == wvecs.end() || pvecEntry->first < wvecEntry->first )
750 vector<double> valNow = pvecEntry->second.valNow;
751 vector<double> valDefault = pvecEntry->second.valDefault;
752 if ( writeAll || valNow != valDefault ) {
753 os << pvecEntry->second.name <<
" = {";
754 if (valNow.size() > 0) {
755 for (vector<double>::iterator val = valNow.begin();
756 val != --valNow.end(); ++val) {
757 if ( *val == 0. ) os << fixed << setprecision(1);
758 else if ( abs(*val) < 0.001 ) os << scientific << setprecision(4);
759 else if ( abs(*val) < 0.1 ) os << fixed << setprecision(7);
760 else if ( abs(*val) < 1000. ) os << fixed << setprecision(5);
761 else if ( abs(*val) < 1000000. ) os << fixed << setprecision(3);
762 else os << scientific << setprecision(4);
764 } os << *(--valNow.end()) <<
"}\n";
771 vector<string> valNow = wvecEntry->second.valNow;
772 vector<string> valDefault = wvecEntry->second.valDefault;
773 if ( writeAll || valNow != valDefault ) {
774 if (valNow.size() > 0) {
775 os << wvecEntry->second.name <<
" = {";
776 for (vector<string>::iterator val = valNow.begin();
777 val != --valNow.end(); ++val) os << *val <<
",";
778 os << *(--valNow.end()) <<
"}\n";
793 bool Settings::writeFileXML(ostream& os) {
796 map<string, Flag>::iterator flagEntry = flags.begin();
797 map<string, Mode>::iterator modeEntry = modes.begin();
798 map<string, Parm>::iterator parmEntry = parms.begin();
799 map<string, Word>::iterator wordEntry = words.begin();
800 map<string, FVec>::iterator fvecEntry = fvecs.begin();
801 map<string, MVec>::iterator mvecEntry = mvecs.begin();
802 map<string, PVec>::iterator pvecEntry = pvecs.begin();
803 map<string, WVec>::iterator wvecEntry = wvecs.begin();
806 while (flagEntry != flags.end() || modeEntry != modes.end()
807 || parmEntry != parms.end() || wordEntry != words.end()
808 || fvecEntry != fvecs.end() || mvecEntry != mvecs.end()
809 || pvecEntry != pvecs.end() || wvecEntry != wvecs.end() ) {
812 if ( flagEntry != flags.end()
813 && ( modeEntry == modes.end() || flagEntry->first < modeEntry->first )
814 && ( parmEntry == parms.end() || flagEntry->first < parmEntry->first )
815 && ( wordEntry == words.end() || flagEntry->first < wordEntry->first )
816 && ( fvecEntry == fvecs.end() || flagEntry->first < fvecEntry->first )
817 && ( mvecEntry == mvecs.end() || flagEntry->first < mvecEntry->first )
818 && ( pvecEntry == pvecs.end() || flagEntry->first < pvecEntry->first )
819 && ( wvecEntry == wvecs.end() || flagEntry->first < wvecEntry->first )
821 string state[2] = {
"off",
"on"};
822 bool valDefault = flagEntry->second.valDefault;
823 os <<
"<flag name=\"" << flagEntry->second.name <<
"\" default=\""
824 << state[valDefault] <<
"\"></flag>" << endl;
828 }
else if ( modeEntry != modes.end()
829 && ( parmEntry == parms.end() || modeEntry->first < parmEntry->first )
830 && ( wordEntry == words.end() || modeEntry->first < wordEntry->first )
831 && ( fvecEntry == fvecs.end() || modeEntry->first < fvecEntry->first )
832 && ( mvecEntry == mvecs.end() || modeEntry->first < mvecEntry->first )
833 && ( pvecEntry == pvecs.end() || modeEntry->first < pvecEntry->first )
834 && ( wvecEntry == wvecs.end() || modeEntry->first < wvecEntry->first )
836 int valDefault = modeEntry->second.valDefault;
837 os <<
"<mode name=\"" << modeEntry->second.name <<
"\" default=\""
838 << valDefault <<
"\">";
839 if (modeEntry->second.hasMin ) os <<
" min=\""
840 << modeEntry->second.valMin <<
"\"";
841 if (modeEntry->second.hasMax ) os <<
" max=\""
842 << modeEntry->second.valMax <<
"\"";
843 os <<
"</mode>" << endl;
847 }
else if ( parmEntry != parms.end()
848 && ( wordEntry == words.end() || parmEntry->first < wordEntry->first )
849 && ( fvecEntry == fvecs.end() || parmEntry->first < fvecEntry->first )
850 && ( mvecEntry == mvecs.end() || parmEntry->first < mvecEntry->first )
851 && ( pvecEntry == pvecs.end() || parmEntry->first < pvecEntry->first )
852 && ( wvecEntry == wvecs.end() || parmEntry->first < wvecEntry->first )
854 double valDefault = parmEntry->second.valDefault;
855 os <<
"<parm name=\"" << parmEntry->second.name <<
"\" default=\"";
856 if ( valDefault == 0. ) os << fixed << setprecision(1);
857 else if ( abs(valDefault) < 0.001 ) os << scientific << setprecision(4);
858 else if ( abs(valDefault) < 0.1 ) os << fixed << setprecision(7);
859 else if ( abs(valDefault) < 1000. ) os << fixed << setprecision(5);
860 else if ( abs(valDefault) < 1000000. ) os << fixed << setprecision(3);
861 else os << scientific << setprecision(4);
862 os << valDefault <<
"\">";
863 if (parmEntry->second.hasMin) {
865 valDefault = parmEntry->second.valMin;
866 if ( valDefault == 0. ) os << fixed << setprecision(1);
867 else if ( abs(valDefault) < 0.001) os << scientific << setprecision(4);
868 else if ( abs(valDefault) < 0.1 ) os << fixed << setprecision(7);
869 else if ( abs(valDefault) < 1000. ) os << fixed << setprecision(5);
870 else if ( abs(valDefault) < 1000000. ) os << fixed << setprecision(3);
871 else os << scientific << setprecision(4);
872 os << valDefault <<
"\">";
874 if (parmEntry->second.hasMax) {
876 valDefault = parmEntry->second.valMax;
877 if ( valDefault == 0. ) os << fixed << setprecision(1);
878 else if ( abs(valDefault) < 0.001) os << scientific << setprecision(4);
879 else if ( abs(valDefault) < 0.1 ) os << fixed << setprecision(7);
880 else if ( abs(valDefault) < 1000. ) os << fixed << setprecision(5);
881 else if ( abs(valDefault) < 1000000. ) os << fixed << setprecision(3);
882 else os << scientific << setprecision(4);
883 os << valDefault <<
"\">";
885 os <<
"</parm>" << endl;
889 }
else if ( wordEntry != words.end()
890 && ( fvecEntry == fvecs.end() || wordEntry->first < fvecEntry->first )
891 && ( mvecEntry == mvecs.end() || wordEntry->first < mvecEntry->first )
892 && ( pvecEntry == pvecs.end() || wordEntry->first < pvecEntry->first )
893 && ( wvecEntry == wvecs.end() || wordEntry->first < wvecEntry->first )
895 string valDefault = wordEntry->second.valDefault;
896 os <<
"<word name=\"" << wordEntry->second.name <<
"\" default=\""
897 << valDefault <<
"\"></word>" << endl;
901 }
else if ( fvecEntry != fvecs.end()
902 && ( mvecEntry == mvecs.end() || fvecEntry->first < mvecEntry->first )
903 && ( pvecEntry == pvecs.end() || fvecEntry->first < pvecEntry->first )
904 && ( wvecEntry == wvecs.end() || fvecEntry->first < wvecEntry->first )
906 string state[2] = {
"off",
"on"};
907 vector<bool> valDefault = fvecEntry->second.valDefault;
908 os <<
"<fvec name=\"" << fvecEntry->second.name <<
"\" default={\"";
909 if (valDefault.size() > 0) {
910 for (vector<bool>::iterator val = valDefault.begin();
911 val != --valDefault.end(); ++val) os << state[*val] <<
",";
912 os << state[*(--valDefault.end())] <<
"}\"></fvec>" << endl;
913 }
else os <<
"}\"></fvec>" << endl;
917 }
else if ( mvecEntry != mvecs.end()
918 && ( pvecEntry == pvecs.end() || mvecEntry->first < pvecEntry->first )
919 && ( wvecEntry == wvecs.end() || mvecEntry->first < wvecEntry->first )
921 vector<int> valDefault = mvecEntry->second.valDefault;
922 os <<
"<mvec name=\"" << mvecEntry->second.name <<
"\" default={\"";
923 if (valDefault.size() > 0) {
924 for (vector<int>::iterator val = valDefault.begin();
925 val != --valDefault.end(); ++val) os << *val <<
",";
926 os << *(--valDefault.end()) <<
"}\">";
928 if (mvecEntry->second.hasMin ) os <<
" min=\""
929 << mvecEntry->second.valMin <<
"\"";
930 if (mvecEntry->second.hasMax ) os <<
" max=\""
931 << mvecEntry->second.valMax <<
"\"";
932 os <<
"</mvec>" << endl;
936 }
else if ( pvecEntry != pvecs.end()
937 && ( wvecEntry == wvecs.end() || pvecEntry->first < wvecEntry->first )
939 vector<double> valDefault = pvecEntry->second.valDefault;
940 os <<
"<pvec name=\"" << pvecEntry->second.name <<
"\" default={\"";
941 if (valDefault.size() > 0) {
942 for (vector<double>::iterator val = valDefault.begin();
943 val != --valDefault.end(); ++val) {
944 if ( *val == 0. ) os << fixed << setprecision(1);
945 else if ( abs(*val) < 0.001 ) os << scientific << setprecision(4);
946 else if ( abs(*val) < 0.1 ) os << fixed << setprecision(7);
947 else if ( abs(*val) < 1000. ) os << fixed << setprecision(5);
948 else if ( abs(*val) < 1000000. ) os << fixed << setprecision(3);
949 else os << scientific << setprecision(4);
952 os << *(--valDefault.end()) <<
"}\">";
954 if (pvecEntry->second.hasMin ) {
955 double valLocal = pvecEntry->second.valMin;
957 if ( valLocal == 0. ) os << fixed << setprecision(1);
958 else if ( abs(valLocal) < 0.001 ) os << scientific << setprecision(4);
959 else if ( abs(valLocal) < 0.1 ) os << fixed << setprecision(7);
960 else if ( abs(valLocal) < 1000. ) os << fixed << setprecision(5);
961 else if ( abs(valLocal) < 1000000. ) os << fixed << setprecision(3);
962 else os << scientific << setprecision(4);
963 os << valLocal <<
"\">";
965 if (pvecEntry->second.hasMax ) {
966 double valLocal = pvecEntry->second.valMax;
968 if ( valLocal == 0. ) os << fixed << setprecision(1);
969 else if ( abs(valLocal) < 0.001 ) os << scientific << setprecision(4);
970 else if ( abs(valLocal) < 0.1 ) os << fixed << setprecision(7);
971 else if ( abs(valLocal) < 1000. ) os << fixed << setprecision(5);
972 else if ( abs(valLocal) < 1000000. ) os << fixed << setprecision(3);
973 else os << scientific << setprecision(4);
974 os << valLocal <<
"\">";
976 os <<
"</pvec>" << endl;
981 vector<string> valDefault = wvecEntry->second.valDefault;
982 os <<
"<wvec name=\"" << wvecEntry->second.name <<
"\" default={\"";
983 if (valDefault.size() > 0) {
984 for (vector<string>::iterator val = valDefault.begin();
985 val != --valDefault.end(); ++val) os << *val <<
",";
986 os << *(--valDefault.end()) <<
"}\">";
988 os <<
"</wvec>" << endl;
1001 void Settings::list(
bool doListAll,
bool doListString,
string match) {
1005 cout <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec "
1006 <<
"+ PVec + WVec Settings (all) ---------------------------* \n";
1007 else if (!doListString)
1008 cout <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec "
1009 <<
"+ PVec + WVec Settings (changes only) ------------------* \n" ;
1011 cout <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec "
1012 <<
"+ PVec + WVec Settings (with requested string) ----------* \n" ;
1016 <<
" Now | Default Min Max | \n"
1022 if (match ==
"") match =
" ";
1025 map<string, Flag>::iterator flagEntry = flags.begin();
1026 map<string, Mode>::iterator modeEntry = modes.begin();
1027 map<string, Parm>::iterator parmEntry = parms.begin();
1028 map<string, Word>::iterator wordEntry = words.begin();
1029 map<string, FVec>::iterator fvecEntry = fvecs.begin();
1030 map<string, MVec>::iterator mvecEntry = mvecs.begin();
1031 map<string, PVec>::iterator pvecEntry = pvecs.begin();
1032 map<string, WVec>::iterator wvecEntry = wvecs.begin();
1035 while (flagEntry != flags.end() || modeEntry != modes.end()
1036 || parmEntry != parms.end() || wordEntry != words.end()
1037 || fvecEntry != fvecs.end() || mvecEntry != mvecs.end()
1038 || pvecEntry != pvecs.end() || wvecEntry != wvecs.end() ) {
1041 if ( flagEntry != flags.end()
1042 && ( modeEntry == modes.end() || flagEntry->first < modeEntry->first )
1043 && ( parmEntry == parms.end() || flagEntry->first < parmEntry->first )
1044 && ( wordEntry == words.end() || flagEntry->first < wordEntry->first )
1045 && ( fvecEntry == fvecs.end() || flagEntry->first < fvecEntry->first )
1046 && ( mvecEntry == mvecs.end() || flagEntry->first < mvecEntry->first )
1047 && ( pvecEntry == pvecs.end() || flagEntry->first < pvecEntry->first )
1048 && ( wvecEntry == wvecs.end() || flagEntry->first < wvecEntry->first )
1050 string state[2] = {
"off",
"on"};
1051 bool valNow = flagEntry->second.valNow;
1052 bool valDefault = flagEntry->second.valDefault;
1053 if ( doListAll || (!doListString && valNow != valDefault)
1054 || (doListString && flagEntry->first.find(match) != string::npos) )
1055 cout <<
" | " << setw(45) << left
1056 << flagEntry->second.name <<
" | " << setw(24) << right
1057 << state[valNow] <<
" | " << setw(12) << state[valDefault]
1062 }
else if ( modeEntry != modes.end()
1063 && ( parmEntry == parms.end() || modeEntry->first < parmEntry->first )
1064 && ( wordEntry == words.end() || modeEntry->first < wordEntry->first )
1065 && ( fvecEntry == fvecs.end() || modeEntry->first < fvecEntry->first )
1066 && ( mvecEntry == mvecs.end() || modeEntry->first < mvecEntry->first )
1067 && ( pvecEntry == pvecs.end() || modeEntry->first < pvecEntry->first )
1068 && ( wvecEntry == wvecs.end() || modeEntry->first < wvecEntry->first )
1070 int valNow = modeEntry->second.valNow;
1071 int valDefault = modeEntry->second.valDefault;
1072 if ( doListAll || (!doListString && valNow != valDefault)
1073 || (doListString && modeEntry->first.find(match) != string::npos) ) {
1074 cout <<
" | " << setw(45) << left
1075 << modeEntry->second.name <<
" | " << setw(24) << right
1076 << valNow <<
" | " << setw(12) << valDefault;
1077 if (modeEntry->second.hasMin)
1078 cout << setw(12) << modeEntry->second.valMin;
1080 if (modeEntry->second.hasMax)
1081 cout << setw(12) << modeEntry->second.valMax;
1088 }
else if ( parmEntry != parms.end()
1089 && ( wordEntry == words.end() || parmEntry->first < wordEntry->first )
1090 && ( fvecEntry == fvecs.end() || parmEntry->first < fvecEntry->first )
1091 && ( mvecEntry == mvecs.end() || parmEntry->first < mvecEntry->first )
1092 && ( pvecEntry == pvecs.end() || parmEntry->first < pvecEntry->first )
1093 && ( wvecEntry == wvecs.end() || parmEntry->first < wvecEntry->first )
1095 double valNow = parmEntry->second.valNow;
1096 double valDefault = parmEntry->second.valDefault;
1097 if ( doListAll || (!doListString && valNow != valDefault )
1098 || (doListString && parmEntry->first.find(match) != string::npos) ) {
1099 cout <<
" | " << setw(45) << left
1100 << parmEntry->second.name << right <<
" | ";
1101 for (
int i = 0; i < 4; ++i) {
1102 if (i == 1) valNow = valDefault;
1103 if (i == 2) valNow = parmEntry->second.valMin;
1104 if (i == 3) valNow = parmEntry->second.valMax;
1105 if ( (i == 2 && !parmEntry->second.hasMin)
1106 || (i == 3 && !parmEntry->second.hasMax) )
1108 else if ( valNow == 0. )
1109 cout << fixed << setprecision(1) << setw(12) << valNow;
1110 else if ( abs(valNow) < 0.001 )
1111 cout << scientific << setprecision(4) << setw(12) << valNow;
1112 else if ( abs(valNow) < 0.1 )
1113 cout << fixed << setprecision(7) << setw(12) << valNow;
1114 else if ( abs(valNow) < 1000. )
1115 cout << fixed << setprecision(5) << setw(12) << valNow;
1116 else if ( abs(valNow) < 1000000. )
1117 cout << fixed << setprecision(3) << setw(12) << valNow;
1119 cout << scientific << setprecision(4) << setw(12) << valNow;
1120 if (i == 0) cout <<
" | ";
1127 }
else if ( wordEntry != words.end()
1128 && ( fvecEntry == fvecs.end() || wordEntry->first < fvecEntry->first )
1129 && ( mvecEntry == mvecs.end() || wordEntry->first < mvecEntry->first )
1130 && ( pvecEntry == pvecs.end() || wordEntry->first < pvecEntry->first )
1131 && ( wvecEntry == wvecs.end() || wordEntry->first < wvecEntry->first )
1133 string valNow = wordEntry->second.valNow;
1134 string valDefault = wordEntry->second.valDefault;
1135 int blankLeft = max(0, 60 - max(24,
int(valNow.length()) )
1136 - max(12,
int(valDefault.length()) ) );
1137 string blankPad( blankLeft,
' ');
1138 if ( doListAll || (!doListString && valNow != valDefault)
1139 || (doListString && wordEntry->first.find(match) != string::npos) )
1140 cout <<
" | " << setw(45) << left
1141 << wordEntry->second.name <<
" | " << setw(24) << right
1142 << valNow <<
" | " << setw(12) << valDefault << blankPad
1147 }
else if ( fvecEntry != fvecs.end()
1148 && ( mvecEntry == mvecs.end() || fvecEntry->first < mvecEntry->first )
1149 && ( pvecEntry == pvecs.end() || fvecEntry->first < pvecEntry->first )
1150 && ( wvecEntry == wvecs.end() || fvecEntry->first < wvecEntry->first )
1152 string state[2] = {
"off",
"on"};
1153 vector<bool> valsNow = fvecEntry->second.valNow;
1154 vector<bool> valsDefault = fvecEntry->second.valDefault;
1155 bool valNow(
false), valDefault(
false);
1156 if ( doListAll || (!doListString && valsNow != valsDefault )
1157 || (doListString && fvecEntry->first.find(match) != string::npos) ) {
1158 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
1161 cout <<
" | " << setw(45) << left
1162 << fvecEntry->second.name << right <<
" | ";
1164 cout <<
" | " << setw(45) <<
" " << right <<
" | ";
1165 for (
int j = 0; j < 4; ++j) {
1166 if (i < valsNow.size()) valNow = valsNow[i];
1167 if (i < valsDefault.size()) valDefault = valsDefault[i];
1168 if (j == 1) valNow = valDefault;
1169 if ( (j == 0 && i >= valsNow.size())
1170 || (j == 1 && i >= valsDefault.size()) || (j > 1) )
1172 else cout << setw(12) << state[valNow];
1173 if (j == 0) cout <<
" | ";
1181 }
else if ( mvecEntry != mvecs.end()
1182 && ( pvecEntry == pvecs.end() || mvecEntry->first < pvecEntry->first )
1183 && ( wvecEntry == wvecs.end() || mvecEntry->first < wvecEntry->first )
1185 vector<int> valsNow = mvecEntry->second.valNow;
1186 vector<int> valsDefault = mvecEntry->second.valDefault;
1187 int valNow(0), valDefault(0);
1188 if ( doListAll || (!doListString && valsNow != valsDefault )
1189 || (doListString && mvecEntry->first.find(match) != string::npos) ) {
1190 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
1193 cout <<
" | " << setw(45) << left
1194 << mvecEntry->second.name << right <<
" | ";
1196 cout <<
" | " << setw(45) <<
" " << right <<
" | ";
1197 for (
int j = 0; j < 4; ++j) {
1198 if (i < valsNow.size()) valNow = valsNow[i];
1199 if (i < valsDefault.size()) valDefault = valsDefault[i];
1200 if (j == 1) valNow = valDefault;
1201 if (j == 2) valNow = mvecEntry->second.valMin;
1202 if (j == 3) valNow = mvecEntry->second.valMax;
1203 if ( (j == 0 && i >= valsNow.size())
1204 || (j == 1 && i >= valsDefault.size())
1205 || (j == 2 && !mvecEntry->second.hasMin)
1206 || (j == 3 && !mvecEntry->second.hasMax) )
1208 else cout << setw(12) << valNow;
1209 if (j == 0) cout <<
" | ";
1217 }
else if ( pvecEntry != pvecs.end()
1218 && ( wvecEntry == wvecs.end() || pvecEntry->first < wvecEntry->first )
1220 vector<double> valsNow = pvecEntry->second.valNow;
1221 vector<double> valsDefault = pvecEntry->second.valDefault;
1222 double valNow(0), valDefault(0);
1223 if ( doListAll || (!doListString && valsNow != valsDefault )
1224 || (doListString && pvecEntry->first.find(match) != string::npos) ) {
1225 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
1228 cout <<
" | " << setw(45) << left
1229 << pvecEntry->second.name << right <<
" | ";
1231 cout <<
" | " << setw(45) <<
" " << right <<
" | ";
1232 for (
int j = 0; j < 4; ++j) {
1233 if (i < valsNow.size()) valNow = valsNow[i];
1234 if (i < valsDefault.size()) valDefault = valsDefault[i];
1235 if (j == 1) valNow = valDefault;
1236 if (j == 2) valNow = pvecEntry->second.valMin;
1237 if (j == 3) valNow = pvecEntry->second.valMax;
1238 if ( (j == 0 && i >= valsNow.size())
1239 || (j == 1 && i >= valsDefault.size())
1240 || (j == 2 && !pvecEntry->second.hasMin)
1241 || (j == 3 && !pvecEntry->second.hasMax) )
1243 else if ( valNow == 0. )
1244 cout << fixed << setprecision(1) << setw(12) << valNow;
1245 else if ( abs(valNow) < 0.001 )
1246 cout << scientific << setprecision(4) << setw(12) << valNow;
1247 else if ( abs(valNow) < 0.1 )
1248 cout << fixed << setprecision(7) << setw(12) << valNow;
1249 else if ( abs(valNow) < 1000. )
1250 cout << fixed << setprecision(5) << setw(12) << valNow;
1251 else if ( abs(valNow) < 1000000. )
1252 cout << fixed << setprecision(3) << setw(12) << valNow;
1254 cout << scientific << setprecision(4) << setw(12) << valNow;
1255 if (j == 0) cout <<
" | ";
1264 vector<string> valsNow = wvecEntry->second.valNow;
1265 vector<string> valsDefault = wvecEntry->second.valDefault;
1266 if ( doListAll || (!doListString && valsNow != valsDefault )
1267 || (doListString && wvecEntry->first.find(match) != string::npos) ) {
1268 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
1271 cout <<
" | " << setw(45) << left
1272 << wvecEntry->second.name << right <<
" | ";
1274 cout <<
" | " << setw(45) <<
" " << right <<
" | ";
1275 string valNow = (i < valsNow.size()) ? valsNow[i] :
" ";
1276 string valDefault = (i < valsDefault.size()) ? valsDefault[i] :
" ";
1277 int blankLeft = max(0, 60 - max(24,
int(valNow.length()) )
1278 - max(12,
int(valDefault.length()) ) );
1279 string blankPad( blankLeft,
' ');
1280 cout << setw(24) << right << valNow <<
" | " << setw(12)
1281 << valDefault << blankPad <<
" | \n";
1291 <<
" *------- End PYTHIA Flag + Mode + Parm + Word + FVec + MVec "
1292 <<
"+ PVec + WVec Settings -----------------------------* " << endl;
1300 string Settings::output(
string keyIn,
bool fullLine) {
1303 string outVal = (fullLine) ?
" " + keyIn +
" = " :
"";
1306 if (isFlag(keyIn)) {
1307 outVal += (flag(keyIn)) ?
"true" :
"false";
1308 }
else if (isMode(keyIn)) {
1310 ostr << mode(keyIn);
1311 outVal += ostr.str();
1312 }
else if (isParm(keyIn)) {
1314 ostr << scientific << setprecision(5) << parm(keyIn);
1315 outVal += ostr.str();
1316 }
else if (isWord(keyIn)) {
1317 outVal += word(keyIn);
1320 }
else if (isFVec(keyIn)) {
1321 vector<bool> outVec = fvec(keyIn);
1322 for (
int i = 0; i < int(outVec.size()); ++i) {
1323 outVal += (outVec[i]) ?
"true" :
"false";
1324 if (i !=
int(outVec.size()) - 1) outVal +=
" ";
1326 }
else if (isMVec(keyIn)) {
1327 vector<int> outVec = mvec(keyIn);
1328 for (
int i = 0; i < int(outVec.size()); ++i) {
1331 outVal += ostr.str();
1332 if (i !=
int(outVec.size()) - 1) outVal +=
" ";
1334 }
else if (isPVec(keyIn)) {
1335 vector<double> outVec = pvec(keyIn);
1336 for (
int i = 0; i < int(outVec.size()); ++i) {
1338 ostr << scientific << setprecision(5) << outVec[i];
1339 outVal += ostr.str();
1340 if (i !=
int(outVec.size()) - 1) outVal +=
" ";
1342 }
else if (isWVec(keyIn)) {
1343 vector<string> outVec = wvec(keyIn);
1344 for (
int i = 0; i < int(outVec.size()); ++i) {
1345 outVal += outVec[i];
1346 if (i !=
int(outVec.size()) - 1) outVal +=
" ";
1350 }
else outVal +=
"unknown";
1351 if (fullLine) outVal +=
"\n";
1360 void Settings::resetAll() {
1363 for (map<string, Flag>::iterator flagEntry = flags.begin();
1364 flagEntry != flags.end(); ++flagEntry) {
1365 string name = flagEntry->first;
1370 for (map<string, Mode>::iterator modeEntry = modes.begin();
1371 modeEntry != modes.end(); ++modeEntry) {
1372 string name = modeEntry->first;
1377 for (map<string, Parm>::iterator parmEntry = parms.begin();
1378 parmEntry != parms.end(); ++parmEntry) {
1379 string name = parmEntry->first;
1384 for (map<string, Word>::iterator wordEntry = words.begin();
1385 wordEntry != words.end(); ++wordEntry) {
1386 string name = wordEntry->first;
1391 for (map<string, FVec>::iterator fvecEntry = fvecs.begin();
1392 fvecEntry != fvecs.end(); ++fvecEntry) {
1393 string name = fvecEntry->first;
1398 for (map<string, MVec>::iterator mvecEntry = mvecs.begin();
1399 mvecEntry != mvecs.end(); ++mvecEntry) {
1400 string name = mvecEntry->first;
1405 for (map<string, PVec>::iterator pvecEntry = pvecs.begin();
1406 pvecEntry != pvecs.end(); ++pvecEntry) {
1407 string name = pvecEntry->first;
1412 for (map<string, WVec>::iterator wvecEntry = wvecs.begin();
1413 wvecEntry != wvecs.end(); ++wvecEntry) {
1414 string name = wvecEntry->first;
1424 bool Settings::flag(
string keyIn) {
1425 if (isFlag(keyIn))
return flags[toLower(keyIn)].valNow;
1426 infoPtr->errorMsg(
"Error in Settings::flag: unknown key", keyIn);
1430 int Settings::mode(
string keyIn) {
1431 if (isMode(keyIn))
return modes[toLower(keyIn)].valNow;
1432 infoPtr->errorMsg(
"Error in Settings::mode: unknown key", keyIn);
1436 double Settings::parm(
string keyIn) {
1437 if (isParm(keyIn))
return parms[toLower(keyIn)].valNow;
1438 infoPtr->errorMsg(
"Error in Settings::parm: unknown key", keyIn);
1442 string Settings::word(
string keyIn) {
1443 if (isWord(keyIn))
return words[toLower(keyIn)].valNow;
1444 infoPtr->errorMsg(
"Error in Settings::word: unknown key", keyIn);
1448 vector<bool> Settings::fvec(
string keyIn) {
1449 if (isFVec(keyIn))
return fvecs[toLower(keyIn)].valNow;
1450 infoPtr->errorMsg(
"Error in Settings::fvec: unknown key", keyIn);
1451 return vector<bool>(1,
false);
1454 vector<int> Settings::mvec(
string keyIn) {
1455 if (isMVec(keyIn))
return mvecs[toLower(keyIn)].valNow;
1456 infoPtr->errorMsg(
"Error in Settings::mvec: unknown key", keyIn);
1457 return vector<int>(1, 0);
1460 vector<double> Settings::pvec(
string keyIn) {
1461 if (isPVec(keyIn))
return pvecs[toLower(keyIn)].valNow;
1462 infoPtr->errorMsg(
"Error in Settings::pvec: unknown key", keyIn);
1463 return vector<double>(1, 0.);
1466 vector<string> Settings::wvec(
string keyIn) {
1467 if (isWVec(keyIn))
return wvecs[toLower(keyIn)].valNow;
1468 infoPtr->errorMsg(
"Error in Settings::wvec: unknown key", keyIn);
1469 return vector<string>(1,
" ");
1476 bool Settings::flagDefault(
string keyIn) {
1477 if (isFlag(keyIn))
return flags[toLower(keyIn)].valDefault;
1478 infoPtr->errorMsg(
"Error in Settings::flagDefault: unknown key", keyIn);
1482 int Settings::modeDefault(
string keyIn) {
1483 if (isMode(keyIn))
return modes[toLower(keyIn)].valDefault;
1484 infoPtr->errorMsg(
"Error in Settings::modeDefault: unknown key", keyIn);
1488 double Settings::parmDefault(
string keyIn) {
1489 if (isParm(keyIn))
return parms[toLower(keyIn)].valDefault;
1490 infoPtr->errorMsg(
"Error in Settings::parmDefault: unknown key", keyIn);
1494 string Settings::wordDefault(
string keyIn) {
1495 if (isWord(keyIn))
return words[toLower(keyIn)].valDefault;
1496 infoPtr->errorMsg(
"Error in Settings::wordDefault: unknown key", keyIn);
1500 vector<bool> Settings::fvecDefault(
string keyIn) {
1501 if (isFVec(keyIn))
return fvecs[toLower(keyIn)].valDefault;
1502 infoPtr->errorMsg(
"Error in Settings::fvecDefault: unknown key", keyIn);
1503 return vector<bool>(1,
false);
1506 vector<int> Settings::mvecDefault(
string keyIn) {
1507 if (isMVec(keyIn))
return mvecs[toLower(keyIn)].valDefault;
1508 infoPtr->errorMsg(
"Error in Settings::mvecDefault: unknown key", keyIn);
1509 return vector<int>(1, 0);
1512 vector<double> Settings::pvecDefault(
string keyIn) {
1513 if (isPVec(keyIn))
return pvecs[toLower(keyIn)].valDefault;
1514 infoPtr->errorMsg(
"Error in Settings::pvecDefault: unknown key", keyIn);
1515 return vector<double>(1, 0.);
1518 vector<string> Settings::wvecDefault(
string keyIn) {
1519 if (isWVec(keyIn))
return wvecs[toLower(keyIn)].valDefault;
1520 infoPtr->errorMsg(
"Error in Settings::wvecDefault: unknown key", keyIn);
1521 return vector<string>(1,
" ");
1528 map<string, Flag> Settings::getFlagMap(
string match) {
1531 map<string, Flag> flagMap;
1533 for (map<string,Flag>::iterator flagEntry = flags.begin();
1534 flagEntry != flags.end(); ++flagEntry)
1535 if (flagEntry->first.find(match) != string::npos)
1536 flagMap[flagEntry->first] = flagEntry->second;
1540 map<string, Mode> Settings::getModeMap(
string match) {
1543 map<string, Mode> modeMap;
1545 for (map<string,Mode>::iterator modeEntry = modes.begin();
1546 modeEntry != modes.end(); ++modeEntry)
1547 if (modeEntry->first.find(match) != string::npos)
1548 modeMap[modeEntry->first] = modeEntry->second;
1552 map<string, Parm> Settings::getParmMap(
string match) {
1555 map<string, Parm> parmMap;
1557 for (map<string,Parm>::iterator parmEntry = parms.begin();
1558 parmEntry != parms.end(); ++parmEntry)
1559 if (parmEntry->first.find(match) != string::npos)
1560 parmMap[parmEntry->first] = parmEntry->second;
1564 map<string, Word> Settings::getWordMap(
string match) {
1567 map<string, Word> wordMap;
1569 for (map<string,Word>::iterator wordEntry = words.begin();
1570 wordEntry != words.end(); ++wordEntry)
1571 if (wordEntry->first.find(match) != string::npos)
1572 wordMap[wordEntry->first] = wordEntry->second;
1576 map<string, FVec> Settings::getFVecMap(
string match) {
1579 map<string, FVec> fvecMap;
1581 for (map<string,FVec>::iterator fvecEntry = fvecs.begin();
1582 fvecEntry != fvecs.end(); ++fvecEntry)
1583 if (fvecEntry->first.find(match) != string::npos)
1584 fvecMap[fvecEntry->first] = fvecEntry->second;
1588 map<string, MVec> Settings::getMVecMap(
string match) {
1591 map<string, MVec> mvecMap;
1593 for (map<string,MVec>::iterator mvecEntry = mvecs.begin();
1594 mvecEntry != mvecs.end(); ++mvecEntry)
1595 if (mvecEntry->first.find(match) != string::npos)
1596 mvecMap[mvecEntry->first] = mvecEntry->second;
1600 map<string, PVec> Settings::getPVecMap(
string match) {
1603 map<string, PVec> pvecMap;
1605 for (map<string,PVec>::iterator pvecEntry = pvecs.begin();
1606 pvecEntry != pvecs.end(); ++pvecEntry)
1607 if (pvecEntry->first.find(match) != string::npos)
1608 pvecMap[pvecEntry->first] = pvecEntry->second;
1612 map<string, WVec> Settings::getWVecMap(
string match) {
1615 map<string, WVec> wvecMap;
1617 for (map<string,WVec>::iterator wvecEntry = wvecs.begin();
1618 wvecEntry != wvecs.end(); ++wvecEntry)
1619 if (wvecEntry->first.find(match) != string::npos)
1620 wvecMap[wvecEntry->first] = wvecEntry->second;
1629 void Settings::flag(
string keyIn,
bool nowIn,
bool force) {
1630 string keyLower = toLower(keyIn);
1631 if (isFlag(keyIn)) flags[keyLower].valNow = nowIn;
1632 else if (force) addFlag( keyIn, nowIn);
1634 if (keyLower ==
"print:quiet") printQuiet( nowIn);
1637 bool Settings::mode(
string keyIn,
int nowIn,
bool force) {
1638 if (isMode(keyIn)) {
1639 string keyLower = toLower(keyIn);
1640 Mode& modeNow = modes[keyLower];
1642 if (!force && modeNow.optOnly
1643 && (nowIn < modeNow.valMin || nowIn > modeNow.valMax) )
return false;
1644 if (!force && modeNow.hasMin && nowIn < modeNow.valMin)
1645 modeNow.valNow = modeNow.valMin;
1646 else if (!force && modeNow.hasMax && nowIn > modeNow.valMax)
1647 modeNow.valNow = modeNow.valMax;
1648 else modeNow.valNow = nowIn;
1650 if (keyLower ==
"tune:ee") initTuneEE( modeNow.valNow);
1651 if (keyLower ==
"tune:pp") initTunePP( modeNow.valNow);
1654 addMode(keyIn, nowIn,
false,
false, 0, 0);
1659 void Settings::parm(
string keyIn,
double nowIn,
bool force) {
1660 if (isParm(keyIn)) {
1661 Parm& parmNow = parms[toLower(keyIn)];
1662 if (!force && parmNow.hasMin && nowIn < parmNow.valMin)
1663 parmNow.valNow = parmNow.valMin;
1664 else if (!force && parmNow.hasMax && nowIn > parmNow.valMax)
1665 parmNow.valNow = parmNow.valMax;
1666 else parmNow.valNow = nowIn;
1669 addParm(keyIn, nowIn,
false,
false, 0., 0.);
1673 void Settings::word(
string keyIn,
string nowIn,
bool force) {
1674 if (isWord(keyIn)) words[toLower(keyIn)].valNow = nowIn;
1675 else if (force) addWord(keyIn, nowIn);
1678 void Settings::fvec(
string keyIn, vector<bool> nowIn,
bool force) {
1679 if (isFVec(keyIn)) {
1680 FVec& fvecNow = fvecs[toLower(keyIn)];
1681 fvecNow.valNow.clear();
1682 for (vector<bool>::iterator now = nowIn.begin();
1683 now != nowIn.end(); now++)
1684 fvecNow.valNow.push_back(*now);
1686 else if (force) addFVec(keyIn, nowIn);
1689 void Settings::mvec(
string keyIn, vector<int> nowIn,
bool force) {
1690 if (isMVec(keyIn)) {
1691 MVec& mvecNow = mvecs[toLower(keyIn)];
1692 mvecNow.valNow.clear();
1693 for (vector<int>::iterator now = nowIn.begin();
1694 now != nowIn.end(); now++) {
1695 if (!force && mvecNow.hasMin && *now < mvecNow.valMin)
1696 mvecNow.valNow.push_back(mvecNow.valMin);
1697 else if (!force && mvecNow.hasMax && *now > mvecNow.valMax)
1698 mvecNow.valNow.push_back(mvecNow.valMax);
1699 else mvecNow.valNow.push_back(*now);
1702 else if (force) addMVec(keyIn, nowIn,
false,
false, 0, 0);
1705 void Settings::pvec(
string keyIn, vector<double> nowIn,
bool force) {
1706 if (isPVec(keyIn)) {
1707 PVec& pvecNow = pvecs[toLower(keyIn)];
1708 pvecNow.valNow.clear();
1709 for (vector<double>::iterator now = nowIn.begin();
1710 now != nowIn.end(); now++) {
1711 if (!force && pvecNow.hasMin && *now < pvecNow.valMin)
1712 pvecNow.valNow.push_back(pvecNow.valMin);
1713 else if (!force && pvecNow.hasMax && *now > pvecNow.valMax)
1714 pvecNow.valNow.push_back(pvecNow.valMax);
1715 else pvecNow.valNow.push_back(*now);
1718 else if (force) addPVec(keyIn, nowIn,
false,
false, 0., 0.);
1721 void Settings::wvec(
string keyIn, vector<string> nowIn,
bool force) {
1722 if (isWVec(keyIn)) {
1723 WVec& wvecNow = wvecs[toLower(keyIn)];
1724 wvecNow.valNow.clear();
1725 for (vector<string>::iterator now = nowIn.begin();
1726 now != nowIn.end(); now++)
1727 wvecNow.valNow.push_back(*now);
1729 else if (force) addWVec(keyIn, nowIn);
1736 void Settings::resetFlag(
string keyIn) {
1737 if (isFlag(keyIn)) flags[toLower(keyIn)].valNow
1738 = flags[toLower(keyIn)].valDefault ;
1741 void Settings::resetMode(
string keyIn) {
1742 string keyLower = toLower(keyIn);
1743 if (isMode(keyIn)) modes[keyLower].valNow
1744 = modes[toLower(keyIn)].valDefault ;
1746 if (keyLower ==
"tune:ee") resetTuneEE();
1747 if (keyLower ==
"tune:pp") resetTunePP();
1750 void Settings::resetParm(
string keyIn) {
1751 if (isParm(keyIn)) parms[toLower(keyIn)].valNow
1752 = parms[toLower(keyIn)].valDefault ;
1755 void Settings::resetWord(
string keyIn) {
1756 if (isWord(keyIn)) words[toLower(keyIn)].valNow
1757 = words[toLower(keyIn)].valDefault ;
1760 void Settings::resetFVec(
string keyIn) {
1761 if (isFVec(keyIn)) fvecs[toLower(keyIn)].valNow
1762 = fvecs[toLower(keyIn)].valDefault ;
1765 void Settings::resetMVec(
string keyIn) {
1766 if (isMVec(keyIn)) mvecs[toLower(keyIn)].valNow
1767 = mvecs[toLower(keyIn)].valDefault ;
1770 void Settings::resetPVec(
string keyIn) {
1771 if (isPVec(keyIn)) pvecs[toLower(keyIn)].valNow
1772 = pvecs[toLower(keyIn)].valDefault ;
1775 void Settings::resetWVec(
string keyIn) {
1776 if (isWVec(keyIn)) wvecs[toLower(keyIn)].valNow
1777 = wvecs[toLower(keyIn)].valDefault ;
1785 bool Settings::hasHardProc() {
1788 string flagList[26] = {
"hardqcd",
"promptphoton",
"weakbosonexchange",
1789 "weaksingleboson",
"weakdoubleboson",
"weakbosonandparton",
1790 "photoncollision",
"photonparton",
"onia:all",
"charmonium:all",
1791 "bottomonium:all",
"top",
"fourthbottom",
"fourthtop",
"fourthpair",
1792 "higgssm",
"higgsbsm",
"susy",
"newgaugeboson",
"leftrightsymmetry",
1793 "leptoquark",
"excitedfermion",
"contactinteractions",
"hiddenvalley",
1794 "extradimensions",
"dm:" };
1796 string flagExclude[2] = {
"extradimensionsg*:vlvl",
"higgssm:nlowidths"};
1797 int sizeExclude = 2;
1800 for (map<string,Flag>::iterator flagEntry = flags.begin();
1801 flagEntry != flags.end(); ++flagEntry) {
1802 string flagName = flagEntry->first;
1803 bool doExclude =
false;
1804 for (
int i = 0; i < sizeExclude; ++i)
1805 if (flagName.find( flagExclude[i]) != string::npos) doExclude =
true;
1806 if (doExclude)
continue;
1807 for (
int i = 0; i < sizeList; ++i)
1808 if (flagName.find( flagList[i]) != string::npos
1809 && flagEntry->second.valNow ==
true)
return true;
1821 void Settings::printQuiet(
bool quiet) {
1825 flag(
"Init:showProcesses",
false );
1826 flag(
"Init:showMultipartonInteractions",
false );
1827 flag(
"Init:showChangedSettings",
false );
1828 flag(
"Init:showAllSettings",
false );
1829 flag(
"Init:showChangedParticleData",
false );
1830 flag(
"Init:showChangedResonanceData",
false );
1831 flag(
"Init:showAllParticleData",
false );
1832 mode(
"Init:showOneParticleData", 0 );
1833 mode(
"Next:numberCount", 0 );
1834 mode(
"Next:numberShowLHA", 0 );
1835 mode(
"Next:numberShowInfo", 0 );
1836 mode(
"Next:numberShowProcess", 0 );
1837 mode(
"Next:numberShowEvent", 0 );
1841 resetFlag(
"Init:showProcesses");
1842 resetFlag(
"Init:showMultipartonInteractions");
1843 resetFlag(
"Init:showChangedSettings");
1844 resetFlag(
"Init:showAllSettings");
1845 resetFlag(
"Init:showChangedParticleData");
1846 resetFlag(
"Init:showChangedResonanceData");
1847 resetFlag(
"Init:showAllParticleData");
1848 resetMode(
"Init:showOneParticleData");
1849 resetMode(
"Next:numberCount");
1850 resetMode(
"Next:numberShowLHA");
1851 resetMode(
"Next:numberShowInfo");
1852 resetMode(
"Next:numberShowProcess");
1853 resetMode(
"Next:numberShowEvent");
1862 void Settings::resetTuneEE() {
1865 resetParm(
"StringFlav:probStoUD");
1866 resetParm(
"StringFlav:probQQtoQ");
1867 resetParm(
"StringFlav:probSQtoQQ");
1868 resetParm(
"StringFlav:probQQ1toQQ0");
1869 resetParm(
"StringFlav:mesonUDvector");
1870 resetParm(
"StringFlav:mesonSvector");
1871 resetParm(
"StringFlav:mesonCvector");
1872 resetParm(
"StringFlav:mesonBvector");
1873 resetParm(
"StringFlav:etaSup");
1874 resetParm(
"StringFlav:etaPrimeSup");
1875 resetParm(
"StringFlav:popcornSpair");
1876 resetParm(
"StringFlav:popcornSmeson");
1877 resetFlag(
"StringFlav:suppressLeadingB");
1880 resetParm(
"StringZ:aLund");
1881 resetParm(
"StringZ:bLund");
1882 resetParm(
"StringZ:aExtraSquark");
1883 resetParm(
"StringZ:aExtraDiquark");
1884 resetParm(
"StringZ:rFactC");
1885 resetParm(
"StringZ:rFactB");
1888 resetParm(
"StringPT:sigma");
1889 resetParm(
"StringPT:enhancedFraction");
1890 resetParm(
"StringPT:enhancedWidth");
1893 resetParm(
"TimeShower:alphaSvalue");
1894 resetMode(
"TimeShower:alphaSorder");
1895 resetFlag(
"TimeShower:alphaSuseCMW");
1896 resetParm(
"TimeShower:pTmin");
1897 resetParm(
"TimeShower:pTminChgQ");
1905 void Settings::resetTunePP() {
1908 resetWord(
"PDF:pSet");
1911 resetParm(
"SigmaProcess:alphaSvalue");
1914 resetFlag(
"SigmaTotal:zeroAXB");
1915 resetFlag(
"SigmaDiffractive:dampen");
1916 resetParm(
"SigmaDiffractive:maxXB");
1917 resetParm(
"SigmaDiffractive:maxAX");
1918 resetParm(
"SigmaDiffractive:maxXX");
1919 resetParm(
"Diffraction:largeMassSuppress");
1922 resetFlag(
"TimeShower:dampenBeamRecoil");
1923 resetFlag(
"TimeShower:phiPolAsym");
1926 resetParm(
"SpaceShower:alphaSvalue");
1927 resetMode(
"SpaceShower:alphaSorder");
1928 resetParm(
"SpaceShower:alphaSuseCMW");
1929 resetFlag(
"SpaceShower:samePTasMPI");
1930 resetParm(
"SpaceShower:pT0Ref");
1931 resetParm(
"SpaceShower:ecmRef");
1932 resetParm(
"SpaceShower:ecmPow");
1933 resetParm(
"SpaceShower:pTmaxFudge");
1934 resetParm(
"SpaceShower:pTdampFudge");
1935 resetFlag(
"SpaceShower:rapidityOrder");
1936 resetFlag(
"SpaceShower:rapidityOrderMPI");
1937 resetFlag(
"SpaceShower:phiPolAsym");
1938 resetFlag(
"SpaceShower:phiIntAsym");
1941 resetParm(
"MultipartonInteractions:alphaSvalue");
1942 resetParm(
"MultipartonInteractions:pT0Ref");
1943 resetParm(
"MultipartonInteractions:ecmRef");
1944 resetParm(
"MultipartonInteractions:ecmPow");
1945 resetMode(
"MultipartonInteractions:bProfile");
1946 resetParm(
"MultipartonInteractions:expPow");
1947 resetParm(
"MultipartonInteractions:a1");
1950 resetParm(
"BeamRemnants:primordialKTsoft");
1951 resetParm(
"BeamRemnants:primordialKThard");
1952 resetParm(
"BeamRemnants:halfScaleForKT");
1953 resetParm(
"BeamRemnants:halfMassForKT");
1956 resetMode(
"ColourReconnection:mode");
1957 resetParm(
"ColourReconnection:range");
1966 void Settings::initTuneEE(
int eeTune) {
1969 if (eeTune == 0)
return;
1978 parm(
"StringFlav:probStoUD", 0.30 );
1979 parm(
"StringFlav:probQQtoQ", 0.10 );
1980 parm(
"StringFlav:probSQtoQQ", 0.40 );
1981 parm(
"StringFlav:probQQ1toQQ0", 0.05 );
1982 parm(
"StringFlav:mesonUDvector", 1.00 );
1983 parm(
"StringFlav:mesonSvector", 1.50 );
1984 parm(
"StringFlav:mesonCvector", 2.50 );
1985 parm(
"StringFlav:mesonBvector", 3.00 );
1986 parm(
"StringFlav:etaSup", 1.00 );
1987 parm(
"StringFlav:etaPrimeSup", 0.40 );
1988 parm(
"StringFlav:popcornSpair", 0.50 );
1989 parm(
"StringFlav:popcornSmeson", 0.50 );
1990 flag(
"StringFlav:suppressLeadingB",
false );
1991 parm(
"StringZ:aLund", 0.30 );
1992 parm(
"StringZ:bLund", 0.58 );
1993 parm(
"StringZ:aExtraSquark", 0.00 );
1994 parm(
"StringZ:aExtraDiquark", 0.50 );
1995 parm(
"StringZ:rFactC", 1.00 );
1996 parm(
"StringZ:rFactB", 1.00 );
1997 parm(
"StringPT:sigma", 0.36 );
1998 parm(
"StringPT:enhancedFraction", 0.01 );
1999 parm(
"StringPT:enhancedWidth", 2.0 );
2000 parm(
"TimeShower:alphaSvalue", 0.137 );
2001 mode(
"TimeShower:alphaSorder", 1 );
2002 flag(
"TimeShower:alphaSuseCMW",
false );
2003 parm(
"TimeShower:pTmin", 0.5 );
2004 parm(
"TimeShower:pTminChgQ", 0.5 );
2008 else if (eeTune == 2) {
2009 parm(
"StringFlav:probStoUD", 0.22 );
2010 parm(
"StringFlav:probQQtoQ", 0.08 );
2011 parm(
"StringFlav:probSQtoQQ", 0.75 );
2012 parm(
"StringFlav:probQQ1toQQ0", 0.025 );
2013 parm(
"StringFlav:mesonUDvector", 0.5 );
2014 parm(
"StringFlav:mesonSvector", 0.6 );
2015 parm(
"StringFlav:mesonCvector", 1.5 );
2016 parm(
"StringFlav:mesonBvector", 2.5 );
2017 parm(
"StringFlav:etaSup", 0.60 );
2018 parm(
"StringFlav:etaPrimeSup", 0.15 );
2019 parm(
"StringFlav:popcornSpair", 1.0 );
2020 parm(
"StringFlav:popcornSmeson", 1.0 );
2021 flag(
"StringFlav:suppressLeadingB",
false );
2022 parm(
"StringZ:aLund", 0.76 );
2023 parm(
"StringZ:bLund", 0.58 );
2024 parm(
"StringZ:aExtraSquark", 0.00 );
2025 parm(
"StringZ:aExtraDiquark", 0.50 );
2026 parm(
"StringZ:rFactC", 1.00 );
2027 parm(
"StringZ:rFactB", 1.00 );
2028 parm(
"StringPT:sigma", 0.36 );
2029 parm(
"StringPT:enhancedFraction", 0.01 );
2030 parm(
"StringPT:enhancedWidth", 2.0 );
2031 parm(
"TimeShower:alphaSvalue", 0.137 );
2032 mode(
"TimeShower:alphaSorder", 1 );
2033 flag(
"TimeShower:alphaSuseCMW",
false );
2034 parm(
"TimeShower:pTmin", 0.5 );
2035 parm(
"TimeShower:pTminChgQ", 0.5 );
2040 else if (eeTune == 3) {
2041 parm(
"StringFlav:probStoUD", 0.19 );
2042 parm(
"StringFlav:probQQtoQ", 0.09 );
2043 parm(
"StringFlav:probSQtoQQ", 1.00 );
2044 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
2045 parm(
"StringFlav:mesonUDvector", 0.62 );
2046 parm(
"StringFlav:mesonSvector", 0.725 );
2047 parm(
"StringFlav:mesonCvector", 1.06 );
2048 parm(
"StringFlav:mesonBvector", 3.0 );
2049 parm(
"StringFlav:etaSup", 0.63 );
2050 parm(
"StringFlav:etaPrimeSup", 0.12 );
2051 parm(
"StringFlav:popcornSpair", 0.5 );
2052 parm(
"StringFlav:popcornSmeson", 0.5 );
2053 flag(
"StringFlav:suppressLeadingB",
false );
2054 parm(
"StringZ:aLund", 0.3 );
2055 parm(
"StringZ:bLund", 0.8 );
2056 parm(
"StringZ:aExtraSquark", 0.00 );
2057 parm(
"StringZ:aExtraDiquark", 0.50 );
2058 parm(
"StringZ:rFactC", 1.00 );
2059 parm(
"StringZ:rFactB", 0.67 );
2060 parm(
"StringPT:sigma", 0.304 );
2061 parm(
"StringPT:enhancedFraction", 0.01 );
2062 parm(
"StringPT:enhancedWidth", 2.0 );
2063 parm(
"TimeShower:alphaSvalue", 0.1383);
2064 mode(
"TimeShower:alphaSorder", 1 );
2065 flag(
"TimeShower:alphaSuseCMW",
false );
2066 parm(
"TimeShower:pTmin", 0.4 );
2067 parm(
"TimeShower:pTminChgQ", 0.4 );
2072 else if (eeTune == 4) {
2073 parm(
"StringFlav:probStoUD", 0.21 );
2074 parm(
"StringFlav:probQQtoQ", 0.086 );
2075 parm(
"StringFlav:probSQtoQQ", 1.00 );
2076 parm(
"StringFlav:probQQ1toQQ0", 0.031 );
2077 parm(
"StringFlav:mesonUDvector", 0.45 );
2078 parm(
"StringFlav:mesonSvector", 0.60 );
2079 parm(
"StringFlav:mesonCvector", 0.95 );
2080 parm(
"StringFlav:mesonBvector", 3.0 );
2081 parm(
"StringFlav:etaSup", 0.65 );
2082 parm(
"StringFlav:etaPrimeSup", 0.08 );
2083 parm(
"StringFlav:popcornSpair", 0.5 );
2084 parm(
"StringFlav:popcornSmeson", 0.5 );
2085 flag(
"StringFlav:suppressLeadingB",
false );
2086 parm(
"StringZ:aLund", 0.55 );
2087 parm(
"StringZ:bLund", 1.08 );
2088 parm(
"StringZ:aExtraSquark", 0.00 );
2089 parm(
"StringZ:aExtraDiquark", 1.00 );
2090 parm(
"StringZ:rFactC", 1.00 );
2091 parm(
"StringZ:rFactB", 0.85 );
2092 parm(
"StringPT:sigma", 0.305 );
2093 parm(
"StringPT:enhancedFraction", 0.01 );
2094 parm(
"StringPT:enhancedWidth", 2.0 );
2095 parm(
"TimeShower:alphaSvalue", 0.127 );
2096 mode(
"TimeShower:alphaSorder", 1 );
2097 flag(
"TimeShower:alphaSuseCMW",
true );
2098 parm(
"TimeShower:pTmin", 0.4 );
2099 parm(
"TimeShower:pTminChgQ", 0.4 );
2104 else if (eeTune == 5) {
2105 parm(
"StringFlav:probStoUD", 0.19 );
2106 parm(
"StringFlav:probQQtoQ", 0.09 );
2107 parm(
"StringFlav:probSQtoQQ", 1.00 );
2108 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
2109 parm(
"StringFlav:mesonUDvector", 0.62 );
2110 parm(
"StringFlav:mesonSvector", 0.725 );
2111 parm(
"StringFlav:mesonCvector", 1.06 );
2112 parm(
"StringFlav:mesonBvector", 3.0 );
2113 parm(
"StringFlav:etaSup", 0.63 );
2114 parm(
"StringFlav:etaPrimeSup", 0.12 );
2115 parm(
"StringFlav:popcornSpair", 0.5 );
2116 parm(
"StringFlav:popcornSmeson", 0.5 );
2117 flag(
"StringFlav:suppressLeadingB",
false );
2118 parm(
"StringZ:aLund", 0.386 );
2119 parm(
"StringZ:bLund", 0.977 );
2120 parm(
"StringZ:aExtraSquark", 0.00 );
2121 parm(
"StringZ:aExtraDiquark", 0.940 );
2122 parm(
"StringZ:rFactC", 1.00 );
2123 parm(
"StringZ:rFactB", 0.67 );
2124 parm(
"StringPT:sigma", 0.286 );
2125 parm(
"StringPT:enhancedFraction", 0.01 );
2126 parm(
"StringPT:enhancedWidth", 2.0 );
2127 parm(
"TimeShower:alphaSvalue", 0.139 );
2128 mode(
"TimeShower:alphaSorder", 1 );
2129 flag(
"TimeShower:alphaSuseCMW",
false );
2130 parm(
"TimeShower:pTmin", 0.409 );
2131 parm(
"TimeShower:pTminChgQ", 0.409 );
2136 else if (eeTune == 6) {
2137 parm(
"StringFlav:probStoUD", 0.19 );
2138 parm(
"StringFlav:probQQtoQ", 0.09 );
2139 parm(
"StringFlav:probSQtoQQ", 1.00 );
2140 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
2141 parm(
"StringFlav:mesonUDvector", 0.62 );
2142 parm(
"StringFlav:mesonSvector", 0.725 );
2143 parm(
"StringFlav:mesonCvector", 1.06 );
2144 parm(
"StringFlav:mesonBvector", 3.0 );
2145 parm(
"StringFlav:etaSup", 0.63 );
2146 parm(
"StringFlav:etaPrimeSup", 0.12 );
2147 parm(
"StringFlav:popcornSpair", 0.5 );
2148 parm(
"StringFlav:popcornSmeson", 0.5 );
2149 flag(
"StringFlav:suppressLeadingB",
false );
2150 parm(
"StringZ:aLund", 0.351 );
2151 parm(
"StringZ:bLund", 0.942 );
2152 parm(
"StringZ:aExtraSquark", 0.00 );
2153 parm(
"StringZ:aExtraDiquark", 0.547 );
2154 parm(
"StringZ:rFactC", 1.00 );
2155 parm(
"StringZ:rFactB", 0.67 );
2156 parm(
"StringPT:sigma", 0.283 );
2157 parm(
"StringPT:enhancedFraction", 0.01 );
2158 parm(
"StringPT:enhancedWidth", 2.0 );
2159 parm(
"TimeShower:alphaSvalue", 0.139);
2160 mode(
"TimeShower:alphaSorder", 1 );
2161 flag(
"TimeShower:alphaSuseCMW",
false );
2162 parm(
"TimeShower:pTmin", 0.406 );
2163 parm(
"TimeShower:pTminChgQ", 0.406 );
2167 else if (eeTune == 7) {
2168 parm(
"StringFlav:probStoUD", 0.217 );
2169 parm(
"StringFlav:probQQtoQ", 0.081 );
2170 parm(
"StringFlav:probSQtoQQ", 0.915 );
2171 parm(
"StringFlav:probQQ1toQQ0", 0.0275);
2172 parm(
"StringFlav:mesonUDvector", 0.50 );
2173 parm(
"StringFlav:mesonSvector", 0.55 );
2174 parm(
"StringFlav:mesonCvector", 0.88 );
2175 parm(
"StringFlav:mesonBvector", 2.20 );
2176 parm(
"StringFlav:etaSup", 0.60 );
2177 parm(
"StringFlav:etaPrimeSup", 0.12 );
2178 parm(
"StringFlav:popcornSpair", 0.90 );
2179 parm(
"StringFlav:popcornSmeson", 0.50 );
2180 flag(
"StringFlav:suppressLeadingB",
false );
2181 parm(
"StringZ:aLund", 0.68 );
2182 parm(
"StringZ:bLund", 0.98 );
2183 parm(
"StringZ:aExtraSquark", 0.00 );
2184 parm(
"StringZ:aExtraDiquark", 0.97 );
2185 parm(
"StringZ:rFactC", 1.32 );
2186 parm(
"StringZ:rFactB", 0.855 );
2187 parm(
"StringPT:sigma", 0.335 );
2188 parm(
"StringPT:enhancedFraction", 0.01 );
2189 parm(
"StringPT:enhancedWidth", 2.0 );
2190 parm(
"TimeShower:alphaSvalue", 0.1365);
2191 mode(
"TimeShower:alphaSorder", 1 );
2192 flag(
"TimeShower:alphaSuseCMW",
false );
2193 parm(
"TimeShower:pTmin", 0.5 );
2194 parm(
"TimeShower:pTminChgQ", 0.5 );
2204 void Settings::initTunePP(
int ppTune) {
2207 if (ppTune == 0)
return;
2216 if (ppTune == 14 || ppTune >= 18) eeTune = 7;
2218 mode(
"Tune:ee", eeTune );
2219 initTuneEE( eeTune);
2223 int preferLHAPDF = mode(
"Tune:preferLHAPDF");
2227 word(
"PDF:pSet",
"2" );
2228 parm(
"SigmaProcess:alphaSvalue", 0.1265);
2229 flag(
"SigmaTotal:zeroAXB",
true );
2230 flag(
"SigmaDiffractive:dampen",
false );
2231 parm(
"Diffraction:largeMassSuppress", 2.0 );
2232 flag(
"TimeShower:dampenBeamRecoil",
false );
2233 flag(
"TimeShower:phiPolAsym",
false );
2234 parm(
"SpaceShower:alphaSvalue", 0.127 );
2235 mode(
"SpaceShower:alphaSorder", 1 );
2236 flag(
"SpaceShower:alphaSuseCMW",
false );
2237 flag(
"SpaceShower:samePTasMPI",
true );
2238 parm(
"SpaceShower:pT0Ref", 2.2 );
2239 parm(
"SpaceShower:ecmRef", 1800.0);
2240 parm(
"SpaceShower:ecmPow", 0.16 );
2241 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2242 parm(
"SpaceShower:pTdampFudge", 1.0 );
2243 flag(
"SpaceShower:rapidityOrder",
false );
2244 flag(
"SpaceShower:rapidityOrderMPI",
false );
2245 flag(
"SpaceShower:phiPolAsym",
false );
2246 flag(
"SpaceShower:phiIntAsym",
false );
2247 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
2248 parm(
"MultipartonInteractions:pT0Ref", 2.15 );
2249 parm(
"MultipartonInteractions:ecmRef", 1800. );
2250 parm(
"MultipartonInteractions:ecmPow", 0.16 );
2251 mode(
"MultipartonInteractions:bProfile", 2 );
2252 parm(
"MultipartonInteractions:expPow", 1.0 );
2253 parm(
"MultipartonInteractions:a1", 0.15 );
2254 parm(
"BeamRemnants:primordialKTsoft", 0.4 );
2255 parm(
"BeamRemnants:primordialKThard", 2.1 );
2256 parm(
"BeamRemnants:halfScaleForKT", 7.0 );
2257 parm(
"BeamRemnants:halfMassForKT", 2.0 );
2258 mode(
"ColourReconnection:mode", 0 );
2259 parm(
"ColourReconnection:range", 2.5 );
2263 else if (ppTune == 2) {
2264 word(
"PDF:pSet",
"2" );
2265 parm(
"SigmaProcess:alphaSvalue", 0.1265);
2266 flag(
"SigmaTotal:zeroAXB",
true );
2267 flag(
"SigmaDiffractive:dampen",
false );
2268 parm(
"Diffraction:largeMassSuppress", 2.0 );
2269 flag(
"TimeShower:dampenBeamRecoil",
false );
2270 flag(
"TimeShower:phiPolAsym",
false );
2271 parm(
"SpaceShower:alphaSvalue", 0.137 );
2272 mode(
"SpaceShower:alphaSorder", 1 );
2273 flag(
"SpaceShower:alphaSuseCMW",
false );
2274 flag(
"SpaceShower:samePTasMPI",
false );
2275 parm(
"SpaceShower:pT0Ref", 2.0 );
2276 parm(
"SpaceShower:ecmRef", 1800.0);
2277 parm(
"SpaceShower:ecmPow", 0.0 );
2278 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2279 parm(
"SpaceShower:pTdampFudge", 1.0 );
2280 flag(
"SpaceShower:rapidityOrder",
false );
2281 flag(
"SpaceShower:rapidityOrderMPI",
false );
2282 flag(
"SpaceShower:phiPolAsym",
false );
2283 flag(
"SpaceShower:phiIntAsym",
false );
2284 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
2285 parm(
"MultipartonInteractions:pT0Ref", 2.25 );
2286 parm(
"MultipartonInteractions:ecmRef", 1800. );
2287 parm(
"MultipartonInteractions:ecmPow", 0.24 );
2288 mode(
"MultipartonInteractions:bProfile", 1 );
2289 parm(
"MultipartonInteractions:expPow", 1.0 );
2290 parm(
"MultipartonInteractions:a1", 0.15 );
2291 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2292 parm(
"BeamRemnants:primordialKThard", 2.0 );
2293 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2294 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2295 mode(
"ColourReconnection:mode", 0 );
2296 parm(
"ColourReconnection:range", 10.0 );
2300 else if (ppTune == 3) {
2301 word(
"PDF:pSet",
"8" );
2302 parm(
"SigmaProcess:alphaSvalue", 0.135 );
2303 flag(
"SigmaTotal:zeroAXB",
true );
2304 flag(
"SigmaDiffractive:dampen",
false );
2305 parm(
"Diffraction:largeMassSuppress", 2.0 );
2306 flag(
"TimeShower:dampenBeamRecoil",
true );
2307 flag(
"TimeShower:phiPolAsym",
true );
2308 parm(
"SpaceShower:alphaSvalue", 0.137 );
2309 mode(
"SpaceShower:alphaSorder", 1 );
2310 flag(
"SpaceShower:alphaSuseCMW",
false );
2311 flag(
"SpaceShower:samePTasMPI",
false );
2312 parm(
"SpaceShower:pT0Ref", 2.0 );
2313 parm(
"SpaceShower:ecmRef", 1800.0);
2314 parm(
"SpaceShower:ecmPow", 0.0 );
2315 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2316 parm(
"SpaceShower:pTdampFudge", 1.0 );
2317 flag(
"SpaceShower:rapidityOrder",
true );
2318 flag(
"SpaceShower:rapidityOrderMPI",
true );
2319 flag(
"SpaceShower:phiPolAsym",
true );
2320 flag(
"SpaceShower:phiIntAsym",
true );
2321 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
2322 parm(
"MultipartonInteractions:pT0Ref", 2.32 );
2323 parm(
"MultipartonInteractions:ecmRef", 1800. );
2324 parm(
"MultipartonInteractions:ecmPow", 0.21 );
2325 mode(
"MultipartonInteractions:bProfile", 3 );
2326 parm(
"MultipartonInteractions:expPow", 1.6 );
2327 parm(
"MultipartonInteractions:a1", 0.15 );
2328 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2329 parm(
"BeamRemnants:primordialKThard", 2.0 );
2330 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2331 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2332 mode(
"ColourReconnection:mode", 0 );
2333 parm(
"ColourReconnection:range", 3.0 );
2337 else if (ppTune == 4) {
2338 word(
"PDF:pSet",
"4" );
2339 parm(
"SigmaProcess:alphaSvalue", 0.1265);
2340 flag(
"SigmaTotal:zeroAXB",
true );
2341 flag(
"SigmaDiffractive:dampen",
false );
2342 parm(
"Diffraction:largeMassSuppress", 2.0 );
2343 flag(
"TimeShower:dampenBeamRecoil",
true );
2344 flag(
"TimeShower:phiPolAsym",
true );
2345 parm(
"SpaceShower:alphaSvalue", 0.130 );
2346 mode(
"SpaceShower:alphaSorder", 1 );
2347 flag(
"SpaceShower:alphaSuseCMW",
false );
2348 flag(
"SpaceShower:samePTasMPI",
false );
2349 parm(
"SpaceShower:pT0Ref", 2.0 );
2350 parm(
"SpaceShower:ecmRef", 1800.0);
2351 parm(
"SpaceShower:ecmPow", 0.0 );
2352 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2353 parm(
"SpaceShower:pTdampFudge", 1.0 );
2354 flag(
"SpaceShower:rapidityOrder",
true );
2355 flag(
"SpaceShower:rapidityOrderMPI",
true );
2356 flag(
"SpaceShower:phiPolAsym",
true );
2357 flag(
"SpaceShower:phiIntAsym",
true );
2358 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
2359 parm(
"MultipartonInteractions:pT0Ref", 2.455 );
2360 parm(
"MultipartonInteractions:ecmRef", 1800. );
2361 parm(
"MultipartonInteractions:ecmPow", 0.26 );
2362 mode(
"MultipartonInteractions:bProfile", 3 );
2363 parm(
"MultipartonInteractions:expPow", 1.15 );
2364 parm(
"MultipartonInteractions:a1", 0.15 );
2365 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2366 parm(
"BeamRemnants:primordialKThard", 2.0 );
2367 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2368 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2369 mode(
"ColourReconnection:mode", 0 );
2370 parm(
"ColourReconnection:range", 3.0 );
2374 else if (ppTune == 5) {
2375 word(
"PDF:pSet",
"8" );
2376 parm(
"SigmaProcess:alphaSvalue", 0.135 );
2377 flag(
"SigmaTotal:zeroAXB",
true );
2378 flag(
"SigmaDiffractive:dampen",
true );
2379 parm(
"SigmaDiffractive:maxXB", 65.0 );
2380 parm(
"SigmaDiffractive:maxAX", 65.0 );
2381 parm(
"SigmaDiffractive:maxXX", 65.0 );
2382 parm(
"Diffraction:largeMassSuppress", 2.0 );
2383 flag(
"TimeShower:dampenBeamRecoil",
true );
2384 flag(
"TimeShower:phiPolAsym",
true );
2385 parm(
"SpaceShower:alphaSvalue", 0.137 );
2386 mode(
"SpaceShower:alphaSorder", 1 );
2387 flag(
"SpaceShower:alphaSuseCMW",
false );
2388 flag(
"SpaceShower:samePTasMPI",
false );
2389 parm(
"SpaceShower:pT0Ref", 2.0 );
2390 parm(
"SpaceShower:ecmRef", 1800.0);
2391 parm(
"SpaceShower:ecmPow", 0.0 );
2392 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2393 parm(
"SpaceShower:pTdampFudge", 1.0 );
2394 flag(
"SpaceShower:rapidityOrder",
true );
2395 flag(
"SpaceShower:rapidityOrderMPI",
true );
2396 flag(
"SpaceShower:phiPolAsym",
true );
2397 flag(
"SpaceShower:phiIntAsym",
true );
2398 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
2399 parm(
"MultipartonInteractions:pT0Ref", 2.085 );
2400 parm(
"MultipartonInteractions:ecmRef", 1800. );
2401 parm(
"MultipartonInteractions:ecmPow", 0.19 );
2402 mode(
"MultipartonInteractions:bProfile", 3 );
2403 parm(
"MultipartonInteractions:expPow", 2.0 );
2404 parm(
"MultipartonInteractions:a1", 0.15 );
2405 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2406 parm(
"BeamRemnants:primordialKThard", 2.0 );
2407 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2408 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2409 mode(
"ColourReconnection:mode", 0 );
2410 parm(
"ColourReconnection:range", 1.5 );
2414 else if (ppTune == 6) {
2415 word(
"PDF:pSet",
"8" );
2416 parm(
"SigmaProcess:alphaSvalue", 0.135 );
2417 flag(
"SigmaTotal:zeroAXB",
true );
2418 flag(
"SigmaDiffractive:dampen",
true );
2419 parm(
"SigmaDiffractive:maxXB", 65.0 );
2420 parm(
"SigmaDiffractive:maxAX", 65.0 );
2421 parm(
"SigmaDiffractive:maxXX", 65.0 );
2422 parm(
"Diffraction:largeMassSuppress", 2.0 );
2423 flag(
"TimeShower:dampenBeamRecoil",
true );
2424 flag(
"TimeShower:phiPolAsym",
true );
2425 parm(
"SpaceShower:alphaSvalue", 0.137 );
2426 mode(
"SpaceShower:alphaSorder", 1 );
2427 flag(
"SpaceShower:alphaSuseCMW",
false );
2428 flag(
"SpaceShower:samePTasMPI",
false );
2429 parm(
"SpaceShower:pT0Ref", 2.0 );
2430 parm(
"SpaceShower:ecmRef", 1800.0);
2431 parm(
"SpaceShower:ecmPow", 0.0 );
2432 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2433 parm(
"SpaceShower:pTdampFudge", 1.0 );
2434 flag(
"SpaceShower:rapidityOrder",
true );
2435 flag(
"SpaceShower:rapidityOrderMPI",
true );
2436 flag(
"SpaceShower:phiPolAsym",
true );
2437 flag(
"SpaceShower:phiIntAsym",
true );
2438 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
2439 parm(
"MultipartonInteractions:pT0Ref", 2.15 );
2440 parm(
"MultipartonInteractions:ecmRef", 1800. );
2441 parm(
"MultipartonInteractions:ecmPow", 0.19 );
2442 mode(
"MultipartonInteractions:bProfile", 4 );
2443 parm(
"MultipartonInteractions:expPow", 1.0 );
2444 parm(
"MultipartonInteractions:a1", 0.15 );
2445 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2446 parm(
"BeamRemnants:primordialKThard", 2.0 );
2447 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2448 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2449 mode(
"ColourReconnection:mode", 0 );
2450 parm(
"ColourReconnection:range", 1.5 );
2454 else if (ppTune == 14) {
2455 word(
"PDF:pSet",
"13" );
2456 parm(
"SigmaProcess:alphaSvalue", 0.130 );
2457 flag(
"SigmaTotal:zeroAXB",
true );
2458 flag(
"SigmaDiffractive:dampen",
true );
2459 parm(
"SigmaDiffractive:maxXB", 65.0 );
2460 parm(
"SigmaDiffractive:maxAX", 65.0 );
2461 parm(
"SigmaDiffractive:maxXX", 65.0 );
2462 parm(
"Diffraction:largeMassSuppress", 4.0 );
2463 flag(
"TimeShower:dampenBeamRecoil",
true );
2464 flag(
"TimeShower:phiPolAsym",
true );
2465 parm(
"SpaceShower:alphaSvalue", 0.1365);
2466 mode(
"SpaceShower:alphaSorder", 1 );
2467 flag(
"SpaceShower:alphaSuseCMW",
false );
2468 flag(
"SpaceShower:samePTasMPI",
false );
2469 parm(
"SpaceShower:pT0Ref", 2.0 );
2470 parm(
"SpaceShower:ecmRef", 7000.0);
2471 parm(
"SpaceShower:ecmPow", 0.0 );
2472 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2473 parm(
"SpaceShower:pTdampFudge", 1.0 );
2474 flag(
"SpaceShower:rapidityOrder",
true );
2475 flag(
"SpaceShower:rapidityOrderMPI",
true );
2476 flag(
"SpaceShower:phiPolAsym",
true );
2477 flag(
"SpaceShower:phiIntAsym",
true );
2478 parm(
"MultipartonInteractions:alphaSvalue", 0.130 );
2479 parm(
"MultipartonInteractions:pT0Ref", 2.28 );
2480 parm(
"MultipartonInteractions:ecmRef", 7000. );
2481 parm(
"MultipartonInteractions:ecmPow", 0.215 );
2482 mode(
"MultipartonInteractions:bProfile", 3 );
2483 parm(
"MultipartonInteractions:expPow", 1.85 );
2484 parm(
"MultipartonInteractions:a1", 0.15 );
2485 parm(
"BeamRemnants:primordialKTsoft", 0.9 );
2486 parm(
"BeamRemnants:primordialKThard", 1.8 );
2487 parm(
"BeamRemnants:halfScaleForKT", 1.5 );
2488 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2489 mode(
"ColourReconnection:mode", 0 );
2490 parm(
"ColourReconnection:range", 1.80 );
2494 else if (ppTune > 0 && ppTune < 18) {
2495 parm(
"SigmaProcess:alphaSvalue", 0.135 );
2496 flag(
"SigmaTotal:zeroAXB",
true );
2497 flag(
"SigmaDiffractive:dampen",
true );
2498 parm(
"SigmaDiffractive:maxXB", 65.0 );
2499 parm(
"SigmaDiffractive:maxAX", 65.0 );
2500 parm(
"SigmaDiffractive:maxXX", 65.0 );
2501 parm(
"Diffraction:largeMassSuppress", 2.0 );
2502 flag(
"TimeShower:dampenBeamRecoil",
true );
2503 flag(
"TimeShower:phiPolAsym",
true );
2504 parm(
"SpaceShower:alphaSvalue", 0.137 );
2505 mode(
"SpaceShower:alphaSorder", 1 );
2506 flag(
"SpaceShower:alphaSuseCMW",
false );
2507 flag(
"SpaceShower:samePTasMPI",
false );
2508 parm(
"SpaceShower:pT0Ref", 2.0 );
2509 parm(
"SpaceShower:ecmRef", 1800.0);
2510 parm(
"SpaceShower:ecmPow", 0.0 );
2511 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2512 parm(
"SpaceShower:pTdampFudge", 1.0 );
2513 flag(
"SpaceShower:rapidityOrder",
true );
2514 flag(
"SpaceShower:rapidityOrderMPI",
true );
2515 flag(
"SpaceShower:phiPolAsym",
true );
2516 flag(
"SpaceShower:phiIntAsym",
true );
2517 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
2518 parm(
"MultipartonInteractions:pT0Ref", 2.085 );
2519 parm(
"MultipartonInteractions:ecmRef", 1800. );
2520 parm(
"MultipartonInteractions:ecmPow", 0.19 );
2521 mode(
"MultipartonInteractions:bProfile", 3 );
2522 parm(
"MultipartonInteractions:expPow", 2.0 );
2523 parm(
"MultipartonInteractions:a1", 0.15 );
2524 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
2525 parm(
"BeamRemnants:primordialKThard", 2.0 );
2526 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
2527 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2528 mode(
"ColourReconnection:mode", 0 );
2529 parm(
"ColourReconnection:range", 1.5 );
2535 if (preferLHAPDF == 1)
2536 word(
"PDF:pSet",
"LHAPDF5:cteq6ll.LHpdf");
2537 else if (preferLHAPDF == 2)
2538 word(
"PDF:pSet",
"LHAPDF6:cteq6l1");
2539 else word(
"PDF:pSet",
"8" );
2540 flag(
"SpaceShower:rapidityOrder",
false );
2541 flag(
"SpaceShower:rapidityOrderMPI",
false );
2542 parm(
"MultipartonInteractions:pT0Ref", 2.18 );
2543 parm(
"MultipartonInteractions:ecmPow", 0.22 );
2544 mode(
"MultipartonInteractions:bProfile", 4 );
2545 parm(
"MultipartonInteractions:expPow", 1.0 );
2546 parm(
"MultipartonInteractions:a1", 0.06 );
2547 parm(
"ColourReconnection:range", 1.55 );
2551 else if (ppTune == 8) {
2552 if (preferLHAPDF == 1)
2553 word(
"PDF:pSet",
"LHAPDF5:MSTW2008lo68cl.LHgrid");
2554 else if (preferLHAPDF == 2)
2555 word(
"PDF:pSet",
"LHAPDF6:MSTW2008lo68cl");
2556 else word(
"PDF:pSet",
"5" );
2557 flag(
"SpaceShower:rapidityOrder",
false );
2558 flag(
"SpaceShower:rapidityOrderMPI",
false );
2559 parm(
"MultipartonInteractions:pT0Ref", 1.90 );
2560 parm(
"MultipartonInteractions:ecmPow", 0.30 );
2561 mode(
"MultipartonInteractions:bProfile", 4 );
2562 parm(
"MultipartonInteractions:expPow", 1.0 );
2563 parm(
"MultipartonInteractions:a1", 0.03 );
2564 parm(
"ColourReconnection:range", 2.28 );
2569 if (preferLHAPDF == 1)
2570 word(
"PDF:pSet",
"LHAPDF5:cteq6ll.LHpdf");
2571 else if (preferLHAPDF == 2)
2572 word(
"PDF:pSet",
"LHAPDF6:cteq6l1");
2573 else word(
"PDF:pSet",
"8" );
2574 flag(
"SpaceShower:rapidityOrder",
false );
2575 flag(
"SpaceShower:rapidityOrderMPI",
false );
2576 parm(
"MultipartonInteractions:pT0Ref", 2.13 );
2577 parm(
"MultipartonInteractions:ecmPow", 0.21 );
2578 mode(
"MultipartonInteractions:bProfile", 4 );
2579 parm(
"MultipartonInteractions:expPow", 1.0 );
2580 parm(
"MultipartonInteractions:a1", 0.00 );
2581 parm(
"ColourReconnection:range", 2.21 );
2585 else if (ppTune == 10) {
2586 if (preferLHAPDF == 1)
2587 word(
"PDF:pSet",
"LHAPDF5:MSTW2008lo68cl.LHgrid");
2588 else if (preferLHAPDF == 2)
2589 word(
"PDF:pSet",
"LHAPDF6:MSTW2008lo68cl");
2590 else word(
"PDF:pSet",
"5" );
2591 flag(
"SpaceShower:rapidityOrder",
false );
2592 flag(
"SpaceShower:rapidityOrderMPI",
false );
2593 parm(
"MultipartonInteractions:pT0Ref", 1.87 );
2594 parm(
"MultipartonInteractions:ecmPow", 0.28 );
2595 mode(
"MultipartonInteractions:bProfile", 4 );
2596 parm(
"MultipartonInteractions:expPow", 1.0 );
2597 parm(
"MultipartonInteractions:a1", 0.01 );
2598 parm(
"ColourReconnection:range", 5.32 );
2602 else if (ppTune == 11) {
2603 if (preferLHAPDF == 2)
2604 word(
"PDF:pSet",
"LHAPDF6:CT10");
2606 word(
"PDF:pSet",
"LHAPDF5:CT10.LHgrid");
2607 flag(
"SpaceShower:rapidityOrder",
false );
2608 flag(
"SpaceShower:rapidityOrderMPI",
false );
2609 parm(
"MultipartonInteractions:pT0Ref", 1.70 );
2610 parm(
"MultipartonInteractions:ecmPow", 0.16 );
2611 mode(
"MultipartonInteractions:bProfile", 4 );
2612 parm(
"MultipartonInteractions:expPow", 1.0 );
2613 parm(
"MultipartonInteractions:a1", 0.10 );
2614 parm(
"ColourReconnection:range", 4.67 );
2618 else if (ppTune == 12) {
2619 if (preferLHAPDF == 1)
2620 word(
"PDF:pSet",
"LHAPDF5:MRST2007lomod.LHgrid");
2621 else if (preferLHAPDF == 2)
2622 word(
"PDF:pSet",
"LHAPDF6:MRST2007lomod");
2623 else word(
"PDF:pSet",
"3" );
2624 flag(
"SpaceShower:rapidityOrder",
false );
2625 flag(
"SpaceShower:rapidityOrderMPI",
false );
2626 parm(
"MultipartonInteractions:pT0Ref", 2.39 );
2627 parm(
"MultipartonInteractions:ecmPow", 0.24 );
2628 mode(
"MultipartonInteractions:bProfile", 4 );
2629 parm(
"MultipartonInteractions:expPow", 1.0 );
2630 parm(
"MultipartonInteractions:a1", 0.01 );
2631 parm(
"ColourReconnection:range", 1.76 );
2635 else if (ppTune == 13) {
2636 if (preferLHAPDF == 1)
2637 word(
"PDF:pSet",
"LHAPDF5:MRSTMCal.LHgrid");
2638 else if (preferLHAPDF == 2)
2639 word(
"PDF:pSet",
"LHAPDF6:MRSTMCal");
2640 else word(
"PDF:pSet",
"4" );
2641 flag(
"SpaceShower:rapidityOrder",
false );
2642 flag(
"SpaceShower:rapidityOrderMPI",
false );
2643 parm(
"MultipartonInteractions:pT0Ref", 2.57 );
2644 parm(
"MultipartonInteractions:ecmPow", 0.23 );
2645 mode(
"MultipartonInteractions:bProfile", 4 );
2646 parm(
"MultipartonInteractions:expPow", 1.0 );
2647 parm(
"MultipartonInteractions:a1", 0.01 );
2648 parm(
"ColourReconnection:range", 1.47 );
2654 else if (ppTune == 15) {
2655 if (preferLHAPDF == 1)
2656 word(
"PDF:pSet",
"LHAPDF5:cteq6ll.LHpdf");
2657 else if (preferLHAPDF == 2)
2658 word(
"PDF:pSet",
"LHAPDF6:cteq6l1");
2659 else word(
"PDF:pSet",
"8" );
2660 parm(
"MultipartonInteractions:pT0Ref", 2.1006);
2661 parm(
"MultipartonInteractions:ecmPow", 0.2106);
2662 parm(
"MultipartonInteractions:expPow", 1.6089);
2663 parm(
"MultipartonInteractions:a1", 0.00 );
2664 parm(
"ColourReconnection:range", 3.3126);
2668 else if (ppTune == 16) {
2669 if (preferLHAPDF == 2)
2670 word(
"PDF:pSet",
"LHAPDF6:HERAPDF15LO_EIG");
2672 word(
"PDF:pSet",
"LHAPDF5:HERAPDF1.5LO_EIG.LHgrid");
2673 parm(
"MultipartonInteractions:pT0Ref", 2.0001);
2674 parm(
"MultipartonInteractions:ecmPow", 0.2499);
2675 parm(
"MultipartonInteractions:expPow", 1.6905);
2676 parm(
"MultipartonInteractions:a1", 0.00 );
2677 parm(
"ColourReconnection:range", 6.0964);
2682 else if (ppTune == 17) {
2683 parm(
"SpaceShower:alphaSvalue", 0.1237);
2684 parm(
"SpaceShower:pT0Ref", 0.59 );
2685 parm(
"MultipartonInteractions:pT0Ref", 2.18 );
2686 parm(
"BeamRemnants:primordialKThard", 1.71 );
2692 else if (ppTune >= 18) {
2693 word(
"PDF:pSet",
"13" );
2694 parm(
"SigmaProcess:alphaSvalue", 0.130 );
2695 flag(
"SigmaTotal:zeroAXB",
true );
2696 flag(
"SigmaDiffractive:dampen",
true );
2697 parm(
"SigmaDiffractive:maxXB", 65.0 );
2698 parm(
"SigmaDiffractive:maxAX", 65.0 );
2699 parm(
"SigmaDiffractive:maxXX", 65.0 );
2700 parm(
"Diffraction:largeMassSuppress", 4.0 );
2701 flag(
"TimeShower:dampenBeamRecoil",
true );
2702 flag(
"TimeShower:phiPolAsym",
true );
2703 parm(
"SpaceShower:alphaSvalue", 0.1365);
2704 mode(
"SpaceShower:alphaSorder", 1 );
2705 flag(
"SpaceShower:alphaSuseCMW",
false );
2706 flag(
"SpaceShower:samePTasMPI",
false );
2707 parm(
"SpaceShower:pT0Ref", 2.0 );
2708 parm(
"SpaceShower:ecmRef", 7000.0);
2709 parm(
"SpaceShower:ecmPow", 0.0 );
2710 parm(
"SpaceShower:pTmaxFudge", 1.0 );
2711 parm(
"SpaceShower:pTdampFudge", 1.0 );
2712 flag(
"SpaceShower:rapidityOrder",
true );
2713 flag(
"SpaceShower:rapidityOrderMPI",
true );
2714 flag(
"SpaceShower:phiPolAsym",
true );
2715 flag(
"SpaceShower:phiIntAsym",
true );
2716 parm(
"MultipartonInteractions:alphaSvalue", 0.130 );
2717 parm(
"MultipartonInteractions:pT0Ref", 2.28 );
2718 parm(
"MultipartonInteractions:ecmRef", 7000. );
2719 parm(
"MultipartonInteractions:ecmPow", 0.215 );
2720 mode(
"MultipartonInteractions:bProfile", 3 );
2721 parm(
"MultipartonInteractions:expPow", 1.85 );
2722 parm(
"MultipartonInteractions:a1", 0.15 );
2723 parm(
"BeamRemnants:primordialKTsoft", 0.9 );
2724 parm(
"BeamRemnants:primordialKThard", 1.8 );
2725 parm(
"BeamRemnants:halfScaleForKT", 1.5 );
2726 parm(
"BeamRemnants:halfMassForKT", 1.0 );
2727 mode(
"ColourReconnection:mode", 0 );
2728 parm(
"ColourReconnection:range", 1.80 );
2733 parm(
"MultipartonInteractions:pT0Ref", 2.4024);
2734 parm(
"MultipartonInteractions:ecmPow", 0.25208);
2735 parm(
"MultipartonInteractions:expPow", 1.60 );
2743 else if (ppTune == 19) {
2744 if (preferLHAPDF == 1)
2745 word(
"PDF:pSet",
"LHAPDF5:cteq6ll.LHpdf");
2746 else if (preferLHAPDF == 2)
2747 word(
"PDF:pSet",
"LHAPDF6:cteq6l1");
2748 else word(
"PDF:pSet",
"8" );
2749 parm(
"SigmaProcess:alphaSvalue", 0.144 );
2750 parm(
"TimeShower:alphaSvalue", 0.126 );
2751 parm(
"SpaceShower:alphaSvalue", 0.125 );
2752 parm(
"SpaceShower:pT0Ref", 1.3 );
2753 parm(
"SpaceShower:pTmaxFudge", 0.95 );
2754 parm(
"SpaceShower:pTdampFudge", 1.21 );
2755 parm(
"MultipartonInteractions:alphaSvalue",0.118);
2756 parm(
"MultipartonInteractions:pT0Ref", 1.98 );
2757 parm(
"BeamRemnants:primordialKThard", 1.72 );
2758 parm(
"ColourReconnection:range", 2.08 );
2762 else if (ppTune == 20) {
2763 if (preferLHAPDF == 1)
2764 word(
"PDF:pSet",
"LHAPDF5:MSTW2008lo68cl.LHgrid");
2765 else if (preferLHAPDF == 2)
2766 word(
"PDF:pSet",
"LHAPDF6:MSTW2008lo68cl");
2767 else word(
"PDF:pSet",
"5" );
2768 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2769 parm(
"TimeShower:alphaSvalue", 0.129 );
2770 parm(
"SpaceShower:alphaSvalue", 0.129 );
2771 parm(
"SpaceShower:pT0Ref", 1.62 );
2772 parm(
"SpaceShower:pTmaxFudge", 0.92 );
2773 parm(
"SpaceShower:pTdampFudge", 1.14 );
2774 parm(
"MultipartonInteractions:alphaSvalue",0.130);
2775 parm(
"MultipartonInteractions:pT0Ref", 2.28 );
2776 parm(
"BeamRemnants:primordialKThard", 1.82 );
2777 parm(
"ColourReconnection:range", 1.87 );
2781 else if (ppTune == 21) {
2782 word(
"PDF:pSet",
"13" );
2783 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2784 parm(
"TimeShower:alphaSvalue", 0.127 );
2785 parm(
"SpaceShower:alphaSvalue", 0.127 );
2786 parm(
"SpaceShower:pT0Ref", 1.56 );
2787 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2788 parm(
"SpaceShower:pTdampFudge", 1.05 );
2789 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2790 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2791 parm(
"BeamRemnants:primordialKThard", 1.88 );
2792 parm(
"ColourReconnection:range", 1.71 );
2796 else if (ppTune == 22) {
2797 if (preferLHAPDF == 2)
2798 word(
"PDF:pSet",
"LHAPDF6:HERAPDF15LO_EIG");
2800 word(
"PDF:pSet",
"LHAPDF5:HERAPDF1.5LO_EIG.LHgrid");
2801 parm(
"SigmaProcess:alphaSvalue", 0.141 );
2802 parm(
"TimeShower:alphaSvalue", 0.130 );
2803 parm(
"SpaceShower:alphaSvalue", 0.128);
2804 parm(
"SpaceShower:pT0Ref", 1.61 );
2805 parm(
"SpaceShower:pTmaxFudge", 0.95 );
2806 parm(
"SpaceShower:pTdampFudge", 1.10 );
2807 parm(
"MultipartonInteractions:alphaSvalue",0.123);
2808 parm(
"MultipartonInteractions:pT0Ref", 2.14 );
2809 parm(
"BeamRemnants:primordialKThard", 1.83 );
2810 parm(
"ColourReconnection:range", 1.78 );
2814 else if (ppTune == 23) {
2815 word(
"PDF:pSet",
"13" );
2816 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2817 parm(
"TimeShower:alphaSvalue", 0.127 );
2818 parm(
"SpaceShower:alphaSvalue", 0.127 );
2819 parm(
"SpaceShower:pT0Ref", 1.56 );
2820 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2821 parm(
"SpaceShower:pTdampFudge", 1.05 );
2822 parm(
"MultipartonInteractions:alphaSvalue",0.131);
2823 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2824 parm(
"BeamRemnants:primordialKThard", 1.88 );
2825 parm(
"ColourReconnection:range", 1.73 );
2829 else if (ppTune == 24) {
2830 word(
"PDF:pSet",
"13" );
2831 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2832 parm(
"TimeShower:alphaSvalue", 0.127 );
2833 parm(
"SpaceShower:alphaSvalue", 0.127 );
2834 parm(
"SpaceShower:pT0Ref", 1.56 );
2835 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2836 parm(
"SpaceShower:pTdampFudge", 1.05 );
2837 parm(
"MultipartonInteractions:alphaSvalue",0.121);
2838 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2839 parm(
"BeamRemnants:primordialKThard", 1.88 );
2840 parm(
"ColourReconnection:range", 1.69 );
2844 else if (ppTune == 25) {
2845 word(
"PDF:pSet",
"13" );
2846 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2847 parm(
"TimeShower:alphaSvalue", 0.139 );
2848 parm(
"SpaceShower:alphaSvalue", 0.127 );
2849 parm(
"SpaceShower:pT0Ref", 1.60 );
2850 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2851 parm(
"SpaceShower:pTdampFudge", 1.04 );
2852 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2853 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2854 parm(
"BeamRemnants:primordialKThard", 1.88 );
2855 parm(
"ColourReconnection:range", 1.71 );
2859 else if (ppTune == 26) {
2860 word(
"PDF:pSet",
"13" );
2861 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2862 parm(
"TimeShower:alphaSvalue", 0.111 );
2863 parm(
"SpaceShower:alphaSvalue", 0.127 );
2864 parm(
"SpaceShower:pT0Ref", 1.50 );
2865 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2866 parm(
"SpaceShower:pTdampFudge", 1.08 );
2867 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2868 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2869 parm(
"BeamRemnants:primordialKThard", 1.88 );
2870 parm(
"ColourReconnection:range", 1.71 );
2874 else if (ppTune == 27) {
2875 word(
"PDF:pSet",
"13" );
2876 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2877 parm(
"TimeShower:alphaSvalue", 0.136 );
2878 parm(
"SpaceShower:alphaSvalue", 0.127 );
2879 parm(
"SpaceShower:pT0Ref", 1.67 );
2880 parm(
"SpaceShower:pTmaxFudge", 0.98 );
2881 parm(
"SpaceShower:pTdampFudge", 1.36 );
2882 parm(
"MultipartonInteractions:alphaSvalue",0.125);
2883 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2884 parm(
"BeamRemnants:primordialKThard", 1.88 );
2885 parm(
"ColourReconnection:range", 1.71 );
2889 else if (ppTune == 28) {
2890 word(
"PDF:pSet",
"13" );
2891 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2892 parm(
"TimeShower:alphaSvalue", 0.124 );
2893 parm(
"SpaceShower:alphaSvalue", 0.127 );
2894 parm(
"SpaceShower:pT0Ref", 1.51 );
2895 parm(
"SpaceShower:pTmaxFudge", 0.88 );
2896 parm(
"SpaceShower:pTdampFudge", 0.93 );
2897 parm(
"MultipartonInteractions:alphaSvalue",0.127);
2898 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2899 parm(
"BeamRemnants:primordialKThard", 1.88 );
2900 parm(
"ColourReconnection:range", 1.71 );
2904 else if (ppTune == 29) {
2905 word(
"PDF:pSet",
"13" );
2906 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2907 parm(
"TimeShower:alphaSvalue", 0.114 );
2908 parm(
"SpaceShower:alphaSvalue", 0.129 );
2909 parm(
"SpaceShower:pT0Ref", 1.56 );
2910 parm(
"SpaceShower:pTmaxFudge", 1.00 );
2911 parm(
"SpaceShower:pTdampFudge", 1.04 );
2912 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2913 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2914 parm(
"BeamRemnants:primordialKThard", 1.88 );
2915 parm(
"ColourReconnection:range", 1.71 );
2919 else if (ppTune == 30) {
2920 word(
"PDF:pSet",
"13" );
2921 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2922 parm(
"TimeShower:alphaSvalue", 0.138 );
2923 parm(
"SpaceShower:alphaSvalue", 0.126 );
2924 parm(
"SpaceShower:pT0Ref", 1.56 );
2925 parm(
"SpaceShower:pTmaxFudge", 0.83 );
2926 parm(
"SpaceShower:pTdampFudge", 1.07 );
2927 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2928 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2929 parm(
"BeamRemnants:primordialKThard", 1.88 );
2930 parm(
"ColourReconnection:range", 1.71 );
2934 else if (ppTune == 31) {
2935 word(
"PDF:pSet",
"13" );
2936 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2937 parm(
"TimeShower:alphaSvalue", 0.127 );
2938 parm(
"SpaceShower:alphaSvalue", 0.140 );
2939 parm(
"SpaceShower:pT0Ref", 1.56 );
2940 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2941 parm(
"SpaceShower:pTdampFudge", 1.05 );
2942 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2943 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2944 parm(
"BeamRemnants:primordialKThard", 1.88 );
2945 parm(
"ColourReconnection:range", 1.71 );
2949 else if (ppTune == 32) {
2950 word(
"PDF:pSet",
"13" );
2951 parm(
"SigmaProcess:alphaSvalue", 0.140 );
2952 parm(
"TimeShower:alphaSvalue", 0.127 );
2953 parm(
"SpaceShower:alphaSvalue", 0.115 );
2954 parm(
"SpaceShower:pT0Ref", 1.56 );
2955 parm(
"SpaceShower:pTmaxFudge", 0.91 );
2956 parm(
"SpaceShower:pTdampFudge", 1.05 );
2957 parm(
"MultipartonInteractions:alphaSvalue",0.126);
2958 parm(
"MultipartonInteractions:pT0Ref", 2.09 );
2959 parm(
"BeamRemnants:primordialKThard", 1.88 );
2960 parm(
"ColourReconnection:range", 1.71 );
2971 bool Settings::boolString(
string tag) {
2973 string tagLow = toLower(tag);
2974 return ( tagLow ==
"true" || tagLow ==
"1" || tagLow ==
"on"
2975 || tagLow ==
"yes" || tagLow ==
"ok" );
2983 string Settings::attributeValue(
string line,
string attribute) {
2985 if (line.find(attribute) == string::npos)
return "";
2986 int iBegAttri = line.find(attribute);
2987 int iBegQuote = line.find(
"\"", iBegAttri + 1);
2988 int iEndQuote = line.find(
"\"", iBegQuote + 1);
2989 return line.substr(iBegQuote + 1, iEndQuote - iBegQuote - 1);
2997 bool Settings::boolAttributeValue(
string line,
string attribute) {
2999 string valString = attributeValue(line, attribute);
3000 if (valString ==
"")
return false;
3001 return boolString(valString);
3009 int Settings::intAttributeValue(
string line,
string attribute) {
3010 string valString = attributeValue(line, attribute);
3011 if (valString ==
"")
return 0;
3012 istringstream valStream(valString);
3014 valStream >> intVal;
3023 double Settings::doubleAttributeValue(
string line,
string attribute) {
3024 string valString = attributeValue(line, attribute);
3025 if (valString ==
"")
return 0.;
3026 istringstream valStream(valString);
3028 valStream >> doubleVal;
3037 vector<bool> Settings::boolVectorAttributeValue(
string line,
3039 string valString = attributeValue(line, attribute);
3040 size_t openBrace = valString.find_first_of(
"{");
3041 size_t closeBrace = valString.find_last_of(
"}");
3042 if (openBrace != string::npos)
3043 valString = valString.substr(openBrace + 1, closeBrace - openBrace - 1);
3044 if (valString ==
"")
return vector<bool>();
3045 vector<bool> vectorVal;
3046 size_t stringPos(0);
3047 while (stringPos != string::npos) {
3048 stringPos = valString.find(
",");
3049 istringstream valStream(valString.substr(0, stringPos));
3050 valString = valString.substr(stringPos + 1);
3051 vectorVal.push_back(boolString(valStream.str()));
3061 vector<int> Settings::intVectorAttributeValue(
string line,
3063 string valString = attributeValue(line, attribute);
3064 size_t openBrace = valString.find_first_of(
"{");
3065 size_t closeBrace = valString.find_last_of(
"}");
3066 if (openBrace != string::npos)
3067 valString = valString.substr(openBrace + 1, closeBrace - openBrace - 1);
3068 if (valString ==
"")
return vector<int>();
3070 vector<int> vectorVal;
3071 size_t stringPos(0);
3072 while (stringPos != string::npos) {
3073 stringPos = valString.find(
",");
3074 istringstream valStream(valString.substr(0, stringPos));
3075 valString = valString.substr(stringPos + 1);
3076 valStream >> intVal;
3077 vectorVal.push_back(intVal);
3087 vector<double> Settings::doubleVectorAttributeValue(
string line,
3089 string valString = attributeValue(line, attribute);
3090 size_t openBrace = valString.find_first_of(
"{");
3091 size_t closeBrace = valString.find_last_of(
"}");
3092 if (openBrace != string::npos)
3093 valString = valString.substr(openBrace + 1, closeBrace - openBrace - 1);
3094 if (valString ==
"")
return vector<double>();
3096 vector<double> vectorVal;
3097 size_t stringPos(0);
3098 while (stringPos != string::npos) {
3099 stringPos = valString.find(
",");
3100 istringstream valStream(valString.substr(0, stringPos));
3101 valString = valString.substr(stringPos + 1);
3102 valStream >> doubleVal;
3103 vectorVal.push_back(doubleVal);
3113 vector<string> Settings::stringVectorAttributeValue(
string line,
3115 string valString = attributeValue(line, attribute);
3116 size_t openBrace = valString.find_first_of(
"{");
3117 size_t closeBrace = valString.find_last_of(
"}");
3118 if (openBrace != string::npos)
3119 valString = valString.substr(openBrace + 1, closeBrace - openBrace - 1);
3120 if (valString ==
"")
return vector<string>();
3122 vector<string> vectorVal;
3123 size_t stringPos(0);
3124 while (stringPos != string::npos) {
3125 stringPos = valString.find(
",");
3126 if (stringPos != string::npos) {
3127 vectorVal.push_back(valString.substr(0, stringPos));
3128 valString = valString.substr(stringPos + 1);
3129 }
else vectorVal.push_back(valString);