Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:29

0001 // -*- C++ -*-
0002 //
0003 // OmegaPhi3PiDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef THEPEG_OmegaPhi3PiDecayer_H
0010 #define THEPEG_OmegaPhi3PiDecayer_H
0011 // This is the declaration of the OmegaPhi3PiDecayer class.
0012 
0013 #include "ThePEG/PDT/FlatDecayer.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * The OmegaPhi3PiDecayer class inherits from performs FlatDecayer and
0019  * will reweight the flat phase space suitable to describe the decay
0020  * of a \f$\phi\f$ or an \f$\omega\f$ into \f$\pi^+\pi^-\pi^0\f$. It
0021  * will in fact decay anything into \f$\pi^+\pi^-\pi^0\f$ assuming the
0022  * same matrix element.
0023  *
0024  * @see \ref OmegaPhi3PiDecayerInterfaces "The interfaces"
0025  * defined for OmegaPhi3PiDecayer.
0026  * @see FlatDecayer
0027  * @see ParticleData
0028  */
0029 class OmegaPhi3PiDecayer: public FlatDecayer {
0030 
0031 public:
0032 
0033   /** @name Standard constructors and destructors. */
0034   //@{
0035   /**
0036    * Default constructor.
0037    */
0038   OmegaPhi3PiDecayer() :  margin(150.0) {}
0039   //@}
0040 
0041 public:
0042 
0043   /** @name Virtual functions required by the Decayer class.
0044    */
0045   //@{
0046   /**
0047    * Check if this decayer can perfom the decay specified by the
0048    * given decay mode.
0049    * @param dm the DecayMode describing the decay.
0050    * @return true if this decayer can handle the given mode, otherwise false.
0051    */
0052   virtual bool accept(const DecayMode & dm) const;
0053 
0054   /**
0055    * Give a weight to a phase space point. To be overridden by
0056    * subclasses. For a given decay mode, \a dm, decaying \a parent
0057    * particle and decayproducts, \a children, distributed according to
0058    * a flat distribution in phase space, return a weight (less or
0059    * equal to unity) modifying the flat distribution to the desired
0060    * one. Note that the chosen phase space point may be rejected, but
0061    * the chosen decay channel will not. This means that the weight
0062    * returned by this function does not influence the branching
0063    * ratios.
0064    */
0065   virtual double reweight(const DecayMode & dm, const Particle & parent,
0066               const ParticleVector & children) const;
0067   //@}
0068 
0069 public:
0070 
0071 
0072   /** @name Functions used by the persistent I/O system. */
0073   //@{
0074   /**
0075    * Function used to write out object persistently.
0076    * @param os the persistent output stream written to.
0077    */
0078   void persistentOutput(PersistentOStream & os) const;
0079 
0080   /**
0081    * Function used to read in object persistently.
0082    * @param is the persistent input stream read from.
0083    * @param version the version number of the object when written.
0084    */
0085   void persistentInput(PersistentIStream & is, int version);
0086   //@}
0087 
0088   /**
0089    * Standard Init function used to initialize the interfaces.
0090    */
0091   static void Init();
0092 
0093 protected:
0094 
0095 
0096 protected:
0097 
0098   /** @name Clone Methods. */
0099   //@{
0100   /**
0101    * Make a simple clone of this object.
0102    * @return a pointer to the new object.
0103    */
0104   virtual IBPtr clone() const;
0105 
0106   /** Make a clone of this object, possibly modifying the cloned object
0107    * to make it sane.
0108    * @return a pointer to the new object.
0109    */
0110   virtual IBPtr fullclone() const;
0111   //@}
0112 
0113 private:
0114 
0115   /**
0116    * Used to multiply the bare weight to get something below unity. In
0117    * the Fortran pythia version it was set to 150 for unknown reasons.
0118    */
0119   double margin;
0120 
0121 private:
0122 
0123   /**
0124    * Describe a concrete class with persistent data.
0125    */
0126   static ClassDescription<OmegaPhi3PiDecayer> initOmegaPhi3PiDecayer;
0127 
0128   /**
0129    * Private and non-existent assignment operator.
0130    */
0131   OmegaPhi3PiDecayer & operator=(const OmegaPhi3PiDecayer &) = delete;
0132 
0133 };
0134 
0135 }
0136 
0137 
0138 namespace ThePEG {
0139 
0140 /** @cond TRAITSPECIALIZATIONS */
0141 
0142 /** This template specialization informs ThePEG about the base classes
0143  *  of OmegaPhi3PiDecayer. */
0144 template <>
0145 struct BaseClassTrait<OmegaPhi3PiDecayer,1>: public ClassTraitsType {
0146   /** Typedef of the first base class of OmegaPhi3PiDecayer. */
0147   typedef FlatDecayer NthBase;
0148 };
0149 
0150 /** This template specialization informs ThePEG about the name of the
0151  *  OmegaPhi3PiDecayer class and the shared object where it is
0152  *  defined. */
0153 template <>
0154 struct ClassTraits<OmegaPhi3PiDecayer>
0155   : public ClassTraitsBase<OmegaPhi3PiDecayer> {
0156   /** Return a platform-independent class name */
0157   static string className() { return "ThePEG::OmegaPhi3PiDecayer"; }
0158   /** Return the name of the shared library be loaded to get access to
0159    *  the OmegaPhi3PiDecayer class and every other class it uses
0160    *  (except the base class). */
0161   static string library() { return "OmegaPhi3PiDecayer.so"; }
0162 };
0163 
0164 /** @endcond */
0165 
0166 }
0167 
0168 #endif /* THEPEG_OmegaPhi3PiDecayer_H */