#include <PartonExtractor.h>
Public Types | |
typedef map< cPPtr, PBIPtr > | PartonBinInstanceMap |
A map of PartonBinInstance objects indexed by the extracted parton. | |
Public Member Functions | |
int | maxTries () const |
The maximum number of attempts allowed when trying to generate remnants. | |
tcPDFPtr | getPDF (tcPDPtr particle) const |
Return the PDFBase object to be used for the incoming particle type. | |
Standard constructors and destructors. | |
PartonExtractor () | |
Default constructor. | |
virtual | ~PartonExtractor () |
Destructor. | |
Virtual functions which may be overridden in sub-classes. | |
virtual bool | canHandle (const cPDPair &) |
Return true if this parton extractor can handle the given types of incoming particles. | |
virtual PartonPairVec | getPartons (Energy maxEnergy, const cPDPair &, const Cuts &) const |
Return a vector of possible pairs of parton bins which can be produced within a given maximum total particle-particle invariant mass squared, maxEnergy sBin. | |
virtual Energy2 | newScale () |
May be overriden by sub-classes which have their own oppinion about what scale to use in a hard subprocess. | |
virtual void | colourConnect (tPPtr particle, tPPtr parton, const tPVector &remnants) const |
Connect the remnants with the colour lines of the extracted parton. | |
virtual PBIPair | newRemnants (tPPair oldp, tPPair newp, tStepPtr step) |
If remnants has already been created for the given parton, remove them from the given step and generate new remnants corresponding to the parton newp and add them to the step. | |
virtual pair< int, int > | nDims (const PBPair &pbins) |
Determine the number of random numbers needed to calculate and the product of all densitiy functions. | |
virtual void | prepare (const PBIPair &pbins) |
Prepare the given parton bin instances for generating a new event. | |
virtual bool | generateL (const PBIPair &pbins, const double *r1, const double *r2) |
Generate for all parton extractions. | |
virtual Energy2 | generateSHat (Energy2 s, const PBIPair &pbins, const double *r1, const double *r2) |
Generate the rest of the degrees of freedom to calculate and the product of all densitiy functions. | |
virtual double | fullFn (const PBIPair &pbins, Energy2 scale) |
Return the product of all density functions. | |
virtual void | construct (const PBIPair &pbins, tStepPtr step) const |
Construct remnants and add them to the step. | |
virtual void | constructRemnants (const PBIPair &pbins, tSubProPtr sub, tStepPtr step) const |
Construct remnants for partons created outside of this extractor. | |
virtual LorentzRotation | boostRemnants (PBIPair &bins, LorentzMomentum k1, LorentzMomentum k2, bool side1, bool side2) const |
Get boost for hard subsystem and boost remnants. | |
Access information about the current paron extraction. | |
tPBIPtr | partonBinInstance (tcPPtr) const |
Return the corresponding parton bin instance for a given extracted parton. | |
void | select (tXCombPtr newXComb) |
Set the XComb object describing the current hard sub-process. | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. | |
Static Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interface. | |
Protected Member Functions | |
virtual void | addPartons (tPBPtr incoming, const PDFCuts &cuts, PartonVector &pbins) const |
Add parton bins to pbins for the given incoming particle and the specified cuts. | |
tcPDFPtr | noPDF () const |
The NoPDF object. | |
template<typename Iterator> | |
void | findConnect (tColinePtr line, tPPtr parton, bool anti, Iterator first, Iterator last) const |
Connect the first (anti) coloured particle in the given range (not equal to parton) and connect it to the colour line. | |
Functions used by the main virtual functions. Some of | |
these may be overridden in sub-classes. | |
virtual void | generateL (PartonBinInstance &pb, const double *r) |
Used by generateL() for each of the final parton bins. | |
virtual bool | generate (PartonBinInstance &pb, const double *r, Energy2 shat, const Lorentz5Momentum &first) |
Used by generateSHat() for each of the final parton bins. | |
virtual double | fullFn (const PartonBinInstance &pb) |
Used by the public fullFn() for each of the final parton bins. | |
virtual void | construct (PartonBinInstance &pb, tStepPtr step, bool boost=true) const |
Used by the public construct() for each of the final parton bins. | |
PBIPtr | newRemnants (tPBIPtr oldpb, tPPtr newp, const LorentzMomentum &k) |
Used by the public newRemnants() for each of the parton bins. | |
void | addNewRemnants (tPBIPtr oldpb, tPBIPtr newpb, tStepPtr step) |
Used by the public newRemnants() for each of the parton bins. | |
virtual void | transformRemnants (LorentzMomentum &Ph, LorentzMomentum &Pr, const LorentzMomentum &k, const LorentzMomentum &P) const |
Transform remnant momentum. | |
virtual void | constructRemnants (PartonBinInstance &pb, LorentzMomentum &Ph, const LorentzMomentum &k) const |
Construct remnants recursively for the parton represented by pb. | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. | |
Standard Interfaced functions. | |
virtual void | dofinish () |
Finalize this object. | |
Private Member Functions | |
PartonExtractor & | operator= (const PartonExtractor &) |
Private and non-existent assignment operator. | |
Private Attributes | |
PartonBinInstanceMap | partonBinInstances |
The PartonBinInstance's used mapped to the respective partons. | |
vector< PDFPtr > | theSpecialDensities |
A list of special PDFBase objects to be used. | |
PDFPtr | theNoPDF |
The NoPDF object. | |
int | theMaxTries |
The maximum number of tries allowed when trying to produce remnants. | |
bool | flatSHatY |
True if this extractor should override the -generation in the PDFs and generate a flat distribution in and y. | |
Static Private Attributes | |
static ClassDescription < PartonExtractor > | initPartonExtractor |
Describe a concrete class with persistent data. | |
Friends | |
class | XComb |
XComb is a friend. |
It is used by a SubProcessHandler which combines one PartonExtractor with a number of MEBase objects which are the used in an XComb in a StandardEventHandler to generate hard sub-processes.
PartonExtractor inherits from the general HandlerBase class and from the LastXCombInfo class to have easy acces to information about the currently chosen hard sub-process.
Definition at line 44 of file PartonExtractor.h.
typedef map<cPPtr,PBIPtr> ThePEG::PartonExtractor::PartonBinInstanceMap |
A map of PartonBinInstance objects indexed by the extracted parton.
Definition at line 52 of file PartonExtractor.h.
virtual Energy2 ThePEG::PartonExtractor::newScale | ( | ) | [virtual] |
May be overriden by sub-classes which have their own oppinion about what scale to use in a hard subprocess.
The default version simply returns the previously selected scale.
virtual PBIPair ThePEG::PartonExtractor::newRemnants | ( | tPPair | oldp, | |
tPPair | newp, | |||
tStepPtr | step | |||
) | [virtual] |
If remnants has already been created for the given parton, remove them from the given step and generate new remnants corresponding to the parton newp and add them to the step.
The new parton bins are returned.
Veto | if remnant generation failed for whatever reason. |
virtual void ThePEG::PartonExtractor::constructRemnants | ( | const PBIPair & | pbins, | |
tSubProPtr | sub, | |||
tStepPtr | step | |||
) | const [virtual] |
Construct remnants for partons created outside of this extractor.
Information about the incoming partons should be set in pbins and the hard subprocess should be present in sub. Generated remnants will be added to the step.
Veto | if remnant generation failed for whatever reason. |
virtual LorentzRotation ThePEG::PartonExtractor::boostRemnants | ( | PBIPair & | bins, | |
LorentzMomentum | k1, | |||
LorentzMomentum | k2, | |||
bool | side1, | |||
bool | side2 | |||
) | const [virtual] |
Get boost for hard subsystem and boost remnants.
To be called after re-constructing remnants and obtaining new momenta of the partons entering the hard subsystem, but ignoring detailed energy and momentum conservation. Perform boosts of the remnants to conserve energy and momentum and return the boost needed for the hard subsystem. bins contains the current state of the incoming partons, including the momenta obtained after the remnant generation. k1 and k2 contains the momenta of the incoming partons before the remnant generation. If either side has no new remnants, side1 and/or side2 should be false.
Return the PDFBase object to be used for the incoming particle type.
If one of theSpecialDensities matches the particle type it is returned, otherwise if particle is a BeamParticleData use the PDFBase object specified there. If also this fails, return a NoPDF object.
virtual void ThePEG::PartonExtractor::generateL | ( | PartonBinInstance & | pb, | |
const double * | r | |||
) | [protected, virtual] |
Used by generateL() for each of the final parton bins.
Direction<0> is set to positive(negative) for the first(second) final bin.
virtual bool ThePEG::PartonExtractor::generate | ( | PartonBinInstance & | pb, | |
const double * | r, | |||
Energy2 | shat, | |||
const Lorentz5Momentum & | first | |||
) | [protected, virtual] |
Used by generateSHat() for each of the final parton bins.
Direction<0> is set to positive(negative) for the first(second) final bin, pb. Should ask the remnant handler to generate what is needed to construct the extracted parton momentum. r is a pointer to an array of random numbers to be used and shat is the approximate invariant mass squared of the hard system produced by the extracted parton and the primary parton from the other side. first is the momentum of the original incoming particle.
virtual void ThePEG::PartonExtractor::construct | ( | PartonBinInstance & | pb, | |
tStepPtr | step, | |||
bool | boost = true | |||
) | const [protected, virtual] |
Used by the public construct() for each of the final parton bins.
If boost is false, no boost is necessary to give the remnants proper momenta.
PBIPtr ThePEG::PartonExtractor::newRemnants | ( | tPBIPtr | oldpb, | |
tPPtr | newp, | |||
const LorentzMomentum & | k | |||
) | [protected] |
Used by the public newRemnants() for each of the parton bins.
Veto | if remnant generation failed for whatever reason. |
virtual void ThePEG::PartonExtractor::transformRemnants | ( | LorentzMomentum & | Ph, | |
LorentzMomentum & | Pr, | |||
const LorentzMomentum & | k, | |||
const LorentzMomentum & | P | |||
) | const [protected, virtual] |
Transform remnant momentum.
Assuming remnants have been generated with momentum Pr without considering energy-momentum conservation, shift the momentum, possibly compensating with the momentum of the hard subsystem, Ph. For information the momentum of the parton entering the hard subsystem from the other side, k, and the momentum of the remnants parent particle , P is given. Note that Direction<0> must be set to determine if the parent particle is to be assumed to go in the positive or negative direction.
virtual void ThePEG::PartonExtractor::constructRemnants | ( | PartonBinInstance & | pb, | |
LorentzMomentum & | Ph, | |||
const LorentzMomentum & | k | |||
) | const [protected, virtual] |
Construct remnants recursively for the parton represented by pb.
Used by constructRemnants(const PBIPair &, tSubProPtr, tStepPtr). Shift the momentum, Ph, of the hard subsystem to conserve energy and momentum if necessary. The momentum, k, of the parton coming into the hard subsystem from the other side is given for information. Note that Direction<0> must be set to determine if the parent particle is to be assumed to go in the positive or negative direction.
Veto | if remnant generation failed for whatever reason. |
void ThePEG::PartonExtractor::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
Reimplemented from ThePEG::Interfaced.
void ThePEG::PartonExtractor::persistentInput | ( | PersistentIStream & | is, | |
int | version | |||
) |
Function used to read in object persistently.
is | the persistent input stream read from. | |
version | the version number of the object when written. |
Reimplemented from ThePEG::Interfaced.
virtual IBPtr ThePEG::PartonExtractor::clone | ( | ) | const [protected, virtual] |
Make a simple clone of this object.
Implements ThePEG::InterfacedBase.
virtual IBPtr ThePEG::PartonExtractor::fullclone | ( | ) | const [protected, virtual] |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::InterfacedBase.
virtual void ThePEG::PartonExtractor::dofinish | ( | ) | [protected, virtual] |
Finalize this object.
Called in the run phase just after a run has ended. Used eg. to write out statistics.
Reimplemented from ThePEG::InterfacedBase.
friend class XComb [friend] |