|
|
|||
File indexing completed on 2026-08-06 09:24:11
0001 // -*- C++ -*- 0002 // 0003 // IdentifiedParticleCut.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_IdentifiedParticleCut_H 0010 #define Herwig_IdentifiedParticleCut_H 0011 // 0012 // This is the declaration of the IdentifiedParticleCut class. 0013 // 0014 0015 #include "ThePEG/Cuts/OneCutBase.h" 0016 #include "ThePEG/PDT/MatcherBase.h" 0017 0018 namespace Herwig { 0019 0020 using namespace ThePEG; 0021 0022 /** 0023 * \ingroup Matchbox 0024 * \author Simon Platzer 0025 * 0026 * \brief IdentifiedParticleCut implements cuts on single momenta. 0027 * 0028 * @see \ref IdentifiedParticleCutInterfaces "The interfaces" 0029 * defined for IdentifiedParticleCut. 0030 */ 0031 class IdentifiedParticleCut: public OneCutBase { 0032 0033 public: 0034 0035 /** 0036 * The default constructor. 0037 */ 0038 IdentifiedParticleCut(); 0039 0040 public: 0041 0042 /** @name Virtual functions to be overridden by sub-classes. */ 0043 //@{ 0044 /** 0045 * Return the minimum allowed value of the transverse momentum of an 0046 * outgoing parton. 0047 */ 0048 virtual Energy minKT(tcPDPtr) const { return ZERO; } 0049 0050 /** 0051 * Return the minimum allowed pseudo-rapidity of an outgoing parton 0052 * of the given type. The pseudo-rapidity is measured in the lab 0053 * system. 0054 */ 0055 virtual double minEta(tcPDPtr) const { return -Constants::MaxRapidity; } 0056 0057 /** 0058 * Return the maximum allowed pseudo-rapidity of an outgoing parton 0059 * of the given type. The pseudo-rapidity is measured in the lab 0060 * system. 0061 */ 0062 virtual double maxEta(tcPDPtr) const { return Constants::MaxRapidity; } 0063 0064 /** 0065 * Return true if a particle with type \a ptype and momentum \a p 0066 * passes the cuts. The \a parent contains information about the 0067 * kinematics of the hard sub-process. 0068 */ 0069 virtual bool passCuts(tcCutsPtr parent, 0070 tcPDPtr ptype, LorentzMomentum p) const; 0071 0072 /** 0073 * Describe the currently active cuts in the log file. 0074 */ 0075 virtual void describe() const; 0076 //@} 0077 0078 public: 0079 0080 /** 0081 * Return the minimum pt. 0082 */ 0083 Energy ptMin() const { return thePtMin; } 0084 0085 /** 0086 * Return the maximum pt. 0087 */ 0088 Energy ptMax() const { return thePtMax; } 0089 0090 /** 0091 * Return the rapidity ranges. 0092 */ 0093 const vector<pair<double,double> >& yRanges() const { return theYRanges; } 0094 0095 /** 0096 * Return the matcher for particles to cut on. 0097 */ 0098 Ptr<MatcherBase>::tptr matcher() const { return theMatcher; } 0099 0100 public: 0101 0102 /** @name Functions used by the persistent I/O system. */ 0103 //@{ 0104 /** 0105 * Function used to write out object persistently. 0106 * @param os the persistent output stream written to. 0107 */ 0108 void persistentOutput(PersistentOStream & os) const; 0109 0110 /** 0111 * Function used to read in object persistently. 0112 * @param is the persistent input stream read from. 0113 * @param version the version number of the object when written. 0114 */ 0115 void persistentInput(PersistentIStream & is, int version); 0116 //@} 0117 0118 /** 0119 * The standard Init function used to initialize the interfaces. 0120 * Called exactly once for each class by the class description system 0121 * before the main function starts or 0122 * when this class is dynamically loaded. 0123 */ 0124 static void Init(); 0125 0126 protected: 0127 0128 /** @name Clone Methods. */ 0129 //@{ 0130 /** 0131 * Make a simple clone of this object. 0132 * @return a pointer to the new object. 0133 */ 0134 virtual IBPtr clone() const; 0135 0136 /** Make a clone of this object, possibly modifying the cloned object 0137 * to make it sane. 0138 * @return a pointer to the new object. 0139 */ 0140 virtual IBPtr fullclone() const; 0141 //@} 0142 0143 0144 // If needed, insert declarations of virtual function defined in the 0145 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0146 0147 private: 0148 0149 /** 0150 * Command to insert a rapidity range 0151 */ 0152 string doYRange(string); 0153 0154 /** 0155 * The minimum pt. 0156 */ 0157 Energy thePtMin; 0158 0159 /** 0160 * The maximum pt. 0161 */ 0162 Energy thePtMax; 0163 0164 /** 0165 * The rapidity ranges. 0166 */ 0167 vector<pair<double,double> > theYRanges; 0168 0169 /** 0170 * A matcher for particles to cut on. 0171 */ 0172 Ptr<MatcherBase>::ptr theMatcher; 0173 0174 private: 0175 0176 /** 0177 * The assignment operator is private and must never be called. 0178 * In fact, it should not even be implemented. 0179 */ 0180 IdentifiedParticleCut & operator=(const IdentifiedParticleCut &) = delete; 0181 0182 }; 0183 0184 } 0185 0186 #endif /* Herwig_IdentifiedParticleCut_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|