herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Herwig::PhaseSpaceMode Class Reference

The PhaseSpaceMode class is designed to store a group of phase-space channels for use by the DecayIntegrator class to generate the phase-space for a given decay mode. More...

#include <PhaseSpaceMode.h>

Inheritance diagram for Herwig::PhaseSpaceMode:

Public Member Functions

Standard constructors and destructors.
 PhaseSpaceMode ()
 The default constructor.
 
 PhaseSpaceMode (tPDPtr in1, tPDVector out, double wMax, tPDPtr in2=tPDPtr(), Energy eMax=ZERO)
 The default constructor.
 
ParticleVector generateDecay (const Particle &inpart, tcDecayIntegratorPtr decayer, bool intermediates, bool cc)
 Generate the decay.
 
void addChannel (PhaseSpaceChannel channel)
 Add a new channel.
 
void resetIntermediate (int ichan, tcPDPtr part, Energy mass, Energy width)
 Reset the properties of one of the intermediate particles.
 
void resetIntermediate (tcPDPtr part, Energy mass, Energy width)
 Reset the properties of one of the intermediate particles.
 
const vector< PhaseSpaceChannel > & channels () const
 The phase-space channels.
 
void setWeights (const vector< double > &wgts)
 Set the weights.
 
unsigned int selectedChannel () const
 Access to the selected channel.
 
unsigned int nRand () const
 Number of rnadom numbers needed.
 
void checkOnShell (bool in)
 Set whether of not decays are generated on-shell.
 
- Public Member Functions inherited from ThePEG::Base
void debug () const
 
virtual void debugme () const
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 

Friends

class PhaseSpaceChannel
 

Functions used by the persistent I/O system.

ostream & operator<< (ostream &os, const PhaseSpaceMode &mode)
 A friend operator to allow the mode to be outputted for debugging purposes.
 
pair< PDPtr, PDPtrincoming_
 The incoming particles.
 
vector< PhaseSpaceChannelchannels_
 The phase-space channels.
 
double maxWeight_
 The maximum weight.
 
tPDVector outgoing_
 The external particles.
 
tPDVector outgoingCC_
 
int partial_
 Which of the partial widths of the incoming particle to use.
 
cGenericWidthGeneratorPtr widthGen_
 The width generator for the incoming particle.
 
vector< cGenericMassGeneratorPtr > massGen_
 The mass generators for the outgoing particles.
 
vector< double > BRsum_
 
bool testOnShell_
 Whether to check on-shell or off-shell kinematics in doinit, if on-shell off-shell is tested in initrun.
 
Energy eMax_
 The maximum energy for the mode.
 
unsigned int iChannel_
 The selected channel.
 
Energy eps_
 Cut-off.
 
unsigned int nRand_
 Number of random numbers required.
 
stack< double > rStack_
 Stack for the random numbers.
 
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.
 
void init ()
 Initialize the phase space.
 
void initrun ()
 Initialisation before the run stage.
 
double maxWeight () const
 Get the maximum weight for the decay.
 
void maxWeight (double wgt) const
 Set the maximum weight for the decay.
 
Energy initializePhaseSpace (bool init, tcDecayIntegratorPtr decayer, bool onShell=false)
 Initialise the phase space.
 
pair< PDPtr, PDPtrincoming () const
 The incoming particles.
 
tPDVector outgoing () const
 Access to the outging particles.
 
tPDVector outgoingCC () const
 Access to the outging particles.
 
unsigned int numberOfParticles () const
 Number of outgoing particles.
 
void setPartialWidth (int in)
 Set the partial width to use for normalization.
 
Energy epsilonPS () const
 Access to the epsilon parameter.
 
void fillStack (const double *r)
 Fill the stack.
 
void fillStack ()
 Fill the stack.
 
Energy weight (int &ichan, const Lorentz5Momentum &in, vector< Lorentz5Momentum > &momenta, bool onShell=false) const
 Return the weight for a given phase-space point.
 
static void Init ()
 The standard Init function used to initialize the interfaces.
 
Energy flatPhaseSpace (const Lorentz5Momentum &in, vector< Lorentz5Momentum > &momenta, bool onShell=false) const
 Return the weight and momenta for a flat phase-space decay.
 
Energy channelPhaseSpace (int &ichan, const Lorentz5Momentum &in, vector< Lorentz5Momentum > &momenta, bool onShell=false) const
 Generate a phase-space point using multichannel phase space.
 
vector< Energy > externalMasses (Energy inmass, double &wgt, bool onShell) const
 Generate the masses of the external particles.
 
void constructVertex (const Particle &in, const ParticleVector &out, tcDecayIntegratorPtr decayer) const
 Construct the vertex for spin corrections.
 
PhaseSpaceModeoperator= (const PhaseSpaceMode &)=delete
 The assignment operator is private and must never be called.
 

Additional Inherited Members

- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 

Detailed Description

The PhaseSpaceMode class is designed to store a group of phase-space channels for use by the DecayIntegrator class to generate the phase-space for a given decay mode.

Additional phase-space channels can be added using the addChannel member.

In practice the modes are usually constructed together with the a number of PhaseSpaceChannel objects. In classes inheriting from the DecayIntegrator class.

See also
DecayIntegrator
PhaseSpaceChannel
Author
Peter Richardson

Definition at line 42 of file PhaseSpaceMode.h.

Constructor & Destructor Documentation

◆ PhaseSpaceMode() [1/2]

Herwig::PhaseSpaceMode::PhaseSpaceMode ( )
inline

The default constructor.

Definition at line 53 of file PhaseSpaceMode.h.

◆ PhaseSpaceMode() [2/2]

Herwig::PhaseSpaceMode::PhaseSpaceMode ( tPDPtr  in1,
tPDVector  out,
double  wMax,
tPDPtr  in2 = tPDPtr(),
Energy  eMax = ZERO 
)
inline

The default constructor.

Definition at line 61 of file PhaseSpaceMode.h.

Member Function Documentation

◆ addChannel()

void Herwig::PhaseSpaceMode::addChannel ( PhaseSpaceChannel  channel)
inline

Add a new channel.

Parameters
channelA pointer to the new PhaseChannel

Definition at line 90 of file PhaseSpaceMode.h.

References channels_, and Herwig::PhaseSpaceChannel::init().

◆ channelPhaseSpace()

Energy Herwig::PhaseSpaceMode::channelPhaseSpace ( int &  ichan,
const Lorentz5Momentum &  in,
vector< Lorentz5Momentum > &  momenta,
bool  onShell = false 
) const
private

Generate a phase-space point using multichannel phase space.

Parameters
ichanThe channel to use
inThe momentum of the incoming particle
momentaThe momenta of the outgoing particles
onShellWhether or not to force the intermediates to be on-shell
Returns
The weight.

Referenced by weight().

◆ channels()

const vector< PhaseSpaceChannel > & Herwig::PhaseSpaceMode::channels ( ) const
inline

The phase-space channels.

Definition at line 123 of file PhaseSpaceMode.h.

References channels_.

◆ checkOnShell()

void Herwig::PhaseSpaceMode::checkOnShell ( bool  in)
inline

Set whether of not decays are generated on-shell.

Definition at line 147 of file PhaseSpaceMode.h.

References testOnShell_.

◆ constructVertex()

void Herwig::PhaseSpaceMode::constructVertex ( const Particle in,
const ParticleVector out,
tcDecayIntegratorPtr  decayer 
) const
private

Construct the vertex for spin corrections.

Parameters
inThe incoming particle.
outThe outgoing particles.

◆ epsilonPS()

Energy Herwig::PhaseSpaceMode::epsilonPS ( ) const
inline

Access to the epsilon parameter.

Definition at line 239 of file PhaseSpaceMode.h.

References eps_.

◆ externalMasses()

vector< Energy > Herwig::PhaseSpaceMode::externalMasses ( Energy  inmass,
double &  wgt,
bool  onShell 
) const
private

Generate the masses of the external particles.

Parameters
inmassThe mass of the decaying particle.
wgtThe weight for the masses.
Returns
The masses.

◆ fillStack() [1/2]

void Herwig::PhaseSpaceMode::fillStack ( )
inline

Fill the stack.

Definition at line 253 of file PhaseSpaceMode.h.

References nRand_, ThePEG::UseRandom::rnd(), and rStack_.

◆ fillStack() [2/2]

void Herwig::PhaseSpaceMode::fillStack ( const double *  r)
inline

Fill the stack.

Definition at line 244 of file PhaseSpaceMode.h.

References nRand_, and rStack_.

◆ flatPhaseSpace()

Energy Herwig::PhaseSpaceMode::flatPhaseSpace ( const Lorentz5Momentum &  in,
vector< Lorentz5Momentum > &  momenta,
bool  onShell = false 
) const
private

Return the weight and momenta for a flat phase-space decay.

Parameters
inThe momentum of the incoming particle
momentaThe momenta of the outgoing particles
onShellWhether or not to force the intermediates to be on-shell
Returns
The weight.

Referenced by weight().

◆ generateDecay()

ParticleVector Herwig::PhaseSpaceMode::generateDecay ( const Particle inpart,
tcDecayIntegratorPtr  decayer,
bool  intermediates,
bool  cc 
)

Generate the decay.

Parameters
intermediatesWhether or not to generate the intermediate particle in the decay channel.
ccWhether we are generating the mode specified or the charge conjugate mode.
inpartThe incoming particle.
Returns
The outgoing particles.

◆ incoming()

pair< PDPtr, PDPtr > Herwig::PhaseSpaceMode::incoming ( ) const
inline

The incoming particles.

Definition at line 209 of file PhaseSpaceMode.h.

References incoming_.

◆ Init()

static void Herwig::PhaseSpaceMode::Init ( )
static

The standard Init function used to initialize the interfaces.

Called exactly once for each class by the class description system before the main function starts or when this class is dynamically loaded.

◆ initializePhaseSpace()

Energy Herwig::PhaseSpaceMode::initializePhaseSpace ( bool  init,
tcDecayIntegratorPtr  decayer,
bool  onShell = false 
)

Initialise the phase space.

Parameters
initPerform the initialization.

◆ maxWeight() [1/2]

double Herwig::PhaseSpaceMode::maxWeight ( ) const
inline

Get the maximum weight for the decay.

Returns
The maximum weight.

Definition at line 191 of file PhaseSpaceMode.h.

References maxWeight_.

◆ maxWeight() [2/2]

void Herwig::PhaseSpaceMode::maxWeight ( double  wgt) const
inline

Set the maximum weight for the decay.

Returns
The maximum weight.

Definition at line 197 of file PhaseSpaceMode.h.

References maxWeight_.

◆ nRand()

unsigned int Herwig::PhaseSpaceMode::nRand ( ) const
inline

Number of rnadom numbers needed.

Definition at line 142 of file PhaseSpaceMode.h.

References nRand_.

◆ numberOfParticles()

unsigned int Herwig::PhaseSpaceMode::numberOfParticles ( ) const
inline

Number of outgoing particles.

Returns
The number of outgoing particles.

Definition at line 227 of file PhaseSpaceMode.h.

References outgoing_.

◆ operator=()

PhaseSpaceMode & Herwig::PhaseSpaceMode::operator= ( const PhaseSpaceMode )
privatedelete

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

◆ outgoing()

tPDVector Herwig::PhaseSpaceMode::outgoing ( ) const
inline

Access to the outging particles.

Returns
A pointer to the ParticleData object.

Definition at line 215 of file PhaseSpaceMode.h.

References outgoing_.

◆ outgoingCC()

tPDVector Herwig::PhaseSpaceMode::outgoingCC ( ) const
inline

Access to the outging particles.

Returns
A pointer to the ParticleData object.

Definition at line 221 of file PhaseSpaceMode.h.

◆ persistentInput()

void Herwig::PhaseSpaceMode::persistentInput ( PersistentIStream is,
int  version 
)

Function used to read in object persistently.

Parameters
isthe persistent input stream read from.
versionthe version number of the object when written.

◆ persistentOutput()

void Herwig::PhaseSpaceMode::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ resetIntermediate() [1/2]

void Herwig::PhaseSpaceMode::resetIntermediate ( int  ichan,
tcPDPtr  part,
Energy  mass,
Energy  width 
)
inline

Reset the properties of one of the intermediate particles.

Only a specific channel is reset.

Parameters
ichanThe channel to reset.
partThe ParticleData object of the particle to reset
massThe mass of the intermediate.
widthThe width of gthe intermediate.

Definition at line 103 of file PhaseSpaceMode.h.

References channels_.

◆ resetIntermediate() [2/2]

void Herwig::PhaseSpaceMode::resetIntermediate ( tcPDPtr  part,
Energy  mass,
Energy  width 
)
inline

Reset the properties of one of the intermediate particles.

All the channels are reset.

Parameters
partThe ParticleData object of the particle to reset
massThe mass of the intermediate.
widthThe width of gthe intermediate.

Definition at line 115 of file PhaseSpaceMode.h.

References channels_.

◆ selectedChannel()

unsigned int Herwig::PhaseSpaceMode::selectedChannel ( ) const
inline

Access to the selected channel.

Definition at line 137 of file PhaseSpaceMode.h.

References iChannel_.

◆ setPartialWidth()

void Herwig::PhaseSpaceMode::setPartialWidth ( int  in)
inline

Set the partial width to use for normalization.

This is the partial width in the WidthGenerator object.

Parameters
inThe partial width to use.

Definition at line 234 of file PhaseSpaceMode.h.

References partial_.

◆ setWeights()

void Herwig::PhaseSpaceMode::setWeights ( const vector< double > &  wgts)
inline

Set the weights.

Definition at line 128 of file PhaseSpaceMode.h.

References channels_, and weight().

◆ weight()

Energy Herwig::PhaseSpaceMode::weight ( int &  ichan,
const Lorentz5Momentum &  in,
vector< Lorentz5Momentum > &  momenta,
bool  onShell = false 
) const
inline

Return the weight for a given phase-space point.

Parameters
inThe momentum of the incoming particle
momentaThe momenta of the outgoing particles
onShellWhether or not to force the intermediates to be on-shell
Returns
The weight.

Definition at line 265 of file PhaseSpaceMode.h.

References channelPhaseSpace(), channels_, and flatPhaseSpace().

Referenced by setWeights().

Friends And Related Function Documentation

◆ operator<<

ostream & operator<< ( ostream &  os,
const PhaseSpaceMode mode 
)
friend

A friend operator to allow the mode to be outputted for debugging purposes.

Definition at line 282 of file PhaseSpaceMode.h.

◆ PhaseSpaceChannel

friend class PhaseSpaceChannel
friend

Definition at line 44 of file PhaseSpaceMode.h.

Member Data Documentation

◆ BRsum_

vector<double> Herwig::PhaseSpaceMode::BRsum_
private

Definition at line 381 of file PhaseSpaceMode.h.

◆ channels_

vector<PhaseSpaceChannel> Herwig::PhaseSpaceMode::channels_
private

The phase-space channels.

Definition at line 354 of file PhaseSpaceMode.h.

Referenced by addChannel(), channels(), resetIntermediate(), setWeights(), and weight().

◆ eMax_

Energy Herwig::PhaseSpaceMode::eMax_
private

The maximum energy for the mode.

Definition at line 391 of file PhaseSpaceMode.h.

◆ eps_

Energy Herwig::PhaseSpaceMode::eps_
private

Cut-off.

Definition at line 401 of file PhaseSpaceMode.h.

Referenced by epsilonPS().

◆ iChannel_

unsigned int Herwig::PhaseSpaceMode::iChannel_
mutableprivate

The selected channel.

Definition at line 396 of file PhaseSpaceMode.h.

Referenced by selectedChannel().

◆ incoming_

pair<PDPtr,PDPtr> Herwig::PhaseSpaceMode::incoming_
private

The incoming particles.

Definition at line 349 of file PhaseSpaceMode.h.

Referenced by incoming().

◆ massGen_

vector<cGenericMassGeneratorPtr> Herwig::PhaseSpaceMode::massGen_
private

The mass generators for the outgoing particles.

Definition at line 380 of file PhaseSpaceMode.h.

◆ maxWeight_

double Herwig::PhaseSpaceMode::maxWeight_
mutableprivate

The maximum weight.

Definition at line 359 of file PhaseSpaceMode.h.

Referenced by maxWeight().

◆ nRand_

unsigned int Herwig::PhaseSpaceMode::nRand_
private

Number of random numbers required.

Definition at line 406 of file PhaseSpaceMode.h.

Referenced by fillStack(), and nRand().

◆ outgoing_

tPDVector Herwig::PhaseSpaceMode::outgoing_
private

The external particles.

Definition at line 364 of file PhaseSpaceMode.h.

Referenced by numberOfParticles(), and outgoing().

◆ outgoingCC_

tPDVector Herwig::PhaseSpaceMode::outgoingCC_
private

Definition at line 365 of file PhaseSpaceMode.h.

◆ partial_

int Herwig::PhaseSpaceMode::partial_
private

Which of the partial widths of the incoming particle to use.

Definition at line 370 of file PhaseSpaceMode.h.

Referenced by setPartialWidth().

◆ rStack_

stack<double> Herwig::PhaseSpaceMode::rStack_
mutableprivate

Stack for the random numbers.

Definition at line 411 of file PhaseSpaceMode.h.

Referenced by fillStack().

◆ testOnShell_

bool Herwig::PhaseSpaceMode::testOnShell_
private

Whether to check on-shell or off-shell kinematics in doinit, if on-shell off-shell is tested in initrun.

Definition at line 386 of file PhaseSpaceMode.h.

Referenced by checkOnShell().

◆ widthGen_

cGenericWidthGeneratorPtr Herwig::PhaseSpaceMode::widthGen_
private

The width generator for the incoming particle.

Definition at line 375 of file PhaseSpaceMode.h.


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