thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
PDT
DecayMode.h
1
// -*- C++ -*-
2
//
3
// DecayMode.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_DecayMode_H
10
#define ThePEG_DecayMode_H
11
// This is the declaration of the DecayMode class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/Interface/Interfaced.h"
15
#include "DecayMode.fh"
16
#include "MatcherBase.h"
17
#include "Decayer.h"
18
19
namespace
ThePEG
{
20
21
ThePEG_DECLARE_MULTISET
(
tPDPtr
,
ParticleMSet
);
22
ThePEG_DECLARE_MULTISET
(
tPMPtr
,
MatcherMSet
);
23
ThePEG_DECLARE_MULTISET
(
tDMPtr
,
ModeMSet
);
24
87
class
DecayMode
:
public
Interfaced
{
88
89
public
:
90
92
friend
class
ParticleData
;
93
95
friend
class
RemnantData
;
96
98
friend
class
EventGenerator
;
99
100
public
:
101
103
typedef
vector<tcDMPtr>
ModeVector
;
105
typedef
vector<tPDPair>
LinkVector
;
106
107
public
:
108
116
static
DMPtr
constructDecayMode
(
string
&
tag
, vector<DMPtr> * save = 0);
117
123
DecayMode
();
124
128
DecayMode
(
const
DecayMode
&);
130
135
virtual
DMPtr
clone
(
tPDPtr
pd)
const
;
136
137
public
:
138
143
const
string
&
tag
()
const
{
144
return
theTag
.size() ?
theTag
: (
theTag
=
makeTag
() );
145
}
146
151
tcPDPtr
parent
()
const
{
return
theParent
; }
152
156
const
ParticleMSet
&
products
()
const
{
return
theProducts
; }
157
161
const
tPDVector
&
orderedProducts
()
const
{
return
theOrderedProducts
; }
162
168
PVector
produceProducts
()
const
;
169
174
const
ModeMSet
&
cascadeProducts
()
const
{
return
theCascadeProducts
; }
175
179
const
MatcherMSet
&
productMatchers
()
const
{
return
theMatchers
; }
180
185
tPMPtr
wildProductMatcher
()
const
{
return
theWildMatcher
; }
186
191
const
ParticleMSet
&
excluded
()
const
{
return
theExcluded
; }
192
196
double
brat
()
const
;
197
201
double
brat
(
const
Particle
&)
const
;
202
206
tDecayerPtr
decayer
()
const
{
return
theDecayer
; }
207
211
bool
includes
(
const
DecayMode
&)
const
;
212
217
tDMPtr
CC
()
const
{
return
theAntiPartner
; }
218
223
bool
operator ==
(
const
DecayMode
& d)
const
{
224
return
tag
() == d.tag() ;
225
}
226
231
const
LinkVector
&
links
()
const
{
return
theLinks
; }
232
236
const
ModeVector
&
overlap
()
const
{
return
theOverlap
; }
237
241
void
synchronize
();
242
246
bool
on
()
const
{
return
isOn
; }
247
248
public
:
249
256
void
persistentOutput
(
PersistentOStream
& os)
const
;
257
263
void
persistentInput
(
PersistentIStream
& is,
int
version);
265
269
static
void
Init
();
270
271
protected
:
272
278
virtual
void
doupdate
();
279
289
virtual
void
rebind
(
const
TranslationMap
& trans)
290
;
291
297
virtual
IVector
getReferences
();
299
300
protected
:
301
306
void
parent
(
tPDPtr
pd) {
theParent
= pd; }
307
311
void
brat
(
double
);
312
316
void
switchOn
();
317
321
void
switchOff
();
322
327
void
decayer
(
tDecayerPtr
);
328
332
void
addProduct
(
tPDPtr
);
333
338
void
addLink
(
tPDPtr
a,
tPDPtr
b);
339
343
void
addCascadeProduct
(
tDMPtr
);
344
348
void
addProductMatcher
(
tPMPtr
);
349
353
void
setWildMatcher
(
tPMPtr
);
354
359
void
addExcluded
(
tPDPtr
);
360
364
static
DMPtr
Create
(
tPDPtr
newParent,
double
newBrat = 0.0,
365
bool
newOn =
false
);
369
DecayMode
(
tPDPtr
newParticle,
double
newBrat,
bool
newOn);
370
377
virtual
IBPtr
clone
()
const
;
378
383
virtual
IBPtr
fullclone
()
const
;
385
389
DMPtr
dmclone
()
const
;
390
397
virtual
void
readSetup
(istream & is);
398
402
ParticleMSet
&
products
() {
return
theProducts
; }
403
408
ModeMSet
&
cascadeProducts
() {
return
theCascadeProducts
; }
409
413
MatcherMSet
&
productMatchers
() {
return
theMatchers
; }
414
419
tPMPtr
&
wildProductMatcher
() {
return
theWildMatcher
; }
420
425
ParticleMSet
&
excluded
() {
return
theExcluded
; }
426
431
void
CC
(
tDMPtr
cc) {
theAntiPartner
= cc;}
432
433
private
:
434
438
bool
addOverlap
(
tcDMPtr
);
439
443
void
resetOverlap
();
444
448
bool
compareId
(
const
ParticleMSet
&,
const
ParticleMSet
&)
const
;
449
453
ParticleMSet::const_iterator
findId
(
const
ParticleMSet
&,
454
const
ParticleData
&)
const
;
455
460
string
makeTag
()
const
;
461
465
void
resetTag
() {
466
theTag
=
""
;
467
if
(
CC
() )
CC
()->theTag =
""
;
468
}
469
470
471
private
:
472
476
void
setOn
(
long
);
477
481
long
getOn
()
const
;
482
486
void
setDecayer
(
DecayerPtr
);
487
488
private
:
489
493
mutable
string
theTag
;
494
498
double
theBrat
;
499
503
bool
isOn
;
504
509
tPDPtr
theParent
;
510
514
ParticleMSet
theProducts
;
515
519
tPDVector
theOrderedProducts
;
520
525
ModeMSet
theCascadeProducts
;
526
531
MatcherMSet
theMatchers
;
532
536
tPMPtr
theWildMatcher
;
537
542
ParticleMSet
theExcluded
;
543
547
ModeVector
theOverlap
;
548
552
DecayerPtr
theDecayer
;
553
557
tDMPtr
theAntiPartner
;
558
563
LinkVector
theLinks
;
564
565
private
:
566
570
static
ClassDescription<DecayMode>
initDecayMode
;
571
575
DecayMode
&
operator=
(
const
DecayMode
&) =
delete
;
576
577
};
578
583
template
<>
584
struct
BaseClassTrait
<
DecayMode
,1>:
public
ClassTraitsType
{
586
typedef
Interfaced
NthBase
;
587
};
588
591
template
<>
592
struct
ClassTraits<DecayMode>:
593
public
ClassTraitsBase<DecayMode> {
595
static
string
className
() {
return
"ThePEG::DecayMode"
; }
596
};
597
600
}
601
602
#endif
/* ThePEG_DecayMode_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
ThePEG::DecayMode
The DecayMode class describes a decay channel of a particle.
Definition:
DecayMode.h:87
ThePEG::DecayMode::doupdate
virtual void doupdate()
Check sanity of the object during the setup phase.
ThePEG::DecayMode::theMatchers
MatcherMSet theMatchers
The set of matching decay products.
Definition:
DecayMode.h:531
ThePEG::DecayMode::brat
double brat(const Particle &) const
Calculate the branching ratio for a particular particle instance.
ThePEG::DecayMode::theAntiPartner
tDMPtr theAntiPartner
The corresponding decay mode of the anti particle.
Definition:
DecayMode.h:557
ThePEG::DecayMode::theBrat
double theBrat
The branching ratio.
Definition:
DecayMode.h:498
ThePEG::DecayMode::excluded
ParticleMSet & excluded()
The set particles corresponding to excluded intermediate resonances.
Definition:
DecayMode.h:425
ThePEG::DecayMode::on
bool on() const
Check whether this decay mode is switched on.
Definition:
DecayMode.h:246
ThePEG::DecayMode::operator==
bool operator==(const DecayMode &d) const
Check if another decay mode has the same final state as this one.
Definition:
DecayMode.h:223
ThePEG::DecayMode::CC
void CC(tDMPtr cc)
Set the pointer to the corresponding decaymode for the antiparticle decay.
Definition:
DecayMode.h:431
ThePEG::DecayMode::addProductMatcher
void addProductMatcher(tPMPtr)
Add a mathcer corresponding to one decay product.
ThePEG::DecayMode::links
const LinkVector & links() const
Return a vector of pairs of decay products which are linked together (e.g.
Definition:
DecayMode.h:231
ThePEG::DecayMode::getOn
long getOn() const
Utility function for the interface.
ThePEG::DecayMode::synchronize
void synchronize()
Modify this mode to have properties corresponding to its anti-partner.
ThePEG::DecayMode::Create
static DMPtr Create(tPDPtr newParent, double newBrat=0.0, bool newOn=false)
Protected creation and clone methods.
ThePEG::DecayMode::setOn
void setOn(long)
Utility function for the interface.
ThePEG::DecayMode::products
ParticleMSet & products()
The set of identified decay products.
Definition:
DecayMode.h:402
ThePEG::DecayMode::includes
bool includes(const DecayMode &) const
Check if another decay mode is included in this one.
ThePEG::DecayMode::findId
ParticleMSet::const_iterator findId(const ParticleMSet &, const ParticleData &) const
Check if a particle set contains a given particle ID.
ThePEG::DecayMode::constructDecayMode
static DMPtr constructDecayMode(string &tag, vector< DMPtr > *save=0)
Create a decay mode from a given tag.
ThePEG::DecayMode::parent
tcPDPtr parent() const
Get a pointer to the particle data object corresponding to the decaying particle.
Definition:
DecayMode.h:151
ThePEG::DecayMode::theOverlap
ModeVector theOverlap
A list of decay modes which are included in this one.
Definition:
DecayMode.h:547
ThePEG::DecayMode::addCascadeProduct
void addCascadeProduct(tDMPtr)
Add identified resonant product with specified decay mode.
ThePEG::DecayMode::wildProductMatcher
tPMPtr wildProductMatcher() const
The pointer to a matcher corresponding to any number of decay products.
Definition:
DecayMode.h:185
ThePEG::DecayMode::productMatchers
const MatcherMSet & productMatchers() const
The set of matchers each corresponding to one decay product.
Definition:
DecayMode.h:179
ThePEG::DecayMode::DecayMode
DecayMode(tPDPtr newParticle, double newBrat, bool newOn)
Protected constructor.
ThePEG::DecayMode::DecayMode
DecayMode()
Default constructor.
ThePEG::DecayMode::parent
void parent(tPDPtr pd)
Set a pointer to the particle data object corresponding to the decaying particle.
Definition:
DecayMode.h:306
ThePEG::DecayMode::rebind
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
ThePEG::DecayMode::addOverlap
bool addOverlap(tcDMPtr)
Add a decay mode to the list of overlapping modes if included.
ThePEG::DecayMode::resetOverlap
void resetOverlap()
Remove all decay modes from the list of overlapping modes.
ThePEG::DecayMode::brat
double brat() const
Return the branching ratio to be used.
ThePEG::DecayMode::CC
tDMPtr CC() const
Return a pointer to the corresponding decaymode for the antiparticle decay.
Definition:
DecayMode.h:217
ThePEG::DecayMode::setWildMatcher
void setWildMatcher(tPMPtr)
Add a matcher corresponding to any number of decay products.
ThePEG::DecayMode::products
const ParticleMSet & products() const
The set of identified decay products.
Definition:
DecayMode.h:156
ThePEG::DecayMode::dmclone
DMPtr dmclone() const
Protected special clone function.
ThePEG::DecayMode::compareId
bool compareId(const ParticleMSet &, const ParticleMSet &) const
Check if two sets of particles have equivalent types.
ThePEG::DecayMode::productMatchers
MatcherMSet & productMatchers()
The set of matchers each corresponding to one decay product.
Definition:
DecayMode.h:413
ThePEG::DecayMode::produceProducts
PVector produceProducts() const
Produce particles corresponding to the identified decay products.
ThePEG::DecayMode::clone
virtual DMPtr clone(tPDPtr pd) const
Return a clone of this decay mode with pd as the decaying particle.
ThePEG::DecayMode::ModeVector
vector< tcDMPtr > ModeVector
A vector of DecayMode pointers.
Definition:
DecayMode.h:103
ThePEG::DecayMode::addExcluded
void addExcluded(tPDPtr)
Add a particle corresponding to an excluded intermediate resonance.
ThePEG::DecayMode::cascadeProducts
ModeMSet & cascadeProducts()
The set of identified resonant products with specified decay modes.
Definition:
DecayMode.h:408
ThePEG::DecayMode::theDecayer
DecayerPtr theDecayer
The decayer object responsible for performing the decay.
Definition:
DecayMode.h:552
ThePEG::DecayMode::DecayMode
DecayMode(const DecayMode &)
Copy-constructor.
ThePEG::DecayMode::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::DecayMode::isOn
bool isOn
True if this mode is switched on.
Definition:
DecayMode.h:503
ThePEG::DecayMode::excluded
const ParticleMSet & excluded() const
The set particles corresponding to excluded intermediate resonances.
Definition:
DecayMode.h:191
ThePEG::DecayMode::switchOn
void switchOn()
Switch on this decay mode.
ThePEG::DecayMode::theCascadeProducts
ModeMSet theCascadeProducts
The set of matching decay channels corresponding to a specified with a specified subsequent decay mod...
Definition:
DecayMode.h:525
ThePEG::DecayMode::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::DecayMode::LinkVector
vector< tPDPair > LinkVector
A vector of pairs of ParticleData pointers.
Definition:
DecayMode.h:105
ThePEG::DecayMode::decayer
void decayer(tDecayerPtr)
Set the decayer.
ThePEG::DecayMode::theOrderedProducts
tPDVector theOrderedProducts
The set of specified decay particles in the order they was specified.
Definition:
DecayMode.h:519
ThePEG::DecayMode::orderedProducts
const tPDVector & orderedProducts() const
The set of identified decay products in the order they were specified.
Definition:
DecayMode.h:161
ThePEG::DecayMode::initDecayMode
static ClassDescription< DecayMode > initDecayMode
Describe a concrete class with persistent data.
Definition:
DecayMode.h:570
ThePEG::DecayMode::getReferences
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
ThePEG::DecayMode::theTag
string theTag
The tag.
Definition:
DecayMode.h:493
ThePEG::DecayMode::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::DecayMode::addProduct
void addProduct(tPDPtr)
Add identified decay products.
ThePEG::DecayMode::cascadeProducts
const ModeMSet & cascadeProducts() const
The set of identified resonance products with specified decay modes.
Definition:
DecayMode.h:174
ThePEG::DecayMode::theProducts
ParticleMSet theProducts
The set of specified decay particles.
Definition:
DecayMode.h:514
ThePEG::DecayMode::theLinks
LinkVector theLinks
The vector of pairs of decay products which are linked together (e.g.
Definition:
DecayMode.h:563
ThePEG::DecayMode::tag
const string & tag() const
Return the tag for this decay mode.
Definition:
DecayMode.h:143
ThePEG::DecayMode::theWildMatcher
tPMPtr theWildMatcher
A particle matcher which corresponds to zero or more particles.
Definition:
DecayMode.h:536
ThePEG::DecayMode::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::DecayMode::decayer
tDecayerPtr decayer() const
Get the decayer assigned to this mode.
Definition:
DecayMode.h:206
ThePEG::DecayMode::switchOff
void switchOff()
Switch off this decay mode.
ThePEG::DecayMode::operator=
DecayMode & operator=(const DecayMode &)=delete
Private and non-existent assignment operator.
ThePEG::DecayMode::theExcluded
ParticleMSet theExcluded
A set of particles which are not allowed as intermediate resonances.
Definition:
DecayMode.h:542
ThePEG::DecayMode::setDecayer
void setDecayer(DecayerPtr)
Utility function for the interface.
ThePEG::DecayMode::overlap
const ModeVector & overlap() const
Return the list of overlapping decay modes.
Definition:
DecayMode.h:236
ThePEG::DecayMode::theParent
tPDPtr theParent
Pointer to a particle data object corresponding to the decaying particle.
Definition:
DecayMode.h:509
ThePEG::DecayMode::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::DecayMode::addLink
void addLink(tPDPtr a, tPDPtr b)
Add a pair of decay products which are linked together (e.g.
ThePEG::DecayMode::makeTag
string makeTag() const
Use the members in this decay channel and generate the corresponding tag.
ThePEG::DecayMode::brat
void brat(double)
Set the branching ratio to be used.
ThePEG::DecayMode::wildProductMatcher
tPMPtr & wildProductMatcher()
The pointer to a matcher corresponding to any number of decay products.
Definition:
DecayMode.h:419
ThePEG::DecayMode::resetTag
void resetTag()
Delete the tag (it will be regenerated later if asked for).
Definition:
DecayMode.h:465
ThePEG::DecayMode::readSetup
virtual void readSetup(istream &is)
Read setup info from a standard stream used by the Repository.
ThePEG::EventGenerator
The EventGenerator class manages a whole event generator run.
Definition:
EventGenerator.h:68
ThePEG::Interfaced
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition:
Interfaced.h:38
ThePEG::ParticleData
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition:
ParticleData.h:36
ThePEG::Particle
The Particle class is used to describe an instance of a particle.
Definition:
Particle.h:83
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Pointer::TransientRCPtr
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition:
RCPtr.h:519
ThePEG::Rebinder
Rebinder is a class associating pairs of pointers to objects.
Definition:
Rebinder.h:27
ThePEG::RemnantData
The RemnantData class is not a normal ParticleData class.
Definition:
RemnantData.h:46
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::MatcherMSet
multiset< tPMPtr, less< tPMPtr > > MatcherMSet
A multiset of tPMPtr .
Definition:
DecayMode.h:22
ThePEG::ParticleMSet
multiset< tPDPtr, less< tPDPtr > > ParticleMSet
A multiset of tPDPtr .
Definition:
DecayMode.h:21
ThePEG::tPDVector
vector< tPDPtr > tPDVector
A vector of transient pointers to ParticleData objects.
Definition:
Containers.h:39
ThePEG::PVector
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition:
Containers.h:76
ThePEG::ModeMSet
multiset< tDMPtr, less< tDMPtr > > ModeMSet
A multiset of tDMPtr .
Definition:
DecayMode.h:23
ThePEG::IVector
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition:
Containers.h:67
ThePEG_DECLARE_MULTISET
#define ThePEG_DECLARE_MULTISET(VALTYPE, NAME)
Macro for declaring a multiset.
Definition:
std.h:180
ThePEG::BaseClassTrait
BaseClassTraits describes the base classes of the templated class.
Definition:
ClassTraits.h:156
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsType
ClassTraitsType is an empty, non-polymorphic, base class.
Definition:
ClassTraits.h:30
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6