Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // DipoleMCCheck.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_DipoleMCCheck_H
0010 #define HERWIG_DipoleMCCheck_H
0011 //
0012 // This is the declaration of the DipoleMCCheck class.
0013 //
0014 
0015 #include "ThePEG/Handlers/HandlerBase.h"
0016 
0017 #include "Herwig/Utilities/Histogram.h"
0018 
0019 namespace Herwig {
0020 
0021 using namespace ThePEG;
0022 
0023 /**
0024  * \ingroup DipoleShower
0025  * \author Simon Platzer
0026  * 
0027  * \brief DipoleMCCheck is used to perform checks for
0028  * the dipole shower.
0029  *
0030  * @see \ref DipoleMCCheckInterfaces "The interfaces"
0031  * defined for DipoleMCCheck.
0032  */
0033 class DipoleMCCheck: public HandlerBase {
0034 
0035 public:
0036 
0037   /**
0038    * The default constructor.
0039    */
0040   DipoleMCCheck();
0041 
0042 public:
0043 
0044   /**
0045    * Book a point.
0046    */
0047   void book(double xe,double xs,
0048         Energy dScale,
0049         Energy hardPt,
0050         Energy pt, double z,
0051         double weight);
0052 
0053 public:
0054 
0055   /** @name Functions used by the persistent I/O system. */
0056   //@{
0057   /**
0058    * Function used to write out object persistently.
0059    * @param os the persistent output stream written to.
0060    */
0061   void persistentOutput(PersistentOStream & os) const;
0062 
0063   /**
0064    * Function used to read in object persistently.
0065    * @param is the persistent input stream read from.
0066    * @param version the version number of the object when written.
0067    */
0068   void persistentInput(PersistentIStream & is, int version);
0069   //@}
0070 
0071   /**
0072    * The standard Init function used to initialize the interfaces.
0073    * Called exactly once for each class by the class description system
0074    * before the main function starts or
0075    * when this class is dynamically loaded.
0076    */
0077   static void Init();
0078 
0079 protected:
0080 
0081   /** @name Clone Methods. */
0082   //@{
0083   /**
0084    * Make a simple clone of this object.
0085    * @return a pointer to the new object.
0086    */
0087   virtual IBPtr clone() const;
0088 
0089   /** Make a clone of this object, possibly modifying the cloned object
0090    * to make it sane.
0091    * @return a pointer to the new object.
0092    */
0093   virtual IBPtr fullclone() const;
0094   //@}
0095 
0096 
0097 
0098 protected:
0099 
0100   /**
0101    * Initialize this object. Called in the run phase just before
0102    * a run begins.
0103    */
0104   virtual void doinitrun();
0105 
0106   /**
0107    * Finalize this object. Called in the run phase just after a
0108    * run has ended. Used eg. to write out statistics.
0109    */
0110   virtual void dofinish();
0111 
0112 
0113 // If needed, insert declarations of virtual function defined in the
0114 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0115 
0116 private:
0117 
0118   /**
0119    * The number of bins in the starting scale
0120    * divided by the dipole scale, the upper bound
0121    * is 1/2.
0122    */
0123   unsigned int theHardPtBins;
0124 
0125   /**
0126    * The number of bins in the emitter fraction.
0127    * The lenght of the zero bin is taken to be
0128    * 10^(-7).
0129    */
0130   unsigned int theEmitterXBins;
0131 
0132   /**
0133    * The number of bins in the spectator fraction.
0134    * The lenght of the zero bin is taken to be
0135    * 10^(-7).
0136    */
0137   unsigned int theSpectatorXBins;
0138 
0139   /**
0140    * The number of bins in pt dicided by the
0141    * dipole scale; the upper bound is 1/2
0142    */
0143   unsigned int thePtBins;
0144 
0145   /**
0146    * The number of bins in z
0147    */
0148   unsigned int theZBins;
0149 
0150   /**
0151    * The recursive map structure: xe, xs, hard pt / GeV
0152    * to histograms for pt and z;
0153    * output is done such that there's one file for each
0154    * xe,xs bin, including all histograms for the 
0155    * hard pt bins.
0156    */
0157   map<double,
0158       map<double,
0159       map<double,
0160           pair<Ptr<Histogram>::ptr,Ptr<Histogram>::ptr>
0161           >
0162       >
0163       > histoMap;
0164 
0165   /**
0166    * Helper to make logarithmic bins.
0167    */
0168   vector<double> makeLogBins(double xlow, double xup, unsigned int n) const;
0169 
0170 private:
0171 
0172   /**
0173    * The static object used to initialize the description of this class.
0174    * Indicates that this is a concrete class with persistent data.
0175    */
0176   static ClassDescription<DipoleMCCheck> initDipoleMCCheck;
0177 
0178   /**
0179    * The assignment operator is private and must never be called.
0180    * In fact, it should not even be implemented.
0181    */
0182   DipoleMCCheck & operator=(const DipoleMCCheck &) = delete;
0183 
0184 };
0185 
0186 }
0187 
0188 #include "ThePEG/Utilities/ClassTraits.h"
0189 
0190 namespace ThePEG {
0191 
0192 /** @cond TRAITSPECIALIZATIONS */
0193 
0194 /** This template specialization informs ThePEG about the
0195  *  base classes of DipoleMCCheck. */
0196 template <>
0197 struct BaseClassTrait<Herwig::DipoleMCCheck,1> {
0198   /** Typedef of the first base class of DipoleMCCheck. */
0199   typedef HandlerBase NthBase;
0200 };
0201 
0202 /** This template specialization informs ThePEG about the name of
0203  *  the DipoleMCCheck class and the shared object where it is defined. */
0204 template <>
0205 struct ClassTraits<Herwig::DipoleMCCheck>
0206   : public ClassTraitsBase<Herwig::DipoleMCCheck> {
0207   /** Return a platform-independent class name */
0208   static string className() { return "Herwig::DipoleMCCheck"; }
0209   /**
0210    * The name of a file containing the dynamic library where the class
0211    * DipoleMCCheck is implemented. It may also include several, space-separated,
0212    * libraries if the class DipoleMCCheck depends on other classes (base classes
0213    * excepted). In this case the listed libraries will be dynamically
0214    * linked in the order they are specified.
0215    */
0216   static string library() { return "HwDipoleShower.so"; }
0217 };
0218 
0219 /** @endcond */
0220 
0221 }
0222 
0223 #endif /* HERWIG_DipoleMCCheck_H */