Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // OneCutBase.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_OneCutBase_H
0010 #define THEPEG_OneCutBase_H
0011 //
0012 // This is the declaration of the OneCutBase class.
0013 //
0014 
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "OneCutBase.fh"
0017 #include "Cuts.fh"
0018 
0019 namespace ThePEG {
0020 
0021 /**
0022  * This class corresponds to a kinematical cut to be made on a single
0023  * outgoing parton from a hard sub-process.
0024  *
0025  * There are four main virtual functions which must be overridden by
0026  * concrete sub-classes. minKT() should return the minimum allowed
0027  * transverse momentum of a given type, while minEta() and maxEta()
0028  * should return the minimum and maximum allowed pseudo-rapidity for a
0029  * particle of a given type as measured in the lab-system. Note that
0030  * when applied in the rest frame of a hard sub-process, the
0031  * transformation from the lab frame is assumed to be a simple boost
0032  * along the z-axis. In addition the passCut() function should return
0033  * true if a particle with a given type and given momentum will pass
0034  * the cuts.
0035  *
0036  * @see \ref OneCutBaseInterfaces "The interfaces"
0037  * defined for OneCutBase.
0038  */
0039 class OneCutBase: public Interfaced {
0040 
0041 public:
0042 
0043   /** @name Standard constructors and destructors. */
0044   //@{
0045   /**
0046    * The default constructor.
0047    */
0048   OneCutBase() {}
0049 
0050   /**
0051    * The destructor.
0052    */
0053   virtual ~OneCutBase();
0054   //@}
0055 
0056 public:
0057 
0058   /** @name Virtual functions to be overridden by sub-classes. */
0059   //@{
0060   /**
0061    * Return the minimum allowed value of the transverse momentum of an
0062    * outgoing parton.
0063    */
0064   virtual Energy minKT(tcPDPtr p) const = 0;
0065 
0066   /**
0067    * Return the minimum allowed pseudo-rapidity of an outgoing parton
0068    * of the given type. The pseudo-rapidity is measured in the lab
0069    * system.
0070    */
0071   virtual double minEta(tcPDPtr p) const = 0;
0072 
0073   /**
0074    * Return the maximum allowed pseudo-rapidity of an outgoing parton
0075    * of the given type. The pseudo-rapidity is measured in the lab
0076    * system.
0077    */
0078   virtual double maxEta(tcPDPtr p) const = 0;
0079 
0080   /**
0081    * Return the minimum allowed rapidity of an outgoing parton
0082    * of the given type. The rapidity is measured in the lab
0083    * system.
0084    */
0085   virtual double minRapidityMax(tcPDPtr p) const;
0086 
0087   /**
0088    * Return the maximum allowed rapidity of an outgoing parton
0089    * of the given type. The rapidity is measured in the lab
0090    * system.
0091    */
0092   virtual double maxRapidityMin(tcPDPtr p) const;
0093 
0094   /**
0095    * Return the minimum allowed value of the transverse momentum of
0096    * the outgoing parton with the lagrest transverse momentum. This
0097    * version simply returns minKt().
0098    */
0099   virtual Energy minMaxKT(tcPDPtr p) const;
0100 
0101   /**
0102    * Return the minimum allowed pseudo-rapidity of the outgoing parton
0103    * of the given type with the maximum pseudo-rapidity. The
0104    * pseudo-rapidity is measured in the lab system. This version
0105    * simply returns minEta().
0106    */
0107   virtual double minMaxEta(tcPDPtr p) const;
0108 
0109   /**
0110    * Return the maximum allowed pseudo-rapidity of the outgoing parton
0111    * of the given type with the minimum pseudo-rapidity.. The
0112    * pseudo-rapidity is measured in the lab system. This version
0113    * simply returns maxEta().
0114    */
0115   virtual double maxMinEta(tcPDPtr p) const;
0116 
0117   /**
0118    * Return true if a particle with type \a ptype and momentum \a p
0119    * passes the cuts. The \a parent contains information about the
0120    * kinematics of the hard sub-process.
0121    */
0122   virtual bool passCuts(tcCutsPtr parent,
0123             tcPDPtr ptype, LorentzMomentum p) const;
0124 
0125   /**
0126    * Return true if the given particle passes the cuts. The \a parent
0127    * contains information about the kinematics of the hard
0128    * sub-process.
0129    */
0130   bool passCuts(tcCutsPtr parent, tcPPtr p) const;
0131   //@}
0132 
0133   /**
0134    * Describe the currently active cuts in the log file.
0135    */
0136   virtual void describe() const;
0137 
0138 public:
0139 
0140   /**
0141    * The standard Init function used to initialize the interfaces.
0142    * Called exactly once for each class by the class description system
0143    * before the main function starts or
0144    * when this class is dynamically loaded.
0145    */
0146   static void Init();
0147 
0148 private:
0149 
0150   /**
0151    * The static object used to initialize the description of this class.
0152    * Indicates that this is a concrete class with persistent data.
0153    */
0154   static AbstractNoPIOClassDescription<OneCutBase> initOneCutBase;
0155 
0156   /**
0157    * The assignment operator is private and must never be called.
0158    * In fact, it should not even be implemented.
0159    */
0160   OneCutBase & operator=(const OneCutBase &) = delete;
0161 
0162 };
0163 
0164 }
0165 
0166 #include "ThePEG/Utilities/ClassTraits.h"
0167 
0168 namespace ThePEG {
0169 
0170 /** @cond TRAITSPECIALIZATIONS */
0171 
0172 /** This template specialization informs ThePEG about the
0173  *  base classes of OneCutBase. */
0174 template <>
0175 struct BaseClassTrait<OneCutBase,1> {
0176   /** Typedef of the first base class of OneCutBase. */
0177   typedef Interfaced NthBase;
0178 };
0179 
0180 /** This template specialization informs ThePEG about the name of
0181  *  the OneCutBase class and the shared object where it is defined. */
0182 template <>
0183 struct ClassTraits<OneCutBase>
0184   : public ClassTraitsBase<OneCutBase> {
0185   /** Return a platform-independent class name */
0186   static string className() { return "ThePEG::OneCutBase"; }
0187 };
0188 
0189 /** @endcond */
0190 
0191 }
0192 
0193 #endif /* THEPEG_OneCutBase_H */