10 #ifndef Pythia8_Info_H
11 #define Pythia8_Info_H
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/LHEF3.h"
15 #include "Pythia8/PythiaStdlib.h"
16 #include "Pythia8/SharedPointers.h"
17 #include "Pythia8/Weights.h"
48 Info(
bool) : Info() {}
52 if (hasOwnEventAttributes && eventAttributes !=
nullptr)
53 delete eventAttributes;
58 Info & operator=(
const Info &) =
default;
63 void setPtrs(Settings* settingsPtrIn, ParticleData* particleDataPtrIn,
64 Rndm* rndmPtrIn, CoupSM* coupSMPtrIn, CoupSUSY* coupSUSYPtrIn,
65 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
66 BeamParticle* beamPomAPtrIn, BeamParticle* beamPomBPtrIn,
67 BeamParticle* beamGamAPtrIn, BeamParticle* beamGamBPtrIn,
68 BeamParticle* beamVMDAPtrIn, BeamParticle* beamVMDBPtrIn,
69 PartonSystems* partonSystemsPtrIn, SigmaTotal* sigmaTotPtrIn,
70 HadronWidths* hadronWidthsPtrIn,
71 WeightContainer* weightContainerPtrIn) {
72 settingsPtr = settingsPtrIn; particleDataPtr = particleDataPtrIn;
73 rndmPtr = rndmPtrIn; coupSMPtr = coupSMPtrIn; coupSUSYPtr = coupSUSYPtrIn;
74 beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;
75 beamPomAPtr = beamPomAPtrIn; beamPomBPtr = beamPomBPtrIn;
76 beamGamAPtr = beamGamAPtrIn; beamGamBPtr = beamGamBPtrIn;
77 beamVMDAPtr = beamVMDAPtrIn; beamVMDBPtr = beamVMDBPtrIn;
78 partonSystemsPtr = partonSystemsPtrIn; sigmaTotPtr = sigmaTotPtrIn;
79 hadronWidthsPtr = hadronWidthsPtrIn;
80 weightContainerPtr = weightContainerPtrIn; }
83 Settings* settingsPtr{};
86 ParticleData* particleDataPtr{};
93 CoupSUSY* coupSUSYPtr{};
97 BeamParticle* beamAPtr{};
98 BeamParticle* beamBPtr{};
99 BeamParticle* beamPomAPtr{};
100 BeamParticle* beamPomBPtr{};
101 BeamParticle* beamGamAPtr{};
102 BeamParticle* beamGamBPtr{};
103 BeamParticle* beamVMDAPtr{};
104 BeamParticle* beamVMDBPtr{};
107 PartonSystems* partonSystemsPtr{};
110 SigmaTotal* sigmaTotPtr{};
113 HadronWidths* hadronWidthsPtr;
116 UserHooksPtr userHooksPtr{};
122 WeightContainer* weightContainerPtr{};
128 int idA()
const {
return idASave;}
129 int idB()
const {
return idBSave;}
130 double pzA()
const {
return pzASave;}
131 double pzB()
const {
return pzBSave;}
132 double eA()
const {
return eASave;}
133 double eB()
const {
return eBSave;}
134 double mA()
const {
return mASave;}
135 double mB()
const {
return mBSave;}
136 double eCM()
const {
return eCMSave;}
137 double s()
const {
return sSave;}
140 bool tooLowPTmin()
const {
return lowPTmin;}
143 string name()
const {
return nameSave;}
144 int code()
const {
return codeSave;}
145 int nFinal()
const {
return nFinalSave;}
148 bool isResolved()
const {
return isRes;}
149 bool isDiffractiveA()
const {
return isDiffA;}
150 bool isDiffractiveB()
const {
return isDiffB;}
151 bool isDiffractiveC()
const {
return isDiffC;}
152 bool isNonDiffractive()
const {
return isND;}
153 bool isElastic()
const {
return (codeSave == 102);}
155 bool isMinBias()
const {
return isND;}
158 bool isLHA()
const {
return isLH;}
159 bool atEndOfFile()
const {
return atEOF;}
162 bool hasSub(
int i = 0)
const {
return hasSubSave[i];}
163 string nameSub(
int i = 0)
const {
return nameSubSave[i];}
164 int codeSub(
int i = 0)
const {
return codeSubSave[i];}
165 int nFinalSub(
int i = 0)
const {
return nFinalSubSave[i];}
168 int id1(
int i = 0)
const {
return id1Save[i];}
169 int id2(
int i = 0)
const {
return id2Save[i];}
170 double x1(
int i = 0)
const {
return x1Save[i];}
171 double x2(
int i = 0)
const {
return x2Save[i];}
172 double y(
int i = 0)
const {
return 0.5 * log( x1Save[i] / x2Save[i]);}
173 double tau(
int i = 0)
const {
return x1Save[i] * x2Save[i];}
176 int id1pdf(
int i = 0)
const {
return id1pdfSave[i];}
177 int id2pdf(
int i = 0)
const {
return id2pdfSave[i];}
178 double x1pdf(
int i = 0)
const {
return x1pdfSave[i];}
179 double x2pdf(
int i = 0)
const {
return x2pdfSave[i];}
180 double pdf1(
int i = 0)
const {
return pdf1Save[i];}
181 double pdf2(
int i = 0)
const {
return pdf2Save[i];}
182 double QFac(
int i = 0)
const {
return sqrtpos(Q2FacSave[i]);}
183 double Q2Fac(
int i = 0)
const {
return Q2FacSave[i];}
184 bool isValence1()
const {
return isVal1;}
185 bool isValence2()
const {
return isVal2;}
186 double alphaS(
int i = 0)
const {
return alphaSSave[i];}
187 double alphaEM(
int i = 0)
const {
return alphaEMSave[i];}
188 double QRen(
int i = 0)
const {
return sqrtpos(Q2RenSave[i]);}
189 double Q2Ren(
int i = 0)
const {
return Q2RenSave[i];}
190 double scalup(
int i = 0)
const {
return scalupSave[i];}
193 double xGammaA()
const {
return x1GammaSave;}
194 double xGammaB()
const {
return x2GammaSave;}
195 double Q2GammaA()
const {
return Q2Gamma1Save;}
196 double Q2GammaB()
const {
return Q2Gamma2Save;}
197 double eCMsub()
const {
return eCMsubSave;}
198 double thetaScatLepA()
const {
return thetaLepton1;}
199 double thetaScatLepB()
const {
return thetaLepton2;}
200 double sHatNew()
const {
return sHatNewSave;}
201 int photonMode()
const {
return gammaModeEvent;}
204 bool isVMDstateA()
const {
return isVMDstateAEvent;}
205 bool isVMDstateB()
const {
return isVMDstateBEvent;}
206 int idVMDA()
const {
return idVMDASave;}
207 int idVMDB()
const {
return idVMDBSave;}
208 double mVMDA()
const {
return mVMDASave;}
209 double mVMDB()
const {
return mVMDBSave;}
210 double scaleVMDA()
const {
return scaleVMDASave;}
211 double scaleVMDB()
const {
return scaleVMDBSave;}
214 double mHat(
int i = 0)
const {
return sqrt(sH[i]);}
215 double sHat(
int i = 0)
const {
return sH[i];}
216 double tHat(
int i = 0)
const {
return tH[i];}
217 double uHat(
int i = 0)
const {
return uH[i];}
218 double pTHat(
int i = 0)
const {
return pTH[i];}
219 double pT2Hat(
int i = 0)
const {
return pTH[i] * pTH[i];}
220 double m3Hat(
int i = 0)
const {
return m3H[i];}
221 double m4Hat(
int i = 0)
const {
return m4H[i];}
222 double thetaHat(
int i = 0)
const {
return thetaH[i];}
223 double phiHat(
int i = 0)
const {
return phiH[i];}
229 double weight(
int i = 0)
const;
230 double weightSum()
const;
231 double lhaStrategy()
const {
return lhaStrategySave;}
235 {
return weightContainerPtr->weightsPS.getWeightsSize(); }
236 string weightLabel(
int iWeight)
const {
237 return weightContainerPtr->weightsPS.getWeightsName(iWeight);
240 int nVariationGroups()
const {
return weightContainerPtr->
241 weightsPS.externalVariations.size(); }
242 string getGroupName(
int iGN)
const {
243 return weightContainerPtr->weightsPS.getGroupName(iGN);
245 double getGroupWeight(
int iGW)
const {
246 return weightContainerPtr->weightsPS.getGroupWeight(iGW)
247 *weightContainerPtr->weightNominal;
251 int nISR()
const {
return nISRSave;}
252 int nFSRinProc()
const {
return nFSRinProcSave;}
253 int nFSRinRes()
const {
return nFSRinResSave;}
256 double pTmaxMPI()
const {
return pTmaxMPISave;}
257 double pTmaxISR()
const {
return pTmaxISRSave;}
258 double pTmaxFSR()
const {
return pTmaxFSRSave;}
261 double pTnow()
const {
return pTnowSave;}
264 double a0MPI()
const {
return a0MPISave;}
267 double bMPI()
const {
return (bIsSet) ? bMPISave : 1.;}
268 double enhanceMPI()
const {
return (bIsSet) ? enhanceMPISave : 1.;}
269 double enhanceMPIavg()
const {
return (bIsSet) ? enhanceMPIavgSave : 1.;}
270 double eMPI(
int i)
const {
return (bIsSet) ? eMPISave[i] : 1.;}
271 double bMPIold()
const {
return (bIsSet) ? bMPIoldSave : 1.;}
272 double enhanceMPIold()
const {
return (bIsSet) ? enhanceMPIoldSave : 1.;}
273 double enhanceMPIoldavg()
const {
return (bIsSet)
274 ? enhanceMPIoldavgSave : 1.;}
277 int nMPI()
const {
return nMPISave;}
278 int codeMPI(
int i)
const {
return codeMPISave[i];}
279 double pTMPI(
int i)
const {
return pTMPISave[i];}
280 int iAMPI(
int i)
const {
return iAMPISave[i];}
281 int iBMPI(
int i)
const {
return iBMPISave[i];}
284 vector<int> codesHard();
285 string nameProc(
int i = 0)
const {
return (i == 0) ?
"sum"
286 : ( (procNameM.at(i) ==
"") ?
"unknown process" : procNameM.at(i) );}
287 long nTried(
int i = 0)
const {
return (i == 0) ? nTry : nTryM.at(i);}
288 long nSelected(
int i = 0)
const {
return (i == 0) ? nSel : nSelM.at(i);}
289 long nAccepted(
int i = 0)
const {
return (i == 0) ? nAcc : nAccM.at(i);}
290 double sigmaGen(
int i = 0)
const {
return (i == 0) ? sigGen : sigGenM.at(i);}
291 double sigmaErr(
int i = 0)
const {
return (i == 0) ? sigErr : sigErrM.at(i);}
294 int getCounter(
int i)
const {
return counters[i];}
297 void setCounter(
int i,
int value = 0) {counters[i] = value;}
298 void addCounter(
int i,
int value = 1) {counters[i] += value;}
301 void errorReset() {messages.clear();}
304 void errorMsg(
string messageIn,
string extraIn =
" ",
305 bool showAlways =
false);
308 int errorTotalNumber()
const;
311 void errorStatistics()
const;
314 void setTooLowPTmin(
bool lowPTminIn) {lowPTmin = lowPTminIn;}
317 void setValence(
bool isVal1In,
bool isVal2In) {isVal1 = isVal1In;
322 void hasHistory(
bool hasHistoryIn) {hasHistorySave = hasHistoryIn;}
323 bool hasHistory() {
return hasHistorySave;}
324 void zNowISR(
double zNowIn) {zNowISRSave = zNowIn;}
325 double zNowISR() {
return zNowISRSave;}
326 void pT2NowISR(
double pT2NowIn) {pT2NowISRSave = pT2NowIn;}
327 double pT2NowISR() {
return pT2NowISRSave;}
330 double mergingWeight(
int i=0)
const {
331 return weightContainerPtr->weightsMerging.getWeightsValue(i);}
334 double mergingWeightNLO(
int i=0)
const {
335 return weightContainerPtr->weightsMerging.getWeightsValue(i); }
338 string header(
const string &key)
const {
339 if (headers.find(key) == headers.end())
return "";
340 else return headers.at(key);
344 vector<string> headerKeys()
const;
347 int nProcessesLHEF()
const {
return int(sigmaLHEFSave.size());}
349 double sigmaLHEF(
int iProcess)
const {
return sigmaLHEFSave[iProcess];}
355 vector<double> sigmaLHEFSave;
358 LHAinitrwgt *initrwgt{};
361 vector<LHAgenerator > *generators{};
364 map<string,LHAweightgroup > *weightgroups{};
367 map<string,LHAweight > *init_weights{};
370 bool hasOwnEventAttributes{};
371 map<string, string > *eventAttributes{};
374 map<string,double > *weights_detailed{};
377 vector<double > *weights_compressed{};
383 LHAweights *weights{};
389 vector<double> weights_detailed_vector;
394 double eventWeightLHEF = {};
397 void setLHEF3InitInfo();
398 void setLHEF3InitInfo(
int LHEFversionIn, LHAinitrwgt *initrwgtIn,
399 vector<LHAgenerator> *generatorsIn,
400 map<string,LHAweightgroup> *weightgroupsIn,
401 map<string,LHAweight> *init_weightsIn,
string headerBlockIn );
403 void setLHEF3EventInfo();
404 void setLHEF3EventInfo( map<string, string> *eventAttributesIn,
405 map<string, double > *weights_detailedIn,
406 vector<double > *weights_compressedIn,
407 LHAscales *scalesIn, LHAweights *weightsIn,
408 LHArwgt *rwgtIn, vector<double> weights_detailed_vecIn,
409 vector<string> weights_detailed_name_vecIn,
410 string eventCommentsIn,
double eventWeightLHEFIn );
413 string getEventAttribute(
string key,
bool doRemoveWhitespace =
false)
const;
416 void setEventAttribute(
string key,
string value,
bool doOverwrite =
true) {
417 if (eventAttributes == NULL) {
418 eventAttributes =
new map<string,string>();
419 hasOwnEventAttributes =
true;
421 map<string, string>::iterator it = eventAttributes->find(key);
422 if ( it != eventAttributes->end() && !doOverwrite )
return;
423 if ( it != eventAttributes->end() ) eventAttributes->erase(it);
424 eventAttributes->insert(make_pair(key,value));
428 int LHEFversion()
const {
return LHEFversionSave; }
431 unsigned int getInitrwgtSize()
const;
434 unsigned int getGeneratorSize()
const;
435 string getGeneratorValue(
unsigned int n = 0)
const;
436 string getGeneratorAttribute(
unsigned int n,
string key,
437 bool doRemoveWhitespace =
false)
const;
440 unsigned int getWeightsDetailedSize()
const;
441 double getWeightsDetailedValue(
string n)
const;
442 string getWeightsDetailedAttribute(
string n,
string key,
443 bool doRemoveWhitespace =
false)
const;
446 unsigned int getWeightsCompressedSize()
const;
447 double getWeightsCompressedValue(
unsigned int n)
const;
448 string getWeightsCompressedAttribute(
string key,
449 bool doRemoveWhitespace =
false)
const;
452 string getScalesValue(
bool doRemoveWhitespace =
false)
const;
453 double getScalesAttribute(
string key)
const;
457 string getHeaderBlock()
const {
return headerBlock;}
458 string getEventComments()
const {
return eventComments;}
461 void setHeader(
const string &key,
const string &val)
462 { headers[key] = val; }
465 void setAbortPartonLevel(
bool abortIn) {abortPartonLevel = abortIn;}
466 bool getAbortPartonLevel()
const {
return abortPartonLevel;}
469 bool hasUnresolvedBeams()
const {
return hasUnresBeams;}
470 bool hasPomPsystem()
const {
return hasPomPsys;}
471 bool isHardDiffractive()
const {
return isHardDiffA || isHardDiffB;}
472 bool isHardDiffractiveA()
const {
return isHardDiffA;}
473 bool isHardDiffractiveB()
const {
return isHardDiffB;}
474 double xPomeronA()
const {
return xPomA;}
475 double xPomeronB()
const {
return xPomB;}
476 double tPomeronA()
const {
return tPomA;}
477 double tPomeronB()
const {
return tPomB;}
480 vector<int> getWeakModes()
const {
return weakModes;}
481 vector<pair<int,int> > getWeakDipoles()
const {
return weakDipoles;}
482 vector<Vec4> getWeakMomenta()
const {
return weakMomenta;}
483 vector<int> getWeak2to2lines()
const {
return weak2to2lines;}
484 void setWeakModes(vector<int> weakModesIn) {weakModes = weakModesIn;}
485 void setWeakDipoles(vector<pair<int,int> > weakDipolesIn)
486 {weakDipoles = weakDipolesIn;}
487 void setWeakMomenta(vector<Vec4> weakMomentaIn)
488 {weakMomenta = weakMomentaIn;}
489 void setWeak2to2lines(vector<int> weak2to2linesIn)
490 {weak2to2lines = weak2to2linesIn;}
495 static const int TIMESTOPRINT;
498 static const double CONVERTMB2PB;
501 int idASave{}, idBSave{};
502 double pzASave{}, eASave{}, mASave{}, pzBSave{}, eBSave{}, mBSave{},
509 long nTry{}, nSel{}, nAcc{};
510 double sigGen{}, sigErr{}, wtAccSum{};
511 map<int, string> procNameM;
512 map<int, long> nTryM, nSelM, nAccM;
513 map<int, double> sigGenM, sigErrM;
514 int lhaStrategySave{};
520 bool isRes{}, isDiffA{}, isDiffB{}, isDiffC{}, isND{}, isLH{},
521 hasSubSave[4], bIsSet{}, evolIsSet{}, atEOF{}, isVal1{}, isVal2{},
522 hasHistorySave{}, abortPartonLevel{}, isHardDiffA{}, isHardDiffB{},
523 hasUnresBeams{}, hasPomPsys{};
524 int codeSave{}, codeSubSave[4], nFinalSave{}, nFinalSubSave[4], nTotal{},
525 id1Save[4], id2Save[4], id1pdfSave[4], id2pdfSave[4], nMPISave{},
526 nISRSave{}, nFSRinProcSave{}, nFSRinResSave{};
527 double x1Save[4], x2Save[4], x1pdfSave[4], x2pdfSave[4], pdf1Save[4],
528 pdf2Save[4], Q2FacSave[4], alphaEMSave[4], alphaSSave[4],
529 Q2RenSave[4], scalupSave[4], sH[4], tH[4], uH[4], pTH[4], m3H[4],
530 m4H[4], thetaH[4], phiH[4], bMPISave{}, enhanceMPISave{},
531 enhanceMPIavgSave{}, bMPIoldSave{}, enhanceMPIoldSave{},
532 enhanceMPIoldavgSave{}, pTmaxMPISave{}, pTmaxISRSave{},
533 pTmaxFSRSave{}, pTnowSave{}, zNowISRSave{}, pT2NowISRSave{}, xPomA{},
534 xPomB{}, tPomA{}, tPomB{};
535 string nameSave{}, nameSubSave[4];
536 vector<int> codeMPISave, iAMPISave, iBMPISave;
537 vector<double> pTMPISave, eMPISave;
540 bool isVMDstateAEvent{}, isVMDstateBEvent{};
541 int gammaModeEvent{}, idVMDASave{}, idVMDBSave{};
542 double x1GammaSave{}, x2GammaSave{}, Q2Gamma1Save{}, Q2Gamma2Save{},
543 eCMsubSave{}, thetaLepton1{}, thetaLepton2{}, sHatNewSave{},
544 mVMDASave{}, mVMDBSave{}, scaleVMDASave{}, scaleVMDBSave{};
550 map<string, int> messages;
553 map<string, string> headers;
556 string headerBlock{}, eventComments{};
559 map<string, PluginPtr> plugins;
562 PluginPtr plugin(
string nameIn) {
563 map<string, PluginPtr>::iterator pluginItr = plugins.find(nameIn);
564 if (pluginItr == plugins.end()) {
565 PluginPtr pluginPtr = make_shared<Plugin>(nameIn,
this);
566 plugins[nameIn] = pluginPtr;
568 }
else return pluginItr->second;
572 void setBeamA(
int idAin,
double pzAin,
double eAin,
double mAin) {
573 idASave = idAin; pzASave = pzAin; eASave = eAin; mASave = mAin;}
574 void setBeamB(
int idBin,
double pzBin,
double eBin,
double mBin) {
575 idBSave = idBin; pzBSave = pzBin; eBSave = eBin; mBSave = mBin;}
576 void setECM(
double eCMin) {eCMSave = eCMin; sSave = eCMSave * eCMSave;}
579 void setX1Gamma(
double x1GammaIn) { x1GammaSave = x1GammaIn; }
580 void setX2Gamma(
double x2GammaIn) { x2GammaSave = x2GammaIn; }
581 void setQ2Gamma1(
double Q2gammaIn) { Q2Gamma1Save = Q2gammaIn; }
582 void setQ2Gamma2(
double Q2gammaIn) { Q2Gamma2Save = Q2gammaIn; }
583 void setTheta1(
double theta1In) { thetaLepton1 = theta1In; }
584 void setTheta2(
double theta2In) { thetaLepton2 = theta2In; }
585 void setECMsub(
double eCMsubIn) { eCMsubSave = eCMsubIn; }
586 void setsHatNew(
double sHatNewIn) { sHatNewSave = sHatNewIn; }
587 void setGammaMode(
double gammaModeIn) { gammaModeEvent = gammaModeIn; }
589 void setVMDstateA(
bool isVMDAIn,
int idAIn,
double mAIn,
double scaleAIn)
590 {isVMDstateAEvent = isVMDAIn; idVMDASave = idAIn; mVMDASave = mAIn;
591 scaleVMDASave = scaleAIn;}
592 void setVMDstateB(
bool isVMDBIn,
int idBIn,
double mBIn,
double scaleBIn)
593 {isVMDstateBEvent = isVMDBIn; idVMDBSave = idBIn; mVMDBSave = mBIn;
594 scaleVMDBSave = scaleBIn;}
598 isRes = isDiffA = isDiffB = isDiffC = isND = isLH = bIsSet
599 = evolIsSet = atEOF = isVal1 = isVal2 = hasHistorySave
600 = isHardDiffA = isHardDiffB = hasUnresBeams = hasPomPsys =
false;
601 codeSave = nFinalSave = nTotal = nMPISave = nISRSave = nFSRinProcSave
603 bMPISave = enhanceMPISave = enhanceMPIavgSave = bMPIoldSave
604 = enhanceMPIoldSave = enhanceMPIoldavgSave = 1.;
605 pTmaxMPISave = pTmaxISRSave = pTmaxFSRSave = pTnowSave = zNowISRSave
606 = pT2NowISRSave = 0.;
608 for (
int i = 0; i < 4; ++i) {
609 hasSubSave[i] =
false;
610 codeSubSave[i] = nFinalSubSave[i] = id1pdfSave[i] = id2pdfSave[i]
611 = id1Save[i] = id2Save[i] = 0;
612 x1pdfSave[i] = x2pdfSave[i] = pdf1Save[i] = pdf2Save[i]
613 = Q2FacSave[i] = alphaEMSave[i] = alphaSSave[i] = Q2RenSave[i]
614 = scalupSave[i] = x1Save[i] = x2Save[i] = sH[i] = tH[i] = uH[i]
615 = pTH[i] = m3H[i] = m4H[i] = thetaH[i] = phiH[i] = 0.;
616 nameSubSave[i] =
" ";
618 codeMPISave.resize(0); iAMPISave.resize(0); iBMPISave.resize(0);
619 pTMPISave.resize(0); eMPISave.resize(0); setHardDiff();
620 weightContainerPtr->clear();
624 int sizeMPIarrays()
const {
return codeMPISave.size(); }
625 void resizeMPIarrays(
int newSize) { codeMPISave.resize(newSize);
626 iAMPISave.resize(newSize); iBMPISave.resize(newSize);
627 pTMPISave.resize(newSize); eMPISave.resize(newSize); }
631 void setType(
string nameIn,
int codeIn,
int nFinalIn,
632 bool isNonDiffIn =
false,
bool isResolvedIn =
true,
633 bool isDiffractiveAin =
false,
bool isDiffractiveBin =
false,
634 bool isDiffractiveCin =
false,
bool isLHAin =
false) {
635 nameSave = nameIn; codeSave = codeIn; nFinalSave = nFinalIn;
636 isND = isNonDiffIn; isRes = isResolvedIn; isDiffA = isDiffractiveAin;
637 isDiffB = isDiffractiveBin; isDiffC = isDiffractiveCin; isLH = isLHAin;
638 nTotal = 2 + nFinalSave; bIsSet =
false; hasSubSave[0] =
false;
639 nameSubSave[0] =
" "; codeSubSave[0] = 0; nFinalSubSave[0] = 0;
641 void setSubType(
int iDS,
string nameSubIn,
int codeSubIn,
642 int nFinalSubIn) { hasSubSave[iDS] =
true; nameSubSave[iDS] = nameSubIn;
643 codeSubSave[iDS] = codeSubIn; nFinalSubSave[iDS] = nFinalSubIn;}
644 void setPDFalpha(
int iDS,
int id1pdfIn,
int id2pdfIn,
double x1pdfIn,
645 double x2pdfIn,
double pdf1In,
double pdf2In,
double Q2FacIn,
646 double alphaEMIn,
double alphaSIn,
double Q2RenIn,
double scalupIn) {
647 id1pdfSave[iDS] = id1pdfIn; id2pdfSave[iDS] = id2pdfIn;
648 x1pdfSave[iDS] = x1pdfIn; x2pdfSave[iDS] = x2pdfIn;
649 pdf1Save[iDS] = pdf1In; pdf2Save[iDS] = pdf2In; Q2FacSave[iDS] = Q2FacIn;
650 alphaEMSave[iDS] = alphaEMIn; alphaSSave[iDS] = alphaSIn;
651 Q2RenSave[iDS] = Q2RenIn; scalupSave[iDS] = scalupIn;}
652 void setScalup(
int iDS,
double scalupIn) {scalupSave[iDS] = scalupIn;}
653 void setKin(
int iDS,
int id1In,
int id2In,
double x1In,
double x2In,
654 double sHatIn,
double tHatIn,
double uHatIn,
double pTHatIn,
655 double m3HatIn,
double m4HatIn,
double thetaHatIn,
double phiHatIn) {
656 id1Save[iDS] = id1In; id2Save[iDS] = id2In; x1Save[iDS] = x1In;
657 x2Save[iDS] = x2In; sH[iDS] = sHatIn; tH[iDS] = tHatIn;
658 uH[iDS] = uHatIn; pTH[iDS] = pTHatIn; m3H[iDS] = m3HatIn;
659 m4H[iDS] = m4HatIn; thetaH[iDS] = thetaHatIn; phiH[iDS] = phiHatIn;}
660 void setTypeMPI(
int codeMPIIn,
double pTMPIIn,
int iAMPIIn = 0,
661 int iBMPIIn = 0,
double eMPIIn = 1.) {codeMPISave.push_back(codeMPIIn);
662 pTMPISave.push_back(pTMPIIn); iAMPISave.push_back(iAMPIIn);
663 iBMPISave.push_back(iBMPIIn); eMPISave.push_back(eMPIIn); }
666 void sigmaReset() { nTry = nSel = nAcc = 0; sigGen = sigErr = wtAccSum = 0.;
667 procNameM.clear(); nTryM.clear(); nSelM.clear(); nAccM.clear();
668 sigGenM.clear(); sigErrM.clear();}
669 void setSigma(
int i,
string procNameIn,
long nTryIn,
long nSelIn,
670 long nAccIn,
double sigGenIn,
double sigErrIn,
double wtAccSumIn) {
671 if (i == 0) {nTry = nTryIn; nSel = nSelIn; nAcc = nAccIn;
672 sigGen = sigGenIn; sigErr = sigErrIn; wtAccSum = wtAccSumIn;}
673 else {procNameM[i] = procNameIn; nTryM[i] = nTryIn; nSelM[i] = nSelIn;
674 nAccM[i] = nAccIn; sigGenM[i] = sigGenIn; sigErrM[i] = sigErrIn;} }
675 void addSigma(
int i,
long nTryIn,
long nSelIn,
long nAccIn,
double sigGenIn,
676 double sigErrIn) { nTryM[i] += nTryIn; nSelM[i] += nSelIn;
677 nAccM[i] += nAccIn; sigGenM[i] += sigGenIn;
678 sigErrM[i] = sqrtpos(sigErrM[i]*sigErrM[i] + sigErrIn*sigErrIn); }
681 void setImpact(
double bMPIIn,
double enhanceMPIIn,
double enhanceMPIavgIn,
682 bool bIsSetIn =
true,
bool pushBack =
false) {
683 if (pushBack) {bMPIoldSave = bMPISave; enhanceMPIoldSave = enhanceMPISave;
684 enhanceMPIoldavgSave = enhanceMPIavgSave;}
685 bMPISave = bMPIIn; enhanceMPISave = eMPISave[0] = enhanceMPIIn,
686 enhanceMPIavgSave = enhanceMPIavgIn, bIsSet = bIsSetIn;}
689 void setPartEvolved(
int nMPIIn,
int nISRIn) {
690 nMPISave = nMPIIn; nISRSave = nISRIn;}
691 void setEvolution(
double pTmaxMPIIn,
double pTmaxISRIn,
double pTmaxFSRIn,
692 int nMPIIn,
int nISRIn,
int nFSRinProcIn,
int nFSRinResIn) {
693 pTmaxMPISave = pTmaxMPIIn; pTmaxISRSave = pTmaxISRIn;
694 pTmaxFSRSave = pTmaxFSRIn; nMPISave = nMPIIn; nISRSave = nISRIn;
695 nFSRinProcSave = nFSRinProcIn; nFSRinResSave = nFSRinResIn;
699 void setPTnow(
double pTnowIn) {pTnowSave = pTnowIn;}
702 void seta0MPI(
double a0MPIin) {a0MPISave = a0MPIin;}
705 void setEndOfFile(
bool atEOFin) {atEOF = atEOFin;}
709 void setWeight(
double weightIn,
int lhaStrategyIn) {
710 for (
int i = 0; i < nWeights(); ++i)
711 weightContainerPtr->weightsPS.setValueByIndex(i,1.);
713 weightContainerPtr->setWeightNominal(
714 abs(lhaStrategyIn) == 4 ? CONVERTMB2PB*weightIn : weightIn);
715 lhaStrategySave = lhaStrategyIn;}
718 void setIsResolved(
bool isResIn) {isRes = isResIn;}
721 void setHardDiff(
bool hasUnresBeamsIn =
false,
bool hasPomPsysIn =
false,
722 bool isHardDiffAIn =
false,
bool isHardDiffBIn =
false,
723 double xPomAIn = 0.,
double xPomBIn = 0.,
double tPomAIn = 0.,
724 double tPomBIn = 0.) { hasUnresBeams = hasUnresBeamsIn;
725 hasPomPsys = hasPomPsysIn; isHardDiffA = isHardDiffAIn;
726 isHardDiffB = isHardDiffBIn;
727 xPomA = xPomAIn; xPomB = xPomBIn;
728 tPomA = tPomAIn; tPomB = tPomBIn;}
731 void setHasUnresolvedBeams(
bool hasUnresBeamsIn)
732 {hasUnresBeams = hasUnresBeamsIn;}
733 void setHasPomPsystem(
bool hasPomPsysIn) {hasPomPsys = hasPomPsysIn;}
736 vector<int> weakModes, weak2to2lines;
737 vector<Vec4> weakMomenta;
738 vector<pair<int, int> > weakDipoles;
740 int numberOfWeights()
const {
741 return weightContainerPtr->numberOfWeights(); }
742 double weightValueByIndex(
int key=0)
const {
743 return weightContainerPtr->weightValueByIndex(key); }
744 string weightNameByIndex(
int key=0)
const {
745 return weightContainerPtr->weightNameByIndex(key); }
746 vector<double> weightValueVector()
const {
747 return weightContainerPtr->weightValueVector(); }
748 vector<string> weightNameVector()
const {
749 return weightContainerPtr->weightNameVector(); }
762 Plugin(
string nameIn =
"",
Info *infoPtrIn =
nullptr);
768 bool isLoaded() {
return libPtr !=
nullptr;}
771 typedef void (*Symbol)();
774 Symbol symbol(
string symName);
779 void errorMsg(
string errMsg) {
780 if (infoPtr !=
nullptr) infoPtr->errorMsg(errMsg);
781 else cout << errMsg << endl;
799 #endif // Pythia8_Info_H