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

The GenericMassGenerator class is a simple class for the generation of particle masses in Herwig. More...

#include <GenericMassGenerator.h>

Inheritance diagram for Herwig::GenericMassGenerator:

Public Member Functions

 GenericMassGenerator ()
 Default constructor.
 
virtual ~GenericMassGenerator ()
 Destructor.
 
Members to generate the mass of a particle instance
Energy mass (const ParticleData &part) const
 Generate a mass using the default limits.
 
Energy mass (const ParticleData &part, const Energy low, const Energy upp) const
 Generate a mass using specified limits.
 
Energy mass (double &wgt, const ParticleData &part, double r=UseRandom::rnd()) const
 Return a mass with the weight using the default limits.
 
Energy mass (double &wgt, const ParticleData &part, const Energy low, const Energy upp, double r=UseRandom::rnd()) const
 Return a mass with the weight using the specified limits.
 
virtual double weight (Energy q) const
 Weight for the factor.
 
virtual InvEnergy2 BreitWignerWeight (Energy q)
 Return the full weight.
 
virtual void dataBaseOutput (ofstream &, bool)
 Output the initialisation info for the database.
 
virtual bool accept (const ParticleData &) const=0
 
virtual Energy mass (const ParticleData &) const=0
 
- Public Member Functions inherited from ThePEG::Interfaced
virtual bool defaultInit ()
 
PPtr getParticle (PID) const
 
PDPtr getParticleData (PID) const
 
bool used () const
 
void useMe () const
 
tEGPtr generator () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
PPtr getParticle (PID) const
 
PDPtr getParticleData (PID) const
 
bool used () const
 
void useMe () const
 
tEGPtr generator () const
 
- Public Member Functions inherited from ThePEG::InterfacedBase
string fullName () const
 
string name () const
 
string path () const
 
string comment () const
 
void setup (istream &is)
 
void update ()
 
void init ()
 
virtual bool preInitialize () const
 
void initrun ()
 
void finish ()
 
void touch ()
 
void reset ()
 
void clear ()
 
InitState state () const
 
bool locked () const
 
bool touched () const
 
virtual IBPtr fullclone () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
virtual void debugme () const
 
void update ()
 
void init ()
 
virtual bool preInitialize () const
 
void initrun ()
 
void finish ()
 
void touch ()
 
void reset ()
 
void clear ()
 
InitState state () const
 
bool locked () const
 
bool touched () const
 
virtual IBPtr fullclone () const
 
- 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
 
- Public Member Functions inherited from ThePEG::Named
 Named (const string &newName=string())
 
 Named (const Named &)=default
 
const string & name () const
 
bool operator== (const Named &other) const
 
bool operator< (const Named &other) const
 

Protected Member Functions

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.
 
- Protected Member Functions inherited from ThePEG::Interfaced
void reporeg (IBPtr object, string name) const
 
bool setDefaultReference (PtrT &ptr, string classname, string objectname)
 
 Interfaced (const string &newName)
 
 Interfaced (const Interfaced &i)
 
void setGenerator (tEGPtr generator)
 
- Protected Member Functions inherited from ThePEG::InterfacedBase
virtual void readSetup (istream &is)
 
virtual void doupdate ()
 
virtual void doinit ()
 
virtual void doinitrun ()
 
virtual void dofinish ()
 
virtual IVector getReferences ()
 
virtual void rebind (const TranslationMap &)
 
virtual IBPtr clone () const=0
 
 InterfacedBase (string newName)
 
 InterfacedBase (const InterfacedBase &i)
 
virtual void readSetup (istream &is)
 
virtual void doupdate ()
 
virtual void doinit ()
 
virtual void doinitrun ()
 
virtual void dofinish ()
 
virtual IVector getReferences ()
 
virtual void rebind (const TranslationMap &)
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
- Protected Member Functions inherited from ThePEG::Named
const Namedoperator= (const Named &other)
 
const string & name (const string &newName)
 

Friends

class ModelGenerator
 ModelGenerator class as must be friend to set the particle.
 

Standard Interfaced functions.

double maxWgt_
 The maximum weight for unweighting when generating the mass.
 
int BWShape_
 parameter controlling the shape of the Breit-Wigner
 
int nGenerate_
 Number of attempts to generate the mass.
 
tPDPtr particle_
 Pointer to the particle.
 
Energy lowerMass_
 Lower limit on the particle's mass.
 
Energy upperMass_
 Upper limit on the particle's mass.
 
Energy mass_
 Mass of the particle.
 
Energy width_
 Width of the particle.
 
Energy2 mass2_
 Mass of the particle squared.
 
Energy2 mWidth_
 Mass of the particle times the width.
 
int nInitial_
 Number of weights to generate when initializing.
 
bool initialize_
 Whether or not to initialize the GenericMassGenerator.
 
bool output_
 Whether or not to output the data to a file.
 
WidthGeneratorPtr widthGen_
 Pointer to the width generator.
 
GenericWidthGeneratorPtr widthGenB_
 Pointer to the width generator.
 
bool widthOpt_
 Option for the treatment of the width.
 
virtual void doinit ()
 Initialize this object after the setup phase before saving and EventGenerator to disk.
 
virtual void dofinish ()
 Finalize this object.
 
virtual void rebind (const TranslationMap &trans)
 Rebind pointer to other Interfaced objects.
 
virtual IVector getReferences ()
 Return a vector of all pointers to Interfaced objects used in this object.
 
GenericMassGeneratoroperator= (const GenericMassGenerator &)=delete
 Private and non-existent assignment operator.
 
void setParticle (string)
 Helper function for the interface.
 
string getParticle () const
 Helper function for the interface.
 

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.
 
bool accept (const ParticleData &part) const
 Return true if this mass generator can handle the given particle type.
 
static void Init ()
 Standard Init function used to initialize the interfaces.
 

Access to particle properties

pair< Energy, Energy > width (Energy q, int shape) const
 The running width.
 
Energy lowerLimit () const
 Lower limit on the mass.
 
Energy upperLimit () const
 Upper limit on the mass.
 
Energy nominalMass () const
 Default mass.
 
Energy nominalWidth () const
 Default Width.
 
virtual Energy mass (double &wgt, const ParticleData &, const Energy low, const Energy upp, int shape, double r=UseRandom::rnd()) const
 Return a mass with the weight using the specified limits.
 
Energy mass (double &wgt, const ParticleData &part, int shape, double r=UseRandom::rnd()) const
 Return a mass with the weight using the default limits.
 
virtual double weight (Energy q, int shape) const
 Weight for the factor.
 
virtual InvEnergy2 BreitWignerWeight (Energy q, int shape) const
 Return the full weight.
 
tcPDPtr particle () const
 Accesss to the particle.
 
void particle (tPDPtr in)
 Set the particle.
 

Additional Inherited Members

- Public Types inherited from ThePEG::InterfacedBase
enum  InitState
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- Static Public Member Functions inherited from ThePEG::MassGenerator
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::Interfaced
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::InterfacedBase
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 
- Public Attributes inherited from ThePEG::InterfacedBase
 initializing
 
 uninitialized
 
 initialized
 
 runready
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 
- Static Protected Member Functions inherited from ThePEG::Interfaced
static void registerRepository (IBPtr)
 
static void registerRepository (IBPtr, string newName)
 

Detailed Description

The GenericMassGenerator class is a simple class for the generation of particle masses in Herwig.

It inherits from the MassGenerator class of ThePEG and implements a Breit-Wigner using the width generator to give the running width.

In general the width generator will be an instance of the GenericWidthGenerator class which uses the Herwig decayers based on the DecayIntegrator class to define the shape of the running width.

This class is designed so that the weight

\[\int dm^2 \frac{m\Gamma(m)}{(m^2-M^2)^2+m^2\Gamma^2(m)}\]

can be included in the production of the particle to take off-shell effects into account. This is the default form of the weight. The numerator and running of the width can be changed using the BreitWignerShape interface.

See also
MassGenerator
DecayIntegrator
GenericWidthGenerator

Definition at line 56 of file GenericMassGenerator.h.

Member Function Documentation

◆ accept()

bool Herwig::GenericMassGenerator::accept ( const ParticleData part) const
virtual

Return true if this mass generator can handle the given particle type.

Parameters
partThe particle data pointer of the particle.
Returns
True ig this class can handle the particle and false otherwise

Implements ThePEG::MassGenerator.

Reimplemented in Herwig::SMHiggsMassGenerator.

◆ BreitWignerWeight() [1/2]

virtual InvEnergy2 Herwig::GenericMassGenerator::BreitWignerWeight ( Energy  q)
inlinevirtual

Return the full weight.

Definition at line 176 of file GenericMassGenerator.h.

References BreitWignerWeight(), and BWShape_.

Referenced by BreitWignerWeight().

◆ BreitWignerWeight() [2/2]

virtual InvEnergy2 Herwig::GenericMassGenerator::BreitWignerWeight ( Energy  q,
int  shape 
) const
inlineprotectedvirtual

Return the full weight.

Reimplemented in Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

Definition at line 278 of file GenericMassGenerator.h.

References mass2_, mass_, ThePEG::Constants::pi, ThePEG::sqr(), and width().

◆ clone()

virtual IBPtr Herwig::GenericMassGenerator::clone ( ) const
protectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

Implements ThePEG::InterfacedBase.

Reimplemented in Herwig::GravitonMassGenerator, Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

◆ dataBaseOutput()

virtual void Herwig::GenericMassGenerator::dataBaseOutput ( ofstream &  ,
bool   
)
virtual

Output the initialisation info for the database.

Reimplemented in Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

◆ dofinish()

virtual void Herwig::GenericMassGenerator::dofinish ( )
protectedvirtual

Finalize this object.

Called in the run phase just after a run has ended. Used eg. to write out statistics.

Reimplemented from ThePEG::InterfacedBase.

◆ doinit()

virtual void Herwig::GenericMassGenerator::doinit ( )
protectedvirtual

Initialize this object after the setup phase before saving and EventGenerator to disk.

Exceptions
InitExceptionif object could not be initialized properly.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in Herwig::GravitonMassGenerator, Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

◆ fullclone()

virtual IBPtr Herwig::GenericMassGenerator::fullclone ( ) const
protectedvirtual

Make a clone of this object, possibly modifying the cloned object to make it sane.

Returns
a pointer to the new object.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in Herwig::GravitonMassGenerator, Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

◆ getReferences()

virtual IVector Herwig::GenericMassGenerator::getReferences ( )
protectedvirtual

Return a vector of all pointers to Interfaced objects used in this object.

Returns
a vector of pointers.

Reimplemented from ThePEG::InterfacedBase.

◆ lowerLimit()

Energy Herwig::GenericMassGenerator::lowerLimit ( ) const
inline

Lower limit on the mass.

Definition at line 200 of file GenericMassGenerator.h.

References lowerMass_.

◆ mass() [1/6]

Energy Herwig::GenericMassGenerator::mass ( const ParticleData part) const
inlinevirtual

Generate a mass using the default limits.

Parameters
partThe particle data pointer of the particle.
Returns
The mass of the particle instance.

Implements ThePEG::MassGenerator.

Definition at line 112 of file GenericMassGenerator.h.

References lowerMass_, mass(), and upperMass_.

Referenced by mass().

◆ mass() [2/6]

Energy Herwig::GenericMassGenerator::mass ( const ParticleData part,
const Energy  low,
const Energy  upp 
) const
inline

Generate a mass using specified limits.

Parameters
partThe particle data pointer of the particle.
lowThe lower limit on the particle's mass.
uppThe upper limit on the particle's mass.
Returns
The mass of the particle instance.

Definition at line 123 of file GenericMassGenerator.h.

References mass(), mass_, maxWgt_, nGenerate_, and ThePEG::UseRandom::rnd().

◆ mass() [3/6]

virtual Energy Herwig::GenericMassGenerator::mass ( double &  wgt,
const ParticleData ,
const Energy  low,
const Energy  upp,
int  shape,
double  r = UseRandom::rnd() 
) const
inlineprotectedvirtual

Return a mass with the weight using the specified limits.

Parameters
lowThe lower limit on the particle's mass.
uppThe upper limit on the particle's mass.
wgtThe weight for this mass.
shapeThe type of shape to use
rThe random number used for the weight
Returns
The mass of the particle instance.

Reimplemented in Herwig::GravitonMassGenerator.

Definition at line 228 of file GenericMassGenerator.h.

References lowerMass_, mass2_, mWidth_, ThePEG::sqrt(), upperMass_, and weight().

◆ mass() [4/6]

Energy Herwig::GenericMassGenerator::mass ( double &  wgt,
const ParticleData part,
const Energy  low,
const Energy  upp,
double  r = UseRandom::rnd() 
) const
inline

Return a mass with the weight using the specified limits.

Parameters
partThe particle data pointer of the particle.
lowThe lower limit on the particle's mass.
uppThe upper limit on the particle's mass.
wgtThe weight for this mass.
rThe random number used for the weight
Returns
The mass of the particle instance.

Definition at line 158 of file GenericMassGenerator.h.

References BWShape_, and mass().

◆ mass() [5/6]

Energy Herwig::GenericMassGenerator::mass ( double &  wgt,
const ParticleData part,
double  r = UseRandom::rnd() 
) const
inline

Return a mass with the weight using the default limits.

Parameters
partThe particle data pointer of the particle.
wgtThe weight for this mass.
rThe random number used for the weight
Returns
The mass of the particle instance.

Definition at line 144 of file GenericMassGenerator.h.

References lowerMass_, mass(), and upperMass_.

◆ mass() [6/6]

Energy Herwig::GenericMassGenerator::mass ( double &  wgt,
const ParticleData part,
int  shape,
double  r = UseRandom::rnd() 
) const
inlineprotected

Return a mass with the weight using the default limits.

Parameters
partThe particle data pointer of the particle.
wgtThe weight for this mass.
shapeThe type of shape to use
rThe random number used for the weight
Returns
The mass of the particle instance.

Definition at line 251 of file GenericMassGenerator.h.

References lowerMass_, mass(), and upperMass_.

◆ nominalMass()

Energy Herwig::GenericMassGenerator::nominalMass ( ) const
inline

Default mass.

Definition at line 210 of file GenericMassGenerator.h.

References mass_.

Referenced by Herwig::SMHiggsMassGenerator::BreitWignerWeight(), and Herwig::SMHiggsMassGenerator::weight().

◆ nominalWidth()

Energy Herwig::GenericMassGenerator::nominalWidth ( ) const
inline

Default Width.

Definition at line 215 of file GenericMassGenerator.h.

References width_.

Referenced by Herwig::SMHiggsMassGenerator::BreitWignerWeight(), and Herwig::SMHiggsMassGenerator::weight().

◆ particle() [1/2]

tcPDPtr Herwig::GenericMassGenerator::particle ( ) const
inlineprotected

Accesss to the particle.

Definition at line 294 of file GenericMassGenerator.h.

References particle_.

Referenced by Herwig::SMHiggsMassGenerator::BreitWignerWeight().

◆ particle() [2/2]

void Herwig::GenericMassGenerator::particle ( tPDPtr  in)
inlineprotected

Set the particle.

Definition at line 299 of file GenericMassGenerator.h.

References particle_.

◆ persistentInput()

void Herwig::GenericMassGenerator::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::GenericMassGenerator::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ rebind()

virtual void Herwig::GenericMassGenerator::rebind ( const TranslationMap trans)
protectedvirtual

Rebind pointer to other Interfaced objects.

Called in the setup phase after all objects used in an EventGenerator has been cloned so that the pointers will refer to the cloned objects afterwards.

Parameters
transa TranslationMap relating the original objects to their respective clones.
Exceptions
RebindExceptionif no cloned object was found for a given pointer.

Reimplemented from ThePEG::InterfacedBase.

◆ upperLimit()

Energy Herwig::GenericMassGenerator::upperLimit ( ) const
inline

Upper limit on the mass.

Definition at line 205 of file GenericMassGenerator.h.

References upperMass_.

◆ weight() [1/2]

virtual double Herwig::GenericMassGenerator::weight ( Energy  q) const
inlinevirtual

Weight for the factor.

Parameters
qThe mass of the instance
Returns
The weight.

Definition at line 169 of file GenericMassGenerator.h.

References BWShape_, and weight().

Referenced by mass(), and weight().

◆ weight() [2/2]

virtual double Herwig::GenericMassGenerator::weight ( Energy  q,
int  shape 
) const
inlineprotectedvirtual

Weight for the factor.

Parameters
qThe mass of the instance
shapeThe type of shape to use as for the BreitWignerShape interface
Returns
The weight.

Reimplemented in Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.

Definition at line 262 of file GenericMassGenerator.h.

References mass2_, mass_, mWidth_, ThePEG::Constants::pi, ThePEG::sqr(), and width().

◆ width()

pair< Energy, Energy > Herwig::GenericMassGenerator::width ( Energy  q,
int  shape 
) const

The running width.

Parameters
qThe mass for the calculation of the running width
Returns
The running width.

Referenced by BreitWignerWeight(), and weight().

Friends And Related Function Documentation

◆ ModelGenerator

friend class ModelGenerator
friend

ModelGenerator class as must be friend to set the particle.

Definition at line 61 of file GenericMassGenerator.h.

Member Data Documentation

◆ BWShape_

int Herwig::GenericMassGenerator::BWShape_
private

parameter controlling the shape of the Breit-Wigner

Definition at line 384 of file GenericMassGenerator.h.

Referenced by BreitWignerWeight(), mass(), and weight().

◆ initialize_

bool Herwig::GenericMassGenerator::initialize_
private

Whether or not to initialize the GenericMassGenerator.

Definition at line 436 of file GenericMassGenerator.h.

◆ lowerMass_

Energy Herwig::GenericMassGenerator::lowerMass_
private

Lower limit on the particle's mass.

Definition at line 401 of file GenericMassGenerator.h.

Referenced by lowerLimit(), and mass().

◆ mass2_

Energy2 Herwig::GenericMassGenerator::mass2_
private

Mass of the particle squared.

Definition at line 421 of file GenericMassGenerator.h.

Referenced by BreitWignerWeight(), mass(), and weight().

◆ mass_

Energy Herwig::GenericMassGenerator::mass_
private

Mass of the particle.

Definition at line 411 of file GenericMassGenerator.h.

Referenced by BreitWignerWeight(), mass(), nominalMass(), and weight().

◆ maxWgt_

double Herwig::GenericMassGenerator::maxWgt_
mutableprivate

The maximum weight for unweighting when generating the mass.

Definition at line 379 of file GenericMassGenerator.h.

Referenced by mass().

◆ mWidth_

Energy2 Herwig::GenericMassGenerator::mWidth_
private

Mass of the particle times the width.

Definition at line 426 of file GenericMassGenerator.h.

Referenced by mass(), and weight().

◆ nGenerate_

int Herwig::GenericMassGenerator::nGenerate_
private

Number of attempts to generate the mass.

Definition at line 389 of file GenericMassGenerator.h.

Referenced by mass().

◆ nInitial_

int Herwig::GenericMassGenerator::nInitial_
private

Number of weights to generate when initializing.

Definition at line 431 of file GenericMassGenerator.h.

◆ output_

bool Herwig::GenericMassGenerator::output_
private

Whether or not to output the data to a file.

Definition at line 441 of file GenericMassGenerator.h.

◆ particle_

tPDPtr Herwig::GenericMassGenerator::particle_
private

Pointer to the particle.

Definition at line 396 of file GenericMassGenerator.h.

Referenced by particle().

◆ upperMass_

Energy Herwig::GenericMassGenerator::upperMass_
private

Upper limit on the particle's mass.

Definition at line 406 of file GenericMassGenerator.h.

Referenced by mass(), and upperLimit().

◆ width_

Energy Herwig::GenericMassGenerator::width_
private

Width of the particle.

Definition at line 416 of file GenericMassGenerator.h.

Referenced by nominalWidth().

◆ widthGen_

WidthGeneratorPtr Herwig::GenericMassGenerator::widthGen_
private

Pointer to the width generator.

Definition at line 446 of file GenericMassGenerator.h.

◆ widthGenB_

GenericWidthGeneratorPtr Herwig::GenericMassGenerator::widthGenB_
private

Pointer to the width generator.

Definition at line 451 of file GenericMassGenerator.h.

◆ widthOpt_

bool Herwig::GenericMassGenerator::widthOpt_
private

Option for the treatment of the width.

Definition at line 456 of file GenericMassGenerator.h.


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