thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
PartonBinInstance.h
1// -*- C++ -*-
2//
3// PartonBinInstance.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_PartonBinInstance_H
10#define THEPEG_PartonBinInstance_H
11// This is the declaration of the PartonBinInstance class.
12
14#include "ThePEG/PDF/PartonBin.h"
15
16namespace ThePEG {
17
20typedef pair<PBIPtr,PBIPtr> PBIPair;
21
23
29
30public:
31
38
43
48
54
73
83
85
86public:
87
93 tcPBPtr bin() const { return theBin; }
94
99 const PartonVector & bins() const { return theBins; }
100
104 tcPDPtr particleData() const { return bin()->particle(); }
105
109 tcPDPtr partonData() const { return bin()->parton(); }
110
116 tPBIPtr incoming() const { return theIncoming; }
117
123
128 tcPDFPtr pdf() const { return bin()->pdf(); }
129
133 tcRemHPtr remnantHandler() const { return bin()->remnantHandler(); }
134
139 bool hasPoleIn1() const;
141
147 void reset(double lx = 0, Energy2 Q2 = ZERO);
148
152 void prepare();
153
157 void generate(const double * r);
158
162 double jacobian() const { return theJacobian; }
163
167 void jacobian(double j) { theJacobian = j; }
169
175 tPPtr particle() const { return theParticle; }
176
180 void particle(tPPtr p) { theParticle = p; }
181
185 tPPtr parton() const { return theParton; }
186
190 void parton(tPPtr p) { theParton = p; }
191
196 const PVector & partons() const { return thePartons; }
197
202 double xi() const {
203 if ( theXi < 0.0 ) theXi = exp(-li());
204 return theXi;
205 }
206
207
212 double eps() const {
213 if ( theEps < 0.0 ) theEps = Math::exp1m(-li());
214 return theEps;
215 }
216
221 double li() const { return theLi; }
222
227 void li(double lx) {
228 theLi = lx;
229 theXi = theEps = -1.0;
230 }
231
232
237 double x() const {
238 if ( theX < 0.0 ) theX = exp(-l());
239 return theX;
240 }
241
242
247 double l() const { return theL; }
248
253 void l(double lx) {
254 theL = lx;
255 theX = -1.0;
256 }
257
258
262 Energy2 scale() const { return theScale; }
263
264
268 void scale(Energy2 s) { theScale = s; }
269
273 const TransverseMomentum & kT() const { return theKT; }
274
278 double remnantWeight() const { return theRemnantWeight; }
279
283 void remnantWeight(double w) { theRemnantWeight = w; }
284
288 const PVector & remnants() const { return theRemnants; }
289
293 void remnants(const PVector & rems) { theRemnants = rems; }
294
300 tRemIPtr remnantInfo() const { return theRemInfo; }
301
307 void remnantInfo(tRemIPtr ri) { theRemInfo = ri; }
309
310public:
311
319
325 void persistentInput(PersistentIStream & is, int version);
327
331 static void Init();
332
333private:
334
338 cPBPtr theBin;
339
344 PartonVector theBins;
345
352
357
362
367
373
379 mutable double theXi;
385 mutable double theEps;
391 double theLi;
392
397 mutable double theX;
402 double theL;
403
408
413
418
423
430
431private:
432
437
442
443};
444
447class RemInfoBase: public Base {
448public:
450 virtual ~RemInfoBase() {}
451};
452
453}
454
455
456namespace ThePEG {
457
462template <>
463struct BaseClassTrait<PartonBinInstance,1>: public ClassTraitsType {
465 typedef Base NthBase;
466};
467
470template <>
471struct ClassTraits<PartonBinInstance>:
472 public ClassTraitsBase<PartonBinInstance> {
474 static string className() { return "ThePEG::PartonBinInstance"; }
475};
476
479}
480
481#endif /* THEPEG_PartonBinInstance_H */
#define ThePEG_DECLARE_CLASS_POINTERS(full, abbrev)
This macro helps us to declare pointers and stuff to standard classes.
Definition: Pointers.h:58
This is the main config header file for ThePEG.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
PartonBinInstance is used to store information about the generation of a given parton extraction for ...
void remnantInfo(tRemIPtr ri)
Set information saved by the remnant handler from the generation, to be used in the construction of t...
void reset(double lx=0, Energy2 Q2=ZERO)
Reset the current PartonBin, making room for a new event.
PartonVector theBins
Pointer to the main bin (and secondary in case several partons have been extracted this instance refe...
static void Init()
Standard Init function used to initialize the interfaces.
double xi() const
Get the momentum fraction of this parton w.r.t.
double theEps
The momentum fraction (xi, li=log(xi), eps=1-xi), of this parton w.r.t.
double jacobian() const
Get the jacobian associated with the phase space point generated.
virtual ~PartonBinInstance()
Destructor.
cPBPtr theBin
Pointer to the main bin this instance refer to.
tPBIPtr incoming() const
In the case the incoming particle in turn is extracted from another particle, return the PartonBinIns...
bool hasPoleIn1() const
Return true if the corresponding PDFs has a pole at $x=1$ for the current particle/parton combination...
double theJacobian
The jacobian associated with the phase space point generated.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void remnantWeight(double w)
Set the weight associated with the remnant generation.
PartonBinInstance(tcPBPtr, tPBIPtr=tPBIPtr())
Constructor taking a PartonBin as argument.
PBIPtr theIncoming
In the case the incoming particle in turn is extracted from another particle, this is the PartonBinIn...
const PVector & partons() const
The currently extracted partons (in case of multiple interactions.
static ClassDescription< PartonBinInstance > initPartonBinInstance
Describe a concrete class with persistent data.
PPtr theParton
The current parton instance.
tcPDFPtr pdf() const
The PDFBase object describing the momentum distribution of the parton within the particle in this Par...
const PVector & remnants() const
Get the current remnants.
Energy2 theScale
The scale at which the current parton was extracted.
double l() const
Get the logarithmic momentum fraction of this parton w.r.t.
void scale(Energy2 s)
Set the scale at which the current parton was extracted.
double theL
The momentum fraction (x, l=log(x)) of this parton w.r.t.
tcPBPtr bin() const
Return a pointer to the PartonBin this instance refer to.
TransverseMomentum theKT
The transverse momentum of the extracted parton.
void prepare()
Reset last generated l and Q2 values of this and parent bins.
double theXi
The momentum fraction (xi, li=log(xi), eps=1-xi), of this parton w.r.t.
double remnantWeight() const
Get the weight associated with the remnant generation.
tPPtr parton() const
Get the current parton instance.
tRemIPtr remnantInfo() const
Get information saved by the remnant handler from the generation, to be used in the construction of t...
void l(double lx)
Set the logarithmic momentum fraction of this parton w.r.t.
tcPDPtr partonData() const
Return a pointer to the data object of the extracted parton.
tcRemHPtr remnantHandler() const
The remnant handler associated with the pdf().
RemIPtr theRemInfo
The information saved by the remnant handler from the generation, to be used in the construction of t...
void jacobian(double j)
Set the jacobian associated with the phase space point generated.
void generate(const double *r)
Generate l and Q2 of this and parent bins.
void parton(tPPtr p)
Set the current parton instance.
void particle(tPPtr p)
Set the current particle instance.
tcPDPtr particleData() const
Return a pointer to the data object of the incoming particle.
tPPtr particle() const
Get the current particle instance.
PPtr theParticle
The current particle instance.
double theLi
The momentum fraction (xi, li=log(xi), eps=1-xi), of this parton w.r.t.
double theRemnantWeight
The weight associated with the remnant generation.
double eps() const
Get one minus the momentum fraction of this parton w.r.t.
PVector thePartons
The currently extracted partons (in case of multiple interactions.
PVector theRemnants
The current remnants.
void li(double lx)
Set the logarithmic momentum fraction of this parton w.r.t.
const TransverseMomentum & kT() const
Return the transverse momentum of the extracted parton.
double theX
The momentum fraction (x, l=log(x)) of this parton w.r.t.
Energy2 scale() const
Get the scale at which the current parton was extracted.
const PartonVector & bins() const
Return pointers to the bins this instance refer to in case more than one parton has been extracted.
double li() const
Get the logarithmic momentum fraction of this parton w.r.t.
PartonBinInstance(tPPtr parton, tcPBPtr pb, Energy2 scale=ZERO)
Constructor using an already prepared extracted parton.
PartonBinInstance(const PartonBinInstance &)
Copy-constructor.
PartonBinInstance(tPPtr particle, tPPtr parton, tcPBPtr pb, Energy2 scale=ZERO)
Constructor using a parton which is to be extracted from the given particle, but no mother-child rela...
PartonBinInstance()
Default constructor.
tPBIPtr getFirst()
Return the parton bin instance corresponding to the first incoming particle for this bin.
PartonBinInstance & operator=(const PartonBinInstance &)=delete
Private and non-existent assignment operator.
void remnants(const PVector &rems)
Set the current remnants.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double x() const
Get the momentum fraction of this parton w.r.t.
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
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Empty base class.
virtual ~RemInfoBase()
The descructor.
double exp1m(double x)
Return , with highest possible precision for .
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
ThePEG::Ptr< PartonBinInstance >::transient_pointer tPBIPtr
Alias for a transient pointer to PartonBinInstance .
pair< PBIPtr, PBIPtr > PBIPair
A pair of pointers to PartonBinInstance objects.
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
Define the base class from which all (polymorphic) classes in ThePEG are derived.
Definition: ThePEG.h:54
static string className()
Return the name of class T.
Definition: ClassTraits.h:66