herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
IdentifiedParticleCut.h
1// -*- C++ -*-
2//
3// IdentifiedParticleCut.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_IdentifiedParticleCut_H
10#define Herwig_IdentifiedParticleCut_H
11//
12// This is the declaration of the IdentifiedParticleCut class.
13//
14
15#include "ThePEG/Cuts/OneCutBase.h"
16#include "ThePEG/PDT/MatcherBase.h"
17
18namespace Herwig {
19
20using namespace ThePEG;
21
32
33public:
34
39
40public:
41
48 virtual Energy minKT(tcPDPtr) const { return ZERO; }
49
55 virtual double minEta(tcPDPtr) const { return -Constants::MaxRapidity; }
56
62 virtual double maxEta(tcPDPtr) const { return Constants::MaxRapidity; }
63
69 virtual bool passCuts(tcCutsPtr parent,
70 tcPDPtr ptype, LorentzMomentum p) const;
71
75 virtual void describe() const;
77
78public:
79
83 Energy ptMin() const { return thePtMin; }
84
88 Energy ptMax() const { return thePtMax; }
89
93 const vector<pair<double,double> >& yRanges() const { return theYRanges; }
94
98 Ptr<MatcherBase>::tptr matcher() const { return theMatcher; }
99
100public:
101
109
115 void persistentInput(PersistentIStream & is, int version);
117
124 static void Init();
125
126protected:
127
134 virtual IBPtr clone() const;
135
140 virtual IBPtr fullclone() const;
142
143
144// If needed, insert declarations of virtual function defined in the
145// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
146
147private:
148
152 string doYRange(string);
153
157 Energy thePtMin;
158
162 Energy thePtMax;
163
167 vector<pair<double,double> > theYRanges;
168
172 Ptr<MatcherBase>::ptr theMatcher;
173
174private:
175
181
182};
183
184}
185
186#endif /* Herwig_IdentifiedParticleCut_H */
IdentifiedParticleCut implements cuts on single momenta.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Energy ptMin() const
Return the minimum pt.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual double minEta(tcPDPtr) const
Return the minimum allowed pseudo-rapidity of an outgoing parton of the given type.
Energy ptMax() const
Return the maximum pt.
virtual void describe() const
Describe the currently active cuts in the log file.
Ptr< MatcherBase >::ptr theMatcher
A matcher for particles to cut on.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
IdentifiedParticleCut()
The default constructor.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual double maxEta(tcPDPtr) const
Return the maximum allowed pseudo-rapidity of an outgoing parton of the given type.
Ptr< MatcherBase >::tptr matcher() const
Return the matcher for particles to cut on.
virtual Energy minKT(tcPDPtr) const
Return the minimum allowed value of the transverse momentum of an outgoing parton.
static void Init()
The standard Init function used to initialize the interfaces.
const vector< pair< double, double > > & yRanges() const
Return the rapidity ranges.
string doYRange(string)
Command to insert a rapidity range.
vector< pair< double, double > > theYRanges
The rapidity ranges.
virtual bool passCuts(tcCutsPtr parent, tcPDPtr ptype, LorentzMomentum p) const
Return true if a particle with type ptype and momentum p passes the cuts.
IdentifiedParticleCut & operator=(const IdentifiedParticleCut &)=delete
The assignment operator is private and must never be called.
-*- C++ -*-
constexpr double MaxRapidity
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr ZeroUnit ZERO
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr