Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef THEPEG_KTRapidityCut_H
0003 #define THEPEG_KTRapidityCut_H
0004 //
0005 // This is the declaration of the KTRapidityCut class.
0006 //
0007 
0008 #include "ThePEG/Cuts/OneCutBase.h"
0009 
0010 namespace ThePEG {
0011 
0012 /**
0013  * The KTRapidityCut class is a simple concrete sub-class of OneCutbase simply
0014  * requiring a minimum transverse momentum of any outgoing
0015  * particle. It is also possible to require a minimum and maximum
0016  * rapidity. Optionally the restrictions only apply to particles
0017  * matching a specific matcher object.
0018  *
0019  * @see \ref KTRapidityCutInterfaces "The interfaces"
0020  * defined for KTRapidityCut.
0021  * @see SimpleKtCut
0022  */
0023 class KTRapidityCut: public OneCutBase {
0024 
0025 public:
0026 
0027   /**
0028    * The default constructor.
0029    */
0030   KTRapidityCut(Energy minKT=10*GeV) 
0031     : theMinKT(minKT), theMaxKT(Constants::MaxEnergy),
0032       theMinRapidity(-Constants::MaxRapidity),
0033       theMaxRapidity(Constants::MaxRapidity) {}
0034 
0035 public:
0036 
0037   /** @name Overwritten virtual functions defined in the base class. */
0038   //@{
0039   /**
0040    * Return the minimum allowed value of the transverse momentum of an
0041    * outgoing parton.
0042    */
0043   virtual Energy minKT(tcPDPtr p) const;
0044 
0045   /**
0046    * Return the minimum allowed pseudo-rapidity of an outgoing parton
0047    * of the given type. The pseudo-rapidity is measured in the lab
0048    * system.
0049    */
0050   virtual double minEta(tcPDPtr p) const;
0051 
0052   /**
0053    * Return the maximum allowed pseudo-rapidity of an outgoing parton
0054    * of the given type. The pseudo-rapidity is measured in the lab
0055    * system.
0056    */
0057   virtual double maxEta(tcPDPtr p) const;
0058 
0059   /**
0060    * Return true if a particle with type \a ptype and momentum \a p
0061    * passes the cuts. The \a parent contains information about the
0062    * kinematics of the hard sub-process.
0063    */
0064   virtual bool passCuts(tcCutsPtr parent,
0065             tcPDPtr ptype, LorentzMomentum p) const;
0066   //@}
0067 
0068   /**
0069    * Describe the currently active cuts in the log file.
0070    */
0071   virtual void describe() const;
0072 
0073 public:
0074 
0075   /** @name Functions used by the persistent I/O system. */
0076   //@{
0077   /**
0078    * Function used to write out object persistently.
0079    * @param os the persistent output stream written to.
0080    */
0081   void persistentOutput(PersistentOStream & os) const;
0082 
0083   /**
0084    * Function used to read in object persistently.
0085    * @param is the persistent input stream read from.
0086    * @param version the version number of the object when written.
0087    */
0088   void persistentInput(PersistentIStream & is, int version);
0089   //@}
0090 
0091   /**
0092    * The standard Init function used to initialize the interfaces.
0093    * Called exactly once for each class by the class description system
0094    * before the main function starts or
0095    * when this class is dynamically loaded.
0096    */
0097   static void Init();
0098 
0099 protected:
0100 
0101   /** @name Clone Methods. */
0102   //@{
0103   /**
0104    * Make a simple clone of this object.
0105    * @return a pointer to the new object.
0106    */
0107   virtual IBPtr clone() const;
0108 
0109   /** Make a clone of this object, possibly modifying the cloned object
0110    * to make it sane.
0111    * @return a pointer to the new object.
0112    */
0113   virtual IBPtr fullclone() const;
0114   //@}
0115 
0116 private:
0117 
0118   /**
0119    * Helper function used by the interface.
0120    */
0121   Energy maxKTMin() const;
0122 
0123   /**
0124    * Helper function used by the interface.
0125    */
0126   Energy minKTMax() const;
0127 
0128   /**
0129    * Helper function used by the interface.
0130    */
0131   double maxRapidityMin() const;
0132 
0133   /**
0134    * Helper function used by the interface.
0135    */
0136   double minRapidityMax() const;
0137 
0138   /**
0139    * Return the minimum allowed rapidity of an outgoing parton
0140    * of the given type. The rapidity is measured in the lab
0141    * system.
0142    */
0143   virtual double minRapidityMax(tcPDPtr p) const;
0144 
0145   /**
0146    * Return the maximum allowed rapidity of an outgoing parton
0147    * of the given type. The rapidity is measured in the lab
0148    * system.
0149    */
0150   virtual double maxRapidityMin(tcPDPtr p) const;
0151 
0152 private:
0153 
0154   /**
0155    * The minimum allowed value of the transverse momentum of an
0156    * outgoing parton.
0157    */
0158   Energy theMinKT;
0159 
0160   /**
0161    * The maximum allowed value of the transverse momentum of an
0162    * outgoing parton.
0163    */
0164   Energy theMaxKT;
0165 
0166   /**
0167    * The minimum allowed rapidity of an outgoing parton. The
0168    * rapidity is measured in the lab system.
0169    */
0170   double theMinRapidity;
0171 
0172   /**
0173    * The maximum allowed rapidity of an outgoing parton. The
0174    * rapidity is measured in the lab system.
0175    */
0176   double theMaxRapidity;
0177 
0178   /**
0179    * If non-null only particles matching this object will be affected
0180    * by this cut.
0181    */
0182   PMPtr theMatcher;
0183 
0184 private:
0185 
0186   /**
0187    * The static object used to initialize the description of this class.
0188    * Indicates that this is a concrete class with persistent data.
0189    */
0190   static ClassDescription<KTRapidityCut> initKTRapidityCut;
0191 
0192   /**
0193    * The assignment operator is private and must never be called.
0194    * In fact, it should not even be implemented.
0195    */
0196   KTRapidityCut & operator=(const KTRapidityCut &) = delete;
0197 
0198 };
0199 
0200 }
0201 
0202 #include "ThePEG/Utilities/ClassTraits.h"
0203 
0204 namespace ThePEG {
0205 
0206 /** @cond TRAITSPECIALIZATIONS */
0207 
0208 /** This template specialization informs ThePEG about the
0209  *  base classes of KTRapidityCut. */
0210 template <>
0211 struct BaseClassTrait<KTRapidityCut,1> {
0212   /** Typedef of the first base class of KTRapidityCut. */
0213   typedef OneCutBase NthBase;
0214 };
0215 
0216 /** This template specialization informs ThePEG about the name of
0217  *  the KTRapidityCut class and the shared object where it is defined. */
0218 template <>
0219 struct ClassTraits<KTRapidityCut>
0220   : public ClassTraitsBase<KTRapidityCut> {
0221   /** Return a platform-independent class name */
0222   static string className() { return "ThePEG::KTRapidityCut"; }
0223   /**
0224    * The name of a file containing the dynamic library where the class
0225    * KTRapidityCut is implemented. It may also include several, space-separated,
0226    * libraries if the class KTRapidityCut depends on other classes (base classes
0227    * excepted). In this case the listed libraries will be dynamically
0228    * linked in the order they are specified.
0229    */
0230   static string library() { return "KTRapidityCut.so"; }
0231 };
0232 
0233 /** @endcond */
0234 
0235 }
0236 
0237 #endif /* THEPEG_KTRapidityCut_H */