Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // PartonicDecayerBase.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_PartonicDecayerBase_H
0010 #define HERWIG_PartonicDecayerBase_H
0011 //
0012 // This is the declaration of the PartonicDecayerBase class.
0013 //
0014 
0015 #include "Herwig/Decay/HwDecayerBase.h"
0016 #include "Herwig/Hadronization/PartonSplitter.h"
0017 #include "Herwig/Hadronization/ClusterFinder.h"
0018 #include "Herwig/Hadronization/ClusterFissioner.h"
0019 #include "Herwig/Hadronization/LightClusterDecayer.h"
0020 #include "Herwig/Hadronization/ClusterDecayer.h"
0021 #include "Herwig/Hadronization/Cluster.h"
0022 #include "Herwig/Shower/QTilde/Base/PartnerFinder.h"
0023 #include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.h"
0024 #include "Herwig/Shower/QTilde/Kinematics/KinematicsReconstructor.h"
0025 
0026 namespace Herwig {
0027 
0028 using namespace ThePEG;
0029 
0030 /**
0031  *  Define some sets
0032  */
0033 ThePEG_DECLARE_MULTISET(tcPDPtr,cParticleMSet);
0034 
0035 /**
0036  * Here is the documentation of the PartonicDecayerBase class.
0037  *
0038  * @see \ref PartonicDecayerBaseInterfaces "The interfaces"
0039  * defined for PartonicDecayerBase.
0040  */
0041 class PartonicDecayerBase: public HwDecayerBase {
0042 
0043 public:
0044 
0045   /**
0046    * The default constructor.
0047    */
0048   PartonicDecayerBase();
0049 
0050   /** @name Virtual functions required by the Decayer class. */
0051   //@{
0052   /**
0053    * Check if this decayer can perfom the decay for a particular mode
0054    * @param parent The decaying particle
0055    * @param children The decay products
0056    * @return true If this decayer can handle the given mode, otherwise false.
0057    */
0058   virtual bool accept(tcPDPtr parent, const tPDVector & children) const = 0;
0059   
0060   /**
0061    *  Perform the decay of the particle to the specified decay products
0062    * @param parent The decaying particle
0063    * @param children The decay products
0064    * @return a ParticleVector containing the decay products.
0065    */
0066   virtual ParticleVector decay(const Particle & parent,
0067                    const tPDVector & children) const = 0;
0068 
0069   /**
0070    * Perform a decay for a given DecayMode and a given Particle instance.
0071    * @param dm the DecayMode describing the decay.
0072    * @param p the Particle instance to be decayed.
0073    * @return a ParticleVector containing the decay products.
0074    */
0075   virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
0076 
0077   /**
0078    * Output the setup information for the particle database
0079    * @param os The stream to output the information to
0080    * @param header Whether or not to output the information for MySQL
0081    */
0082   virtual void dataBaseOutput(ofstream & os,bool header) const;
0083   //@}
0084 
0085 protected:
0086 
0087   /**
0088    *  Perform the parton shower
0089    */
0090   PVector shower(const Particle & parent, ParticleVector & partons) const;
0091   
0092   bool timeLikeShower(tShowerParticlePtr particle,
0093               Branching fb, bool first, PVector & output) const;
0094 
0095 public:
0096 
0097   /** @name Functions used by the persistent I/O system. */
0098   //@{
0099   /**
0100    * Function used to write out object persistently.
0101    * @param os the persistent output stream written to.
0102    */
0103   void persistentOutput(PersistentOStream & os) const;
0104 
0105   /**
0106    * Function used to read in object persistently.
0107    * @param is the persistent input stream read from.
0108    * @param version the version number of the object when written.
0109    */
0110   void persistentInput(PersistentIStream & is, int version);
0111   //@}
0112 
0113   /**
0114    * The standard Init function used to initialize the interfaces.
0115    * Called exactly once for each class by the class description system
0116    * before the main function starts or
0117    * when this class is dynamically loaded.
0118    */
0119   static void Init();
0120 
0121 protected:
0122 
0123   /** @name Standard Interfaced functions. */
0124   //@{
0125   /**
0126    * Initialize this object after the setup phase before saving an
0127    * EventGenerator to disk.
0128    * @throws InitException if object could not be initialized properly.
0129    */
0130   virtual void doinit();
0131   //@}
0132 
0133 protected:
0134 
0135   /**
0136    * Check hadrons produced in a partonic hadron decay do not reproduce an inclusive
0137    * mode.
0138    * @param parent The decaying particles.
0139    * @param hadrons The hadrons produced in the partonic decay.
0140    * @return Whether or not there are duplicate modes.
0141    */
0142   bool duplicateMode(const Particle & parent,
0143              const vector<tPPtr> & hadrons) const;
0144 
0145 private:
0146 
0147   /**
0148    * The assignment operator is private and must never be called.
0149    * In fact, it should not even be implemented.
0150    */
0151   PartonicDecayerBase & operator=(const PartonicDecayerBase &) = delete;
0152 
0153 private:
0154 
0155   /**
0156    * This is a pointer to a Herwig::PartonSplitter object.
0157    */
0158   PartonSplitterPtr      _partonSplitter;
0159 
0160   /**
0161    * This is a pointer to a Herwig::ClusterFinder object.
0162    */
0163   ClusterFinderPtr       _clusterFinder;
0164 
0165   /**
0166    * This is a pointer to a Herwig::ClusterFissioner object.
0167    */
0168   ClusterFissionerPtr    _clusterFissioner;
0169 
0170   /**
0171    * This is a pointer to a Herwig::LightClusterDecayer object.
0172    */
0173   LightClusterDecayerPtr _lightClusterDecayer;
0174 
0175   /**
0176    * This is a pointer to a Herwig::ClusterDecayer object.
0177    */
0178   ClusterDecayerPtr      _clusterDecayer; 
0179 
0180   /**
0181    * Switch to control hadrons produced in partonic b and c decays
0182    */
0183   bool _exclusive;
0184 
0185   /**
0186    *  Number of tries for partonic modes
0187    */
0188   unsigned int _partontries;
0189 
0190   /**
0191    * Whether or not to include the intermediates
0192    */
0193   bool _inter;
0194 
0195   // @name Parton Shower related variables
0196   //@{
0197   /**
0198    *  Wheher or not to perform the parton shower
0199    */
0200   bool _shower;
0201   
0202   /**
0203    * Pointer to the splitting generator
0204    */
0205   SplittingGeneratorPtr _splittingGenerator;
0206 
0207   /**
0208    *  Pointer to the PartnerFinder object
0209    */
0210   PartnerFinderPtr _partnerFinder;
0211   
0212   /**
0213    *  Pointer to the KinematicsReconstructor object
0214    */
0215   KinematicsReconstructorPtr _reconstructor;
0216   //@}
0217 
0218 };
0219 
0220 }
0221 
0222 #endif /* HERWIG_PartonicDecayerBase_H */