Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // FFVCurrentDecayer.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_FFVCurrentDecayer_H
0010 #define HERWIG_FFVCurrentDecayer_H
0011 //
0012 // This is the declaration of the FFVCurrentDecayer class.
0013 //
0014 
0015 #include "GeneralCurrentDecayer.h"
0016 #include "ThePEG/Repository/EventGenerator.h"
0017 #include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
0018 
0019 namespace Herwig {
0020 using namespace ThePEG;
0021 using Helicity::FFVVertexPtr;
0022 
0023 /**
0024  * Here is the documentation of the FFVCurrentDecayer class.
0025  *
0026  * @see \ref FFVCurrentDecayerInterfaces "The interfaces"
0027  * defined for FFVCurrentDecayer.
0028  */
0029 class FFVCurrentDecayer: public GeneralCurrentDecayer {
0030 
0031 public:
0032 
0033   /** @name Virtual functions required by the Decayer class. */
0034   //@{
0035 
0036   /**
0037    * Return the matrix element squared for a given mode and phase-space channel.
0038    * @param ichan The channel we are calculating the matrix element for. 
0039    * @param part The decaying Particle.
0040    * @param outgoing The particles produced in the decay
0041    * @param momenta  The momenta of the particles produced in the decay
0042    * @param meopt Option for the calculation of the matrix element
0043    * @return The matrix element squared for the phase-space configuration.
0044    */
0045   double me2(const int ichan,const Particle & part,
0046          const tPDVector & outgoing,
0047          const vector<Lorentz5Momentum> & momenta,
0048          MEOption meopt) const;
0049 
0050   /**
0051    *   Construct the SpinInfos for the particles produced in the decay
0052    */
0053   virtual void constructSpinInfo(const Particle & part,
0054                  ParticleVector outgoing) const;
0055   
0056   /**
0057    * Function to return partial Width
0058    * @param inpart Pointer to incoming particle data object
0059    * @param outa Pointer to first outgoing particle data object
0060    * @param currout The outgoing particles from the current
0061    */
0062   virtual Energy partialWidth(tPDPtr inpart, tPDPtr outa,
0063                   vector<tPDPtr> currout);
0064   //@}
0065 
0066 public:
0067 
0068   /** @name Functions used by the persistent I/O system. */
0069   //@{
0070   /**
0071    * Function used to write out object persistently.
0072    * @param os the persistent output stream written to.
0073    */
0074   void persistentOutput(PersistentOStream & os) const;
0075 
0076   /**
0077    * Function used to read in object persistently.
0078    * @param is the persistent input stream read from.
0079    * @param version the version number of the object when written.
0080    */
0081   void persistentInput(PersistentIStream & is, int version);
0082   //@}
0083 
0084   /**
0085    * The standard Init function used to initialize the interfaces.
0086    * Called exactly once for each class by the class description system
0087    * before the main function starts or
0088    * when this class is dynamically loaded.
0089    */
0090   static void Init();
0091 
0092 protected:
0093 
0094   /** @name Clone Methods. */
0095   //@{
0096   /**
0097    * Make a simple clone of this object.
0098    * @return a pointer to the new object.
0099    */
0100   virtual IBPtr clone() const;
0101 
0102   /** Make a clone of this object, possibly modifying the cloned object
0103    * to make it sane.
0104    * @return a pointer to the new object.
0105    */
0106   virtual IBPtr fullclone() const;
0107   //@}
0108 
0109 
0110 protected:
0111 
0112   /** @name Standard Interfaced functions. */
0113   //@{
0114   /**
0115    * Initialize this object after the setup phase before saving an
0116    * EventGenerator to disk.
0117    * @throws InitException if object could not be initialized properly.
0118    */
0119   virtual void doinit();
0120 
0121   /**
0122    * Rebind pointer to other Interfaced objects. Called in the setup phase
0123    * after all objects used in an EventGenerator has been cloned so that
0124    * the pointers will refer to the cloned objects afterwards.
0125    * @param trans a TranslationMap relating the original objects to
0126    * their respective clones.
0127    * @throws RebindException if no cloned object was found for a given
0128    * pointer.
0129    */
0130   virtual void rebind(const TranslationMap & trans)
0131    ;
0132 
0133   /**
0134    * Return a vector of all pointers to Interfaced objects used in this
0135    * object.
0136    * @return a vector of pointers.
0137    */
0138   virtual IVector getReferences();
0139   //@}
0140 
0141 private:
0142 
0143   /**
0144    * The assignment operator is private and must never be called.
0145    * In fact, it should not even be implemented.
0146    */
0147   FFVCurrentDecayer & operator=(const FFVCurrentDecayer &) = delete;
0148 
0149 private:
0150   
0151   /**
0152    * Pointer to FFVVertex
0153    */
0154   FFVVertexPtr FFVPtr_;
0155 
0156   /**
0157    *  Spinr density matrix
0158    */
0159   mutable RhoDMatrix rho_;
0160 
0161   /**
0162    *  Spinor wavefunction
0163    */
0164   mutable vector<SpinorWaveFunction>    wave_   ;
0165 
0166   /**
0167    *  Barred spinor wavefunction
0168    */
0169   mutable vector<SpinorBarWaveFunction> wavebar_;
0170 };
0171 
0172 }
0173 
0174 #endif /* HERWIG_FFVCurrentDecayer_H */