-
If you are not satisfied with the list of parton density functions that
are implemented internally or available via the LHAPDF interface
(see the ";?>PDF Selection page), you
can supply your own by a call to the
setPDFPtr(...)
method
pythia.setPDFptr( pdfAPtr, pdfBPtr);
where pdfAPtr
and pdfBPtr
are pointers to
two Pythia
";?>PDF
objects. Note that pdfAPtr
and pdfBPtr
cannot point to the same object; even if the PDF set is the same,
two copies are needed to keep track of two separate sets of x
and density values.
If you further wish to use separate PDF's for the hard process of an
event than the ones being used for everything else, the extended form
pythia.setPDFptr( pdfAPtr, pdfBPtr, pdfHardAPtr, pdfHardBPtr);
allows you to specify those separately, and then the first two sets
would only be used for the showers and for multiparton interactions.
-
If you want to link to an external generator that feeds in events
in the LHA format, you can call the
setLHAupPtr(...)
method
pythia.setLHAupPtr( lhaUpPtr);
where the lhaUpPtr
derives from the
";?>LHAup base class.
-
If you want to perform some particle decays with an
external generator, you can call the
setDecayPtr(...)
method
pythia.setDecayPtr( decayHandlePtr, particles);
where the decayHandlePtr
derives from the
";?>DecayHandler
base
class and particles
is a vector of particle codes to be
handled.
-
If you want to use an external random number generator,
you can call the
setRndmEnginePtr(...)
method
pythia.setRndmEnginePtr( rndmEnginePtr);
where rndmEnginePtr
derives from the
";?>RndmEngine
base class.
The Pythia
default random number generator is perfectly
good, so this is only intended for consistency in bigger frameworks.
-
If you want to interrupt the evolution at various stages,
to interrogate the event and possibly veto it, or you want to
reweight the cross section, you can use
pythia.setUserHooksPtr( userHooksPtr);
where userHooksPtr
derives from the
";?>UserHooks
base class.
-
If you want to use your own merging scale definition for
matrix element + parton shower merging, you can call
pythia.setMergingHooksPtr( mergingHooksPtr);
where mergingHooksPtr
derives from the
";?>MergingHooks
base class.
-
If you want to use your own parametrization of beam momentum spread and
interaction vertex, rather than the provided simple Gaussian
parametrization (off by default), you can call
pythia.setBeamShapePtr( beamShapePtr);
where beamShapePtr
derives from the
";?>BeamShape
base class.
-
If you want to implement a cross section of your own, you can use
pythia.setSigmaPtr( sigmaPtr );
or, optionally,
pythia.setSigmaPtr( sigmaPtr, phaseSpacePtr );
where sigmaPtr
is of type SigmaProcess*
and phaseSpacePtr
is of type PhaseSpace*
.
When only the cross-section expression is provided, the built-in
phase-space selection machinery will be used. Then sigmaPtr
must be an instance of a class derived from one of the
Sigma1Process
, Sigma2Process
and
Sigma3Process
classes for 1-, 2- and 3- particle production,
in their turn derived from
";?>SigmaProcess
.
When you supply your own phase-space generator there is no fundamental
limit on the complexity of the process.
This call can be used repeatedly to hand in several different processes,
mixing ones with and ones without their own phase-space generators.
-
If your cross section contains the production of a new resonance
with known analytical expression for all the relevant partial widths,
you can make this resonance available to the program with
pythia.setResonancePtr( resonancePtr);
where resonancePtr
of type ResonanceWidths*
is an instance of a class derived from the
";?>ResonanceWidths
base class. In addition you need to add the particle to the normal
";?>particle and decay database.
This procedure can be used repeatedly to hand in several different
resonances.
-
If you are a real expert and want to ";?>replace
the PYTHIA initial- and final-state showers, you can use
pythia.setShowerPtr( timesDecPtr, timesPtr, spacePtr);
where timesDecPtr
and timesPtr
derive from the TimeShower
base class, and
spacePtr
from SpaceShower
.