Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // QEDRadiationHandler.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_QEDRadiationHandler_H
0010 #define HERWIG_QEDRadiationHandler_H
0011 //
0012 // This is the declaration of the QEDRadiationHandler class.
0013 //
0014 
0015 #include "ThePEG/Handlers/StepHandler.h"
0016 #include "DecayRadiationGenerator.fh"
0017 #include "QEDRadiationHandler.fh"
0018 
0019 namespace Herwig {
0020 
0021 using namespace ThePEG;
0022 
0023 /**
0024  * The QEDRadiationHandler class is designed so that the approach
0025  * for the generation of QED radiation in decays can be used to generate
0026  * QED radiation from the decay products of \f$s\f$-channel resonances
0027  * produced in the hard process where the decay products of the resonance
0028  * have been generated as part of the hard process.
0029  *
0030  * It is designed to be used as a PostSubProcessHandler.
0031  *
0032  * @see \ref QEDRadiationHandlerInterfaces "The interfaces"
0033  * defined for QEDRadiationHandler.
0034  */
0035 class QEDRadiationHandler: public StepHandler {
0036 
0037 public:
0038 
0039   /** @name Standard constructors and destructors. */
0040   //@{
0041   /**
0042    * The default constructor.
0043    */
0044   QEDRadiationHandler();
0045   //@}
0046 
0047 public:
0048 
0049   /** @name Virtual functions required by the StepHandler class. */
0050   //@{
0051   /**
0052     * The main function called by the EventHandler class to
0053     * perform a step. Given the current state of an Event, this function
0054     * performs the event generation step and includes the result in a new
0055     * Step object int the Event record.
0056     * @param eh the EventHandler in charge of the Event generation.
0057     * @param tagged if not empty these are the only particles which should
0058     * be considered by the StepHandler.
0059     * @param hint a Hint object with possible information from previously
0060     * performed steps.
0061     * @throws Veto if the StepHandler requires the current step to be discarded.
0062     * @throws Stop if the generation of the current Event should be stopped
0063     * after this call.
0064     * @throws Exception if something goes wrong.
0065     */
0066   virtual void handle(EventHandler & eh, const tPVector & tagged,
0067               const Hint & hint);
0068   //@}
0069 
0070 public:
0071 
0072   /** @name Functions used by the persistent I/O system. */
0073   //@{
0074   /**
0075    * Function used to write out object persistently.
0076    * @param os the persistent output stream written to.
0077    */
0078   void persistentOutput(PersistentOStream & os) const;
0079 
0080   /**
0081    * Function used to read in object persistently.
0082    * @param is the persistent input stream read from.
0083    * @param version the version number of the object when written.
0084    */
0085   void persistentInput(PersistentIStream & is, int version);
0086   //@}
0087 
0088   /**
0089    * The standard Init function used to initialize the interfaces.
0090    * Called exactly once for each class by the class description system
0091    * before the main function starts or
0092    * when this class is dynamically loaded.
0093    */
0094   static void Init();
0095 
0096 protected:
0097 
0098   /** @name Clone Methods. */
0099   //@{
0100   /**
0101    * Make a simple clone of this object.
0102    * @return a pointer to the new object.
0103    */
0104   virtual IBPtr clone() const {return new_ptr(*this);}
0105 
0106   /** Make a clone of this object, possibly modifying the cloned object
0107    * to make it sane.
0108    * @return a pointer to the new object.
0109    */
0110   virtual IBPtr fullclone() const {return new_ptr(*this);}
0111   //@}
0112 
0113 private:
0114 
0115   /**
0116    * The assignment operator is private and must never be called.
0117    * In fact, it should not even be implemented.
0118    */
0119   QEDRadiationHandler & operator=(const QEDRadiationHandler &) = delete;
0120 
0121 private:
0122 
0123   /**
0124    *  Pointer to the object responsible for generating the radiation in
0125    *  the decays
0126    */
0127   DecayRadiationGeneratorPtr _generator;
0128 
0129   /**
0130    *  List of the PDG codes of the decaying particles which should be considered
0131    */
0132   vector<long> _decayingParticles;
0133 
0134   /**
0135    *  List of the PDG codes of the decay products which should be considered
0136    */
0137   vector<long> _decayProducts;
0138 
0139 };
0140 
0141 }
0142 
0143 #endif /* HERWIG_QEDRadiationHandler_H */