Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MatchboxFactoryMatcher.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_MatchboxFactoryMatcher_H
0010 #define Herwig_MatchboxFactoryMatcher_H
0011 //
0012 // This is the declaration of the MatchboxFactoryMatcher class.
0013 //
0014 
0015 #include "ThePEG/PDT/MatcherBase.h"
0016 #include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
0017 
0018 namespace Herwig {
0019 
0020 using namespace ThePEG;
0021 
0022 /**
0023  * \ingroup Matchbox
0024  * \author Simon Platzer
0025  *
0026  * \brief MatchboxFactoryMatcher matches particles according to
0027  * MatchboxFatory particle groups
0028  *
0029  * @see \ref MatchboxFactoryMatcherInterfaces "The interfaces"
0030  * defined for MatchboxFactoryMatcher.
0031  */
0032 class MatchboxFactoryMatcher: public ThePEG::MatcherBase {
0033 
0034 public:
0035 
0036   /**
0037    * The default constructor.
0038    */
0039   MatchboxFactoryMatcher();
0040 
0041 public:
0042 
0043   /**
0044    * Check if a particle type meets the criteria.
0045    */
0046   virtual bool check(const ParticleData &) const;
0047 
0048   /**
0049    * Specialized clone method for MatcherBase used by the
0050    * Repository. A sub class must make sure that also the MatcherBase
0051    * object corresponding to the complex conjugate of this is cloned.
0052    */
0053   virtual PMPtr pmclone() const;
0054 
0055 public:
0056 
0057   /** @name Functions used by the persistent I/O system. */
0058   //@{
0059   /**
0060    * Function used to write out object persistently.
0061    * @param os the persistent output stream written to.
0062    */
0063   void persistentOutput(PersistentOStream & os) const;
0064 
0065   /**
0066    * Function used to read in object persistently.
0067    * @param is the persistent input stream read from.
0068    * @param version the version number of the object when written.
0069    */
0070   void persistentInput(PersistentIStream & is, int version);
0071   //@}
0072 
0073   /**
0074    * The standard Init function used to initialize the interfaces.
0075    * Called exactly once for each class by the class description system
0076    * before the main function starts or
0077    * when this class is dynamically loaded.
0078    */
0079   static void Init();
0080 
0081 protected:
0082 
0083   /** @name Clone Methods. */
0084   //@{
0085   /**
0086    * Make a simple clone of this object.
0087    * @return a pointer to the new object.
0088    */
0089   virtual IBPtr clone() const;
0090 
0091   /** Make a clone of this object, possibly modifying the cloned object
0092    * to make it sane.
0093    * @return a pointer to the new object.
0094    */
0095   virtual IBPtr fullclone() const;
0096   //@}
0097 
0098 
0099 // If needed, insert declarations of virtual function defined in the
0100 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0101 
0102 
0103 protected:
0104 
0105   /** @name Standard Interfaced functions. */
0106   //@{
0107   /**
0108    * Initialize this object after the setup phase before saving an
0109    * EventGenerator to disk.
0110    * @throws InitException if object could not be initialized properly.
0111    */
0112   virtual void doinit();
0113   //@}
0114 
0115 private:
0116 
0117   /**
0118    * The particle group to be matched
0119    */
0120   string theGroup;
0121 
0122   /**
0123    * The set of particle ids to be matched
0124    */
0125   set<long> theIds;
0126 
0127 private:
0128 
0129   /**
0130    * The assignment operator is private and must never be called.
0131    * In fact, it should not even be implemented.
0132    */
0133   MatchboxFactoryMatcher & operator=(const MatchboxFactoryMatcher &) = delete;
0134 
0135 };
0136 
0137 }
0138 
0139 #endif /* Herwig_MatchboxFactoryMatcher_H */