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