Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:23:59

0001 // -*- C++ -*-
0002 #ifndef Herwig_ScalarTo3ScalarDalitz_H
0003 #define Herwig_ScalarTo3ScalarDalitz_H
0004 //
0005 // This is the declaration of the ScalarTo3ScalarDalitz class.
0006 //
0007 
0008 #include "DalitzBase.h"
0009 
0010 namespace Herwig {
0011 using namespace ThePEG;
0012   
0013   
0014 /**
0015  * The ScalarTo3ScalarDalitz class provides a base class for the implementation
0016  * of weak three-body decays of bottom and charm mesons
0017  *
0018  * @see \ref ScalarTo3ScalarDalitzInterfaces "The interfaces"
0019  * defined for ScalarTo3ScalarDalitz.
0020  */
0021 class ScalarTo3ScalarDalitz: public DalitzBase {
0022   
0023 public:
0024 
0025   /**
0026    * The default constructor.
0027    */
0028   ScalarTo3ScalarDalitz() : useResonanceMass_(false)
0029   {}
0030 
0031   /**
0032    * Return the matrix element squared for a given mode and phase-space channel.
0033    * @param ichan The channel we are calculating the matrix element for. 
0034    * @param part The decaying Particle.
0035    * @param outgoing The particles produced in the decay
0036    * @param momenta  The momenta of the particles produced in the decay
0037    * @param meopt Option for the calculation of the matrix element
0038    * @return The matrix element squared for the phase-space configuration.
0039    */
0040   virtual double me2(const int ichan,const Particle & part,
0041              const tPDVector & outgoing,
0042              const vector<Lorentz5Momentum> & momenta,
0043              MEOption meopt) const;
0044 
0045   /**
0046    *   Construct the SpinInfos for the particles produced in the decay
0047    */
0048   virtual void constructSpinInfo(const Particle & part,
0049                  ParticleVector outgoing) const;
0050 
0051   /**
0052    * Output the setup information for the particle database
0053    * @param os The stream to output the information to
0054    * @param header Whether or not to output the information for MySQL
0055    */
0056   virtual void dataBaseOutput(ofstream & os,bool header) const;
0057 
0058 public:
0059 
0060   /** @name Functions used by the persistent I/O system. */
0061   //@{
0062   /**
0063    * Function used to write out object persistently.
0064    * @param os the persistent output stream written to.
0065    */
0066   void persistentOutput(PersistentOStream & os) const;
0067 
0068   /**
0069    * Function used to read in object persistently.
0070    * @param is the persistent input stream read from.
0071    * @param version the version number of the object when written.
0072    */
0073   void persistentInput(PersistentIStream & is, int version);
0074   //@}
0075 
0076   /**
0077    * The standard Init function used to initialize the interfaces.
0078    * Called exactly once for each class by the class description system
0079    * before the main function starts or
0080    * when this class is dynamically loaded.
0081    */
0082   static void Init();
0083 
0084 protected:
0085 
0086   /** @name Clone Methods. */
0087   //@{
0088   /**
0089    * Make a simple clone of this object.
0090    * @return a pointer to the new object.
0091    */
0092   virtual IBPtr clone() const;
0093 
0094   /** Make a clone of this object, possibly modifying the cloned object
0095    * to make it sane.
0096    * @return a pointer to the new object.
0097    */
0098   virtual IBPtr fullclone() const;
0099   //@}
0100 
0101 protected:
0102   
0103   /**
0104    *  Calculate the amplitude
0105    */
0106   virtual Complex amplitude(int ichan) const {
0107     Complex amp(0.);
0108     int iloc=-1;
0109     for(int ix=0;ix<int(resonances().size());++ix) {
0110       ++iloc;
0111       if(channel1()>=0) {
0112     if(ix!=channel1() && ix!=channel2()) continue;
0113       }
0114       if(ichan>=0&&ichan!=iloc) continue;
0115       amp += resAmp(ix);
0116     }
0117     return amp;
0118   }
0119 
0120   /**
0121    * Calculate the amplitude for the ith resonance
0122    */
0123   Complex resAmp(unsigned int i) const;
0124 
0125   /**
0126    *  Access to the invariants
0127    */
0128   const Energy & mInv(unsigned int i,unsigned int j) const {
0129     return m2_[i][j];
0130   }
0131 
0132   /**
0133    *  Masses of the children
0134    */
0135   const Energy & mOut(unsigned int i) const {
0136     return mOut_[i];
0137   }
0138 
0139 private:
0140 
0141   /**
0142    * The assignment operator is private and must never be called.
0143    * In fact, it should not even be implemented.
0144    */
0145   ScalarTo3ScalarDalitz & operator=(const ScalarTo3ScalarDalitz &) = delete;
0146 
0147 private:
0148 
0149   /**
0150    *  Choice of the mass to use in the denominator of the expressions
0151    */
0152   bool useResonanceMass_;
0153   //@}
0154   
0155 private :
0156 
0157   /**
0158    *   Storage of the kinematics
0159    */
0160   //@{
0161   /**
0162    *   Mass of the parent
0163    */
0164   mutable Energy mD_;
0165 
0166   /**
0167    *   Masses of the children
0168    */
0169   mutable Energy mOut_[3];
0170 
0171   /**
0172    *   Masses of the children
0173    */
0174   mutable Energy m2_[3][3];
0175   //@}
0176 
0177   /**
0178    *  Spin density matrix
0179    */
0180   mutable RhoDMatrix rho_;
0181 };
0182 
0183 }
0184 
0185 #endif /* Herwig_ScalarTo3ScalarDalitz_H */