Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:23:58

0001 // -*- C++ -*-
0002 //
0003 // LEPMultiplicityCount.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_LEPMultiplicityCount_H
0010 #define HERWIG_LEPMultiplicityCount_H
0011 //
0012 // This is the declaration of the LEPMultiplicityCount class.
0013 //
0014 
0015 #include "ThePEG/Handlers/AnalysisHandler.h"
0016 #include "ThePEG/Repository/Repository.h"
0017 #include "ThePEG/PDT/ParticleData.h"
0018 #include "Herwig/Utilities/Histogram.h"
0019 #include "MultiplicityInfo.h"
0020 
0021 namespace Herwig {
0022 
0023 using namespace ThePEG;
0024 
0025 
0026 /** \ingroup Analysis
0027  * The LEPMultiplicityCount class is designed to count particle multiplicities and
0028  * compare them to LEP data.
0029  *
0030  * @see \ref LEPMultiplicityCountInterfaces "The interfaces"
0031  * defined for LEPMultiplicityCount.
0032  */
0033 class LEPMultiplicityCount: public AnalysisHandler {
0034 
0035 public:
0036 
0037   /**
0038    * The default constructor.
0039    */
0040   LEPMultiplicityCount();
0041 
0042 public:
0043 
0044   /** @name Virtual functions required by the AnalysisHandler class. */
0045   //@{
0046   /**
0047    * Analyze a given Event. Note that a fully generated event
0048    * may be presented several times, if it has been manipulated in
0049    * between. The default version of this function will call transform
0050    * to make a lorentz transformation of the whole event, then extract
0051    * all final state particles and call analyze(tPVector) of this
0052    * analysis object and those of all associated analysis objects. The
0053    * default version will not, however, do anything on events which
0054    * have not been fully generated, or have been manipulated in any
0055    * way.
0056    * @param event pointer to the Event to be analyzed.
0057    * @param ieve the event number.
0058    * @param loop the number of times this event has been presented.
0059    * If negative the event is now fully generated.
0060    * @param state a number different from zero if the event has been
0061    * manipulated in some way since it was last presented.
0062    */
0063   virtual void analyze(tEventPtr event, long ieve, int loop, int state);
0064 
0065   /**
0066    * Analyze the given vector of particles. The default version calls
0067    * analyze(tPPtr) for each of the particles.
0068    * @param particles the vector of pointers to particles to be analyzed
0069    */
0070   virtual void analyze(const tPVector & particles);
0071 
0072   using AnalysisHandler::analyze;
0073   //@}
0074 
0075 public:
0076 
0077   /** @name Functions used by the persistent I/O system. */
0078   //@{
0079   /**
0080    * Function used to write out object persistently.
0081    * @param os the persistent output stream written to.
0082    */
0083   void persistentOutput(PersistentOStream & os) const;
0084 
0085   /**
0086    * Function used to read in object persistently.
0087    * @param is the persistent input stream read from.
0088    * @param version the version number of the object when written.
0089    */
0090   void persistentInput(PersistentIStream & is, int version);
0091   //@}
0092 
0093   /**
0094    * The standard Init function used to initialize the interfaces.
0095    * Called exactly once for each class by the class description system
0096    * before the main function starts or
0097    * when this class is dynamically loaded.
0098    */
0099   static void Init();
0100 
0101 protected:
0102 
0103   /** @name Clone Methods. */
0104   //@{
0105   /**
0106    * Make a simple clone of this object.
0107    * @return a pointer to the new object.
0108    */
0109   virtual IBPtr clone() const;
0110 
0111   /** Make a clone of this object, possibly modifying the cloned object
0112    * to make it sane.
0113    * @return a pointer to the new object.
0114    */
0115   virtual IBPtr fullclone() const;
0116   //@}
0117 
0118 protected:
0119 
0120   /** @name Standard Interfaced functions. */
0121   //@{
0122   /**
0123    * Finalize this object. Called in the run phase just after a
0124    * run has ended. Used eg. to write out statistics.
0125    */
0126   virtual void dofinish();
0127   //@}
0128 
0129 private:
0130 
0131   /**
0132    * The assignment operator is private and must never be called.
0133    * In fact, it should not even be implemented.
0134    */
0135   LEPMultiplicityCount & operator=(const LEPMultiplicityCount &) = delete;
0136 
0137 private:
0138 
0139   /**
0140    *  The PDG codes of the particles
0141    */
0142   vector<long> _particlecodes;
0143 
0144   /**
0145    * The multiplcity
0146    */
0147   vector<double> _multiplicity;
0148 
0149   /**
0150    * The error
0151    */
0152   vector<double> _error;
0153 
0154   /**
0155    * Species of particle
0156    */
0157   vector<unsigned int> _species;
0158 
0159   /**
0160    *  Map of PDG codes to multiplicity info
0161    */
0162   map<long,MultiplicityInfo> _data;
0163 
0164   /// Histograms for cluster mass dependence
0165   map<long,Histogram> _histograms;
0166 
0167   /**
0168    *  Histograms of the clusters after cluster splitting
0169    */
0170   map<int,Histogram> _clusters;
0171 
0172   /**
0173    *  Histograms of the primary clusters
0174    */
0175   map<int,Histogram> _primary;
0176 
0177   /**
0178    *  Map of number of final-state particles to PDG code
0179    */
0180   map<long,long> _finalstatecount;
0181 
0182   /**
0183    *  Particles in hard process
0184    */
0185   map<long,long> _collisioncount;
0186 
0187   /// Make histograms of cluster mass dependence
0188   bool _makeHistograms;
0189 
0190 };
0191 
0192 }
0193 
0194 #endif /* HERWIG_LEPMultiplicityCount_H */