Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MatchboxDeltaRCut.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_MatchboxDeltaRCut_H
0010 #define Herwig_MatchboxDeltaRCut_H
0011 //
0012 // This is the declaration of the MatchboxDeltaRCut class.
0013 //
0014 
0015 #include "ThePEG/Cuts/TwoCutBase.h"
0016 #include "ThePEG/PDT/MatcherBase.h"
0017 
0018 namespace Herwig {
0019 
0020 using namespace ThePEG;
0021 
0022 /**
0023  * \ingroup Matchbox
0024  * \author Christian Reuschle
0025  *
0026  * \brief MatchboxDeltaRCut implements cuts related to the separation in the legoplot plane
0027  *
0028  * @see \ref MatchboxDeltaRCutInterfaces "The interfaces"
0029  * defined for MatchboxDeltaRCut.
0030  */
0031 class MatchboxDeltaRCut: public TwoCutBase {
0032 
0033 public:
0034 
0035   /**
0036    * The default constructor.
0037    */
0038   MatchboxDeltaRCut();
0039 
0040 public:
0041 
0042   /** @name Virtual functions to be overridden by sub-classes. */
0043   //@{
0044   /**
0045    * Return the minimum allowed value of the longitudinally invariant
0046    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0047    * \f$\min(p_{\perp i}, p_{\perp
0048    * j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
0049    * partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
0050    * single outgoing parton. Returns 0 if both partons are incoming. A
0051    * null pointer indicates an incoming parton, hence the type of the
0052    * incoming parton is irrelevant.
0053    */
0054   virtual Energy minDeltaMeasureCuts(tcPDPtr , tcPDPtr ) const { return ZERO; }
0055   // virtual Energy minDeltaMeasureCuts(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
0056 
0057   /**
0058    * Return the minimum allowed value of the longitudinally invariant
0059    * \f$k_\perp\f$-algorithms distance measure. Returns ZERO.
0060    */
0061   virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
0062   // virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
0063 
0064   /**
0065    * Return the minimum allowed squared invariant mass of two outgoing
0066    * partons of type \a pi and \a pj. Returns zero.
0067    */
0068   virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
0069   // virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
0070 
0071   /**
0072    * Return the minimum allowed value of the negative of the squared
0073    * invariant mass of an incoming parton of type \a pi and an
0074    * outgoing parton of type \a po. Returns zero.
0075    */
0076   virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
0077   // virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const { return ZERO; }
0078 
0079   /**
0080    * Return the minimum allowed value of \f$\Delta
0081    * R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
0082    * outgoing partons of type \a pi and \a pj. Returns zero.
0083    */
0084   virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
0085   // virtual double minDeltaR(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
0086 
0087   /**
0088    * Return the minimum allowed value of the Durham
0089    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0090    * \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
0091    * outgoing partons. Returns zero.
0092    */
0093   virtual double minDurham(tcPDPtr , tcPDPtr ) const { return 0.0; }
0094   // virtual double minDurham(tcPDPtr pi, tcPDPtr pj) const { return 0.0; }
0095 
0096   /**
0097    * Return true if a pair of particles with type \a pitype and \a
0098    * pjtype and momenta \a pi and \a pj respectively passes the
0099    * cuts. \a inci and \a inj indicates if the corresponding particles
0100    * are incoming.
0101    */
0102   virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
0103             LorentzMomentum pi, LorentzMomentum pj,
0104             bool inci = false, bool incj = false) const;
0105 
0106   /**
0107    * Describe the currently active cuts in the log file.
0108    */
0109   virtual void describe() const;
0110   //@}
0111 
0112 public:
0113 
0114   /**
0115    * Return the minimum and maximum allowed legoplot separation
0116    */
0117   double deltaRMin() const { return theDeltaRMin; }
0118   double deltaRMax() const { return theDeltaRMax; }
0119 
0120   /**
0121    * Return the minimum and maximum allowed rapidity separation
0122    */
0123   double deltaYMin() const { return theDeltaYMin; }
0124   double deltaYMax() const { return theDeltaYMax; }
0125 
0126   /**
0127    * Return the minimum and maximum allowed azimuthal separation
0128    */
0129   double deltaPhiMin() const { return theDeltaPhiMin; }
0130   double deltaPhiMax() const { return theDeltaPhiMax; }
0131 
0132   /**
0133    * Return the matchers for a pair of particles to cut on. Only a pair
0134    * of particles, matching these objects, will be affected.
0135    */
0136   Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
0137   Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
0138 
0139 public:
0140 
0141   /** @name Functions used by the persistent I/O system. */
0142   //@{
0143   /**
0144    * Function used to write out object persistently.
0145    * @param os the persistent output stream written to.
0146    */
0147   void persistentOutput(PersistentOStream & os) const;
0148 
0149   /**
0150    * Function used to read in object persistently.
0151    * @param is the persistent input stream read from.
0152    * @param version the version number of the object when written.
0153    */
0154   void persistentInput(PersistentIStream & is, int version);
0155   //@}
0156 
0157   /**
0158    * The standard Init function used to initialize the interfaces.
0159    * Called exactly once for each class by the class description system
0160    * before the main function starts or
0161    * when this class is dynamically loaded.
0162    */
0163   static void Init();
0164 
0165 protected:
0166 
0167   /** @name Clone Methods. */
0168   //@{
0169   /**
0170    * Make a simple clone of this object.
0171    * @return a pointer to the new object.
0172    */
0173   virtual IBPtr clone() const;
0174 
0175   /** Make a clone of this object, possibly modifying the cloned object
0176    * to make it sane.
0177    * @return a pointer to the new object.
0178    */
0179   virtual IBPtr fullclone() const;
0180   //@}
0181 
0182 
0183 // If needed, insert declarations of virtual function defined in the
0184 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0185 
0186 private:
0187 
0188   /**
0189    * The minimum and maximum allowed legoplot separation
0190    */
0191   double theDeltaRMin;
0192   double theDeltaRMax;
0193 
0194   /**
0195    * The minimum and maximum allowed rapidity separation
0196    */
0197   double theDeltaYMin;
0198   double theDeltaYMax;
0199 
0200   /**
0201    * The minimum and maximum allowed azimuthal separation
0202    */
0203   double theDeltaPhiMin;
0204   double theDeltaPhiMax;
0205 
0206   /**
0207    * Matchers for a pair of particles to cut on. Only a pair
0208    * of particles, matching these objects, will be affected.
0209    */
0210   Ptr<MatcherBase>::ptr theFirstMatcher;
0211   Ptr<MatcherBase>::ptr theSecondMatcher;
0212   
0213 private:
0214 
0215   /**
0216    * The assignment operator is private and must never be called.
0217    * In fact, it should not even be implemented.
0218    */
0219   MatchboxDeltaRCut & operator=(const MatchboxDeltaRCut &) = delete;
0220 
0221 };
0222 
0223 }
0224 
0225 #endif /* Herwig_MatchboxDeltaRCut_H */