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) : sigmaProcessPtr(sigmaProcessPtrIn),
45 externalPtr(externalPtrIn), phaseSpacePtr(0) {}
48 ~ProcessContainer() {
delete phaseSpacePtr;
49 if (!externalPtr)
delete sigmaProcessPtr;}
52 bool init(
bool isFirst, Info* infoPtrIn, Settings& settings,
53 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, BeamParticle* beamAPtr,
54 BeamParticle* beamBPtr, Couplings* couplings, SigmaTotal* sigmaTotPtr,
55 ResonanceDecays* resDecaysPtrIn, SLHAinterface* slhaInterfacePtr,
56 UserHooks* userHooksPtr);
59 void setLHAPtr( LHAup* lhaUpPtrIn, ParticleData* particleDataPtrIn = 0)
60 {lhaUpPtr = lhaUpPtrIn;
61 if (particleDataPtrIn != 0) particleDataPtr = particleDataPtrIn;
62 if (sigmaProcessPtr != 0) sigmaProcessPtr->setLHAPtr(lhaUpPtr);
63 if (phaseSpacePtr != 0) phaseSpacePtr->setLHAPtr(lhaUpPtr);}
66 void newECM(
double eCM) {phaseSpacePtr->newECM(eCM);}
72 bool constructState();
75 bool constructProcess(
Event& process,
bool isHardest =
true);
78 bool constructDecays(
Event& process);
81 bool decayResonances(
Event& process);
90 string name()
const {
return sigmaProcessPtr->name();}
91 int code()
const {
return sigmaProcessPtr->code();}
92 int nFinal()
const {
return sigmaProcessPtr->nFinal();}
93 bool isSUSY()
const {
return sigmaProcessPtr->isSUSY();}
96 bool newSigmaMax()
const {
return newSigmaMx;}
97 double sigmaMax()
const {
return sigmaMx;}
98 long nTried()
const {
return nTry;}
99 long nSelected()
const {
return nSel;}
100 long nAccepted()
const {
return nAcc;}
101 double weightSum()
const {
return wtAccSum;}
102 double sigmaSelMC() {
if (nTry > nTryStat) sigmaDelta();
return sigmaAvg;}
103 double sigmaMC() {
if (nTry > nTryStat) sigmaDelta();
return sigmaFin;}
104 double deltaMC() {
if (nTry > nTryStat) sigmaDelta();
return deltaFin;}
107 int id1()
const {
return sigmaProcessPtr->id(1);}
108 int id2()
const {
return sigmaProcessPtr->id(2);}
109 double x1()
const {
return phaseSpacePtr->x1();}
110 double x2()
const {
return phaseSpacePtr->x2();}
111 double Q2Fac()
const {
return sigmaProcessPtr->Q2Fac();}
112 double mHat()
const {
return sqrtpos(phaseSpacePtr->sHat());}
113 double pTHat()
const {
return phaseSpacePtr->pTHat();}
116 bool isLHAContainer()
const {
return isLHA;}
117 int lhaStrategy()
const {
return lhaStrat;}
120 int codeLHASize()
const {
return codeLHA.size();}
121 int subCodeLHA(
int i)
const {
return codeLHA[i];}
122 long nTriedLHA(
int i)
const {
return nTryLHA[i];}
123 long nSelectedLHA(
int i)
const {
return nSelLHA[i];}
124 long nAcceptedLHA(
int i)
const {
return nAccLHA[i];}
127 void isSame(
bool isSameIn) { isSameSave = isSameIn;}
128 bool isSame()
const {
return isSameSave;}
133 static const int N12SAMPLE, N3SAMPLE;
136 SigmaProcess* sigmaProcessPtr;
140 PhaseSpace* phaseSpacePtr;
146 ParticleData* particleDataPtr;
152 ResonanceDecays* resDecaysPtr;
155 UserHooks* userHooksPtr;
161 int idRenameBeams, setLifetime;
164 bool isLHA, isNonDiff, isResolved, isDiffA, isDiffB, isDiffC, isQCD3body,
165 allowNegSig, isSameSave, increaseMaximum, canVetoResDecay;
166 int lhaStrat, lhaStratAbs;
170 long nTry, nSel, nAcc, nTryStat;
171 double sigmaMx, sigmaSgn, sigmaSum, sigma2Sum, sigmaNeg, sigmaAvg,
172 sigmaFin, deltaFin, weightNow, wtAccSum;
176 vector<long> nTryLHA, nSelLHA, nAccLHA;
188 class SetupContainers {
196 bool init(vector<ProcessContainer*>& containerPtrs, Info* infoPtr,
197 Settings& settings, ParticleData* particleDataPtr, Couplings* couplings);
200 bool init2(vector<ProcessContainer*>& container2Ptrs, Settings& settings);
205 void setupIdVecs( Settings& settings);
206 bool allowIdVals(
int idCheck1,
int idCheck2);
209 vector<int> idVecA, idVecB;
213 SigmaOniaSetup charmonium, bottomonium;
221 #endif // Pythia8_ProcessContainer_H