thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
JetRegion.h
1// -*- C++ -*-
2//
3// JetRegion.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5// Copyright (C) 2009-2019 Simon Platzer
6//
7// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
8// Please respect the MCnet academic guidelines, see GUIDELINES for details.
9//
10#ifndef ThePEG_JetRegion_H
11#define ThePEG_JetRegion_H
12//
13// This is the declaration of the JetRegion class.
14//
15
16#include "ThePEG/Handlers/HandlerBase.h"
17#include "ThePEG/EventRecord/Particle.h"
18#include "ThePEG/Cuts/Cuts.h"
19
20namespace ThePEG {
21
32class JetRegion: public HandlerBase {
33
34public:
35
40
41public:
42
46 Energy ptMin() const { return thePtMin; }
47
51 Energy ptMax() const { return thePtMax; }
52
56 const vector<pair<double,double> >& yRanges() const { return theYRanges; }
57
63 const vector<int>& accepts() const { return theAccepts; }
64
68 bool fuzzy() const { return theFuzzy; }
69
73 double cutWeight() const { return theCutWeight; }
74
78 bool lessThanEnergy(Energy a, Energy b, double& weight) const;
79
83 bool lessThanRapidity(double a, double b, double& weight) const;
84
85public:
86
90 virtual void describe() const;
91
95 virtual bool matches(tcCutsPtr parent, int n, const LorentzMomentum& p,
96 double yHat = 0.0);
97
101 bool didMatch() { return theDidMatch; }
102
106 virtual void reset() { theDidMatch = false; }
107
111 int lastNumber() const { return theLastNumber; }
112
117
118public:
119
127
133 void persistentInput(PersistentIStream & is, int version);
135
142 static void Init();
143
144protected:
145
152 virtual IBPtr clone() const;
153
158 virtual IBPtr fullclone() const;
160
161
162// If needed, insert declarations of virtual function defined in the
163// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
164
165
166private:
167
171 string doYRange(string);
172
177
182
186 vector<pair<double,double> > theYRanges;
187
193 vector<int> theAccepts;
194
199
204
209
214
219
224
229
234 JetRegion & operator=(const JetRegion &) = delete;
235
236};
237
238}
239
240#endif /* ThePEG_JetRegion_H */
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
JetRegion implements the requirement of finding a jet inside a given range of transverse momenta,...
Definition: JetRegion.h:32
bool fuzzy() const
Return true, if this jet region is fuzzy.
Definition: JetRegion.h:68
bool didMatch()
Return true, if this region matched a jet in the last call to matches().
Definition: JetRegion.h:101
bool lessThanRapidity(double a, double b, double &weight) const
Perform a (potentially) fuzzy check on angular-type quantities.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
vector< int > theAccepts
The jets accepted by this region (with respect to the ordering imposed by the JetCuts object).
Definition: JetRegion.h:193
bool lessThanEnergy(Energy a, Energy b, double &weight) const
Perform a (potentially) fuzzy check on energy-type quantities.
JetRegion & operator=(const JetRegion &)=delete
The assignment operator is private and must never be called.
Energy ptMax() const
Return the maximum pt.
Definition: JetRegion.h:51
vector< pair< double, double > > theYRanges
The rapidity ranges.
Definition: JetRegion.h:186
bool theFuzzy
True if this region is fuzzy.
Definition: JetRegion.h:213
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual IBPtr clone() const
Make a simple clone of this object.
JetRegion()
The default constructor.
LorentzMomentum theLastMomentum
Return the momentum of the last jet matching this region.
Definition: JetRegion.h:208
virtual bool matches(tcCutsPtr parent, int n, const LorentzMomentum &p, double yHat=0.0)
Return true, if the given jet matches this region.
double theCutWeight
The cut weight encountered from the last call to matches()
Definition: JetRegion.h:218
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Energy theEnergyCutWidth
The smearing width for the pt or mass cuts, if fuzzy.
Definition: JetRegion.h:223
const vector< pair< double, double > > & yRanges() const
Return the rapidity ranges.
Definition: JetRegion.h:56
const vector< int > & accepts() const
Return the jets accepted by this region (with respect to the ordering imposed by the JetCuts object).
Definition: JetRegion.h:63
double cutWeight() const
Return the cut weight encountered from the last call to matches()
Definition: JetRegion.h:73
Energy ptMin() const
Return the minimum pt.
Definition: JetRegion.h:46
int lastNumber() const
Return the number of the last jet matching this region.
Definition: JetRegion.h:111
bool theDidMatch
True, if this region matched a jet in the last call to matches().
Definition: JetRegion.h:198
virtual void describe() const
Describe the currently active cuts in the log file.
Energy thePtMax
The maximum pt.
Definition: JetRegion.h:181
const LorentzMomentum & lastMomentum() const
Return the momentum of the last jet matching this region.
Definition: JetRegion.h:116
string doYRange(string)
Command to insert a rapidity range.
double theRapidityCutWidth
The smearing width for the rapidity cut, if fuzzy.
Definition: JetRegion.h:228
int theLastNumber
The number of the last jet matching this region.
Definition: JetRegion.h:203
virtual void reset()
Reset this region to act on a new event.
Definition: JetRegion.h:106
Energy thePtMin
The minimum pt.
Definition: JetRegion.h:176
static void Init()
The standard Init function used to initialize the interfaces.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28