Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:20

0001 // -*- C++ -*-
0002 //
0003 // MultiCutBase.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG 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 THEPEG_MultiCutBase_H
0010 #define THEPEG_MultiCutBase_H
0011 //
0012 // This is the declaration of the MultiCutBase class.
0013 //
0014 
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "MultiCutBase.fh"
0017 #include "Cuts.fh"
0018 
0019 namespace ThePEG {
0020 
0021 /**
0022  * This class corresponds to a kinematical cut to be made on a set of
0023  * outgoing particles from a hard sub-process.
0024  *
0025  * There are three virtual functions to be overridden by concrete
0026  * sub-classes. minS() and maxS() should return the minimum and
0027  * maximum invariant mass of of a set of particle types. In addition
0028  * the passCut() function should return true if a set of particle
0029  * with a given types and given momenta will pass the cuts.
0030  *
0031  * @see \ref MultiCutBaseInterfaces "The interfaces"
0032  * defined for MultiCutBase.
0033  */
0034 class MultiCutBase: public Interfaced {
0035 
0036 public:
0037 
0038   /** @name Virtual functions to be overridden by sub-classes. */
0039   //@{
0040   /**
0041    * Return the minimum allowed value of the squared invariant mass of
0042    * a set of outgoing partons of the given types. Typically used to
0043    * cut off the tails of the mass of a resonance for efficiency.
0044    */
0045   virtual Energy2 minS(const tcPDVector & pv) const;
0046 
0047   /**
0048    * Return the maximum allowed value of the squared invariant mass of
0049    * a set of outgoing partons of the given types. Typically used to
0050    * cut off the tails of the mass of a resonance for efficiency.
0051    */
0052   virtual Energy2 maxS(const tcPDVector & pv) const;
0053 
0054   /**
0055    * Return true if a set of outgoing particles with typea \a ptype
0056    * and corresponding momenta \a p passes the cuts.
0057    */
0058   virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype,
0059             const vector<LorentzMomentum> & p) const;
0060 
0061   /**
0062    * Return true if the given vector of particles passes the cuts.
0063    */
0064   bool passCuts(tcCutsPtr parent, const tcPVector & p) const;
0065   //@}
0066 
0067   /**
0068    * Describe the currently active cuts in the log file.
0069    */
0070   virtual void describe() const;
0071 
0072 public:
0073 
0074   /**
0075    * The standard Init function used to initialize the interfaces.
0076    * Called exactly once for each class by the class description system
0077    * before the main function starts or
0078    * when this class is dynamically loaded.
0079    */
0080   static void Init();
0081 
0082 private:
0083 
0084   /**
0085    * The static object used to initialize the description of this class.
0086    * Indicates that this is an abstract class without persistent data.
0087    */
0088   static AbstractNoPIOClassDescription<MultiCutBase> initMultiCutBase;
0089 
0090   /**
0091    * The assignment operator is private and must never be called.
0092    * In fact, it should not even be implemented.
0093    */
0094   MultiCutBase & operator=(const MultiCutBase &) = delete;
0095 
0096 };
0097 
0098 }
0099 
0100 #include "ThePEG/Utilities/ClassTraits.h"
0101 
0102 namespace ThePEG {
0103 
0104 /** @cond TRAITSPECIALIZATIONS */
0105 
0106 /** This template specialization informs ThePEG about the
0107  *  base classes of MultiCutBase. */
0108 template <>
0109 struct BaseClassTrait<MultiCutBase,1> {
0110   /** Typedef of the first base class of MultiCutBase. */
0111   typedef Interfaced NthBase;
0112 };
0113 
0114 /** This template specialization informs ThePEG about the name of
0115  *  the MultiCutBase class and the shared object where it is defined. */
0116 template <>
0117 struct ClassTraits<MultiCutBase>
0118   : public ClassTraitsBase<MultiCutBase> {
0119   /** Return a platform-independent class name */
0120   static string className() { return "ThePEG::MultiCutBase"; }
0121 };
0122 
0123 /** @endcond */
0124 
0125 }
0126 
0127 #endif /* THEPEG_MultiCutBase_H */