ThePEG  1.8.0
SimpleKTCut.h
1 // -*- C++ -*-
2 //
3 // SimpleKTCut.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 &);
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.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
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:681
Energy theMinKT
The minimum allowed value of the transverse momentum of an outgoing parton.
Definition: SimpleKTCut.h:158
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
virtual double minEta(tcPDPtr p) const
Return the minimum allowed pseudo-rapidity of an outgoing parton of the given type.
static void Init()
The standard Init function used to initialize the interfaces.
SimpleKTCut & operator=(const SimpleKTCut &)
The assignment operator is private and must never be called.
double maxEtaMin() const
Helper function used by the interface.
QTY< 0, 1, 0 >::Type Energy
Energy.
Definition: Unitsystem.h:34
double theMaxEta
The maximum allowed pseudo-rapidity of an outgoing parton.
Definition: SimpleKTCut.h:176
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85
Energy maxKTMin() const
Helper function used by the interface.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
virtual void describe() const
Describe the currently active cuts in the log file.
Energy theMaxKT
The maximum allowed value of the transverse momentum of an outgoing parton.
Definition: SimpleKTCut.h:164
virtual ~SimpleKTCut()
The destructor.
virtual bool passCuts(tcCutsPtr parent, tcPDPtr ptype, LorentzMomentum p) const
Return true if a particle with type ptype and momentum p passes the cuts.
virtual Energy minKT(tcPDPtr p) const
Return the minimum allowed value of the transverse momentum of an outgoing parton.
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
double minEtaMax() const
Helper function used by the interface.
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
double theMinEta
The minimum allowed pseudo-rapidity of an outgoing parton.
Definition: SimpleKTCut.h:170
Energy minKTMax() const
Helper function used by the interface.
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
virtual IBPtr clone() const
Make a simple clone of this object.
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
virtual double maxEta(tcPDPtr p) const
Return the maximum allowed pseudo-rapidity of an outgoing parton of the given type.