Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // TwoCutBase.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_TwoCutBase_H
0010 #define THEPEG_TwoCutBase_H
0011 //
0012 // This is the declaration of the TwoCutBase class.
0013 //
0014 
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "TwoCutBase.fh"
0017 #include "Cuts.fh"
0018 
0019 namespace ThePEG {
0020 
0021 /**
0022  * This class corresponds to a kinematical cut to be made on a pair of
0023  * particles in a hard sub-process.
0024  *
0025  * There are six main virtual functions to be overridden by concrete
0026  * sub-classes. minsSij(), minTij(), minDeltaR(), minKTClus() and
0027  * minDurham() returns the minimum allowed values of pre defined
0028  * kinematical variable. In addition the passCut() function should
0029  * return true if a pair of particle with a given types and given
0030  * momenta will pass the cuts.
0031  *
0032  * @see \ref TwoCutBaseInterfaces "The interfaces" defined for
0033  * TwoCutBase.
0034  */
0035 class TwoCutBase: public Interfaced {
0036 
0037 public:
0038 
0039   /**
0040    * The default constructor.
0041    */
0042   TwoCutBase() {}
0043 
0044 public:
0045 
0046   /** @name Virtual functions to be overridden by sub-classes. */
0047   //@{
0048   /**
0049    * Return the minimum allowed squared invariant mass of two outgoing
0050    * partons of type \a pi and \a pj.
0051    */
0052   virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const = 0;
0053 
0054   /**
0055    * Return the minimum allowed value of the negative of the squared
0056    * invariant mass of an incoming parton of type \a pi and an
0057    * outgoing parton of type \a po.
0058    */
0059   virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const = 0;
0060 
0061   /**
0062    * Return the minimum allowed value of \f$\Delta
0063    * R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
0064    * outgoing partons of type \a pi and \a pj.
0065    */
0066   virtual double minDeltaR(tcPDPtr pi, tcPDPtr pj) const = 0;
0067 
0068   /**
0069    * Return the minimum allowed value of the longitudinally invariant
0070    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0071    * \f$\min(p_{\perp i}, p_{\perp
0072    * j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
0073    * partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
0074    * single outgoing parton. Returns 0 if both partons are incoming. A
0075    * null pointer indicates an incoming parton, hence the type of the
0076    * incoming parton is irrelevant.
0077    */
0078   virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const = 0;
0079 
0080   /**
0081    * Return the minimum allowed value of the Durham
0082    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0083    * \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
0084    * outgoing partons.
0085    */
0086   virtual double minDurham(tcPDPtr pi, tcPDPtr pj) const = 0;
0087 
0088   /**
0089    * Return true if a pair of particles with type \a pitype and \a
0090    * pjtype and momenta \a pi and \a pj respectively passes the
0091    * cuts. \a inci and \a inj indicates if the corresponding particles
0092    * are incoming.
0093    */
0094   virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
0095             LorentzMomentum pi, LorentzMomentum pj,
0096             bool inci = false, bool incj = false) const;
0097 
0098   /**
0099    * Return true if the given pair of particles passes the cuts. \a
0100    * inci and \a inj indicates if the corresponding particles are
0101    * incoming.
0102    */
0103   bool passCuts(tcCutsPtr parent, tcPPtr pi, tcPPtr pj,
0104         bool inci = false, bool incj = false) const;
0105   //@}
0106 
0107   /**
0108    * Describe the currently active cuts in the log file.
0109    */
0110   virtual void describe() const;
0111 
0112 public:
0113 
0114   /**
0115    * The standard Init function used to initialize the interfaces.
0116    * Called exactly once for each class by the class description system
0117    * before the main function starts or
0118    * when this class is dynamically loaded.
0119    */
0120   static void Init();
0121 
0122 private:
0123 
0124   /**
0125    * The static object used to initialize the description of this class.
0126    * Indicates that this is an abstract class with persistent data.
0127    */
0128   static AbstractNoPIOClassDescription<TwoCutBase> initTwoCutBase;
0129 
0130   /**
0131    * The assignment operator is private and must never be called.
0132    * In fact, it should not even be implemented.
0133    */
0134   TwoCutBase & operator=(const TwoCutBase &) = delete;
0135 
0136 };
0137 
0138 }
0139 
0140 #include "ThePEG/Utilities/ClassTraits.h"
0141 
0142 namespace ThePEG {
0143 
0144 /** @cond TRAITSPECIALIZATIONS */
0145 
0146 /** This template specialization informs ThePEG about the
0147  *  base classes of TwoCutBase. */
0148 template <>
0149 struct BaseClassTrait<TwoCutBase,1> {
0150   /** Typedef of the first base class of TwoCutBase. */
0151   typedef Interfaced NthBase;
0152 };
0153 
0154 /** This template specialization informs ThePEG about the name of
0155  *  the TwoCutBase class and the shared object where it is defined. */
0156 template <>
0157 struct ClassTraits<TwoCutBase>
0158   : public ClassTraitsBase<TwoCutBase> {
0159   /** Return a platform-independent class name */
0160   static string className() { return "ThePEG::TwoCutBase"; }
0161 };
0162 
0163 /** @endcond */
0164 
0165 }
0166 
0167 #endif /* THEPEG_TwoCutBase_H */