thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
SimpleKTCut.h
1 // -*- C++ -*-
2 //
3 // SimpleKTCut.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef THEPEG_SimpleKTCut_H
10 #define THEPEG_SimpleKTCut_H
11 //
12 // This is the declaration of the SimpleKTCut class.
13 //
14 
15 #include "ThePEG/Cuts/OneCutBase.h"
16 
17 namespace ThePEG {
18 
29 class SimpleKTCut: public OneCutBase {
30 
31 public:
32 
39  : theMinKT(minKT), theMaxKT(Constants::MaxEnergy),
40  theMinEta(-Constants::MaxRapidity),
41  theMaxEta(Constants::MaxRapidity) {}
42 
46  virtual ~SimpleKTCut();
48 
49 public:
50 
57  virtual Energy minKT(tcPDPtr p) const;
58 
64  virtual double minEta(tcPDPtr p) const;
65 
71  virtual double maxEta(tcPDPtr p) const;
72 
78  virtual bool passCuts(tcCutsPtr parent,
79  tcPDPtr ptype, LorentzMomentum p) const;
81 
85  virtual void describe() const;
86 
87 public:
88 
95  void persistentOutput(PersistentOStream & os) const;
96 
102  void persistentInput(PersistentIStream & is, int version);
104 
111  static void Init();
112 
113 protected:
114 
121  virtual IBPtr clone() const;
122 
127  virtual IBPtr fullclone() const;
129 
130 private:
131 
135  Energy maxKTMin() const;
136 
140  Energy minKTMax() const;
141 
145  double maxEtaMin() const;
146 
150  double minEtaMax() const;
151 
152 private:
153 
159 
165 
170  double theMinEta;
171 
176  double theMaxEta;
177 
183 
184 private:
185 
191 
196  SimpleKTCut & operator=(const SimpleKTCut &) = delete;
197 
198 };
199 
200 }
201 
202 #include "ThePEG/Utilities/ClassTraits.h"
203 
204 namespace ThePEG {
205 
210 template <>
211 struct BaseClassTrait<SimpleKTCut,1> {
213  typedef OneCutBase NthBase;
214 };
215 
218 template <>
219 struct ClassTraits<SimpleKTCut>
220  : public ClassTraitsBase<SimpleKTCut> {
222  static string className() { return "ThePEG::SimpleKTCut"; }
226  static string library() { return "SimpleKTCut.so"; }
227 };
228 
231 }
232 
233 #endif /* THEPEG_SimpleKTCut_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual double maxEta(tcPDPtr p) const
Return the maximum allowed pseudo-rapidity of an outgoing parton of the given type.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
virtual IBPtr clone() const
Make a simple clone of this object.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
Energy theMinKT
The minimum allowed value of the transverse momentum of an outgoing parton.
Definition: SimpleKTCut.h:158
Energy maxKTMin() const
Helper function used by the interface.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
static void Init()
The standard Init function used to initialize the interfaces.
double minEtaMax() const
Helper function used by the interface.
SimpleKTCut & operator=(const SimpleKTCut &)=delete
The assignment operator is private and must never be called.
double theMaxEta
The maximum allowed pseudo-rapidity of an outgoing parton.
Definition: SimpleKTCut.h:176
double maxEtaMin() const
Helper function used by the interface.
virtual void describe() const
Describe the currently active cuts in the log file.
virtual double minEta(tcPDPtr p) const
Return the minimum allowed pseudo-rapidity of an outgoing parton of the given type.
virtual Energy minKT(tcPDPtr p) const
Return the minimum allowed value of the transverse momentum of an outgoing parton.
virtual bool passCuts(tcCutsPtr parent, tcPDPtr ptype, LorentzMomentum p) const
Return true if a particle with type ptype and momentum p passes the cuts.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
Energy theMaxKT
The maximum allowed value of the transverse momentum of an outgoing parton.
Definition: SimpleKTCut.h:164
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
virtual ~SimpleKTCut()
The destructor.
double theMinEta
The minimum allowed pseudo-rapidity of an outgoing parton.
Definition: SimpleKTCut.h:170
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
This is a very simple concrete sub-class of OneCutbase simply requiring a minimum transverse momentum...
Definition: SimpleKTCut.h:29
PMPtr theMatcher
If non-null only particles matching this object will be affected by this cut.
Definition: SimpleKTCut.h:182
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
Energy minKTMax() const
Helper function used by the interface.
This class corresponds to a kinematical cut to be made on a single outgoing parton from a hard sub-pr...
Definition: OneCutBase.h:39
SimpleKTCut(Energy minKT=10 *GeV)
The default constructor.
Definition: SimpleKTCut.h:38
static ClassDescription< SimpleKTCut > initSimpleKTCut
The static object used to initialize the description of this class.
Definition: SimpleKTCut.h:190
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52