Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ShowerConfig.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_ShowerConfig_H
0010 #define HERWIG_ShowerConfig_H
0011 //
0012 // This is the declaration of the ShowerConfig class.
0013 
0014 #include "ThePEG/Config/ThePEG.h"
0015 #include "ThePEG/PDT/ParticleData.h"
0016 #include "Herwig/Shower/QTilde/Base/ShowerParticle.fh"
0017 #include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.fh"
0018 #include "ThePEG/Persistency/PersistentOStream.h"
0019 #include "ThePEG/Persistency/PersistentIStream.h"
0020 #include "Herwig/Shower/ShowerInteraction.h"
0021 
0022 namespace Herwig { 
0023 using namespace ThePEG;
0024 
0025 /** \ingroup Shower
0026  *  
0027  *  Handy header file to be included in all Shower classes.
0028  *  It contains only some useful typedefs.
0029  */
0030   
0031   /**
0032    * Pointer to a ColourLine
0033    */
0034   typedef Ptr<ThePEG::ColourLine>::pointer ColinePtr;
0035   
0036   /**
0037    * Transient Pointer to a ColourLine
0038    */
0039   typedef Ptr<ThePEG::ColourLine>::transient_pointer tColinePtr;
0040   
0041   /**
0042    * A pair of ColourLine pointers
0043    */
0044   typedef pair<ColinePtr,ColinePtr> ColinePair;
0045 
0046   /**
0047    * A pair of transient ColourLine pointers
0048    */
0049   typedef pair<tColinePtr,tColinePtr> tColinePair;
0050 
0051   /**
0052    *  A Vector of ShowerParticle pointers
0053    */
0054   typedef vector<ShowerParticlePtr> ShowerParticleVector;
0055 
0056   /**
0057    *  A Vector of transient ShowerParticle pointers
0058    */
0059   typedef vector<tShowerParticlePtr> tShowerParticleVector;
0060 
0061   /**
0062    *  Definition of the IdList for branchings
0063    */
0064   typedef vector<tcPDPtr> IdList;
0065   
0066   inline ShowerInteraction convertInteraction(ShowerPartnerType partner) {
0067     if (partner==ShowerPartnerType::QCDColourLine ||
0068         partner==ShowerPartnerType::QCDAntiColourLine)
0069       return ShowerInteraction::QCD;
0070     else if (partner==ShowerPartnerType::QED)
0071       return ShowerInteraction::QED;
0072     else if(partner==ShowerPartnerType::EW)
0073       return ShowerInteraction::EW;
0074     else
0075       return ShowerInteraction::UNDEFINED;
0076   }
0077 
0078   /**
0079    *  typedef to pair the SudakovFormFactor and the particles in a branching
0080    */
0081   struct BranchingElement {
0082 
0083     /**
0084      *  Constructor
0085      */ 
0086     BranchingElement();
0087 
0088     /**
0089      *  Constructor
0090      */ 
0091     BranchingElement(SudakovPtr sud, IdList part);
0092 
0093     /**
0094      * Destructor
0095      */
0096     ~BranchingElement();
0097 
0098     /**
0099     *   Access to the Sudakov
0100     */
0101     SudakovPtr sudakov;
0102 
0103     /**
0104      *   Access to the particles
0105      */
0106     IdList particles;
0107 
0108     /**
0109      *  Access to the charge conjugate particles
0110      */
0111     IdList conjugateParticles;
0112     
0113     /**
0114      * Compare two BranchingElements
0115      **/
0116     bool operator == (const BranchingElement& x) const{
0117       return
0118       sudakov == x.sudakov &&
0119       particles == x.particles &&
0120       conjugateParticles == x.conjugateParticles;
0121     }
0122   };
0123 
0124   /**
0125    *  typedef to pair the PDG code of the particle and the BranchingElement
0126    */
0127   typedef multimap<long,BranchingElement> BranchingList;
0128 
0129   /**
0130    *  typedef to create a structure which can be inserted into a BranchingList
0131    */
0132   typedef pair<long, BranchingElement> BranchingInsert;
0133 
0134 }
0135 
0136 namespace ThePEG {
0137 
0138   /** 
0139    * Output operator to allow the structure
0140    */
0141   PersistentOStream & operator << (PersistentOStream & os, 
0142                    const Herwig::BranchingElement  & x);
0143 
0144   /** 
0145    * Input operator to allow the structure
0146    */
0147   PersistentIStream & operator >> (PersistentIStream & is, 
0148                    Herwig::BranchingElement  & x);
0149 
0150 }
0151 
0152 #endif // HERWIG_ShowerConfig_H 
0153