Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // PairPtCut.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_PairPtCut_H
0010 #define Herwig_PairPtCut_H
0011 //
0012 // This is the declaration of the PairPtCut 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 This class implements a cut on the transverse momentum of a pair of particles
0027  *
0028  * @see \ref PairPtCutInterfaces "The interfaces"
0029  * defined for PairPtCut.
0030  */
0031 class PairPtCut: public TwoCutBase {
0032 
0033 public:
0034 
0035   /** @name Standard constructors and destructors. */
0036   //@{
0037   /**
0038    * The default constructor.
0039    */
0040   PairPtCut() : 
0041     theMinPt(0*GeV), theMaxPt(Constants::MaxEnergy),
0042     theSameFlavourOnly(false), theOppositeSignOnly(false) {}
0043   //@}
0044 
0045 public:
0046 
0047   /** @name Overridden virtual functions defined in the base class. */
0048   //@{
0049   /**
0050    * Return true if a pair of particles with type \a pitype and \a
0051    * pjtype and momenta \a pi and \a pj respectively passes the
0052    * cuts. \a inci and \a inj indicates if the corresponding particles
0053    * are incoming.
0054    */
0055   virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
0056             LorentzMomentum pi, LorentzMomentum pj,
0057             bool inci = false, bool incj = false) const;
0058 
0059   /**
0060    * Return the minimum allowed squared invariant mass of two outgoing
0061    * partons of type \a pi and \a pj.
0062    */
0063   virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
0064 
0065   /**
0066    * Return the minimum allowed value of the negative of the squared
0067    * invariant mass of an incoming parton of type \a pi and an
0068    * outgoing parton of type \a po.
0069    */
0070   virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
0071 
0072   /**
0073    * Return the minimum allowed value of \f$\Delta
0074    * R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
0075    * outgoing partons of type \a pi and \a pj.
0076    */
0077   virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
0078 
0079   /**
0080    * Return the minimum allowed value of the longitudinally invariant
0081    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0082    * \f$\min(p_{\perp i}, p_{\perp
0083    * j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
0084    * partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
0085    * single outgoing parton. Returns 0 if both partons are incoming. A
0086    * null pointer indicates an incoming parton, hence the type of the
0087    * incoming parton is irrelevant.
0088    */
0089   virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
0090 
0091   /**
0092    * Return the minimum allowed value of the Durham
0093    * \f$k_\perp\f$-algorithms distance measure. This is defined as
0094    * \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
0095    * outgoing partons.
0096    */
0097   virtual double minDurham(tcPDPtr , tcPDPtr ) const { return ZERO; }
0098 
0099   //@}
0100 
0101   /**
0102    * Describe the currently active cuts in the log file.
0103    */
0104   virtual void describe() const;
0105 
0106 public:
0107 
0108   /**
0109    * Return the minimal allowed pair pT
0110    */
0111   Energy minPt() const { return theMinPt; }
0112 
0113   /**
0114    * Return the maximal allowed pair pT
0115    */
0116   Energy maxPt() const { return theMaxPt; }
0117 
0118   /**
0119    * Return whether cut acts on same-flavour fermions only
0120    */
0121   bool sameFlavourOnly() const { return theSameFlavourOnly; }
0122 
0123   /**
0124    * Return whether cut acts on opposite-sign fermions only
0125    */
0126   bool oppositeSignOnly() const { return theOppositeSignOnly; }
0127 
0128   /**
0129    * Return the matchers for a pair of particles to cut on. 
0130    * Only a pair of particles, matching these objects, will be affected.
0131    */
0132   Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
0133   Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
0134 
0135 protected:
0136 
0137    /**
0138    * Return the family of the given PDG id number.
0139    */
0140   int family(long id) const;
0141 
0142 public:
0143 
0144   /** @name Functions used by the persistent I/O system. */
0145   //@{
0146   /**
0147    * Function used to write out object persistently.
0148    * @param os the persistent output stream written to.
0149    */
0150   void persistentOutput(PersistentOStream & os) const;
0151 
0152   /**
0153    * Function used to read in object persistently.
0154    * @param is the persistent input stream read from.
0155    * @param version the version number of the object when written.
0156    */
0157   void persistentInput(PersistentIStream & is, int version);
0158   //@}
0159 
0160   /**
0161    * The standard Init function used to initialize the interfaces.
0162    * Called exactly once for each class by the class description system
0163    * before the main function starts or
0164    * when this class is dynamically loaded.
0165    */
0166   static void Init();
0167 
0168 protected:
0169 
0170   /** @name Clone Methods. */
0171   //@{
0172   /**
0173    * Make a simple clone of this object.
0174    * @return a pointer to the new object.
0175    */
0176   virtual IBPtr clone() const;
0177 
0178   /** Make a clone of this object, possibly modifying the cloned object
0179    * to make it sane.
0180    * @return a pointer to the new object.
0181    */
0182   virtual IBPtr fullclone() const;
0183   //@}
0184 
0185 private:
0186 
0187   /**
0188    * The minimal allowed pT cut value
0189    */
0190   Energy theMinPt;
0191 
0192   /**
0193    * The maximal allowed pT cut value
0194    */
0195   Energy theMaxPt;
0196 
0197   /**
0198    * Whether the cut is active on same-flavour fermions only 
0199    * (ignored for pairs not consisting of two fermions)
0200    */
0201   bool theSameFlavourOnly;
0202 
0203   /**
0204    * Whether the cut is active on opposite-sign fermions only
0205    * (ignored for pairs not consisting of two fermions)
0206    */
0207   bool theOppositeSignOnly;
0208 
0209   /**
0210    * Matchers for a pair of particles to cut on. Only a pair
0211    * of particles, matching these objects, will be affected.
0212    */
0213   Ptr<MatcherBase>::ptr theFirstMatcher;
0214   Ptr<MatcherBase>::ptr theSecondMatcher;
0215 
0216 private:
0217 
0218   /**
0219    * The assignment operator is private and must never be called.
0220    * In fact, it should not even be implemented.
0221    */
0222   PairPtCut & operator=(const PairPtCut &) = delete;
0223 
0224 };
0225 
0226 }
0227 
0228 #endif /* Herwig_PairPtCut_H */
0229