herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
PairRapidityCut.h
1 // -*- C++ -*-
2 //
3 // PairRapidityCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2019 The Herwig Collaboration
5 //
6 // Herwig 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 Herwig_PairRapidityCut_H
10 #define Herwig_PairRapidityCut_H
11 //
12 // This is the declaration of the PairRapidityCut class.
13 //
14 
15 #include "ThePEG/Cuts/TwoCutBase.h"
16 #include "ThePEG/PDT/MatcherBase.h"
17 
18 namespace Herwig {
19 
20 using namespace ThePEG;
21 
31 class PairRapidityCut: public TwoCutBase {
32 
33 public:
34 
41 
45  virtual ~PairRapidityCut();
47 
48 public:
49 
58  virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
59  LorentzMomentum pi, LorentzMomentum pj,
60  bool inci = false, bool incj = false) const;
61 
66  virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
67 
73  virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
74 
80  virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
81 
92  virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
93 
100  virtual double minDurham(tcPDPtr , tcPDPtr ) const { return ZERO; }
101 
103 
107  virtual void describe() const;
108 
109 public:
110 
111 // /**
112 // * Return the minimal allowed rapidity
113 // */
114 // double minRapidity() const { return theMinRapidity; }
115 //
116 // /**
117 // * Return the maximal allowed rapidity
118 // */
119 // double maxRapidity() const { return theMaxRapidity; }
120 
124  const vector<pair<double,double> >& yRanges() const { return theYRanges; }
125 
129  bool sameFlavourOnly() const { return theSameFlavourOnly; }
130 
134  bool oppositeSignOnly() const { return theOppositeSignOnly; }
135 
140  Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
141  Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
142 
143 protected:
144 
148  int family(long id) const;
149 
150 public:
151 
158  void persistentOutput(PersistentOStream & os) const;
159 
165  void persistentInput(PersistentIStream & is, int version);
167 
174  static void Init();
175 
176 protected:
177 
184  virtual IBPtr clone() const;
185 
190  virtual IBPtr fullclone() const;
192 
193 private:
194 
198  string doYRange(string);
199 
203  vector<pair<double,double> > theYRanges;
204 
208  bool thePseudo;
209 
215 
221 
227  Ptr<MatcherBase>::ptr theSecondMatcher;
228 
229 private:
230 
235  PairRapidityCut & operator=(const PairRapidityCut &) = delete;
236 
237 };
238 
239 }
240 
241 #endif /* Herwig_PairRapidityCut_H */
242 
bool theSameFlavourOnly
Whether the cut is active on same-flavour fermions only (ignored for pairs not consisting of two ferm...
transient_pointer tptr
virtual double minDurham(tcPDPtr, tcPDPtr) const
Return the minimum allowed value of the Durham -algorithms distance measure.
virtual Energy minKTClus(tcPDPtr, tcPDPtr) const
Return the minimum allowed value of the longitudinally invariant -algorithms distance measure...
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr double pi
Ptr< MatcherBase >::ptr theFirstMatcher
Matchers for a pair of particles to cut on.
This class implements a cut on the rapidity of a pair of particles.
bool oppositeSignOnly() const
Return whether cut acts on opposite-sign fermions only.
bool sameFlavourOnly() const
Return whether cut acts on same-flavour fermions only.
virtual double minDeltaR(tcPDPtr, tcPDPtr) const
Return the minimum allowed value of of two outgoing partons of type pi and pj.
Ptr< MatcherBase >::tptr firstMatcher() const
Return the matchers for a pair of particles to cut on.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
bool theOppositeSignOnly
Whether the cut is active on opposite-sign fermions only (ignored for pairs not consisting of two fer...
bool thePseudo
Whether to use pseudo rapidity instead of rapidity.
virtual Energy2 minTij(tcPDPtr, tcPDPtr) const
Return the minimum allowed value of the negative of the squared invariant mass of an incoming parton ...
vector< pair< double, double > > theYRanges
The rapidity ranges.
virtual Energy2 minSij(tcPDPtr, tcPDPtr) const
Return the minimum allowed squared invariant mass of two outgoing partons of type pi and pj...
const vector< pair< double, double > > & yRanges() const
Return the minimal allowed rapidity.
-*- C++ -*-
constexpr ZeroUnit ZERO