Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // DipoleShowerParticle.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 2 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef HERWIG_DipoleShowerParticle_H
0010 #define HERWIG_DipoleShowerParticle_H
0011 //
0012 // This is the declaration of the DipoleShowerParticle class.
0013 //
0014 
0015 #include "ThePEG/EventRecord/Particle.h"
0016 #include "ThePEG/Helicity/WaveFunction/WaveFunctionBase.h"
0017 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0018 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
0019 
0020 #include "DipoleShowerVertex.h"
0021 
0022 namespace Herwig {
0023 
0024   using namespace ThePEG;
0025   
0026   /** \ingroup DipoleShower
0027    *
0028    * \author Stephen Webster
0029    *
0030    */
0031   class DipoleShowerParticle : public Base {
0032     
0033   public:
0034 
0035     /**
0036      * Default constructor
0037      */
0038     DipoleShowerParticle() {}
0039 
0040     /** 
0041      * Default destructor
0042      **/
0043     ~DipoleShowerParticle() {}
0044 
0045   public:   
0046 
0047     /**
0048      * Reset the member variables of the object.
0049      */
0050     void clear();
0051 
0052     /**
0053      * Set up the decay vertex for the emitter.
0054      */
0055     void prepare( PPtr& part,
0056                   const Helicity::Direction emmDir,
0057                   const Helicity::Direction specDir,
0058                   const Lorentz5Momentum& pVector,
0059                   const Lorentz5Momentum& nVector );
0060     
0061     /**
0062      * Return the associated decay vertex,
0063      * a DipoleShowerVertex.
0064      **/
0065     DSVertexPtr decayVertex() { return theDecayVertex; }
0066     
0067     /**
0068      * Create fermion decay basis states.
0069      * It returns the decay basis states in the 
0070      * decay frame as required for the mapping.
0071      */
0072     vector<LorentzSpinor<SqrtEnergy> > createFermionDecayStates();
0073 
0074     /**
0075      * Create vector decay basis states.
0076      */
0077     void createVectorDecayStates();
0078     
0079     /**
0080      * Create fermion production basis states
0081      * for the given particle produced in the splitting.
0082      */
0083     void createNewFermionSpinInfo( PPtr& outgoing, Helicity::Direction dir);
0084 
0085     /**
0086      * Create vector production basis states
0087      * for the given particle produced in the splitting.
0088      */
0089     void createNewVectorSpinInfo( PPtr& outgoing, Helicity::Direction dir);
0090     
0091     /**
0092      * Create the mappings between the production
0093      * and decay states for the fermion and
0094      * store them in the associated decay vertex.
0095      * (No longer applicable) reason for passing the
0096      * decay states as an argument:
0097      * Previously used a check on zero values for computing
0098      * the mapping, rather than a </> 1e-5, this would only
0099      * work when using the original decay state as calculated
0100      * in the decay frame (i.e. without transforming to the 
0101      * lab frame and back). Now it simply avoids doing an
0102      * unnecessary rotation of the decay basis
0103      */
0104     void setFermionMapping( const vector<LorentzSpinor<SqrtEnergy>>& decayBasis );
0105 
0106     /**
0107      * Create the mappings between the production
0108      * and decay states the boson and
0109      * store them in the associated decay vertex.
0110      */
0111 
0112     void setVectorMapping();
0113 
0114   public:
0115 
0116     /**
0117      * The standard Init function used to initialize the interfaces.
0118      * Called exactly once for each class by the class description system
0119      * before the main function starts or
0120      * when this class is dynamically loaded.
0121      */
0122     static void Init();
0123 
0124   private:
0125 
0126     /**
0127      * The pptr to this particle.
0128      */
0129     PPtr theParticle;
0130     
0131     /**
0132      * The dipole shower vertex associated 
0133      * with this particle.
0134      */
0135     DSVertexPtr theDecayVertex;
0136 
0137   private:
0138 
0139     /**
0140      * The assignment operator is private and must never be called.
0141      * In fact, it should not even be implemented.
0142      */
0143     DipoleShowerParticle & operator=(const DipoleShowerParticle &) = delete;
0144 
0145   };
0146 }
0147 
0148 #include "ThePEG/Utilities/ClassTraits.h"
0149 
0150 namespace ThePEG {
0151 
0152   /** @cond TRAITSPECIALIZATIONS */
0153 
0154   /** This template specialization informs ThePEG about the
0155    *  base classes of DipoleShowerParticle. */
0156   template <>
0157   struct BaseClassTrait<Herwig::DipoleShowerParticle,1> {
0158     /** Typedef of the first base class of DipoleShowerParticle. */
0159     typedef Base NthBase;
0160   };
0161 
0162   /** This template specialization informs ThePEG about the name of
0163    *  the DipoleShowerParticle class and the shared object where it is defined. */
0164   template <>
0165   struct ClassTraits<Herwig::DipoleShowerParticle>
0166     : public ClassTraitsBase<Herwig::DipoleShowerParticle> {
0167     /** Return a platform-independent class name */
0168     static string className() { return "Herwig::DipoleShowerParticle"; }
0169     /**
0170      * The name of a file containing the dynamic library where the class
0171      * DipoleShowerParticle is implemented. It may also include several, space-separated,
0172      * libraries if the class DipoleShowerParticle depends on other classes (base classes
0173      * excepted). In this case the listed libraries will be dynamically
0174      * linked in the order they are specified.
0175      */
0176     static string library() { return "HwDipoleShower.so"; }
0177   };
0178 
0179   /** @endcond */
0180 
0181 }
0182 #endif /* HERWIG_DipoleShowerParticle_H */