Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ClusterFinder.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_ClusterFinder_H
0010 #define HERWIG_ClusterFinder_H
0011 
0012 #include <ThePEG/Interface/Interfaced.h>
0013 #include "CluHadConfig.h"
0014 #include "HadronSelector.h"
0015 #include "ClusterFinder.fh"
0016 
0017 namespace Herwig {
0018 using namespace ThePEG;
0019 
0020 /*! \ingroup Hadronization
0021  *  \class ClusterFinder
0022  *  \brief This class forms clusters from the partons produced in the Shower.
0023  *  \author Philip Stephens
0024  *  \author Alberto Ribon
0025  * 
0026  *  This class scans through the particles in the event and produces a 
0027  *  collection of clusters, defined as a colour-singlet combinations of 
0028  *  colour-connected particles. There are no assumptions about the type 
0029  *  (i.e. quark or diquark) or number of the component particles of the 
0030  *  cluster; however, most of the time clusters are formed by quark-antiquark 
0031  *  pairs. In special situations, such as baryon-violating processes in
0032  *  R-nonconserved Susy, three quarks (or three antiquarks) could form a 
0033  *  cluster. Because at the moment we don't know how to handle 3-component 
0034  *  clusters (i.e. how to fission heavy ones, or how to decay clusters), we 
0035  *  provide also a separate method, reduceToTwoComponents, which 
0036  *  does the job of redefining these 3-component clusters as "normal" 
0037  *  2-component ones, simply by randomly considering two (anti-) quarks as a 
0038  *  (anti-) diquark. Notice that if in the future the method 
0039  *  reduceToTwoComponents is modified or even eliminated, the 
0040  *  main method for finding clusters, formClusters, will not need 
0041  *  any change. 
0042  *
0043  * @see \ref ClusterFinderInterfaces "The interfaces"
0044  * defined for ClusterFinder.
0045  */
0046 class ClusterFinder: public Interfaced {
0047 
0048 public :
0049 
0050   /** @name Standard constructors and destructors. */
0051   //@{
0052   /**
0053    * Default constructor.
0054    */
0055   ClusterFinder() : heavyDiquarks_(2), diQuarkSelection_(1), diQuarkOnShell_(false)
0056   {}
0057   //@}
0058 
0059 public:
0060 
0061   /** 
0062    * This routine forms the clusters of the event.
0063    *
0064    * Form clusters starting from the list of partons given.
0065    * It also checks if the cluster is a beam cluster, that is if
0066    * at least one of its components is a beam remnant.
0067    */
0068   ClusterVector formClusters(const PVector & partons) 
0069    ;
0070 
0071   /**
0072    * Reduces three component clusters into two components.
0073    *
0074    * For the eventual clusters that have three components 
0075    * (quark, quark, quark) or (antiquark, antiquark, antiquark),
0076    * it redefines them as "normal" clusters with two components:
0077    * (quark,diquark) or (antiquark,antidiquark), by a random drawing.
0078    * This could be eliminated or changed in the future.
0079    */
0080   void reduceToTwoComponents(ClusterVector&) 
0081    ;
0082 
0083 public:
0084 
0085   /**
0086    * Standard Init function used to initialize the interfaces.
0087    */
0088   static void Init();
0089 
0090   /** @name Functions used by the persistent I/O system. */
0091   //@{
0092   /**
0093    * Function used to write out object persistently.
0094    * @param os the persistent output stream written to.
0095    */
0096   void persistentOutput(PersistentOStream & os) const;
0097 
0098   /**
0099    * Function used to read in object persistently.
0100    * @param is the persistent input stream read from.
0101    * @param version the version number of the object when written.
0102    */
0103   void persistentInput(PersistentIStream & is, int version);
0104   //@}
0105 
0106 protected:
0107 
0108   /** @name Clone Methods. */
0109   //@{
0110   /**
0111    * Make a simple clone of this object.
0112    * @return a pointer to the new object.
0113    */
0114   virtual IBPtr clone() const;
0115 
0116   /** Make a clone of this object, possibly modifying the cloned object
0117    * to make it sane.
0118    * @return a pointer to the new object.
0119    */
0120   virtual IBPtr fullclone() const;
0121   //@}
0122 
0123 private:
0124 
0125   /**
0126    * Private and non-existent assignment operator.
0127    */
0128   ClusterFinder & operator=(const ClusterFinder &) = delete;
0129 
0130 private:
0131 
0132   /**
0133    *  Treatment of diquarks contain heavy quarks in baryon-number violating clusters
0134    */
0135   unsigned int heavyDiquarks_;
0136 
0137   /**
0138    *  Option for the selection of which quarks to make into a diquark
0139    */
0140   unsigned int diQuarkSelection_;
0141 
0142   /**
0143    *  Force diquarks to be on-shell
0144    */
0145   bool diQuarkOnShell_;
0146 
0147   /**
0148    * A pointer to a Herwig::HadronSelector object for generating hadrons.
0149    */
0150   HadronSelectorPtr hadronSelector_;
0151 
0152 };
0153 
0154 }
0155 
0156 #endif /* HERWIG_ClusterFinder_H */