thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
DecayHandler.h
1 // -*- C++ -*-
2 //
3 // DecayHandler.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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_DecayHandler_H
10 #define ThePEG_DecayHandler_H
11 // This is the declaration of the DecayHandler class.
12 
13 #include "StepHandler.h"
14 
15 namespace ThePEG {
16 
31 class DecayHandler: public StepHandler {
32 
33 public:
34 
40  DecayHandler() : theMaxLoop(100000), theMaxLifeTime(-1.0*mm), theLifeTimeOption(false) {}
41 
45  virtual ~DecayHandler();
47 
48 public:
49 
59  virtual void handle(EventHandler & eh, const tPVector & tagged,
60  const Hint & hint);
62 
68  void performDecay(tPPtr parent, Step & s) const;
69 
70 public:
71 
78  void persistentOutput(PersistentOStream & os) const;
79 
85  void persistentInput(PersistentIStream & is, int version);
87 
91  static void Init();
92 
97  long maxLoop() const { return theMaxLoop; }
98 
102  Length maxLifeTime() const { return theMaxLifeTime; }
103 
109  bool lifeTimeOption() const { return theLifeTimeOption; }
110 
111 protected:
112 
119  virtual IBPtr clone() const;
120 
125  virtual IBPtr fullclone() const;
127 
128 private:
129 
135 
140 
145 
146 private:
147 
152 
156  DecayHandler & operator=(const DecayHandler &) = delete;
157 
158 };
159 
166 template <>
167 struct BaseClassTrait<DecayHandler,1>: public ClassTraitsType {
169  typedef StepHandler NthBase;
170 };
171 
176 template <>
177 struct ClassTraits<DecayHandler>: public ClassTraitsBase<DecayHandler> {
179  static string className() { return "ThePEG::DecayHandler"; }
180 };
181 
184 }
185 
186 #endif /* ThePEG_DecayHandler_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
The EventHandler is the base class used to implement event handlers in ThePEG.
Definition: EventHandler.h:63
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Length theMaxLifeTime
The maximum lifetime above which a particle is not decayed.
Definition: DecayHandler.h:139
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
long theMaxLoop
The maximum number of failed decay attempts allowed for each particle.
Definition: DecayHandler.h:134
StepHandler is the base class for implementing any model for a step in the event generation chain...
Definition: StepHandler.h:41
static void Init()
Standard Init function used to initialize the interface.
bool theLifeTimeOption
Option for how theMaxLifeTime should be interpreted.
Definition: DecayHandler.h:144
virtual IBPtr clone() const
Make a simple clone of this object.
static ClassDescription< DecayHandler > initDecayHandler
Describe a concrete class with persistent data.
Definition: DecayHandler.h:151
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
The DecayHandler is the base class of all handlers implementing the administration of decays of unsta...
Definition: DecayHandler.h:31
Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed t...
Definition: Hint.h:48
virtual ~DecayHandler()
Destructor.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
Length maxLifeTime() const
Get the maximum lifetime above which a particle is not decayed.
Definition: DecayHandler.h:102
long maxLoop() const
The maximum number of failed decay attempts allowed for each particle.
Definition: DecayHandler.h:97
DecayHandler & operator=(const DecayHandler &)=delete
Private and non-existent assignment operator.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
bool lifeTimeOption() const
Option for whether the maximum lifetime should be applied to the mean lifetime of the particle specie...
Definition: DecayHandler.h:109
virtual void handle(EventHandler &eh, const tPVector &tagged, const Hint &hint)
Look through all tagged particled and decay all unstable ones.
DecayHandler()
Default constructor.
Definition: DecayHandler.h:40
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
void performDecay(tPPtr parent, Step &s) const
Perform the decay of one unstable particle.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.