PYTHIA  8.311
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
BeamSetup Class Reference

#include <BeamSetup.h>

Inheritance diagram for BeamSetup:
PhysicsBase

Public Member Functions

 BeamSetup ()=default
 Constructor.
 
bool setPDFPtr (PDFPtr pdfAPtrIn, PDFPtr pdfBPtrIn, PDFPtr pdfHardAPtrIn=nullptr, PDFPtr pdfHardBPtrIn=nullptr, PDFPtr pdfPomAPtrIn=nullptr, PDFPtr pdfPomBPtrIn=nullptr, PDFPtr pdfGamAPtrIn=nullptr, PDFPtr pdfGamBPtrIn=nullptr, PDFPtr pdfHardGamAPtrIn=nullptr, PDFPtr pdfHardGamBPtrIn=nullptr, PDFPtr pdfUnresAPtrIn=nullptr, PDFPtr pdfUnresBPtrIn=nullptr, PDFPtr pdfUnresGamAPtrIn=nullptr, PDFPtr pdfUnresGamBPtrIn=nullptr, PDFPtr pdfVMDAPtrIn=nullptr, PDFPtr pdfVMDBPtrIn=nullptr)
 Possibility to pass in pointers to PDF's. More...
 
bool setPDFAPtr (PDFPtr pdfAPtrIn)
 Routine to pass in pointers to PDF's. Usage optional. More...
 
bool setPDFBPtr (PDFPtr pdfBPtrIn)
 Routine to pass in pointers to PDF's. Usage optional. More...
 
bool setPhotonFluxPtr (PDFPtr photonFluxAIn, PDFPtr photonFluxBIn)
 Set photon fluxes externally. Used with option "PDF:lepton2gammaSet = 2".
 
bool setLHAupPtr (LHAupPtr lhaUpPtrIn)
 Possibility to pass in pointer to external LHA-interfaced generator.
 
bool setBeamIDs (int idAin, int idBin=0)
 Switch to new beam particle identities; for similar hadrons only. More...
 
bool setKinematics (double eCMIn)
 Switch beam kinematics. More...
 
bool setKinematics (double eAIn, double eBIn)
 Set beam energies. More...
 
bool setKinematics (double pxAIn, double pyAIn, double pzAIn, double pxBIn, double pyBIn, double pzBIn)
 Set beam momenta. More...
 
bool setKinematics (Vec4 pAIn, Vec4 pBIn)
 Set beam momenta. More...
 
bool setBeamShapePtr (BeamShapePtr beamShapePtrIn)
 Possibility to pass in pointer for beam shape.
 
BeamShapePtr getBeamShapePtr ()
 Possibility to access the pointer to the BeamShape object.
 
PDFPtr getPDFPtr (int idIn, int sequence=1, string beam="A", bool resolved=true)
 Return a parton density set among list of possibilities. More...
 
map< string, PDFPtr > getPDFPtr ()
 Return a map of the PDF pointers.
 
bool initFrame ()
 Set up frame of beams, Les Houches input, and switches for beam handling. More...
 
bool initBeams (bool doNonPertIn, StringFlav *flavSelPtr)
 Initialize kinematics and PDFs of beams. More...
 
bool getVMDsideA ()
 Return whether VMD states sampled.
 
bool getVMDsideB ()
 
void clear ()
 Clear all beams.
 
void newValenceContent ()
 Pick new beam valence flavours (for pi0, eta, K0S, Pomeron, etc.).
 
void nextKinematics ()
 Recalculate kinematics for each event when beam momentum has a spread. More...
 
void boostAndVertex (Event &process, Event &event, bool toLab, bool setVertex)
 Boost from CM frame to lab frame, or inverse. Set production vertex. More...
 
void list () const
 Print parton lists for the main beams. For debug mainly.
 
- Public Member Functions inherited from PhysicsBase
void initInfoPtr (Info &infoPtrIn)
 This function is called from above for physics objects used in a run. More...
 
virtual ~PhysicsBase ()
 Empty virtual destructor.
 
bool flag (string key) const
 Shorthand to read settings values.
 
int mode (string key) const
 
double parm (string key) const
 
string word (string key) const
 
vector< bool > fvec (string key) const
 
vector< int > mvec (string key) const
 
vector< double > pvec (string key) const
 
vector< string > wvec (string key) const
 

Public Attributes

bool doLHA = false
 Some data values are kept public so that the Pythia class can access them.
 
bool useNewLHA = false
 
bool skipInit = false
 
bool doMomentumSpread = {}
 
bool doVertexSpread = {}
 
bool doVarEcm = {}
 
bool allowIDAswitch = {}
 
bool hasSwitchedIDs = {}
 
bool beamA2gamma = {}
 
bool beamB2gamma = {}
 
int idA = {}
 
int idB = {}
 
int frameType = {}
 
int boostType = {}
 
int iPDFAsave = {}
 
int gammaMode = {}
 
double mA = {}
 
double mB = {}
 
double pxA = {}
 
double pxB = {}
 
double pyA = {}
 
double pyB = {}
 
double pzA = {}
 
double pzB = {}
 
double eA = {}
 
double eB = {}
 
double pzAcm = {}
 
double pzBcm = {}
 
double eCM = {}
 
double betaZ = {}
 
double gammaZ = {}
 
Vec4 pAinit = {}
 
Vec4 pBinit = {}
 
Vec4 pAnow = {}
 
Vec4 pBnow = {}
 
RotBstMatrix MfromCM = {}
 
RotBstMatrix MtoCM = {}
 
LHAupPtr lhaUpPtr = {}
 
BeamParticle beamA = {}
 The two incoming beams.
 
BeamParticle beamB = {}
 
BeamParticle beamPomA = {}
 Alternative Pomeron beam-inside-beam.
 
BeamParticle beamPomB = {}
 
BeamParticle beamGamA = {}
 Alternative photon beam-inside-beam.
 
BeamParticle beamGamB = {}
 
BeamParticle beamVMDA = {}
 Alternative VMD beam-inside-beam.
 
BeamParticle beamVMDB = {}
 
vector< int > idAList
 Hadron types for rapid switching. More...
 

Protected Member Functions

void onInitInfoPtr () override
 
- Protected Member Functions inherited from PhysicsBase
 PhysicsBase ()
 Default constructor.
 
virtual void onBeginEvent ()
 This function is called in the very beginning of each Pythia::next call.
 
virtual void onEndEvent (Status)
 
virtual void onStat ()
 This function is called from the Pythia::stat() call.
 
void registerSubObject (PhysicsBase &pb)
 Register a sub object that should have its information in sync with this.
 

Additional Inherited Members

- Public Types inherited from PhysicsBase
enum  Status {
  INCOMPLETE = -1, COMPLETE = 0, CONSTRUCTOR_FAILED, INIT_FAILED,
  LHEF_END, LOWENERGY_FAILED, PROCESSLEVEL_FAILED, PROCESSLEVEL_USERVETO,
  MERGING_FAILED, PARTONLEVEL_FAILED, PARTONLEVEL_USERVETO, HADRONLEVEL_FAILED,
  CHECK_FAILED, OTHER_UNPHYSICAL, HEAVYION_FAILED, HADRONLEVEL_USERVETO
}
 Enumerate the different status codes the event generation can have.
 
- Protected Attributes inherited from PhysicsBase
InfoinfoPtr = {}
 
SettingssettingsPtr = {}
 Pointer to the settings database.
 
ParticleDataparticleDataPtr = {}
 Pointer to the particle data table.
 
LoggerloggerPtr = {}
 Pointer to logger.
 
HadronWidthshadronWidthsPtr = {}
 Pointer to the hadron widths data table.
 
RndmrndmPtr = {}
 Pointer to the random number generator.
 
CoupSMcoupSMPtr = {}
 Pointers to SM and SUSY couplings.
 
CoupSUSYcoupSUSYPtr = {}
 
BeamSetupbeamSetupPtr = {}
 
BeamParticlebeamAPtr = {}
 
BeamParticlebeamBPtr = {}
 
BeamParticlebeamPomAPtr = {}
 
BeamParticlebeamPomBPtr = {}
 
BeamParticlebeamGamAPtr = {}
 
BeamParticlebeamGamBPtr = {}
 
BeamParticlebeamVMDAPtr = {}
 
BeamParticlebeamVMDBPtr = {}
 
PartonSystemspartonSystemsPtr = {}
 Pointer to information on subcollision parton locations.
 
SigmaTotalsigmaTotPtr = {}
 Pointers to the total/elastic/diffractive cross sections.
 
SigmaCombinedsigmaCmbPtr = {}
 
set< PhysicsBase * > subObjects
 
UserHooksPtr userHooksPtr
 

Detailed Description

The BeamSetup class contains a number of routines auxiliary to Pythia to set up beam flavour, kinematics and PDFs.

Member Function Documentation

void boostAndVertex ( Event process,
Event event,
bool  toLab,
bool  setVertex 
)

Boost from CM frame to lab frame, or inverse. Set production vertex.

Optionally rotate event around its axis to randomize parton vertices.

Boost process from CM frame to lab frame.

Boost nonempty event from CM frame to lab frame.

Boost process from lab frame to CM frame.

Boost nonempty event from lab frame to CM frame.

Fix energy from mass and three-momentum, to patch up large boosts.

Set production vertex; assumes particles are in lab frame and at origin.

PDFPtr getPDFPtr ( int  idIn,
int  sequence = 1,
string  beam = "A",
bool  resolved = true 
)

Return a parton density set among list of possibilities.

Routine to set up a PDF pointer.

Temporary pointer to be returned.

Data file directory.

One option is to treat a Pomeron like a pi0.

Check if photon beam inside proton.

Nucleon-like beam, normal or hard choice.

Use internal LHAgrid1 implementation for LHAPDF6 files.

Use sets from LHAPDF.

Use internal sets.

Quasi-real photons inside a (anti-)proton beam.

Find the resolved photon PDF to combine with the flux.

Set up the combination of flux and PDF for resolved photons.

Find the pre-set photon PDF, hard or normal.

Set the photon flux pointer and construct approximation. Use the existing machinery for external fluxes.

Externally provided flux.

Find the correct flux for given beam set with setPhotonFluxPtr().

Check that external flux exist and complain if not.

Classic EPA proton by Budnev, Ginzburg, Meledin and Serbo.

Check if Q^2 sampling on and turn off if necessary.

EPA approximation by Drees and Zeppenfeld.

Construct flux object when pointer succesfully created.

Pion-like beam (or, in one option, Pomeron beam).

If VMD process then scale PDF accordingly: f_a^VMD = alphaEM * (1/f_rho^2 + 1/f_omega^2 + 1/f_phi^2 + 1/f_J/psi)

  • f_a^pi0. COR: New value here includes J/psi

Use internal LHAgrid1 implementation for LHAPDF6 files.

Use sets from LHAPDF.

Use internal set.

Pomeron beam, if not treated like a pi0 beam.

Use internal LHAgrid1 implementation for LHAPDF6 files.

Use sets from LHAPDF.

A generic Q2-independent parametrization.

The H1 Q2-dependent parametrizations. Initialization requires files.

The parametrizations of Alvero, Collins, Terron and Whitmore.

Set up nuclear PDFs.

Which nPDF set to use.

Temporary pointer for storing proton PDF pointer.

Photon beam, either point-like (unresolved) or resolved.

For unresolved beam use the point-like PDF.

Point-like beam if unresolved photons.

Use different PDFs for hard process.

Find the name or number of the hard PDF set.

Use sets from LHAPDF. Only available for hard processes.

Or set up an internal set (though currently only one).

Set up the PDF.

Lepton beam: neutrino, resolved charged lepton or unresolved ditto. Also photon inside lepton PDFs.

For neutrinos only point-like PDF.

Set up resolved photon inside lepton for beam A.

Find the pre-set photon PDF, hard or normal.

Get the mass of lepton and maximum virtuality of the photon.

Initialize the gamma-inside-lepton PDFs with internal photon flux.

Initialize the gamma-inside-lepton PDFs with external photon flux. Requires that the pointer to the flux set.

Set up resolved photon inside lepton for beam B.

Find the pre-set photon PDF, hard or normal.

Get the mass of lepton and maximum virtuality of the photon.

Initialize the gamma-inside-lepton PDFs with internal photon flux.

Initialize the gamma-inside-lepton PDFs with external photon flux.

Usual lepton PDFs.

External photon flux for direct-photon processes.

Dark matter beam set up as pointlike lepton.

Further hadronic beams.

Optionally allow extrapolation beyond x and Q2 limits.

Done.

bool initBeams ( bool  doNonPertIn,
StringFlav flavSelPtr 
)

Initialize kinematics and PDFs of beams.

Info on process kinds.

Set up values related to beam shape.

Check that beams and beam combination can be handled.

Simplified beam setup when no process level.

Full beam setup: first beam kinematics.

Set up pointers to PDFs.

Set up the two beams and the common remnant system.

Special setup to allow switching between beam PDFs.

Pass information whether the beam will contain a photon beam.

Init also unresolved PDF pointers for photon beams when needed.

Optionally set up new alternative beams for these Pomerons.

Initialise VMD beams from gammas (in leptons). Use pion PDF for VMDs.

Optionally set up photon beams from lepton beams if resolved photons.

Done.

bool initFrame ( )

Set up frame of beams, Les Houches input, and switches for beam handling.

Find which frame type to use.

Initialization with internal processes: read in and set values.

Special option with variable incoming projectile.

Initialization with a Les Houches Event File or an LHAup object.

For file input: renew file stream or (re)new Les Houches object.

Header is optional, so use NULL pointer to indicate no value.

Check that file was properly opened.

For object input: at least check that not null pointer.

LHAup object generic abort using fileFound() routine.

Send in pointer to info. Store or replace LHA pointer in other classes.

If second time around, only with new file, then simplify. Optionally skip ahead a number of events at beginning of file.

Set LHAinit information (in some external program).

Extract beams from values set in an LHAinit object.

Optionally skip ahead a number of events at beginning of file.

Find out if beams are or have a resolved photon beam. The PDF:lepton2gamma is kept for backwards compatibility, now beamA2gamma and beamB2gamma are the master switches.

Check if resolved photons are needed.

Check if unresolved photons are needed.

Check if VMD sampling is required for beam A and/or B.

Some other necessary setup.

Done.

void nextKinematics ( )

Recalculate kinematics for each event when beam momentum has a spread.

Pick beam momentum spread and beam vertex. May be all that is needed.

Read out masses, since the particle id's may have changed.

Momentum spread: read out momentum shift to give current beam momenta.

For variable energy in rest frame only need new eCM value, already set.

Variable energy but collinear beams: give current beam momenta.

Variable three-momenta stored and energy calculated.

Other possibilites not supported.

Construct CM frame kinematics.

Set relevant info for other classes to use.

Set boost/rotation matrices from/to CM frame.

void onInitInfoPtr ( )
inlineoverrideprotectedvirtual

If an object needs to set up infoPtr for sub objects, override this and call registerSubObject for each object in question.

Reimplemented from PhysicsBase.

bool setBeamIDs ( int  idAin,
int  idBin = 0 
)

Switch to new beam particle identities; for similar hadrons only.

Do nothing if nothing changed.

Optionally perform checks to see if new are close relatives to old. Empty for now. Could be based on below, to check that same PDF is used.

For allowIDAswitch on one may need to set a new PDF for A. Note that cases are (have to be!) synchronized with the idAList order.

It should have worked, but error if not.

Store the new identities, also in Info.

Modify beam particles. Possibly also PDF for idA.

bool setKinematics ( double  eCMIn)

Switch beam kinematics.

Set beam CM energy.

Check that the frameType matches the input provided.

Save input value.

bool setKinematics ( double  eAIn,
double  eBIn 
)

Set beam energies.

Check that the frameType matches the input provided.

Save input values.

bool setKinematics ( double  pxAIn,
double  pyAIn,
double  pzAIn,
double  pxBIn,
double  pyBIn,
double  pzBIn 
)

Set beam momenta.

Check that the frameType matches the input provided.

Save input values.

bool setKinematics ( Vec4  pAIn,
Vec4  pBIn 
)

Set beam momenta.

Check that the frameType matches the input provided.

Save input values.

bool setPDFAPtr ( PDFPtr  pdfAPtrIn)

Routine to pass in pointers to PDF's. Usage optional.

Reset pointers to be empty.

Switch off external PDF's by zero as input.

Save pointers.

By default same pointers for hard-process PDF's.

Done.

bool setPDFBPtr ( PDFPtr  pdfBPtrIn)

Routine to pass in pointers to PDF's. Usage optional.

Reset pointers to be empty.

Switch off external PDF's by zero as input.

Save pointers.

By default same pointers for hard-process PDF's.

Done.

bool setPDFPtr ( PDFPtr  pdfAPtrIn,
PDFPtr  pdfBPtrIn,
PDFPtr  pdfHardAPtrIn = nullptr,
PDFPtr  pdfHardBPtrIn = nullptr,
PDFPtr  pdfPomAPtrIn = nullptr,
PDFPtr  pdfPomBPtrIn = nullptr,
PDFPtr  pdfGamAPtrIn = nullptr,
PDFPtr  pdfGamBPtrIn = nullptr,
PDFPtr  pdfHardGamAPtrIn = nullptr,
PDFPtr  pdfHardGamBPtrIn = nullptr,
PDFPtr  pdfUnresAPtrIn = nullptr,
PDFPtr  pdfUnresBPtrIn = nullptr,
PDFPtr  pdfUnresGamAPtrIn = nullptr,
PDFPtr  pdfUnresGamBPtrIn = nullptr,
PDFPtr  pdfVMDAPtrIn = nullptr,
PDFPtr  pdfVMDBPtrIn = nullptr 
)

Possibility to pass in pointers to PDF's.

The BeamSetup class.

Routine to pass in pointers to PDF's. Usage optional.

Default is no pointer to different PDF kinds.

Switch off external PDF's by zero as input.

The two PDF objects cannot be one and the same.

Save pointers.

By default same pointers for hard-process PDF's.

Optionally allow separate pointers for hard process.

Optionally allow pointers for Pomerons in the proton.

Optionally allow pointers for Gammas in the leptons.

Optionally allow pointers for Hard PDFs for photons in the leptons.

Optionally allow pointers for unresolved PDFs.

Optionally allow pointers for unresolved PDFs for photons from leptons.

Optionally allow pointers for VMD in the gamma.

Done.

Member Data Documentation

vector<int> idAList
Initial value:
= { 2212, 211, 311, 221,
331, 333, 411, 431, 443, 511, 531, 541, 553, 3212, 3312, 3334,
4112, 4312, 4332, 5112, 5312, 5332}

Hadron types for rapid switching.


The documentation for this class was generated from the following files: