Herwig
7.2.1
|
The GenericMassGenerator
class is a simple class for the generation of particle masses in Herwig.
More...
#include <GenericMassGenerator.h>
Public Member Functions | |
GenericMassGenerator () | |
Default constructor. | |
virtual | ~GenericMassGenerator () |
Destructor. | |
bool | accept (const ParticleData &part) const |
Return true if this mass generator can handle the given particle type. More... | |
virtual void | dataBaseOutput (ofstream &, bool) |
Output the initialisation info for the database. | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. More... | |
Members to generate the mass of a particle instance | |
Energy | mass (const ParticleData &part) const |
Generate a mass using the default limits. More... | |
Energy | mass (const ParticleData &part, const Energy low, const Energy upp) const |
Generate a mass using specified limits. More... | |
Energy | mass (double &wgt, const ParticleData &part, double r=UseRandom::rnd()) const |
Return a mass with the weight using the default limits. More... | |
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. More... | |
virtual double | weight (Energy q) const |
Weight for the factor. More... | |
virtual InvEnergy2 | BreitWignerWeight (Energy q) |
Return the full weight. | |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
Public Member Functions inherited from ThePEG::InterfacedBase | |
string | fullName () const |
string | name () const |
string | path () const |
string | comment () const |
void | setup (istream &is) |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
Public Member Functions inherited from ThePEG::Base | |
void | debug () 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 |
Static Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interfaces. | |
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 () |
Protected Member Functions | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. More... | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. More... | |
Standard Interfaced functions. | |
virtual void | doinit () |
Initialize this object after the setup phase before saving and EventGenerator to disk. More... | |
virtual void | dofinish () |
Finalize this object. More... | |
virtual void | rebind (const TranslationMap &trans) |
Rebind pointer to other Interfaced objects. More... | |
virtual IVector | getReferences () |
Return a vector of all pointers to Interfaced objects used in this object. More... | |
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 | |
InterfacedBase (string newName) | |
InterfacedBase (const InterfacedBase &i) | |
virtual void | readSetup (istream &is) |
virtual void | doupdate () |
virtual void | doinitrun () |
virtual void | readSetup (istream &is) |
virtual void | doupdate () |
virtual void | doinitrun () |
Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted | |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Protected Member Functions inherited from ThePEG::Named | |
const Named & | operator= (const Named &other) |
const string & | name (const string &newName) |
Private Member Functions | |
GenericMassGenerator & | operator= (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. | |
Private Attributes | |
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. | |
Friends | |
class | ModelGenerator |
ModelGenerator class as must be friend to set the particle. | |
Access to particle properties | |
pair< Energy, Energy > | width (Energy q, int shape) const |
The running width. More... | |
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. More... | |
Energy | mass (double &wgt, const ParticleData &part, int shape, double r=UseRandom::rnd()) const |
Return a mass with the weight using the default limits. More... | |
virtual double | weight (Energy q, int shape) const |
Weight for the factor. More... | |
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 |
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) |
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
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.
Definition at line 56 of file GenericMassGenerator.h.
|
virtual |
Return true if this mass generator can handle the given particle type.
part | The particle data pointer of the particle. |
Implements ThePEG::MassGenerator.
Reimplemented in Herwig::SMHiggsMassGenerator.
|
protectedvirtual |
Make a simple clone of this object.
Implements ThePEG::InterfacedBase.
Reimplemented in Herwig::SMHiggsMassGenerator, Herwig::ScalarMassGenerator, and Herwig::GravitonMassGenerator.
|
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.
|
protectedvirtual |
Initialize this object after the setup phase before saving and EventGenerator to disk.
InitException | if object could not be initialized properly. |
Reimplemented from ThePEG::InterfacedBase.
Reimplemented in Herwig::SMHiggsMassGenerator, Herwig::ScalarMassGenerator, and Herwig::GravitonMassGenerator.
|
protectedvirtual |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::InterfacedBase.
Reimplemented in Herwig::SMHiggsMassGenerator, Herwig::ScalarMassGenerator, and Herwig::GravitonMassGenerator.
|
protectedvirtual |
Return a vector of all pointers to Interfaced objects used in this object.
Reimplemented from ThePEG::InterfacedBase.
|
inlinevirtual |
Generate a mass using the default limits.
part | The particle data pointer of the particle. |
Implements ThePEG::MassGenerator.
Definition at line 112 of file GenericMassGenerator.h.
|
inline |
Generate a mass using specified limits.
part | The particle data pointer of the particle. |
low | The lower limit on the particle's mass. |
upp | The upper limit on the particle's mass. |
Definition at line 123 of file GenericMassGenerator.h.
References ThePEG::UseRandom::rnd().
|
inline |
Return a mass with the weight using the default limits.
part | The particle data pointer of the particle. |
wgt | The weight for this mass. |
r | The random number used for the weight |
Definition at line 144 of file GenericMassGenerator.h.
|
inline |
Return a mass with the weight using the specified limits.
part | The particle data pointer of the particle. |
low | The lower limit on the particle's mass. |
upp | The upper limit on the particle's mass. |
wgt | The weight for this mass. |
r | The random number used for the weight |
Definition at line 158 of file GenericMassGenerator.h.
|
inlineprotectedvirtual |
Return a mass with the weight using the specified limits.
low | The lower limit on the particle's mass. |
upp | The upper limit on the particle's mass. |
wgt | The weight for this mass. |
shape | The type of shape to use |
r | The random number used for the weight |
Reimplemented in Herwig::GravitonMassGenerator.
Definition at line 228 of file GenericMassGenerator.h.
References sqrt().
|
inlineprotected |
Return a mass with the weight using the default limits.
part | The particle data pointer of the particle. |
wgt | The weight for this mass. |
shape | The type of shape to use |
r | The random number used for the weight |
Definition at line 251 of file GenericMassGenerator.h.
void Herwig::GenericMassGenerator::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. |
void Herwig::GenericMassGenerator::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
|
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.
trans | a TranslationMap relating the original objects to their respective clones. |
RebindException | if no cloned object was found for a given pointer. |
Reimplemented from ThePEG::InterfacedBase.
|
inlinevirtual |
Weight for the factor.
q | The mass of the instance |
Definition at line 169 of file GenericMassGenerator.h.
|
inlineprotectedvirtual |
Weight for the factor.
q | The mass of the instance |
shape | The type of shape to use as for the BreitWignerShape interface |
Reimplemented in Herwig::ScalarMassGenerator, and Herwig::SMHiggsMassGenerator.
Definition at line 262 of file GenericMassGenerator.h.
References sqr().
pair<Energy,Energy> Herwig::GenericMassGenerator::width | ( | Energy | q, |
int | shape | ||
) | const |
The running width.
q | The mass for the calculation of the running width |