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" 45 PhaseSpacePtr phaseSpacePtrIn = 0) :
46 sigmaProcessPtr(sigmaProcessPtrIn),
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() {}
68 {lhaUpPtr = lhaUpPtrIn; setLifetime = 0;
69 if (settingsPtrIn && rndmPtrIn) {
71 setLifetime = settingsPtrIn->mode(
"LesHouches:setLifetime");
74 if (sigmaProcessPtr != 0) sigmaProcessPtr->setLHAPtr(lhaUpPtr);
75 if (phaseSpacePtr != 0) phaseSpacePtr->setLHAPtr(lhaUpPtr);}
81 void newECM(
double eCM) {phaseSpacePtr->newECM(eCM);}
106 void setBeamModes(
bool setVMD =
false,
bool isSampled =
true);
109 string name()
const {
return sigmaProcessPtr->name();}
110 int code()
const {
return sigmaProcessPtr->code();}
111 int nFinal()
const {
return sigmaProcessPtr->nFinal();}
112 bool isSUSY()
const {
return sigmaProcessPtr->isSUSY();}
113 bool isNonDiffractive()
const {
return isNonDiff;}
114 bool isSoftQCD()
const {
return (code() > 100 && code() < 107);}
115 bool isElastic()
const {
return (code() == 102);}
119 double sigmaMax()
const {
return sigmaMx;}
120 long nTried()
const {
return nTry;}
121 long nSelected()
const {
return nSel;}
122 long nAccepted()
const {
return nAcc;}
123 double weightSum()
const {
return wtAccSum;}
124 double sigmaSelMC(
bool doAccumulate =
true)
125 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaAvg;}
126 double sigmaMC(
bool doAccumulate =
true)
127 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return sigmaFin;}
128 double deltaMC(
bool doAccumulate =
true)
129 {
if (nTry > nTryStat && doAccumulate) sigmaDelta();
return deltaFin;}
136 int id1()
const {
return sigmaProcessPtr->id(1);}
137 int id2()
const {
return sigmaProcessPtr->id(2);}
138 double x1()
const {
return phaseSpacePtr->x1();}
139 double x2()
const {
return phaseSpacePtr->x2();}
140 double Q2Fac()
const {
return sigmaProcessPtr->Q2Fac();}
141 double mHat()
const {
return sqrtpos(phaseSpacePtr->sHat());}
142 double pTHat()
const {
return phaseSpacePtr->pTHat();}
146 int lhaStrategy()
const {
return lhaStrat;}
150 int subCodeLHA(
int i)
const {
return codeLHA[i];}
151 long nTriedLHA(
int i)
const {
return nTryLHA[i];}
152 long nSelectedLHA(
int i)
const {
return nSelLHA[i];}
153 long nAcceptedLHA(
int i)
const {
return nAccLHA[i];}
156 void isSame(
bool isSameIn) { isSameSave = isSameIn;}
157 bool isSame()
const {
return isSameSave;}
162 static const int N12SAMPLE, N3SAMPLE;
165 SigmaProcessPtr sigmaProcessPtr;
168 PhaseSpacePtr phaseSpacePtr;
181 int idRenameBeams, setLifetime, setQuarkMass, setLeptonMass, idNewM[9];
182 double mRecalculate, mNewM[9];
185 bool isLHA, isNonDiff, isResolved, isDiffA, isDiffB, isDiffC, isQCD3body,
186 allowNegSig, isSameSave, increaseMaximum, canVetoResDecay;
187 int lhaStrat, lhaStratAbs, processCode;
188 bool useStrictLHEFscales;
196 long nTry, nSel, nAcc, nTryStat;
197 double sigmaMx, sigmaSgn, sigmaSum, sigma2Sum, sigmaNeg, sigmaAvg,
198 sigmaFin, deltaFin, weightNow, wtAccSum;
201 bool beamAhasResGamma, beamBhasResGamma, beamHasResGamma, beamHasGamma;
202 int beamAgammaMode, beamBgammaMode, gammaModeEvent;
205 bool approximatedGammaFlux;
209 vector<long> nTryLHA, nSelLHA, nAccLHA;
212 long nTryRequested, nSelRequested, nAccRequested;
215 double sigmaTemp, sigma2Temp, normVar3;
238 bool init2(vector<ProcessContainer*>& container2Ptrs,
Info* infoPtr);
243 void setupIdVecs(
Settings& settings);
244 bool allowIdVals(
int idCheck1,
int idCheck2);
247 vector<int> idVecA, idVecB;
ProcessContainer(SigmaProcessPtr sigmaProcessPtrIn=0, PhaseSpacePtr phaseSpacePtrIn=0)
Constructor.
Definition: ProcessContainer.h:44
void accumulate()
Accumulate statistics after user veto.
Definition: ProcessContainer.cc:441
double sigmaMaxSwitch()
New value for switched beam identity or energy (for SoftQCD processes).
Definition: ProcessContainer.h:132
Definition: PhysicsBase.h:27
void newECM(double eCM)
Update the CM energy of the event.
Definition: ProcessContainer.h:81
The Event class holds all info on the generated event.
Definition: Event.h:453
bool trialProcess()
Generate a trial event; accepted or not.
Definition: ProcessContainer.cc:259
Definition: ProcessContainer.h:39
Definition: SLHAinterface.h:27
bool constructProcess(Event &process, bool isHardest=true)
Give the hard subprocess (with option for a second hard subprocess).
Definition: ProcessContainer.cc:524
void isSame(bool isSameIn)
When two hard processes set or get info whether process is matched.
Definition: ProcessContainer.h:156
bool init(bool isFirst, ResonanceDecays *resDecaysPtrIn, SLHAinterface *slhaInterfacePtr, GammaKinematics *gammaKinPtrIn)
Initialize phase space and counters.
Definition: ProcessContainer.cc:48
Rndm * rndmPtr
Pointer to the random number generator.
Definition: PhysicsBase.h:93
SetupContainers()
Constructor.
Definition: ProcessContainer.h:232
A helper class used to setup the onia processes.
Definition: SigmaOnia.h:63
int id1() const
Some kinematics quantities.
Definition: ProcessContainer.h:136
ParticleData * particleDataPtr
Pointer to the particle data table.
Definition: PhysicsBase.h:84
bool newSigmaMax() const
Member functions for info on generation process.
Definition: ProcessContainer.h:118
int codeLHASize() const
Info on Les Houches events.
Definition: ProcessContainer.h:149
void setLHAPtr(LHAupPtr lhaUpPtrIn, ParticleData *particleDataPtrIn=0, Settings *settingsPtrIn=0, Rndm *rndmPtrIn=0)
Store or replace Les Houches pointer.
Definition: ProcessContainer.h:66
void reset()
Reset statistics on events generated so far.
Definition: ProcessContainer.cc:1321
Class to sample the virtuality and transverse momentum of emitted photons.
Definition: GammaKinematics.h:23
string name() const
Process name and code, and the number of final-state particles.
Definition: ProcessContainer.h:109
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
void setBeamModes(bool setVMD=false, bool isSampled=true)
Set the photon modes according to the process.
Definition: ProcessContainer.cc:487
Info * infoPtr
Definition: PhysicsBase.h:78
bool decayResonances(Event &process)
Do resonance decays.
Definition: ProcessContainer.cc:1261
Definition: ProcessContainer.h:227
Definition: ResonanceDecays.h:28
bool constructDecays(Event &process)
Give the Les Houches decay chain for external resonance.
Definition: ProcessContainer.cc:1137
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
void updateBeamIDs()
Switch to new beam particle identities; for similar hadrons only.
Definition: ProcessContainer.h:78
bool constructState()
Pick flavours and colour flow of process.
Definition: ProcessContainer.cc:467
Definition: Settings.h:195
bool isLHAContainer() const
Tell whether container is for Les Houches events.
Definition: ProcessContainer.h:145
double sqrtpos(const double &x)
Avoid problem with negative square root argument (from roundoff).
Definition: PythiaStdlib.h:191