Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:24:00

0001 // -*- C++ -*-
0002 //
0003 // BtoSGammaHadronicMass.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig 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 HERWIG_BtoSGammaHadronicMass_H
0010 #define HERWIG_BtoSGammaHadronicMass_H
0011 //
0012 // This is the declaration of the BtoSGammaHadronicMass class.
0013 //
0014 
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "BtoSGammaHadronicMass.fh"
0017 
0018 namespace Herwig {
0019 
0020 using namespace ThePEG;
0021 
0022 /** \ingroup Decay
0023  *
0024  * The BtoSGammaHadronicMass class is the base class for the implementation
0025  * of models of the hadronic mass spectrum in \f$B\to s\gamma\f$ decays.
0026  * Classes inheriting from this class should implement the hadronicMass()
0027  * member which should return a value of the hadronic mass selected from
0028  * the distribution.
0029  *
0030  * The parameters relating to the minimum and maximum values of the mass are stored
0031  * in this class.
0032  *
0033  */
0034 class BtoSGammaHadronicMass: public Interfaced {
0035 
0036 public:
0037 
0038   /**
0039    * The default constructor.
0040    */
0041   BtoSGammaHadronicMass() : _minMass(825*MeV),_maxMass(5300*MeV) {}
0042 
0043   /**
0044    * Virtual member which must be implemented in classes inheriting from this
0045    * class to return the hadronic mass.
0046    * @param mb The mass of the decaying B meson
0047    * @param mquark The minimum mass of the hadronic system based on the consistuent quark
0048    * masses.
0049    * @return The hadronic mass
0050    */
0051   virtual Energy hadronicMass(Energy mb,Energy mquark) =0;
0052 
0053   /**
0054    * Output the setup information for the particle database
0055    * @param os The stream to output the information to
0056    * @param header Whether or not to output the information for MySQL
0057    * @param create Whether or not to add a statement creating the object
0058    */
0059   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0060 
0061 public:
0062 
0063   /** @name Functions used by the persistent I/O system. */
0064   //@{
0065   /**
0066    * Function used to write out object persistently.
0067    * @param os the persistent output stream written to.
0068    */
0069   void persistentOutput(PersistentOStream & os) const;
0070 
0071   /**
0072    * Function used to read in object persistently.
0073    * @param is the persistent input stream read from.
0074    * @param version the version number of the object when written.
0075    */
0076   void persistentInput(PersistentIStream & is, int version);
0077   //@}
0078 
0079   /**
0080    * The standard Init function used to initialize the interfaces.
0081    * Called exactly once for each class by the class description system
0082    * before the main function starts or
0083    * when this class is dynamically loaded.
0084    */
0085   static void Init();
0086 
0087 protected:
0088 
0089   /** @name Access to the limits on the mass. */
0090   //@{
0091   /**
0092    *  Minimum mass
0093    */
0094   Energy minMass() const {return _minMass;}
0095 
0096   /**
0097    *  Maximum mass
0098    */
0099   Energy maxMass() const {return _maxMass;}
0100   //@}
0101 
0102   /** @name Functions for the fermi motion needed in classes inheriting from this */
0103   //@{
0104   /**
0105    * Exponential function of the form, \f$N(1-x)^ae^{-3\bar{\Lambda}^2x/\lambda_1}\f$,
0106    * where 
0107    * \f$x=k_+/\bar{\Lambda}\f$ taken from hep-ph/9805303
0108    * @param scale The energy scale, \f$k_+\f$, at which to evaluate the function.
0109    * @param lambda The hadronic scale, \f$\bar{\Lambda}\f$
0110    * @param a The shape parameter, \f$a\f$.
0111    * @param norm The normalisation, \f$N\f$.
0112    * @param lambda1 Scale related to kinetic energy of b quark, \f$\lambda_1\f$.
0113    */
0114   InvEnergy exponentialFermiFunction(Energy scale,Energy lambda, double a,
0115                      InvEnergy norm,Energy2 lambda1 ) const {
0116     double x(scale/lambda);
0117     return norm*pow(1.-x,a)*exp(-3.*sqr(lambda)/lambda1*x);
0118   }
0119   //@}
0120 
0121 private:
0122 
0123   /**
0124    * The assignment operator is private and must never be called.
0125    * In fact, it should not even be implemented.
0126    */
0127   BtoSGammaHadronicMass & operator=(const BtoSGammaHadronicMass &) = delete;
0128 
0129 private:
0130 
0131   /**
0132    * The minimum value of the hadronic mass
0133    */
0134   Energy _minMass;
0135 
0136   /**
0137    * The maximum value of the hadronic mass
0138    */
0139   Energy _maxMass;
0140 
0141 };
0142 
0143 }
0144 
0145 #endif /* HERWIG_BtoSGammaHadronicMass_H */