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/PhysicsBase.h"
21 #include "Pythia8/PythiaStdlib.h"
22 #include "Pythia8/ResonanceDecays.h"
23 #include "Pythia8/Settings.h"
24 #include "Pythia8/SigmaProcess.h"
25 #include "Pythia8/SigmaTotal.h"
26 #include "Pythia8/SigmaOnia.h"
27 #include "Pythia8/StandardModel.h"
28 #include "Pythia8/SusyCouplings.h"
29 #include "Pythia8/SLHAinterface.h"
30 #include "Pythia8/UserHooks.h"
39 class ProcessContainer :
public PhysicsBase {
44 ProcessContainer(SigmaProcess* sigmaProcessPtrIn = 0,
45 bool externalPtrIn =
false, PhaseSpace* phaseSpacePtrIn = 0) :
46 sigmaProcessPtr(sigmaProcessPtrIn), externalPtr(externalPtrIn),
47 phaseSpacePtr(phaseSpacePtrIn), resDecaysPtr(), gammaKinPtr(),
48 matchInOut(), idRenameBeams(), setLifetime(), setQuarkMass(),
49 setLeptonMass(), idNewM(), mRecalculate(), mNewM(), isLHA(), isNonDiff(),
50 isResolved(), isDiffA(), isDiffB(), isDiffC(), isQCD3body(),
51 allowNegSig(), isSameSave(), increaseMaximum(), canVetoResDecay(),
52 lhaStrat(), lhaStratAbs(), processCode(), useStrictLHEFscales(),
53 isAsymLHA(), betazLHA(), newSigmaMx(), nTry(), nSel(), nAcc(),
54 nTryStat(), sigmaMx(), sigmaSgn(), sigmaSum(), sigma2Sum(), sigmaNeg(),
55 sigmaAvg(), sigmaFin(), deltaFin(), weightNow(), wtAccSum(),
56 beamAhasResGamma(), beamBhasResGamma(), beamHasResGamma(),
57 beamHasGamma(), beamAgammaMode(), beamBgammaMode(), gammaModeEvent(),
58 approximatedGammaFlux(), nTryRequested(), nSelRequested(),
59 nAccRequested(), sigmaTemp(), sigma2Temp(), normVar3() {}
62 ~ProcessContainer() {
delete phaseSpacePtr;
63 if (!externalPtr)
delete sigmaProcessPtr;}
66 bool init(
bool isFirst, ResonanceDecays* resDecaysPtrIn,
67 SLHAinterface* slhaInterfacePtr, GammaKinematics* gammaKinPtrIn);
70 void setLHAPtr( LHAupPtr lhaUpPtrIn, ParticleData* particleDataPtrIn = 0,
71 Settings* settingsPtrIn = 0, Rndm* rndmPtrIn = 0)
72 {lhaUpPtr = lhaUpPtrIn; setLifetime = 0;
73 if (settingsPtrIn && rndmPtrIn) {
75 setLifetime = settingsPtrIn->mode(
"LesHouches:setLifetime");
77 if (particleDataPtrIn != 0) particleDataPtr = particleDataPtrIn;
78 if (sigmaProcessPtr != 0) sigmaProcessPtr->setLHAPtr(lhaUpPtr);
79 if (phaseSpacePtr != 0) phaseSpacePtr->setLHAPtr(lhaUpPtr);}
82 void newECM(
double eCM) {phaseSpacePtr->newECM(eCM);}
88 bool constructState();
91 bool constructProcess(
Event& process,
bool isHardest =
true);
94 bool constructDecays(
Event& process);
97 bool decayResonances(
Event& process);
107 void setBeamModes(
bool setVMD =
false,
bool isSampled =
true);
110 string name()
const {
return sigmaProcessPtr->name();}
111 int code()
const {
return sigmaProcessPtr->code();}
112 int nFinal()
const {
return sigmaProcessPtr->nFinal();}
113 bool isSUSY()
const {
return sigmaProcessPtr->isSUSY();}
114 bool isNonDiffractive()
const {
return isNonDiff;}
115 bool isSoftQCD()
const {
return (code() > 100 && code() < 107);}
116 bool isElastic()
const {
return (code() == 102);}
119 bool newSigmaMax()
const {
return newSigmaMx;}
120 double sigmaMax()
const {
return sigmaMx;}
121 long nTried()
const {
return nTry;}
122 long nSelected()
const {
return nSel;}
123 long nAccepted()
const {
return nAcc;}
124 double weightSum()
const {
return wtAccSum;}
125 double sigmaSelMC(
bool doAccumulate =
true)
126 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaAvg;}
127 double sigmaMC(
bool doAccumulate =
true)
128 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaFin;}
129 double deltaMC(
bool doAccumulate =
true)
130 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return deltaFin;}
133 int id1()
const {
return sigmaProcessPtr->id(1);}
134 int id2()
const {
return sigmaProcessPtr->id(2);}
135 double x1()
const {
return phaseSpacePtr->x1();}
136 double x2()
const {
return phaseSpacePtr->x2();}
137 double Q2Fac()
const {
return sigmaProcessPtr->Q2Fac();}
138 double mHat()
const {
return sqrtpos(phaseSpacePtr->sHat());}
139 double pTHat()
const {
return phaseSpacePtr->pTHat();}
142 bool isLHAContainer()
const {
return isLHA;}
143 int lhaStrategy()
const {
return lhaStrat;}
146 int codeLHASize()
const {
return codeLHA.size();}
147 int subCodeLHA(
int i)
const {
return codeLHA[i];}
148 long nTriedLHA(
int i)
const {
return nTryLHA[i];}
149 long nSelectedLHA(
int i)
const {
return nSelLHA[i];}
150 long nAcceptedLHA(
int i)
const {
return nAccLHA[i];}
153 void isSame(
bool isSameIn) { isSameSave = isSameIn;}
154 bool isSame()
const {
return isSameSave;}
159 static const int N12SAMPLE, N3SAMPLE;
162 SigmaProcess* sigmaProcessPtr;
166 PhaseSpace* phaseSpacePtr;
169 ResonanceDecays* resDecaysPtr;
175 GammaKinematics* gammaKinPtr;
179 int idRenameBeams, setLifetime, setQuarkMass, setLeptonMass, idNewM[9];
180 double mRecalculate, mNewM[9];
183 bool isLHA, isNonDiff, isResolved, isDiffA, isDiffB, isDiffC, isQCD3body,
184 allowNegSig, isSameSave, increaseMaximum, canVetoResDecay;
185 int lhaStrat, lhaStratAbs, processCode;
186 bool useStrictLHEFscales;
194 long nTry, nSel, nAcc, nTryStat;
195 double sigmaMx, sigmaSgn, sigmaSum, sigma2Sum, sigmaNeg, sigmaAvg,
196 sigmaFin, deltaFin, weightNow, wtAccSum;
199 bool beamAhasResGamma, beamBhasResGamma, beamHasResGamma, beamHasGamma;
200 int beamAgammaMode, beamBgammaMode, gammaModeEvent;
203 bool approximatedGammaFlux;
207 vector<long> nTryLHA, nSelLHA, nAccLHA;
210 long nTryRequested, nSelRequested, nAccRequested;
213 double sigmaTemp, sigma2Temp, normVar3;
225 class SetupContainers {
230 SetupContainers() : nVecA(), nVecB() {}
233 bool init(vector<ProcessContainer*>& containerPtrs, Info* infoPtr);
236 bool init2(vector<ProcessContainer*>& container2Ptrs, Info* infoPtr);
241 void setupIdVecs( Settings& settings);
242 bool allowIdVals(
int idCheck1,
int idCheck2);
245 vector<int> idVecA, idVecB;
249 SigmaOniaSetup charmonium, bottomonium;
257 #endif // Pythia8_ProcessContainer_H