thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
MadGraphTwoCut.h
1 // -*- C++ -*-
2 //
3 // MadGraphTwoCut.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_MadGraphTwoCut_H
10 #define THEPEG_MadGraphTwoCut_H
11 //
12 // This is the declaration of the MadGraphTwoCut class.
13 //
14 
15 #include "ThePEG/Cuts/TwoCutBase.h"
16 
17 namespace ThePEG {
18 
28 class MadGraphTwoCut: public TwoCutBase {
29 
30 public:
31 
35  enum class Cut {
36  INVMASS,
37  DELTAR
39  };
40 
44  enum class P {
45  JET,
46  LEP,
47  PHO,
48  BOT,
49  NOT
50  };
51 
55  enum class PP {
56  JETJET,
57  LEPLEP,
59  PHOPHO,
60  BOTBOT,
61  BOTJET,
63  PHOJET,
65  JETLEP,
67  PHOBOT,
68  BOTLEP,
69  PHOLEP
70  };
71 
72 public:
73 
80  : cutType(Cut::DELTAR), pairType(PP::JETJET), theCut(0.0) {}
81 
88  MadGraphTwoCut(Cut t, PP p, double c)
89  : cutType(t), pairType(p), theCut(c) {}
90 
92 
93 public:
94 
101  virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const;
102 
108  virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const;
109 
115  virtual double minDeltaR(tcPDPtr pi, tcPDPtr pj) const;
116 
127  virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const;
128 
135  virtual double minDurham(tcPDPtr pi, tcPDPtr pj) const;
136 
143  virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
145  bool inci = false, bool incj = false) const;
147 
148 protected:
149 
154  bool checkType(tcPDPtr pi, tcPDPtr pj) const;
155 
159  P getType(tcPDPtr p) const;
160 
161 public:
162 
169  void persistentOutput(PersistentOStream & os) const;
170 
176  void persistentInput(PersistentIStream & is, int version);
178 
185  static void Init();
186 
187 protected:
188 
195  virtual IBPtr clone() const;
196 
201  virtual IBPtr fullclone() const;
203 
204 private:
205 
210 
215 
219  double theCut;
220 
221 private:
222 
228 
233  MadGraphTwoCut & operator=(const MadGraphTwoCut &) = delete;
234 
235 };
236 
237 }
238 
239 #include "ThePEG/Utilities/ClassTraits.h"
240 
241 namespace ThePEG {
242 
247 template <>
248 struct BaseClassTrait<MadGraphTwoCut,1> {
250  typedef TwoCutBase NthBase;
251 };
252 
255 template <>
256 struct ClassTraits<MadGraphTwoCut>
257  : public ClassTraitsBase<MadGraphTwoCut> {
259  static string className() { return "ThePEG::MadGraphTwoCut"; }
263  static string library() { return "MadGraphReader.so"; }
264 };
265 
268 }
269 
270 #endif /* THEPEG_MadGraphTwoCut_H */
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
MadGraphTwoCut & operator=(const MadGraphTwoCut &)=delete
The assignment operator is private and must never be called.
static ClassDescription< MadGraphTwoCut > initMadGraphTwoCut
The static object used to initialize the description of this class.
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...
Cut cutType
The type of this cut.
MadGraphTwoCut(Cut t, PP p, double c)
The constructor used by the MadGraphReader.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const
Return the minimum allowed value of the longitudinally invariant -algorithms distance measure...
static void Init()
The standard Init function used to initialize the interfaces.
double theCut
The value of the cut to be applied.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
MadGraphTwoCut()
The default constructor.
Cut
Enumerate the different kinds of cuts made by MadGraph.
Objects of the MadGraphTwoCut class can be created automatically by the MadGraphReader class when sca...
virtual double minDeltaR(tcPDPtr pi, tcPDPtr pj) const
Return the minimum allowed value of of two outgoing partons of type pi and pj.
This class corresponds to a kinematical cut to be made on a pair of particles in a hard sub-process...
Definition: TwoCutBase.h:35
virtual IBPtr clone() const
Make a simple clone of this object.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
PP
Enumerate the types of particles pairs the cut is made on.
The minimum invariant mass of two particles.
bool checkType(tcPDPtr pi, tcPDPtr pj) const
Returns true if cut should be applied to pair of particles of type pi and pj.
PP pairType
The type of particle pairs this cut applies to.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const
Return the minimum allowed squared invariant mass of two outgoing partons of type pi and pj...
P getType(tcPDPtr p) const
Get the type of particle p.
virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype, LorentzMomentum pi, LorentzMomentum pj, bool inci=false, bool incj=false) const
Return true if a pair of particles with type pitype and pjtype and momenta pi and pj respectively pas...
virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const
Return the minimum allowed value of the negative of the squared invariant mass of an incoming parton ...
virtual double minDurham(tcPDPtr pi, tcPDPtr pj) const
Return the minimum allowed value of the Durham -algorithms distance measure.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
P
Enumerate the types of particles the cut is made on.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
The minimum pseudo-rapidity–azimuth-angle distance between two particles.