Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Tau2HadronsDecayer.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_Tau2HadronsDecayer_H
0010 #define THEPEG_Tau2HadronsDecayer_H
0011 // This is the declaration of the Tau2HadronsDecayer class.
0012 
0013 #include "ThePEG/PDT/FlatDecayer.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * The Tau2HadronsDecayer class inherits FlatDecayer and can perform
0019  * the decays of tau to neutrino + hadrons according to phase space,
0020  * with an extra weight \f$x_\nu(3-x_\nu)\f$.
0021  *
0022  * @see \ref Tau2HadronsDecayerInterfaces "The interfaces"
0023  * defined for Tau2HadronsDecayer.
0024  */
0025 class Tau2HadronsDecayer: public FlatDecayer {
0026 
0027 public:
0028 
0029   /** @name Virtual functions required by the Decayer class.
0030    */
0031   //@{
0032   /**
0033    * Check if this decayer can perfom the decay specified by the
0034    * given decay mode.
0035    * @param dm the DecayMode describing the decay.
0036    * @return true if this decayer can handle the given mode, otherwise false.
0037    */
0038   virtual bool accept(const DecayMode & dm) const;
0039 
0040   /**
0041    * Give a weight to a phase space point. To be overridden by
0042    * subclasses. For a given decay mode, \a dm, decaying \a parent
0043    * particle and decayproducts, \a children, distributed according to
0044    * a flat distribution in phase space, return a weight (less or
0045    * equal to unity) modifying the flat distribution to the desired
0046    * one. Note that the chosen phase space point may be rejected, but
0047    * the chosen decay channel will not. This means that the weight
0048    * returned by this function does not influence the branching
0049    * ratios.
0050    */
0051   virtual double reweight(const DecayMode & dm, const Particle & parent,
0052               const ParticleVector & children) const;
0053   //@}
0054 
0055 public:
0056 
0057 
0058   /** @name Functions used by the persistent I/O system. */
0059   //@{
0060   /**
0061    * Function used to write out object persistently.
0062    * @param os the persistent output stream written to.
0063    */
0064   void persistentOutput(PersistentOStream & os) const;
0065 
0066   /**
0067    * Function used to read in object persistently.
0068    * @param is the persistent input stream read from.
0069    * @param version the version number of the object when written.
0070    */
0071   void persistentInput(PersistentIStream & is, int version);
0072   //@}
0073 
0074   /**
0075    * Standard Init function used to initialize the interfaces.
0076    */
0077   static void Init();
0078 
0079 protected:
0080 
0081 
0082 protected:
0083 
0084   /** @name Clone Methods. */
0085   //@{
0086   /**
0087    * Make a simple clone of this object.
0088    * @return a pointer to the new object.
0089    */
0090   virtual IBPtr clone() const;
0091 
0092   /** Make a clone of this object, possibly modifying the cloned object
0093    * to make it sane.
0094    * @return a pointer to the new object.
0095    */
0096   virtual IBPtr fullclone() const;
0097   //@}
0098 
0099 private:
0100 
0101   /**
0102    * Describe a concrete class with persistent data.
0103    */
0104   static ClassDescription<Tau2HadronsDecayer> initTau2HadronsDecayer;
0105 
0106   /**
0107    * Private and non-existent assignment operator.
0108    */
0109   Tau2HadronsDecayer & operator=(const Tau2HadronsDecayer &) = delete;
0110 
0111 };
0112 
0113 }
0114 
0115 
0116 namespace ThePEG {
0117 
0118 /** @cond TRAITSPECIALIZATIONS */
0119 
0120 /** This template specialization informs ThePEG about the base classes
0121  *  of Tau2HadronsDecayer. */
0122 template <>
0123 struct BaseClassTrait<Tau2HadronsDecayer,1>: public ClassTraitsType {
0124   /** Typedef of the first base class of Tau2HadronsDecayer. */
0125   typedef FlatDecayer NthBase;
0126 };
0127 
0128 /** This template specialization informs ThePEG about the name of the
0129  *  Tau2HadronsDecayer class and the shared object where it is
0130  *  defined. */
0131 template <>
0132 struct ClassTraits<Tau2HadronsDecayer>
0133   : public ClassTraitsBase<Tau2HadronsDecayer> {
0134   /** Return a platform-independent class name */
0135   static string className() { return "ThePEG::Tau2HadronsDecayer"; }
0136   /** Return the name of the shared library be loaded to get access to
0137    *  the Tau2HadronsDecayer class and every other class it uses
0138    *  (except the base class). */
0139   static string library() { return "Tau2HadronsDecayer.so"; }
0140 };
0141 
0142 /** @endcond */
0143 
0144 }
0145 
0146 #endif /* THEPEG_Tau2HadronsDecayer_H */