8 #include "Pythia8/Settings.h"
24 bool Settings::init(
string startFile,
bool append, ostream& os) {
27 if (isInit && !append)
return true;
32 files.push_back(startFile);
36 if (startFile.rfind(
"/") != string::npos)
37 pathName = startFile.substr(0, startFile.rfind(
"/") + 1);
40 for (
int i = 0; i < int(files.size()); ++i) {
41 const char* cstring = files[i].c_str();
46 os <<
"\n PYTHIA Error: settings file " << files[i]
47 <<
" not found" << endl;
53 while ( getline(is, line) ) {
56 istringstream getfirst(line);
61 if (tag !=
"<flag" && tag !=
"<flagfix" && tag !=
"<mode"
62 && tag !=
"<modeopen" && tag !=
"<modepick" && tag !=
"<modefix"
63 && tag !=
"<parm" && tag !=
"<parmfix" && tag !=
"<word"
64 && tag !=
"<wordfix" && tag !=
"<fvec" && tag !=
"<fvecfix"
65 && tag !=
"<mvec" && tag !=
"<mvecfix"
66 && tag !=
"<pvec" && tag !=
"<pvecfix" && tag !=
"<aidx")
continue;
69 while (line.find(
">") == string::npos) {
72 line +=
" " + addLine;
76 while (line.find(
" =") != string::npos) line.erase( line.find(
" ="), 1);
80 string name = attributeValue( line,
"href");
82 os <<
" PYTHIA Error: failed to find name attribute in line "
87 files.push_back(pathName + name +
".xml");
92 string name = attributeValue( line,
"name=");
94 os <<
" PYTHIA Error: failed to find name attribute in line "
101 if (line.find(
"default=") == string::npos) {
102 os <<
" PYTHIA Error: failed to find default value token in line "
107 bool hasMin = (line.find(
"min=") != string::npos);
108 bool hasMax = (line.find(
"max=") != string::npos);
111 if (tag ==
"<flag" || tag ==
"<flagfix") {
112 bool value = boolAttributeValue( line,
"default=");
113 addFlag( name, value);
116 }
else if (tag ==
"<mode" || tag ==
"<modeopen"
117 || tag ==
"<modepick" || tag ==
"<modefix") {
118 int value = intAttributeValue( line,
"default=");
119 int minVal = intAttributeValue( line,
"min=");
120 int maxVal = intAttributeValue( line,
"max=");
121 addMode( name, value, hasMin, hasMax, minVal, maxVal);
124 }
else if (tag ==
"<parm" || tag ==
"<parmfix") {
125 double value = doubleAttributeValue( line,
"default=");
126 double minVal = doubleAttributeValue( line,
"min=");
127 double maxVal = doubleAttributeValue( line,
"max=");
128 addParm( name, value, hasMin, hasMax, minVal, maxVal);
131 }
else if (tag ==
"<word" || tag ==
"<wordfix") {
132 string value = attributeValue( line,
"default=");
133 addWord( name, value);
136 }
else if (tag ==
"<fvec" || tag ==
"<fvecfix") {
137 vector<bool> value = boolVectorAttributeValue( line,
"default=");
138 addFVec( name, value);
141 }
else if (tag ==
"<mvec" || tag ==
"<mvecfix") {
142 vector<int> value = intVectorAttributeValue( line,
"default=");
143 int minVal = intAttributeValue( line,
"min=");
144 int maxVal = intAttributeValue( line,
"max=");
145 addMVec( name, value, hasMin, hasMax, minVal, maxVal);
148 }
else if (tag ==
"<pvec" || tag ==
"<pvecfix") {
149 vector<double> value = doubleVectorAttributeValue( line,
"default=");
150 double minVal = doubleAttributeValue( line,
"min=");
151 double maxVal = doubleAttributeValue( line,
"max=");
152 addPVec( name, value, hasMin, hasMax, minVal, maxVal);
160 int eeTune = mode(
"Tune:ee");
161 if (eeTune > 0) initTuneEE( eeTune);
162 int ppTune = mode(
"Tune:pp");
163 if (ppTune > 0) initTunePP( ppTune);
166 if (nError > 0)
return false;
176 bool Settings::reInit(
string startFile, ostream& os) {
189 return init(startFile,
false, os);
198 bool Settings::readString(
string line,
bool warn, ostream& os) {
201 if (line.find_first_not_of(
" \n\t\v\b\r\f\a") == string::npos)
return true;
204 string lineNow = line;
205 int firstChar = lineNow.find_first_not_of(
" \n\t\v\b\r\f\a");
206 if (!isalpha(lineNow[firstChar]))
return true;
209 while (lineNow.find(
"=") != string::npos) {
210 int firstEqual = lineNow.find_first_of(
"=");
211 lineNow.replace(firstEqual, 1,
" ");
215 istringstream splitLine(lineNow);
220 while (name.find(
"::") != string::npos) {
221 int firstColonColon = name.find_first_of(
"::");
222 name.replace(firstColonColon, 2,
":");
227 if (isFlag(name)) inDataBase = 1;
228 else if (isMode(name)) inDataBase = 2;
229 else if (isParm(name)) inDataBase = 3;
230 else if (isWord(name)) inDataBase = 4;
231 else if (isFVec(name)) inDataBase = 5;
232 else if (isMVec(name)) inDataBase = 6;
233 else if (isPVec(name)) inDataBase = 7;
237 if (inDataBase == 0) {
239 string nameLower = toLower(name);
240 if (nameLower.find(
"multiple") != string::npos) {
241 int firstMI = nameLower.find_first_of(
"multiple");
242 name.replace(firstMI, 8,
"Multiparton");
245 if (!retry && nameLower.find(
"mi") != string::npos) {
246 int firstMI = nameLower.find_first_of(
"mi");
247 name.replace(firstMI, 2,
"MPI");
250 if (!retry && nameLower.find(
"minbias") != string::npos) {
251 int firstMB = nameLower.find_first_of(
"minbias");
252 name.replace(firstMB, 7,
"nonDiffractive");
256 if (isFlag(name)) inDataBase = 1;
257 else if (isMode(name)) inDataBase = 2;
258 else if (isParm(name)) inDataBase = 3;
259 else if (isWord(name)) inDataBase = 4;
260 else if (isFVec(name)) inDataBase = 5;
261 else if (isMVec(name)) inDataBase = 6;
262 else if (isPVec(name)) inDataBase = 7;
267 if (inDataBase == 0) {
268 if (warn) os <<
"\n PYTHIA Error: input string not found in settings"
269 <<
" databases::\n " << line << endl;
270 readingFailedSave =
true;
276 splitLine >> valueString;
278 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
279 <<
" not meaningful:\n " << line << endl;
280 readingFailedSave =
true;
285 if (inDataBase == 1) {
286 bool value = boolString(valueString);
290 }
else if (inDataBase == 2) {
291 istringstream modeData(valueString);
295 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
296 <<
" not meaningful:\n " << line << endl;
297 readingFailedSave =
true;
303 }
else if (inDataBase == 3) {
304 istringstream parmData(valueString);
308 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
309 <<
" not meaningful:\n " << line << endl;
310 readingFailedSave =
true;
316 }
else if (inDataBase == 4) {
317 word(name, valueString);
320 }
else if (inDataBase == 5) {
321 istringstream fvecData(valueString);
322 vector<bool> value(boolVectorAttributeValue(
323 "value=\"" + valueString +
"\"",
"value="));
325 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
326 <<
" not meaningful:\n " << line << endl;
327 readingFailedSave =
true;
333 }
else if (inDataBase == 6) {
334 istringstream mvecData(valueString);
335 vector<int> value(intVectorAttributeValue(
336 "value=\"" + valueString +
"\"",
"value="));
338 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
339 <<
" not meaningful:\n " << line << endl;
340 readingFailedSave =
true;
346 }
else if (inDataBase == 7) {
347 istringstream pvecData(valueString);
348 vector<double> value(doubleVectorAttributeValue(
349 "value=\"" + valueString +
"\"",
"value="));
351 if (warn) os <<
"\n PYTHIA Error: variable recognized, but its value"
352 <<
" not meaningful:\n " << line << endl;
353 readingFailedSave =
true;
367 bool Settings::writeFile(
string toFile,
bool writeAll) {
370 const char* cstring = toFile.c_str();
371 ofstream os(cstring);
373 infoPtr->errorMsg(
"Error in Settings::writeFile:"
374 " could not open file", toFile);
379 return writeFile( os, writeAll);
387 bool Settings::writeFile(ostream& os,
bool writeAll) {
390 if (writeAll) os <<
"! List of all current PYTHIA ";
391 else os <<
"! List of all modified PYTHIA ";
392 os << fixed << setprecision(3) << parm(
"Pythia:versionNumber")
396 map<string, Flag>::iterator flagEntry = flags.begin();
397 map<string, Mode>::iterator modeEntry = modes.begin();
398 map<string, Parm>::iterator parmEntry = parms.begin();
399 map<string, Word>::iterator wordEntry = words.begin();
400 map<string, FVec>::iterator fvecEntry = fvecs.begin();
401 map<string, MVec>::iterator mvecEntry = mvecs.begin();
402 map<string, PVec>::iterator pvecEntry = pvecs.begin();
405 while (flagEntry != flags.end() || modeEntry != modes.end()
406 || parmEntry != parms.end() || wordEntry != words.end()
407 || fvecEntry != fvecs.end() || mvecEntry != mvecs.end()
408 || pvecEntry != pvecs.end() ) {
411 if ( flagEntry != flags.end()
412 && ( modeEntry == modes.end() || flagEntry->first < modeEntry->first )
413 && ( parmEntry == parms.end() || flagEntry->first < parmEntry->first )
414 && ( wordEntry == words.end() || flagEntry->first < wordEntry->first )
415 && ( fvecEntry == fvecs.end() || flagEntry->first < fvecEntry->first )
416 && ( mvecEntry == mvecs.end() || flagEntry->first < mvecEntry->first )
417 && ( pvecEntry == pvecs.end() || flagEntry->first < pvecEntry->first )
419 string state[2] = {
"off",
"on"};
420 bool valNow = flagEntry->second.valNow;
421 bool valDefault = flagEntry->second.valDefault;
422 if ( writeAll || valNow != valDefault )
423 os << flagEntry->second.name <<
" = " << state[valNow] <<
"\n";
427 }
else if ( modeEntry != modes.end()
428 && ( parmEntry == parms.end() || modeEntry->first < parmEntry->first )
429 && ( wordEntry == words.end() || modeEntry->first < wordEntry->first )
430 && ( fvecEntry == fvecs.end() || modeEntry->first < fvecEntry->first )
431 && ( mvecEntry == mvecs.end() || modeEntry->first < mvecEntry->first )
432 && ( pvecEntry == pvecs.end() || modeEntry->first < pvecEntry->first )
434 int valNow = modeEntry->second.valNow;
435 int valDefault = modeEntry->second.valDefault;
436 if ( writeAll || valNow != valDefault )
437 os << modeEntry->second.name <<
" = " << valNow <<
"\n";
442 }
else if ( parmEntry != parms.end()
443 && ( wordEntry == words.end() || parmEntry->first < wordEntry->first )
444 && ( fvecEntry == fvecs.end() || parmEntry->first < fvecEntry->first )
445 && ( mvecEntry == mvecs.end() || parmEntry->first < mvecEntry->first )
446 && ( pvecEntry == pvecs.end() || parmEntry->first < pvecEntry->first )
448 double valNow = parmEntry->second.valNow;
449 double valDefault = parmEntry->second.valDefault;
450 if ( writeAll || valNow != valDefault ) {
451 os << parmEntry->second.name <<
" = ";
452 if ( valNow == 0. ) os << fixed << setprecision(1);
453 else if ( abs(valNow) < 0.001 ) os << scientific << setprecision(4);
454 else if ( abs(valNow) < 0.1 ) os << fixed << setprecision(7);
455 else if ( abs(valNow) < 1000. ) os << fixed << setprecision(5);
456 else if ( abs(valNow) < 1000000. ) os << fixed << setprecision(3);
457 else os << scientific << setprecision(4);
458 os << valNow <<
"\n";
463 }
else if ( wordEntry != words.end()
464 && ( fvecEntry == fvecs.end() || wordEntry->first < fvecEntry->first )
465 && ( mvecEntry == mvecs.end() || wordEntry->first < mvecEntry->first )
466 && ( pvecEntry == pvecs.end() || wordEntry->first < pvecEntry->first )
468 string valNow = wordEntry->second.valNow;
469 string valDefault = wordEntry->second.valDefault;
470 if ( writeAll || valNow != valDefault )
471 os << wordEntry->second.name <<
" = " << valNow <<
"\n";
475 }
else if ( fvecEntry != fvecs.end()
476 && ( mvecEntry == mvecs.end() || fvecEntry->first < mvecEntry->first )
477 && ( pvecEntry == pvecs.end() || fvecEntry->first < pvecEntry->first )
479 string state[2] = {
"off",
"on"};
480 vector<bool> valNow = fvecEntry->second.valNow;
481 vector<bool> valDefault = fvecEntry->second.valDefault;
482 if ( writeAll || valNow != valDefault ) {
483 os << fvecEntry->second.name <<
" = ";
484 for (vector<bool>::iterator val = valNow.begin();
485 val != --valNow.end(); ++val) os << state[*val] <<
",";
486 os << *(--valNow.end()) <<
"\n";
491 }
else if ( mvecEntry != mvecs.end()
492 && ( pvecEntry == pvecs.end() || mvecEntry->first < pvecEntry->first )
494 vector<int> valNow = mvecEntry->second.valNow;
495 vector<int> valDefault = mvecEntry->second.valDefault;
496 if ( writeAll || valNow != valDefault ) {
497 os << mvecEntry->second.name <<
" = ";
498 for (vector<int>::iterator val = valNow.begin();
499 val != --valNow.end(); ++val) os << *val <<
",";
500 os << *(--valNow.end()) <<
"\n";
506 vector<double> valNow = pvecEntry->second.valNow;
507 vector<double> valDefault = pvecEntry->second.valDefault;
508 if ( writeAll || valNow != valDefault ) {
509 os << pvecEntry->second.name <<
" = ";
510 for (vector<double>::iterator val = valNow.begin();
511 val != --valNow.end(); ++val) {
512 if ( *val == 0. ) os << fixed << setprecision(1);
513 else if ( abs(*val) < 0.001 ) os << scientific << setprecision(4);
514 else if ( abs(*val) < 0.1 ) os << fixed << setprecision(7);
515 else if ( abs(*val) < 1000. ) os << fixed << setprecision(5);
516 else if ( abs(*val) < 1000000. ) os << fixed << setprecision(3);
517 else os << scientific << setprecision(4);
519 } os << *(--valNow.end()) <<
"\n";
533 void Settings::list(
bool doListAll,
bool doListString,
string match,
538 os <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec "
539 <<
"Settings (all) ----------------------------------* \n";
540 else if (!doListString)
541 os <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec "
542 <<
"Settings (changes only) -------------------------* \n" ;
544 os <<
"\n *------- PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec "
545 <<
"Settings (with requested string) -----------------* \n" ;
549 <<
" Now | Default Min Max | \n"
554 match = toLower(match);
555 if (match ==
"") match =
" ";
558 map<string, Flag>::iterator flagEntry = flags.begin();
559 map<string, Mode>::iterator modeEntry = modes.begin();
560 map<string, Parm>::iterator parmEntry = parms.begin();
561 map<string, Word>::iterator wordEntry = words.begin();
562 map<string, FVec>::iterator fvecEntry = fvecs.begin();
563 map<string, MVec>::iterator mvecEntry = mvecs.begin();
564 map<string, PVec>::iterator pvecEntry = pvecs.begin();
567 while (flagEntry != flags.end() || modeEntry != modes.end()
568 || parmEntry != parms.end() || wordEntry != words.end()
569 || fvecEntry != fvecs.end() || mvecEntry != mvecs.end()
570 || pvecEntry != pvecs.end() ) {
573 if ( flagEntry != flags.end()
574 && ( modeEntry == modes.end() || flagEntry->first < modeEntry->first )
575 && ( parmEntry == parms.end() || flagEntry->first < parmEntry->first )
576 && ( wordEntry == words.end() || flagEntry->first < wordEntry->first )
577 && ( fvecEntry == fvecs.end() || flagEntry->first < fvecEntry->first )
578 && ( mvecEntry == mvecs.end() || flagEntry->first < mvecEntry->first )
579 && ( pvecEntry == pvecs.end() || flagEntry->first < pvecEntry->first )
581 string state[2] = {
"off",
"on"};
582 bool valNow = flagEntry->second.valNow;
583 bool valDefault = flagEntry->second.valDefault;
584 if ( doListAll || (!doListString && valNow != valDefault)
585 || (doListString && flagEntry->first.find(match) != string::npos) )
586 os <<
" | " << setw(45) << left
587 << flagEntry->second.name <<
" | " << setw(24) << right
588 << state[valNow] <<
" | " << setw(12) << state[valDefault]
593 }
else if ( modeEntry != modes.end()
594 && ( parmEntry == parms.end() || modeEntry->first < parmEntry->first )
595 && ( wordEntry == words.end() || modeEntry->first < wordEntry->first )
596 && ( fvecEntry == fvecs.end() || modeEntry->first < fvecEntry->first )
597 && ( mvecEntry == mvecs.end() || modeEntry->first < mvecEntry->first )
598 && ( pvecEntry == pvecs.end() || modeEntry->first < pvecEntry->first )
600 int valNow = modeEntry->second.valNow;
601 int valDefault = modeEntry->second.valDefault;
602 if ( doListAll || (!doListString && valNow != valDefault)
603 || (doListString && modeEntry->first.find(match) != string::npos) ) {
604 os <<
" | " << setw(45) << left
605 << modeEntry->second.name <<
" | " << setw(24) << right
606 << valNow <<
" | " << setw(12) << valDefault;
607 if (modeEntry->second.hasMin)
608 os << setw(12) << modeEntry->second.valMin;
610 if (modeEntry->second.hasMax)
611 os << setw(12) << modeEntry->second.valMax;
619 }
else if ( parmEntry != parms.end()
620 && ( wordEntry == words.end() || parmEntry->first < wordEntry->first )
621 && ( fvecEntry == fvecs.end() || parmEntry->first < fvecEntry->first )
622 && ( mvecEntry == mvecs.end() || parmEntry->first < mvecEntry->first )
623 && ( pvecEntry == pvecs.end() || parmEntry->first < pvecEntry->first )
625 double valNow = parmEntry->second.valNow;
626 double valDefault = parmEntry->second.valDefault;
627 if ( doListAll || (!doListString && valNow != valDefault )
628 || (doListString && parmEntry->first.find(match) != string::npos) ) {
629 os <<
" | " << setw(45) << left
630 << parmEntry->second.name << right <<
" | ";
631 for (
int i = 0; i < 4; ++i) {
632 if (i == 1) valNow = valDefault;
633 if (i == 2) valNow = parmEntry->second.valMin;
634 if (i == 3) valNow = parmEntry->second.valMax;
635 if ( (i == 2 && !parmEntry->second.hasMin)
636 || (i == 3 && !parmEntry->second.hasMax) )
638 else if ( valNow == 0. )
639 os << fixed << setprecision(1) << setw(12) << valNow;
640 else if ( abs(valNow) < 0.001 )
641 os << scientific << setprecision(4) << setw(12) << valNow;
642 else if ( abs(valNow) < 0.1 )
643 os << fixed << setprecision(7) << setw(12) << valNow;
644 else if ( abs(valNow) < 1000. )
645 os << fixed << setprecision(5) << setw(12) << valNow;
646 else if ( abs(valNow) < 1000000. )
647 os << fixed << setprecision(3) << setw(12) << valNow;
649 os << scientific << setprecision(4) << setw(12) << valNow;
650 if (i == 0) os <<
" | ";
657 }
else if ( wordEntry != words.end()
658 && ( fvecEntry == fvecs.end() || wordEntry->first < fvecEntry->first )
659 && ( mvecEntry == mvecs.end() || wordEntry->first < mvecEntry->first )
660 && ( pvecEntry == pvecs.end() || wordEntry->first < pvecEntry->first )
662 string valNow = wordEntry->second.valNow;
663 string valDefault = wordEntry->second.valDefault;
664 int blankLeft = max(0, 60 - max(24,
int(valNow.length()) )
665 - max(12,
int(valDefault.length()) ) );
666 string blankPad( blankLeft,
' ');
667 if ( doListAll || (!doListString && valNow != valDefault)
668 || (doListString && wordEntry->first.find(match) != string::npos) )
669 os <<
" | " << setw(45) << left
670 << wordEntry->second.name <<
" | " << setw(24) << right
671 << valNow <<
" | " << setw(12) << valDefault << blankPad
676 }
else if ( fvecEntry != fvecs.end()
677 && ( mvecEntry == mvecs.end() || fvecEntry->first < mvecEntry->first )
678 && ( pvecEntry == pvecs.end() || fvecEntry->first < pvecEntry->first )
680 string state[2] = {
"off",
"on"};
681 vector<bool> valsNow = fvecEntry->second.valNow;
682 vector<bool> valsDefault = fvecEntry->second.valDefault;
683 bool valNow(
false), valDefault(
false);
684 if ( doListAll || (!doListString && valsNow != valsDefault )
685 || (doListString && fvecEntry->first.find(match) != string::npos) ) {
686 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
689 os <<
" | " << setw(45) << left
690 << fvecEntry->second.name << right <<
" | ";
692 os <<
" | " << setw(45) <<
" " << right <<
" | ";
693 for (
int j = 0; j < 4; ++j) {
694 if (i < valsNow.size()) valNow = valsNow[i];
695 if (i < valsDefault.size()) valDefault = valsDefault[i];
696 if (j == 1) valNow = valDefault;
697 if ( (j == 0 && i >= valsNow.size())
698 || (j == 1 && i >= valsDefault.size()) || (j > 1) )
700 else os << setw(12) << state[valNow];
701 if (j == 0) os <<
" | ";
709 }
else if ( mvecEntry != mvecs.end()
710 && ( pvecEntry == pvecs.end() || mvecEntry->first < pvecEntry->first )
712 vector<int> valsNow = mvecEntry->second.valNow;
713 vector<int> valsDefault = mvecEntry->second.valDefault;
714 int valNow(0), valDefault(0);
715 if ( doListAll || (!doListString && valsNow != valsDefault )
716 || (doListString && mvecEntry->first.find(match) != string::npos) ) {
717 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
720 os <<
" | " << setw(45) << left
721 << mvecEntry->second.name << right <<
" | ";
723 os <<
" | " << setw(45) <<
" " << right <<
" | ";
724 for (
int j = 0; j < 4; ++j) {
725 if (i < valsNow.size()) valNow = valsNow[i];
726 if (i < valsDefault.size()) valDefault = valsDefault[i];
727 if (j == 1) valNow = valDefault;
728 if (j == 2) valNow = mvecEntry->second.valMin;
729 if (j == 3) valNow = mvecEntry->second.valMax;
730 if ( (j == 0 && i >= valsNow.size())
731 || (j == 1 && i >= valsDefault.size())
732 || (j == 2 && !mvecEntry->second.hasMin)
733 || (j == 3 && !mvecEntry->second.hasMax) )
735 else os << setw(12) << valNow;
736 if (j == 0) os <<
" | ";
745 vector<double> valsNow = pvecEntry->second.valNow;
746 vector<double> valsDefault = pvecEntry->second.valDefault;
747 double valNow(0), valDefault(0);
748 if ( doListAll || (!doListString && valsNow != valsDefault )
749 || (doListString && pvecEntry->first.find(match) != string::npos) ) {
750 for (
unsigned int i = 0; i < valsNow.size() || i < valsDefault.size();
753 os <<
" | " << setw(45) << left
754 << pvecEntry->second.name << right <<
" | ";
756 os <<
" | " << setw(45) <<
" " << right <<
" | ";
757 for (
int j = 0; j < 4; ++j) {
758 if (i < valsNow.size()) valNow = valsNow[i];
759 if (i < valsDefault.size()) valDefault = valsDefault[i];
760 if (j == 1) valNow = valDefault;
761 if (j == 2) valNow = pvecEntry->second.valMin;
762 if (j == 3) valNow = pvecEntry->second.valMax;
763 if ( (j == 0 && i >= valsNow.size())
764 || (j == 1 && i >= valsDefault.size())
765 || (j == 2 && !pvecEntry->second.hasMin)
766 || (j == 3 && !pvecEntry->second.hasMax) )
768 else if ( valNow == 0. )
769 os << fixed << setprecision(1) << setw(12) << valNow;
770 else if ( abs(valNow) < 0.001 )
771 os << scientific << setprecision(4) << setw(12) << valNow;
772 else if ( abs(valNow) < 0.1 )
773 os << fixed << setprecision(7) << setw(12) << valNow;
774 else if ( abs(valNow) < 1000. )
775 os << fixed << setprecision(5) << setw(12) << valNow;
776 else if ( abs(valNow) < 1000000. )
777 os << fixed << setprecision(3) << setw(12) << valNow;
779 os << scientific << setprecision(4) << setw(12) << valNow;
780 if (j == 0) os <<
" | ";
793 <<
" *------- End PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec "
794 <<
"Settings ------------------------------------* " << endl;
802 void Settings::resetAll() {
805 for (map<string, Flag>::iterator flagEntry = flags.begin();
806 flagEntry != flags.end(); ++flagEntry) {
807 string name = flagEntry->first;
812 for (map<string, Mode>::iterator modeEntry = modes.begin();
813 modeEntry != modes.end(); ++modeEntry) {
814 string name = modeEntry->first;
819 for (map<string, Parm>::iterator parmEntry = parms.begin();
820 parmEntry != parms.end(); ++parmEntry) {
821 string name = parmEntry->first;
826 for (map<string, Word>::iterator wordEntry = words.begin();
827 wordEntry != words.end(); ++wordEntry) {
828 string name = wordEntry->first;
833 for (map<string, FVec>::iterator fvecEntry = fvecs.begin();
834 fvecEntry != fvecs.end(); ++fvecEntry) {
835 string name = fvecEntry->first;
840 for (map<string, MVec>::iterator mvecEntry = mvecs.begin();
841 mvecEntry != mvecs.end(); ++mvecEntry) {
842 string name = mvecEntry->first;
847 for (map<string, PVec>::iterator pvecEntry = pvecs.begin();
848 pvecEntry != pvecs.end(); ++pvecEntry) {
849 string name = pvecEntry->first;
859 bool Settings::flag(
string keyIn) {
860 if (isFlag(keyIn))
return flags[toLower(keyIn)].valNow;
861 infoPtr->errorMsg(
"Error in Settings::flag: unknown key", keyIn);
865 int Settings::mode(
string keyIn) {
866 if (isMode(keyIn))
return modes[toLower(keyIn)].valNow;
867 infoPtr->errorMsg(
"Error in Settings::mode: unknown key", keyIn);
871 double Settings::parm(
string keyIn) {
872 if (isParm(keyIn))
return parms[toLower(keyIn)].valNow;
873 infoPtr->errorMsg(
"Error in Settings::parm: unknown key", keyIn);
877 string Settings::word(
string keyIn) {
878 if (isWord(keyIn))
return words[toLower(keyIn)].valNow;
879 infoPtr->errorMsg(
"Error in Settings::word: unknown key", keyIn);
883 vector<bool> Settings::fvec(
string keyIn) {
884 if (isFVec(keyIn))
return fvecs[toLower(keyIn)].valNow;
885 infoPtr->errorMsg(
"Error in Settings::fvec: unknown key", keyIn);
886 return vector<bool>(1,
false);
889 vector<int> Settings::mvec(
string keyIn) {
890 if (isMVec(keyIn))
return mvecs[toLower(keyIn)].valNow;
891 infoPtr->errorMsg(
"Error in Settings::mvec: unknown key", keyIn);
892 return vector<int>(1, 0);
895 vector<double> Settings::pvec(
string keyIn) {
896 if (isPVec(keyIn))
return pvecs[toLower(keyIn)].valNow;
897 infoPtr->errorMsg(
"Error in Settings::pvec: unknown key", keyIn);
898 return vector<double>(1, 0.);
905 bool Settings::flagDefault(
string keyIn) {
906 if (isFlag(keyIn))
return flags[toLower(keyIn)].valDefault;
907 infoPtr->errorMsg(
"Error in Settings::flagDefault: unknown key", keyIn);
911 int Settings::modeDefault(
string keyIn) {
912 if (isMode(keyIn))
return modes[toLower(keyIn)].valDefault;
913 infoPtr->errorMsg(
"Error in Settings::modeDefault: unknown key", keyIn);
917 double Settings::parmDefault(
string keyIn) {
918 if (isParm(keyIn))
return parms[toLower(keyIn)].valDefault;
919 infoPtr->errorMsg(
"Error in Settings::parmDefault: unknown key", keyIn);
923 string Settings::wordDefault(
string keyIn) {
924 if (isWord(keyIn))
return words[toLower(keyIn)].valDefault;
925 infoPtr->errorMsg(
"Error in Settings::wordDefault: unknown key", keyIn);
929 vector<bool> Settings::fvecDefault(
string keyIn) {
930 if (isFVec(keyIn))
return fvecs[toLower(keyIn)].valDefault;
931 infoPtr->errorMsg(
"Error in Settings::fvecDefault: unknown key", keyIn);
932 return vector<bool>(1,
false);
935 vector<int> Settings::mvecDefault(
string keyIn) {
936 if (isMVec(keyIn))
return mvecs[toLower(keyIn)].valDefault;
937 infoPtr->errorMsg(
"Error in Settings::mvecDefault: unknown key", keyIn);
938 return vector<int>(1, 0);
941 vector<double> Settings::pvecDefault(
string keyIn) {
942 if (isPVec(keyIn))
return pvecs[toLower(keyIn)].valDefault;
943 infoPtr->errorMsg(
"Error in Settings::pvecDefault: unknown key", keyIn);
944 return vector<double>(1, 0.);
951 map<string, Flag> Settings::getFlagMap(
string match) {
953 match = toLower(match);
954 map<string, Flag> flagMap;
956 for (map<string,Flag>::iterator flagEntry = flags.begin();
957 flagEntry != flags.end(); ++flagEntry)
958 if (flagEntry->first.find(match) != string::npos)
959 flagMap[flagEntry->first] = flagEntry->second;
963 map<string, Mode> Settings::getModeMap(
string match) {
965 match = toLower(match);
966 map<string, Mode> modeMap;
968 for (map<string,Mode>::iterator modeEntry = modes.begin();
969 modeEntry != modes.end(); ++modeEntry)
970 if (modeEntry->first.find(match) != string::npos)
971 modeMap[modeEntry->first] = modeEntry->second;
975 map<string, Parm> Settings::getParmMap(
string match) {
977 match = toLower(match);
978 map<string, Parm> parmMap;
980 for (map<string,Parm>::iterator parmEntry = parms.begin();
981 parmEntry != parms.end(); ++parmEntry)
982 if (parmEntry->first.find(match) != string::npos)
983 parmMap[parmEntry->first] = parmEntry->second;
987 map<string, Word> Settings::getWordMap(
string match) {
989 match = toLower(match);
990 map<string, Word> wordMap;
992 for (map<string,Word>::iterator wordEntry = words.begin();
993 wordEntry != words.end(); ++wordEntry)
994 if (wordEntry->first.find(match) != string::npos)
995 wordMap[wordEntry->first] = wordEntry->second;
999 map<string, FVec> Settings::getFVecMap(
string match) {
1001 match = toLower(match);
1002 map<string, FVec> fvecMap;
1004 for (map<string,FVec>::iterator fvecEntry = fvecs.begin();
1005 fvecEntry != fvecs.end(); ++fvecEntry)
1006 if (fvecEntry->first.find(match) != string::npos)
1007 fvecMap[fvecEntry->first] = fvecEntry->second;
1011 map<string, MVec> Settings::getMVecMap(
string match) {
1013 match = toLower(match);
1014 map<string, MVec> mvecMap;
1016 for (map<string,MVec>::iterator mvecEntry = mvecs.begin();
1017 mvecEntry != mvecs.end(); ++mvecEntry)
1018 if (mvecEntry->first.find(match) != string::npos)
1019 mvecMap[mvecEntry->first] = mvecEntry->second;
1023 map<string, PVec> Settings::getPVecMap(
string match) {
1025 match = toLower(match);
1026 map<string, PVec> pvecMap;
1028 for (map<string,PVec>::iterator pvecEntry = pvecs.begin();
1029 pvecEntry != pvecs.end(); ++pvecEntry)
1030 if (pvecEntry->first.find(match) != string::npos)
1031 pvecMap[pvecEntry->first] = pvecEntry->second;
1039 void Settings::flag(
string keyIn,
bool nowIn) {
1040 string keyLower = toLower(keyIn);
1041 if (isFlag(keyIn)) flags[keyLower].valNow = nowIn;
1043 if (keyLower ==
"print:quiet") printQuiet( nowIn);
1046 void Settings:: mode(
string keyIn,
int nowIn) {
1047 if (isMode(keyIn)) {
1048 string keyLower = toLower(keyIn);
1049 Mode& modeNow = modes[keyLower];
1050 if (modeNow.hasMin && nowIn < modeNow.valMin)
1051 modeNow.valNow = modeNow.valMin;
1052 else if (modeNow.hasMax && nowIn > modeNow.valMax)
1053 modeNow.valNow = modeNow.valMax;
1054 else modeNow.valNow = nowIn;
1056 if (keyLower ==
"tune:ee") initTuneEE( modeNow.valNow);
1057 if (keyLower ==
"tune:pp") initTunePP( modeNow.valNow);
1061 void Settings::parm(
string keyIn,
double nowIn) {
1062 if (isParm(keyIn)) {
1063 Parm& parmNow = parms[toLower(keyIn)];
1064 if (parmNow.hasMin && nowIn < parmNow.valMin)
1065 parmNow.valNow = parmNow.valMin;
1066 else if (parmNow.hasMax && nowIn > parmNow.valMax)
1067 parmNow.valNow = parmNow.valMax;
1068 else parmNow.valNow = nowIn;
1072 void Settings::word(
string keyIn,
string nowIn) {
1073 if (isWord(keyIn)) words[toLower(keyIn)].valNow = nowIn;
1076 void Settings::fvec(
string keyIn, vector<bool> nowIn) {
1077 if (isFVec(keyIn)) {
1078 FVec& fvecNow = fvecs[toLower(keyIn)];
1079 fvecNow.valNow.clear();
1080 for(vector<bool>::iterator now = nowIn.begin();
1081 now != nowIn.end(); now++)
1082 fvecNow.valNow.push_back(*now);
1086 void Settings::mvec(
string keyIn, vector<int> nowIn) {
1087 if (isMVec(keyIn)) {
1088 MVec& mvecNow = mvecs[toLower(keyIn)];
1089 mvecNow.valNow.clear();
1090 for(vector<int>::iterator now = nowIn.begin();
1091 now != nowIn.end(); now++) {
1092 if (mvecNow.hasMin && *now < mvecNow.valMin)
1093 mvecNow.valNow.push_back(mvecNow.valMin);
1094 else if (mvecNow.hasMax && *now > mvecNow.valMax)
1095 mvecNow.valNow.push_back(mvecNow.valMax);
1096 else mvecNow.valNow.push_back(*now);
1101 void Settings::pvec(
string keyIn, vector<double> nowIn) {
1102 if (isPVec(keyIn)) {
1103 PVec& pvecNow = pvecs[toLower(keyIn)];
1104 pvecNow.valNow.clear();
1105 for(vector<double>::iterator now = nowIn.begin();
1106 now != nowIn.end(); now++) {
1107 if (pvecNow.hasMin && *now < pvecNow.valMin)
1108 pvecNow.valNow.push_back(pvecNow.valMin);
1109 else if (pvecNow.hasMax && *now > pvecNow.valMax)
1110 pvecNow.valNow.push_back(pvecNow.valMax);
1111 else pvecNow.valNow.push_back(*now);
1120 void Settings::forceMode(
string keyIn,
int nowIn) {
1121 if (isMode(keyIn)) {
1122 string keyLower = toLower(keyIn);
1123 Mode& modeNow = modes[keyLower];
1124 modeNow.valNow = nowIn;
1126 if (keyLower ==
"tune:ee") initTuneEE( modeNow.valNow);
1127 if (keyLower ==
"tune:pp") initTunePP( modeNow.valNow);
1131 void Settings::forceParm(
string keyIn,
double nowIn) {
1132 if (isParm(keyIn)) parms[toLower(keyIn)].valNow = nowIn;
1135 void Settings::forceMVec(
string keyIn, vector<int> nowIn) {
1136 if (isMVec(keyIn)) mvecs[toLower(keyIn)].valNow = nowIn;
1139 void Settings::forcePVec(
string keyIn, vector<double> nowIn) {
1140 if (isPVec(keyIn)) pvecs[toLower(keyIn)].valNow = nowIn;
1147 void Settings::resetFlag(
string keyIn) {
1148 if (isFlag(keyIn)) flags[toLower(keyIn)].valNow
1149 = flags[toLower(keyIn)].valDefault ;
1152 void Settings::resetMode(
string keyIn) {
1153 string keyLower = toLower(keyIn);
1154 if (isMode(keyIn)) modes[keyLower].valNow
1155 = modes[toLower(keyIn)].valDefault ;
1157 if (keyLower ==
"tune:ee") resetTuneEE();
1158 if (keyLower ==
"tune:pp") resetTunePP();
1161 void Settings::resetParm(
string keyIn) {
1162 if (isParm(keyIn)) parms[toLower(keyIn)].valNow
1163 = parms[toLower(keyIn)].valDefault ;
1166 void Settings::resetWord(
string keyIn) {
1167 if (isWord(keyIn)) words[toLower(keyIn)].valNow
1168 = words[toLower(keyIn)].valDefault ;
1171 void Settings::resetFVec(
string keyIn) {
1172 if (isFVec(keyIn)) fvecs[toLower(keyIn)].valNow
1173 = fvecs[toLower(keyIn)].valDefault ;
1176 void Settings::resetMVec(
string keyIn) {
1177 if (isMVec(keyIn)) mvecs[toLower(keyIn)].valNow
1178 = mvecs[toLower(keyIn)].valDefault ;
1181 void Settings::resetPVec(
string keyIn) {
1182 if (isPVec(keyIn)) pvecs[toLower(keyIn)].valNow
1183 = pvecs[toLower(keyIn)].valDefault ;
1190 void Settings::printQuiet(
bool quiet) {
1194 flag(
"Init:showProcesses",
false );
1195 flag(
"Init:showMultipartonInteractions",
false );
1196 flag(
"Init:showChangedSettings",
false );
1197 flag(
"Init:showAllSettings",
false );
1198 flag(
"Init:showChangedParticleData",
false );
1199 flag(
"Init:showChangedResonanceData",
false );
1200 flag(
"Init:showAllParticleData",
false );
1201 mode(
"Init:showOneParticleData", 0 );
1202 mode(
"Next:numberCount", 0 );
1203 mode(
"Next:numberShowLHA", 0 );
1204 mode(
"Next:numberShowInfo", 0 );
1205 mode(
"Next:numberShowProcess", 0 );
1206 mode(
"Next:numberShowEvent", 0 );
1210 resetFlag(
"Init:showProcesses");
1211 resetFlag(
"Init:showMultipartonInteractions");
1212 resetFlag(
"Init:showChangedSettings");
1213 resetFlag(
"Init:showAllSettings");
1214 resetFlag(
"Init:showChangedParticleData");
1215 resetFlag(
"Init:showChangedResonanceData");
1216 resetFlag(
"Init:showAllParticleData");
1217 resetMode(
"Init:showOneParticleData");
1218 resetMode(
"Next:numberCount");
1219 resetMode(
"Next:numberShowLHA");
1220 resetMode(
"Next:numberShowInfo");
1221 resetMode(
"Next:numberShowProcess");
1222 resetMode(
"Next:numberShowEvent");
1231 void Settings::resetTuneEE() {
1234 resetParm(
"StringFlav:probStoUD");
1235 resetParm(
"StringFlav:probQQtoQ");
1236 resetParm(
"StringFlav:probSQtoQQ");
1237 resetParm(
"StringFlav:probQQ1toQQ0");
1238 resetParm(
"StringFlav:mesonUDvector");
1239 resetParm(
"StringFlav:mesonSvector");
1240 resetParm(
"StringFlav:mesonCvector");
1241 resetParm(
"StringFlav:mesonBvector");
1242 resetParm(
"StringFlav:etaSup");
1243 resetParm(
"StringFlav:etaPrimeSup");
1244 resetParm(
"StringFlav:popcornSpair");
1245 resetParm(
"StringFlav:popcornSmeson");
1246 resetFlag(
"StringFlav:suppressLeadingB");
1249 resetParm(
"StringZ:aLund");
1250 resetParm(
"StringZ:bLund");
1251 resetParm(
"StringZ:aExtraSquark");
1252 resetParm(
"StringZ:aExtraDiquark");
1253 resetParm(
"StringZ:rFactC");
1254 resetParm(
"StringZ:rFactB");
1257 resetParm(
"StringPT:sigma");
1258 resetParm(
"StringPT:enhancedFraction");
1259 resetParm(
"StringPT:enhancedWidth");
1262 resetParm(
"TimeShower:alphaSvalue");
1263 resetMode(
"TimeShower:alphaSorder");
1264 resetFlag(
"TimeShower:alphaSuseCMW");
1265 resetParm(
"TimeShower:pTmin");
1266 resetParm(
"TimeShower:pTminChgQ");
1274 void Settings::resetTunePP() {
1277 resetMode(
"PDF:pSet");
1278 resetFlag(
"PDF:useLHAPDF");
1281 resetParm(
"SigmaProcess:alphaSvalue");
1284 resetFlag(
"SigmaTotal:zeroAXB");
1285 resetFlag(
"SigmaDiffractive:dampen");
1286 resetParm(
"SigmaDiffractive:maxXB");
1287 resetParm(
"SigmaDiffractive:maxAX");
1288 resetParm(
"SigmaDiffractive:maxXX");
1289 resetParm(
"Diffraction:largeMassSuppress");
1292 resetFlag(
"TimeShower:dampenBeamRecoil");
1293 resetFlag(
"TimeShower:phiPolAsym");
1296 resetParm(
"SpaceShower:alphaSvalue");
1297 resetMode(
"SpaceShower:alphaSorder");
1298 resetParm(
"SpaceShower:alphaSuseCMW");
1299 resetFlag(
"SpaceShower:samePTasMPI");
1300 resetParm(
"SpaceShower:pT0Ref");
1301 resetParm(
"SpaceShower:ecmRef");
1302 resetParm(
"SpaceShower:ecmPow");
1303 resetFlag(
"SpaceShower:rapidityOrder");
1304 resetFlag(
"SpaceShower:phiPolAsym");
1305 resetFlag(
"SpaceShower:phiIntAsym");
1308 resetParm(
"MultipartonInteractions:alphaSvalue");
1309 resetParm(
"MultipartonInteractions:pT0Ref");
1310 resetParm(
"MultipartonInteractions:ecmRef");
1311 resetParm(
"MultipartonInteractions:ecmPow");
1312 resetMode(
"MultipartonInteractions:bProfile");
1313 resetParm(
"MultipartonInteractions:expPow");
1314 resetParm(
"MultipartonInteractions:a1");
1317 resetParm(
"BeamRemnants:primordialKTsoft");
1318 resetParm(
"BeamRemnants:primordialKThard");
1319 resetParm(
"BeamRemnants:halfScaleForKT");
1320 resetParm(
"BeamRemnants:halfMassForKT");
1321 resetParm(
"BeamRemnants:reconnectRange");
1330 void Settings::initTuneEE(
int eeTune) {
1334 if (eeTune != 0) resetTuneEE();
1339 parm(
"StringFlav:probStoUD", 0.30 );
1340 parm(
"StringFlav:probQQtoQ", 0.10 );
1341 parm(
"StringFlav:probSQtoQQ", 0.40 );
1342 parm(
"StringFlav:probQQ1toQQ0", 0.05 );
1343 parm(
"StringFlav:mesonUDvector", 1.00 );
1344 parm(
"StringFlav:mesonSvector", 1.50 );
1345 parm(
"StringFlav:mesonCvector", 2.50 );
1346 parm(
"StringFlav:mesonBvector", 3.00 );
1347 parm(
"StringFlav:etaSup", 1.00 );
1348 parm(
"StringFlav:etaPrimeSup", 0.40 );
1349 parm(
"StringFlav:popcornSpair", 0.50 );
1350 parm(
"StringFlav:popcornSmeson", 0.50 );
1351 flag(
"StringFlav:suppressLeadingB",
false );
1352 parm(
"StringZ:aLund", 0.30 );
1353 parm(
"StringZ:bLund", 0.58 );
1354 parm(
"StringZ:aExtraSquark", 0.00 );
1355 parm(
"StringZ:aExtraDiquark", 0.50 );
1356 parm(
"StringZ:rFactC", 1.00 );
1357 parm(
"StringZ:rFactB", 1.00 );
1358 parm(
"StringPT:sigma", 0.36 );
1359 parm(
"StringPT:enhancedFraction", 0.01 );
1360 parm(
"StringPT:enhancedWidth", 2.0 );
1361 parm(
"TimeShower:alphaSvalue", 0.137 );
1362 mode(
"TimeShower:alphaSorder", 1 );
1363 flag(
"TimeShower:alphaSuseCMW",
false );
1364 parm(
"TimeShower:pTmin", 0.5 );
1365 parm(
"TimeShower:pTminChgQ", 0.5 );
1369 else if (eeTune == 2) {
1370 parm(
"StringFlav:probStoUD", 0.22 );
1371 parm(
"StringFlav:probQQtoQ", 0.08 );
1372 parm(
"StringFlav:probSQtoQQ", 0.75 );
1373 parm(
"StringFlav:probQQ1toQQ0", 0.025 );
1374 parm(
"StringFlav:mesonUDvector", 0.5 );
1375 parm(
"StringFlav:mesonSvector", 0.6 );
1376 parm(
"StringFlav:mesonCvector", 1.5 );
1377 parm(
"StringFlav:mesonBvector", 2.5 );
1378 parm(
"StringFlav:etaSup", 0.60 );
1379 parm(
"StringFlav:etaPrimeSup", 0.15 );
1380 parm(
"StringFlav:popcornSpair", 1.0 );
1381 parm(
"StringFlav:popcornSmeson", 1.0 );
1382 flag(
"StringFlav:suppressLeadingB",
false );
1383 parm(
"StringZ:aLund", 0.76 );
1384 parm(
"StringZ:bLund", 0.58 );
1385 parm(
"StringZ:aExtraSquark", 0.00 );
1386 parm(
"StringZ:aExtraDiquark", 0.50 );
1387 parm(
"StringZ:rFactC", 1.00 );
1388 parm(
"StringZ:rFactB", 1.00 );
1389 parm(
"StringPT:sigma", 0.36 );
1390 parm(
"StringPT:enhancedFraction", 0.01 );
1391 parm(
"StringPT:enhancedWidth", 2.0 );
1392 parm(
"TimeShower:alphaSvalue", 0.137 );
1393 mode(
"TimeShower:alphaSorder", 1 );
1394 flag(
"TimeShower:alphaSuseCMW",
false );
1395 parm(
"TimeShower:pTmin", 0.5 );
1396 parm(
"TimeShower:pTminChgQ", 0.5 );
1401 else if (eeTune == 3) {
1402 parm(
"StringFlav:probStoUD", 0.19 );
1403 parm(
"StringFlav:probQQtoQ", 0.09 );
1404 parm(
"StringFlav:probSQtoQQ", 1.00 );
1405 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
1406 parm(
"StringFlav:mesonUDvector", 0.62 );
1407 parm(
"StringFlav:mesonSvector", 0.725 );
1408 parm(
"StringFlav:mesonCvector", 1.06 );
1409 parm(
"StringFlav:mesonBvector", 3.0 );
1410 parm(
"StringFlav:etaSup", 0.63 );
1411 parm(
"StringFlav:etaPrimeSup", 0.12 );
1412 parm(
"StringFlav:popcornSpair", 0.5 );
1413 parm(
"StringFlav:popcornSmeson", 0.5 );
1414 flag(
"StringFlav:suppressLeadingB",
false );
1415 parm(
"StringZ:aLund", 0.3 );
1416 parm(
"StringZ:bLund", 0.8 );
1417 parm(
"StringZ:aExtraSquark", 0.00 );
1418 parm(
"StringZ:aExtraDiquark", 0.50 );
1419 parm(
"StringZ:rFactC", 1.00 );
1420 parm(
"StringZ:rFactB", 0.67 );
1421 parm(
"StringPT:sigma", 0.304 );
1422 parm(
"StringPT:enhancedFraction", 0.01 );
1423 parm(
"StringPT:enhancedWidth", 2.0 );
1424 parm(
"TimeShower:alphaSvalue", 0.1383);
1425 mode(
"TimeShower:alphaSorder", 1 );
1426 flag(
"TimeShower:alphaSuseCMW",
false );
1427 parm(
"TimeShower:pTmin", 0.4 );
1428 parm(
"TimeShower:pTminChgQ", 0.4 );
1433 else if (eeTune == 4) {
1434 parm(
"StringFlav:probStoUD", 0.21 );
1435 parm(
"StringFlav:probQQtoQ", 0.086 );
1436 parm(
"StringFlav:probSQtoQQ", 1.00 );
1437 parm(
"StringFlav:probQQ1toQQ0", 0.031 );
1438 parm(
"StringFlav:mesonUDvector", 0.45 );
1439 parm(
"StringFlav:mesonSvector", 0.60 );
1440 parm(
"StringFlav:mesonCvector", 0.95 );
1441 parm(
"StringFlav:mesonBvector", 3.0 );
1442 parm(
"StringFlav:etaSup", 0.65 );
1443 parm(
"StringFlav:etaPrimeSup", 0.08 );
1444 parm(
"StringFlav:popcornSpair", 0.5 );
1445 parm(
"StringFlav:popcornSmeson", 0.5 );
1446 flag(
"StringFlav:suppressLeadingB",
false );
1447 parm(
"StringZ:aLund", 0.55 );
1448 parm(
"StringZ:bLund", 1.08 );
1449 parm(
"StringZ:aExtraSquark", 0.00 );
1450 parm(
"StringZ:aExtraDiquark", 1.00 );
1451 parm(
"StringZ:rFactC", 1.00 );
1452 parm(
"StringZ:rFactB", 0.85 );
1453 parm(
"StringPT:sigma", 0.305 );
1454 parm(
"StringPT:enhancedFraction", 0.01 );
1455 parm(
"StringPT:enhancedWidth", 2.0 );
1456 parm(
"TimeShower:alphaSvalue", 0.127 );
1457 mode(
"TimeShower:alphaSorder", 1 );
1458 flag(
"TimeShower:alphaSuseCMW",
true );
1459 parm(
"TimeShower:pTmin", 0.4 );
1460 parm(
"TimeShower:pTminChgQ", 0.4 );
1465 else if (eeTune == 5) {
1466 parm(
"StringFlav:probStoUD", 0.19 );
1467 parm(
"StringFlav:probQQtoQ", 0.09 );
1468 parm(
"StringFlav:probSQtoQQ", 1.00 );
1469 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
1470 parm(
"StringFlav:mesonUDvector", 0.62 );
1471 parm(
"StringFlav:mesonSvector", 0.725 );
1472 parm(
"StringFlav:mesonCvector", 1.06 );
1473 parm(
"StringFlav:mesonBvector", 3.0 );
1474 parm(
"StringFlav:etaSup", 0.63 );
1475 parm(
"StringFlav:etaPrimeSup", 0.12 );
1476 parm(
"StringFlav:popcornSpair", 0.5 );
1477 parm(
"StringFlav:popcornSmeson", 0.5 );
1478 flag(
"StringFlav:suppressLeadingB",
false );
1479 parm(
"StringZ:aLund", 0.386 );
1480 parm(
"StringZ:bLund", 0.977 );
1481 parm(
"StringZ:aExtraSquark", 0.00 );
1482 parm(
"StringZ:aExtraDiquark", 0.940 );
1483 parm(
"StringZ:rFactC", 1.00 );
1484 parm(
"StringZ:rFactB", 0.67 );
1485 parm(
"StringPT:sigma", 0.286 );
1486 parm(
"StringPT:enhancedFraction", 0.01 );
1487 parm(
"StringPT:enhancedWidth", 2.0 );
1488 parm(
"TimeShower:alphaSvalue", 0.139 );
1489 mode(
"TimeShower:alphaSorder", 1 );
1490 flag(
"TimeShower:alphaSuseCMW",
false );
1491 parm(
"TimeShower:pTmin", 0.409 );
1492 parm(
"TimeShower:pTminChgQ", 0.409 );
1497 else if (eeTune == 6) {
1498 parm(
"StringFlav:probStoUD", 0.19 );
1499 parm(
"StringFlav:probQQtoQ", 0.09 );
1500 parm(
"StringFlav:probSQtoQQ", 1.00 );
1501 parm(
"StringFlav:probQQ1toQQ0", 0.027 );
1502 parm(
"StringFlav:mesonUDvector", 0.62 );
1503 parm(
"StringFlav:mesonSvector", 0.725 );
1504 parm(
"StringFlav:mesonCvector", 1.06 );
1505 parm(
"StringFlav:mesonBvector", 3.0 );
1506 parm(
"StringFlav:etaSup", 0.63 );
1507 parm(
"StringFlav:etaPrimeSup", 0.12 );
1508 parm(
"StringFlav:popcornSpair", 0.5 );
1509 parm(
"StringFlav:popcornSmeson", 0.5 );
1510 flag(
"StringFlav:suppressLeadingB",
false );
1511 parm(
"StringZ:aLund", 0.351 );
1512 parm(
"StringZ:bLund", 0.942 );
1513 parm(
"StringZ:aExtraSquark", 0.00 );
1514 parm(
"StringZ:aExtraDiquark", 0.547 );
1515 parm(
"StringZ:rFactC", 1.00 );
1516 parm(
"StringZ:rFactB", 0.67 );
1517 parm(
"StringPT:sigma", 0.283 );
1518 parm(
"StringPT:enhancedFraction", 0.01 );
1519 parm(
"StringPT:enhancedWidth", 2.0 );
1520 parm(
"TimeShower:alphaSvalue", 0.139);
1521 mode(
"TimeShower:alphaSorder", 1 );
1522 flag(
"TimeShower:alphaSuseCMW",
false );
1523 parm(
"TimeShower:pTmin", 0.406 );
1524 parm(
"TimeShower:pTminChgQ", 0.406 );
1528 else if (eeTune == 7) {
1529 parm(
"StringFlav:probStoUD", 0.217 );
1530 parm(
"StringFlav:probQQtoQ", 0.081 );
1531 parm(
"StringFlav:probSQtoQQ", 0.915 );
1532 parm(
"StringFlav:probQQ1toQQ0", 0.0275);
1533 parm(
"StringFlav:mesonUDvector", 0.50 );
1534 parm(
"StringFlav:mesonSvector", 0.55 );
1535 parm(
"StringFlav:mesonCvector", 0.88 );
1536 parm(
"StringFlav:mesonBvector", 2.20 );
1537 parm(
"StringFlav:etaSup", 0.60 );
1538 parm(
"StringFlav:etaPrimeSup", 0.12 );
1539 parm(
"StringFlav:popcornSpair", 0.90 );
1540 parm(
"StringFlav:popcornSmeson", 0.50 );
1541 flag(
"StringFlav:suppressLeadingB",
false );
1542 parm(
"StringZ:aLund", 0.68 );
1543 parm(
"StringZ:bLund", 0.98 );
1544 parm(
"StringZ:aExtraSquark", 0.00 );
1545 parm(
"StringZ:aExtraDiquark", 0.97 );
1546 parm(
"StringZ:rFactC", 1.32 );
1547 parm(
"StringZ:rFactB", 0.855 );
1548 parm(
"StringPT:sigma", 0.335 );
1549 parm(
"StringPT:enhancedFraction", 0.01 );
1550 parm(
"StringPT:enhancedWidth", 2.0 );
1551 parm(
"TimeShower:alphaSvalue", 0.1365);
1552 mode(
"TimeShower:alphaSorder", 1 );
1553 flag(
"TimeShower:alphaSuseCMW",
false );
1554 parm(
"TimeShower:pTmin", 0.5 );
1555 parm(
"TimeShower:pTminChgQ", 0.5 );
1565 void Settings::initTunePP(
int ppTune) {
1569 if (ppTune != 0) resetTunePP();
1572 bool preferLHAPDF = flag(
"Tune:preferLHAPDF");
1576 mode(
"PDF:pSet", 2 );
1577 parm(
"SigmaProcess:alphaSvalue", 0.1265);
1578 flag(
"SigmaTotal:zeroAXB",
true );
1579 flag(
"SigmaDiffractive:dampen",
false );
1580 parm(
"Diffraction:largeMassSuppress", 2.0 );
1581 flag(
"TimeShower:dampenBeamRecoil",
false );
1582 flag(
"TimeShower:phiPolAsym",
false );
1583 parm(
"SpaceShower:alphaSvalue", 0.127 );
1584 mode(
"SpaceShower:alphaSorder", 1 );
1585 flag(
"SpaceShower:alphaSuseCMW",
false );
1586 flag(
"SpaceShower:samePTasMPI",
true );
1587 parm(
"SpaceShower:pT0Ref", 2.2 );
1588 parm(
"SpaceShower:ecmRef", 1800.0);
1589 parm(
"SpaceShower:ecmPow", 0.16 );
1590 flag(
"SpaceShower:rapidityOrder",
false );
1591 flag(
"SpaceShower:phiPolAsym",
false );
1592 flag(
"SpaceShower:phiIntAsym",
false );
1593 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
1594 parm(
"MultipartonInteractions:pT0Ref", 2.15 );
1595 parm(
"MultipartonInteractions:ecmRef", 1800. );
1596 parm(
"MultipartonInteractions:ecmPow", 0.16 );
1597 mode(
"MultipartonInteractions:bProfile", 2 );
1598 parm(
"MultipartonInteractions:expPow", 1.0 );
1599 parm(
"MultipartonInteractions:a1", 0.15 );
1600 parm(
"BeamRemnants:primordialKTsoft", 0.4 );
1601 parm(
"BeamRemnants:primordialKThard", 2.1 );
1602 parm(
"BeamRemnants:halfScaleForKT", 7.0 );
1603 parm(
"BeamRemnants:halfMassForKT", 2.0 );
1604 parm(
"BeamRemnants:reconnectRange", 2.5 );
1608 else if (ppTune == 2) {
1609 mode(
"PDF:pSet", 2 );
1610 parm(
"SigmaProcess:alphaSvalue", 0.1265);
1611 flag(
"SigmaTotal:zeroAXB",
true );
1612 flag(
"SigmaDiffractive:dampen",
false );
1613 parm(
"Diffraction:largeMassSuppress", 2.0 );
1614 flag(
"TimeShower:dampenBeamRecoil",
false );
1615 flag(
"TimeShower:phiPolAsym",
false );
1616 parm(
"SpaceShower:alphaSvalue", 0.137 );
1617 mode(
"SpaceShower:alphaSorder", 1 );
1618 flag(
"SpaceShower:alphaSuseCMW",
false );
1619 flag(
"SpaceShower:samePTasMPI",
false );
1620 parm(
"SpaceShower:pT0Ref", 2.0 );
1621 parm(
"SpaceShower:ecmRef", 1800.0);
1622 parm(
"SpaceShower:ecmPow", 0.0 );
1623 flag(
"SpaceShower:rapidityOrder",
false );
1624 flag(
"SpaceShower:phiPolAsym",
false );
1625 flag(
"SpaceShower:phiIntAsym",
false );
1626 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
1627 parm(
"MultipartonInteractions:pT0Ref", 2.25 );
1628 parm(
"MultipartonInteractions:ecmRef", 1800. );
1629 parm(
"MultipartonInteractions:ecmPow", 0.24 );
1630 mode(
"MultipartonInteractions:bProfile", 1 );
1631 parm(
"MultipartonInteractions:expPow", 1.0 );
1632 parm(
"MultipartonInteractions:a1", 0.15 );
1633 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1634 parm(
"BeamRemnants:primordialKThard", 2.0 );
1635 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1636 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1637 parm(
"BeamRemnants:reconnectRange", 10.0 );
1641 else if (ppTune == 3) {
1642 mode(
"PDF:pSet", 8 );
1643 parm(
"SigmaProcess:alphaSvalue", 0.135 );
1644 flag(
"SigmaTotal:zeroAXB",
true );
1645 flag(
"SigmaDiffractive:dampen",
false );
1646 parm(
"Diffraction:largeMassSuppress", 2.0 );
1647 flag(
"TimeShower:dampenBeamRecoil",
true );
1648 flag(
"TimeShower:phiPolAsym",
true );
1649 parm(
"SpaceShower:alphaSvalue", 0.137 );
1650 mode(
"SpaceShower:alphaSorder", 1 );
1651 flag(
"SpaceShower:alphaSuseCMW",
false );
1652 flag(
"SpaceShower:samePTasMPI",
false );
1653 parm(
"SpaceShower:pT0Ref", 2.0 );
1654 parm(
"SpaceShower:ecmRef", 1800.0);
1655 parm(
"SpaceShower:ecmPow", 0.0 );
1656 flag(
"SpaceShower:rapidityOrder",
true );
1657 flag(
"SpaceShower:phiPolAsym",
true );
1658 flag(
"SpaceShower:phiIntAsym",
true );
1659 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
1660 parm(
"MultipartonInteractions:pT0Ref", 2.32 );
1661 parm(
"MultipartonInteractions:ecmRef", 1800. );
1662 parm(
"MultipartonInteractions:ecmPow", 0.21 );
1663 mode(
"MultipartonInteractions:bProfile", 3 );
1664 parm(
"MultipartonInteractions:expPow", 1.6 );
1665 parm(
"MultipartonInteractions:a1", 0.15 );
1666 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1667 parm(
"BeamRemnants:primordialKThard", 2.0 );
1668 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1669 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1670 parm(
"BeamRemnants:reconnectRange", 3.0 );
1674 else if (ppTune == 4) {
1675 mode(
"PDF:pSet", 4 );
1676 parm(
"SigmaProcess:alphaSvalue", 0.1265);
1677 flag(
"SigmaTotal:zeroAXB",
true );
1678 flag(
"SigmaDiffractive:dampen",
false );
1679 parm(
"Diffraction:largeMassSuppress", 2.0 );
1680 flag(
"TimeShower:dampenBeamRecoil",
true );
1681 flag(
"TimeShower:phiPolAsym",
true );
1682 parm(
"SpaceShower:alphaSvalue", 0.130 );
1683 mode(
"SpaceShower:alphaSorder", 1 );
1684 flag(
"SpaceShower:alphaSuseCMW",
false );
1685 flag(
"SpaceShower:samePTasMPI",
false );
1686 parm(
"SpaceShower:pT0Ref", 2.0 );
1687 parm(
"SpaceShower:ecmRef", 1800.0);
1688 parm(
"SpaceShower:ecmPow", 0.0 );
1689 flag(
"SpaceShower:rapidityOrder",
true );
1690 flag(
"SpaceShower:phiPolAsym",
true );
1691 flag(
"SpaceShower:phiIntAsym",
true );
1692 parm(
"MultipartonInteractions:alphaSvalue", 0.127 );
1693 parm(
"MultipartonInteractions:pT0Ref", 2.455 );
1694 parm(
"MultipartonInteractions:ecmRef", 1800. );
1695 parm(
"MultipartonInteractions:ecmPow", 0.26 );
1696 mode(
"MultipartonInteractions:bProfile", 3 );
1697 parm(
"MultipartonInteractions:expPow", 1.15 );
1698 parm(
"MultipartonInteractions:a1", 0.15 );
1699 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1700 parm(
"BeamRemnants:primordialKThard", 2.0 );
1701 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1702 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1703 parm(
"BeamRemnants:reconnectRange", 3.0 );
1707 else if (ppTune == 5) {
1708 mode(
"PDF:pSet", 8 );
1709 parm(
"SigmaProcess:alphaSvalue", 0.135 );
1710 flag(
"SigmaTotal:zeroAXB",
true );
1711 flag(
"SigmaDiffractive:dampen",
true );
1712 parm(
"SigmaDiffractive:maxXB", 65.0 );
1713 parm(
"SigmaDiffractive:maxAX", 65.0 );
1714 parm(
"SigmaDiffractive:maxXX", 65.0 );
1715 parm(
"Diffraction:largeMassSuppress", 2.0 );
1716 flag(
"TimeShower:dampenBeamRecoil",
true );
1717 flag(
"TimeShower:phiPolAsym",
true );
1718 parm(
"SpaceShower:alphaSvalue", 0.137 );
1719 mode(
"SpaceShower:alphaSorder", 1 );
1720 flag(
"SpaceShower:alphaSuseCMW",
false );
1721 flag(
"SpaceShower:samePTasMPI",
false );
1722 parm(
"SpaceShower:pT0Ref", 2.0 );
1723 parm(
"SpaceShower:ecmRef", 1800.0);
1724 parm(
"SpaceShower:ecmPow", 0.0 );
1725 flag(
"SpaceShower:rapidityOrder",
true );
1726 flag(
"SpaceShower:phiPolAsym",
true );
1727 flag(
"SpaceShower:phiIntAsym",
true );
1728 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
1729 parm(
"MultipartonInteractions:pT0Ref", 2.085 );
1730 parm(
"MultipartonInteractions:ecmRef", 1800. );
1731 parm(
"MultipartonInteractions:ecmPow", 0.19 );
1732 mode(
"MultipartonInteractions:bProfile", 3 );
1733 parm(
"MultipartonInteractions:expPow", 2.0 );
1734 parm(
"MultipartonInteractions:a1", 0.15 );
1735 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1736 parm(
"BeamRemnants:primordialKThard", 2.0 );
1737 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1738 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1739 parm(
"BeamRemnants:reconnectRange", 1.5 );
1743 else if (ppTune == 6) {
1744 mode(
"PDF:pSet", 8 );
1745 parm(
"SigmaProcess:alphaSvalue", 0.135 );
1746 flag(
"SigmaTotal:zeroAXB",
true );
1747 flag(
"SigmaDiffractive:dampen",
true );
1748 parm(
"SigmaDiffractive:maxXB", 65.0 );
1749 parm(
"SigmaDiffractive:maxAX", 65.0 );
1750 parm(
"SigmaDiffractive:maxXX", 65.0 );
1751 parm(
"Diffraction:largeMassSuppress", 2.0 );
1752 flag(
"TimeShower:dampenBeamRecoil",
true );
1753 flag(
"TimeShower:phiPolAsym",
true );
1754 parm(
"SpaceShower:alphaSvalue", 0.137 );
1755 mode(
"SpaceShower:alphaSorder", 1 );
1756 flag(
"SpaceShower:alphaSuseCMW",
false );
1757 flag(
"SpaceShower:samePTasMPI",
false );
1758 parm(
"SpaceShower:pT0Ref", 2.0 );
1759 parm(
"SpaceShower:ecmRef", 1800.0);
1760 parm(
"SpaceShower:ecmPow", 0.0 );
1761 flag(
"SpaceShower:rapidityOrder",
true );
1762 flag(
"SpaceShower:phiPolAsym",
true );
1763 flag(
"SpaceShower:phiIntAsym",
true );
1764 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
1765 parm(
"MultipartonInteractions:pT0Ref", 2.15 );
1766 parm(
"MultipartonInteractions:ecmRef", 1800. );
1767 parm(
"MultipartonInteractions:ecmPow", 0.19 );
1768 mode(
"MultipartonInteractions:bProfile", 4 );
1769 parm(
"MultipartonInteractions:expPow", 1.0 );
1770 parm(
"MultipartonInteractions:a1", 0.15 );
1771 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1772 parm(
"BeamRemnants:primordialKThard", 2.0 );
1773 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1774 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1775 parm(
"BeamRemnants:reconnectRange", 1.5 );
1780 else if (ppTune < 14) {
1781 parm(
"SigmaProcess:alphaSvalue", 0.135 );
1782 flag(
"SigmaTotal:zeroAXB",
true );
1783 flag(
"SigmaDiffractive:dampen",
true );
1784 parm(
"SigmaDiffractive:maxXB", 65.0 );
1785 parm(
"SigmaDiffractive:maxAX", 65.0 );
1786 parm(
"SigmaDiffractive:maxXX", 65.0 );
1787 parm(
"Diffraction:largeMassSuppress", 2.0 );
1788 flag(
"TimeShower:dampenBeamRecoil",
true );
1789 flag(
"TimeShower:phiPolAsym",
true );
1790 parm(
"SpaceShower:alphaSvalue", 0.137 );
1791 mode(
"SpaceShower:alphaSorder", 1 );
1792 flag(
"SpaceShower:alphaSuseCMW",
false );
1793 flag(
"SpaceShower:samePTasMPI",
false );
1794 parm(
"SpaceShower:pT0Ref", 2.0 );
1795 parm(
"SpaceShower:ecmRef", 1800.0);
1796 parm(
"SpaceShower:ecmPow", 0.0 );
1797 flag(
"SpaceShower:rapidityOrder",
false );
1798 flag(
"SpaceShower:phiPolAsym",
true );
1799 flag(
"SpaceShower:phiIntAsym",
true );
1800 parm(
"MultipartonInteractions:alphaSvalue", 0.135 );
1801 parm(
"MultipartonInteractions:ecmRef", 1800. );
1802 mode(
"MultipartonInteractions:bProfile", 4 );
1803 parm(
"MultipartonInteractions:expPow", 1.0 );
1804 parm(
"MultipartonInteractions:a1", 0.15 );
1805 parm(
"BeamRemnants:primordialKTsoft", 0.5 );
1806 parm(
"BeamRemnants:primordialKThard", 2.0 );
1807 parm(
"BeamRemnants:halfScaleForKT", 1.0 );
1808 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1813 flag(
"PDF:useLHAPDF",
true );
1814 word(
"PDF:LHAPDFset",
"cteq6ll.LHpdf");
1815 }
else mode(
"PDF:pSet", 8 );
1816 parm(
"MultipartonInteractions:pT0Ref", 2.18 );
1817 parm(
"MultipartonInteractions:ecmPow", 0.22 );
1818 parm(
"MultipartonInteractions:a1", 0.06 );
1819 parm(
"BeamRemnants:reconnectRange", 1.55 );
1823 else if (ppTune == 8) {
1825 flag(
"PDF:useLHAPDF",
true );
1826 word(
"PDF:LHAPDFset",
"MSTW2008lo68cl.LHgrid");
1827 }
else mode(
"PDF:pSet", 5 );
1828 parm(
"MultipartonInteractions:pT0Ref", 1.90 );
1829 parm(
"MultipartonInteractions:ecmPow", 0.30 );
1830 parm(
"MultipartonInteractions:a1", 0.03 );
1831 parm(
"BeamRemnants:reconnectRange", 2.28 );
1837 flag(
"PDF:useLHAPDF",
true );
1838 word(
"PDF:LHAPDFset",
"cteq6ll.LHpdf");
1839 }
else mode(
"PDF:pSet", 8 );
1840 parm(
"MultipartonInteractions:pT0Ref", 2.13 );
1841 parm(
"MultipartonInteractions:ecmPow", 0.21 );
1842 parm(
"MultipartonInteractions:a1", 0.00 );
1843 parm(
"BeamRemnants:reconnectRange", 2.21 );
1847 else if (ppTune == 10) {
1849 flag(
"PDF:useLHAPDF",
true );
1850 word(
"PDF:LHAPDFset",
"MSTW2008lo68cl.LHgrid");
1851 }
else mode(
"PDF:pSet", 5 );
1852 parm(
"MultipartonInteractions:pT0Ref", 1.87 );
1853 parm(
"MultipartonInteractions:ecmPow", 0.28 );
1854 parm(
"MultipartonInteractions:a1", 0.01 );
1855 parm(
"BeamRemnants:reconnectRange", 5.32 );
1859 else if (ppTune == 11) {
1860 flag(
"PDF:useLHAPDF",
true );
1861 word(
"PDF:LHAPDFset",
"CT10.LHgrid");
1862 parm(
"MultipartonInteractions:pT0Ref", 1.70 );
1863 parm(
"MultipartonInteractions:ecmPow", 0.16 );
1864 parm(
"MultipartonInteractions:a1", 0.10 );
1865 parm(
"BeamRemnants:reconnectRange", 4.67 );
1869 else if (ppTune == 12) {
1871 flag(
"PDF:useLHAPDF",
true );
1872 word(
"PDF:LHAPDFset",
"MRST2007lomod.LHgrid");
1873 }
else mode(
"PDF:pSet", 3 );
1874 parm(
"MultipartonInteractions:pT0Ref", 2.39 );
1875 parm(
"MultipartonInteractions:ecmPow", 0.24 );
1876 parm(
"MultipartonInteractions:a1", 0.01 );
1877 parm(
"BeamRemnants:reconnectRange", 1.76 );
1881 else if (ppTune == 13) {
1883 flag(
"PDF:useLHAPDF",
true );
1884 word(
"PDF:LHAPDFset",
"MRSTMCal.LHgrid");
1885 }
else mode(
"PDF:pSet", 4 );
1886 parm(
"MultipartonInteractions:pT0Ref", 2.57 );
1887 parm(
"MultipartonInteractions:ecmPow", 0.23 );
1888 parm(
"MultipartonInteractions:a1", 0.01 );
1889 parm(
"BeamRemnants:reconnectRange", 1.47 );
1894 else if (ppTune == 14) {
1895 mode(
"PDF:pSet", 13 );
1896 parm(
"SigmaProcess:alphaSvalue", 0.130 );
1897 flag(
"SigmaTotal:zeroAXB",
true );
1898 flag(
"SigmaDiffractive:dampen",
true );
1899 parm(
"SigmaDiffractive:maxXB", 65.0 );
1900 parm(
"SigmaDiffractive:maxAX", 65.0 );
1901 parm(
"SigmaDiffractive:maxXX", 65.0 );
1902 parm(
"Diffraction:largeMassSuppress", 4.0 );
1903 flag(
"TimeShower:dampenBeamRecoil",
true );
1904 flag(
"TimeShower:phiPolAsym",
true );
1905 parm(
"SpaceShower:alphaSvalue", 0.1365);
1906 mode(
"SpaceShower:alphaSorder", 1 );
1907 flag(
"SpaceShower:alphaSuseCMW",
false );
1908 flag(
"SpaceShower:samePTasMPI",
false );
1909 parm(
"SpaceShower:pT0Ref", 2.0 );
1910 parm(
"SpaceShower:ecmRef", 7000.0);
1911 parm(
"SpaceShower:ecmPow", 0.0 );
1912 flag(
"SpaceShower:rapidityOrder",
true );
1913 flag(
"SpaceShower:phiPolAsym",
true );
1914 flag(
"SpaceShower:phiIntAsym",
true );
1915 parm(
"MultipartonInteractions:alphaSvalue", 0.130 );
1916 parm(
"MultipartonInteractions:pT0Ref", 2.28 );
1917 parm(
"MultipartonInteractions:ecmRef", 7000. );
1918 parm(
"MultipartonInteractions:ecmPow", 0.215 );
1919 mode(
"MultipartonInteractions:bProfile", 3 );
1920 parm(
"MultipartonInteractions:expPow", 1.85 );
1921 parm(
"MultipartonInteractions:a1", 0.15 );
1922 parm(
"BeamRemnants:primordialKTsoft", 0.9 );
1923 parm(
"BeamRemnants:primordialKThard", 1.8 );
1924 parm(
"BeamRemnants:halfScaleForKT", 1.5 );
1925 parm(
"BeamRemnants:halfMassForKT", 1.0 );
1926 parm(
"BeamRemnants:reconnectRange", 1.80 );
1936 string Settings::toLower(
const string& name) {
1939 if (name.find_first_not_of(
" \n\t\v\b\r\f\a") == string::npos)
return "";
1940 int firstChar = name.find_first_not_of(
" \n\t\v\b\r\f\a");
1941 int lastChar = name.find_last_not_of(
" \n\t\v\b\r\f\a");
1942 string temp = name.substr( firstChar, lastChar + 1 - firstChar);
1945 for (
int i = 0; i < int(temp.length()); ++i) temp[i] = tolower(temp[i]);
1954 bool Settings::boolString(
string tag) {
1956 string tagLow = toLower(tag);
1957 return ( tagLow ==
"true" || tagLow ==
"1" || tagLow ==
"on"
1958 || tagLow ==
"yes" || tagLow ==
"ok" );
1966 string Settings::attributeValue(
string line,
string attribute) {
1968 if (line.find(attribute) == string::npos)
return "";
1969 int iBegAttri = line.find(attribute);
1970 int iBegQuote = line.find(
"\"", iBegAttri + 1);
1971 int iEndQuote = line.find(
"\"", iBegQuote + 1);
1972 return line.substr(iBegQuote + 1, iEndQuote - iBegQuote - 1);
1980 bool Settings::boolAttributeValue(
string line,
string attribute) {
1982 string valString = attributeValue(line, attribute);
1983 if (valString ==
"")
return false;
1984 return boolString(valString);
1992 int Settings::intAttributeValue(
string line,
string attribute) {
1993 string valString = attributeValue(line, attribute);
1994 if (valString ==
"")
return 0;
1995 istringstream valStream(valString);
1997 valStream >> intVal;
2006 double Settings::doubleAttributeValue(
string line,
string attribute) {
2007 string valString = attributeValue(line, attribute);
2008 if (valString ==
"")
return 0.;
2009 istringstream valStream(valString);
2011 valStream >> doubleVal;
2020 vector<bool> Settings::boolVectorAttributeValue(
string line,
2022 string valString = attributeValue(line, attribute);
2023 if (valString ==
"")
return vector<bool>(1,
false);
2024 vector<bool> vectorVal;
2025 size_t stringPos(0);
2026 while (stringPos != string::npos) {
2027 stringPos = valString.find(
",");
2028 istringstream valStream(valString.substr(0, stringPos));
2029 valString = valString.substr(stringPos + 1);
2030 vectorVal.push_back(boolString(valStream.str()));
2040 vector<int> Settings::intVectorAttributeValue(
string line,
2042 string valString = attributeValue(line, attribute);
2043 if (valString ==
"")
return vector<int>(1, 0);
2045 vector<int> vectorVal;
2046 size_t stringPos(0);
2047 while (stringPos != string::npos) {
2048 stringPos = valString.find(
",");
2049 istringstream valStream(valString.substr(0, stringPos));
2050 valString = valString.substr(stringPos + 1);
2051 valStream >> intVal;
2052 vectorVal.push_back(intVal);
2062 vector<double> Settings::doubleVectorAttributeValue(
string line,
2064 string valString = attributeValue(line, attribute);
2065 if (valString ==
"")
return vector<double>(1, 0.);
2067 vector<double> vectorVal;
2068 size_t stringPos(0);
2069 while (stringPos != string::npos) {
2070 stringPos = valString.find(
",");
2071 istringstream valStream(valString.substr(0, stringPos));
2072 valString = valString.substr(stringPos + 1);
2073 valStream >> doubleVal;
2074 vectorVal.push_back(doubleVal);