ThePEG  1.8.0
MadGraphTwoCut.h
1 // -*- C++ -*-
2 //
3 // MadGraphTwoCut.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_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 CutType {
39  };
40 
44  enum PType {
45  JET,
46  LEP,
47  PHO,
48  BOT,
49  NOT
50  };
51 
55  enum PPType {
70  };
71 
72 public:
73 
80  : cutType(DELTAR), pairType(JETJET), theCut(0.0) {}
81 
88  MadGraphTwoCut(CutType t, PPType 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  PType 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 
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 */