10 #ifndef Pythia8_ProcessContainer_H
11 #define Pythia8_ProcessContainer_H
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/ParticleData.h"
18 #include "Pythia8/PartonDistributions.h"
19 #include "Pythia8/PhaseSpace.h"
20 #include "Pythia8/PythiaStdlib.h"
21 #include "Pythia8/ResonanceDecays.h"
22 #include "Pythia8/Settings.h"
23 #include "Pythia8/SigmaProcess.h"
24 #include "Pythia8/SigmaTotal.h"
25 #include "Pythia8/SigmaOnia.h"
26 #include "Pythia8/StandardModel.h"
27 #include "Pythia8/SusyCouplings.h"
28 #include "Pythia8/SLHAinterface.h"
29 #include "Pythia8/UserHooks.h"
38 class ProcessContainer {
43 ProcessContainer(SigmaProcess* sigmaProcessPtrIn = 0,
44 bool externalPtrIn =
false, PhaseSpace* phaseSpacePtrIn = 0) :
45 sigmaProcessPtr(sigmaProcessPtrIn),
46 externalPtr(externalPtrIn), phaseSpacePtr(phaseSpacePtrIn) {}
49 ~ProcessContainer() {
delete phaseSpacePtr;
50 if (!externalPtr)
delete sigmaProcessPtr;}
53 bool init(
bool isFirst, Info* infoPtrIn, Settings& settings,
54 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, BeamParticle* beamAPtr,
55 BeamParticle* beamBPtr, Couplings* couplings, SigmaTotal* sigmaTotPtrIn,
56 ResonanceDecays* resDecaysPtrIn, SLHAinterface* slhaInterfacePtr,
57 UserHooks* userHooksPtr, GammaKinematics* gammaKinPtrIn);
60 void setLHAPtr( LHAup* lhaUpPtrIn, ParticleData* particleDataPtrIn = 0,
61 Settings* settingsPtrIn = 0, Rndm* rndmPtrIn = 0)
62 {lhaUpPtr = lhaUpPtrIn; setLifetime = 0;
63 if (settingsPtrIn && rndmPtrIn) {
65 setLifetime = settingsPtrIn->mode(
"LesHouches:setLifetime");
67 if (particleDataPtrIn != 0) particleDataPtr = particleDataPtrIn;
68 if (sigmaProcessPtr != 0) sigmaProcessPtr->setLHAPtr(lhaUpPtr);
69 if (phaseSpacePtr != 0) phaseSpacePtr->setLHAPtr(lhaUpPtr);}
72 void newECM(
double eCM) {phaseSpacePtr->newECM(eCM);}
78 bool constructState();
81 bool constructProcess(
Event& process,
bool isHardest =
true);
84 bool constructDecays(
Event& process);
87 bool decayResonances(
Event& process);
101 pair<int, int> chooseVMDstates(
int idA,
int idB);
104 string name()
const {
return sigmaProcessPtr->name();}
105 int code()
const {
return sigmaProcessPtr->code();}
106 int nFinal()
const {
return sigmaProcessPtr->nFinal();}
107 bool isSUSY()
const {
return sigmaProcessPtr->isSUSY();}
108 bool isNonDiffractive()
const {
return isNonDiff;}
109 bool isSoftQCD()
const {
return (code() > 100 && code() < 107);}
112 bool newSigmaMax()
const {
return newSigmaMx;}
113 double sigmaMax()
const {
return sigmaMx;}
114 long nTried()
const {
return nTry;}
115 long nSelected()
const {
return nSel;}
116 long nAccepted()
const {
return nAcc;}
117 double weightSum()
const {
return wtAccSum;}
118 double sigmaSelMC(
bool doAccumulate =
true)
119 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaAvg;}
120 double sigmaMC(
bool doAccumulate =
true)
121 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaFin;}
122 double deltaMC(
bool doAccumulate =
true)
123 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return deltaFin;}
126 int id1()
const {
return sigmaProcessPtr->id(1);}
127 int id2()
const {
return sigmaProcessPtr->id(2);}
128 double x1()
const {
return phaseSpacePtr->x1();}
129 double x2()
const {
return phaseSpacePtr->x2();}
130 double Q2Fac()
const {
return sigmaProcessPtr->Q2Fac();}
131 double mHat()
const {
return sqrtpos(phaseSpacePtr->sHat());}
132 double pTHat()
const {
return phaseSpacePtr->pTHat();}
135 bool isLHAContainer()
const {
return isLHA;}
136 int lhaStrategy()
const {
return lhaStrat;}
139 int codeLHASize()
const {
return codeLHA.size();}
140 int subCodeLHA(
int i)
const {
return codeLHA[i];}
141 long nTriedLHA(
int i)
const {
return nTryLHA[i];}
142 long nSelectedLHA(
int i)
const {
return nSelLHA[i];}
143 long nAcceptedLHA(
int i)
const {
return nAccLHA[i];}
146 void isSame(
bool isSameIn) { isSameSave = isSameIn;}
147 bool isSame()
const {
return isSameSave;}
152 static const int N12SAMPLE, N3SAMPLE;
155 SigmaProcess* sigmaProcessPtr;
159 PhaseSpace* phaseSpacePtr;
165 ParticleData* particleDataPtr;
171 ResonanceDecays* resDecaysPtr;
174 SigmaTotal* sigmaTotPtr;
177 UserHooks* userHooksPtr;
183 BeamParticle* beamAPtr;
184 BeamParticle* beamBPtr;
187 GammaKinematics* gammaKinPtr;
191 int idRenameBeams, setLifetime, setQuarkMass, setLeptonMass, idNewM[9];
192 double mRecalculate, mNewM[9];
195 bool isLHA, isNonDiff, isResolved, isDiffA, isDiffB, isDiffC,
196 isDiff, isSingleDiff, isDoubleDiff, isCentralDiff, isQCD3body,
197 allowNegSig, isSameSave, increaseMaximum, canVetoResDecay;
198 int lhaStrat, lhaStratAbs;
199 bool useStrictLHEFscales;
203 long nTry, nSel, nAcc, nTryStat;
204 double sigmaMx, sigmaSgn, sigmaSum, sigma2Sum, sigmaNeg, sigmaAvg,
205 sigmaFin, deltaFin, weightNow, wtAccSum;
208 bool beamAhasResGamma, beamBhasResGamma, beamHasResGamma, beamHasGamma;
209 int beamAgammaMode, beamBgammaMode, gammaModeEvent;
216 vector<long> nTryLHA, nSelLHA, nAccLHA;
219 long nTryRequested, nSelRequested, nAccRequested;
222 double sigmaTemp, sigma2Temp;
234 class SetupContainers {
242 bool init(vector<ProcessContainer*>& containerPtrs, Info* infoPtr,
243 Settings& settings, ParticleData* particleDataPtr, Couplings* couplings);
246 bool init2(vector<ProcessContainer*>& container2Ptrs, Settings& settings);
251 void setupIdVecs( Settings& settings);
252 bool allowIdVals(
int idCheck1,
int idCheck2);
255 vector<int> idVecA, idVecB;
259 SigmaOniaSetup charmonium, bottomonium;
267 #endif // Pythia8_ProcessContainer_H