thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
PDF
PartonExtractor.h
1
// -*- C++ -*-
2
//
3
// PartonExtractor.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_PartonExtractor_H
10
#define ThePEG_PartonExtractor_H
11
// This is the declaration of the PartonExtractor class.
12
13
#include "ThePEG/Handlers/HandlerBase.h"
14
#include "ThePEG/Handlers/LastXCombInfo.h"
15
#include "ThePEG/PDF/PartonBin.h"
16
#include "ThePEG/PDF/PartonBinInstance.h"
17
#include "ThePEG/PDF/PDFBase.h"
18
#include "ThePEG/PDT/ParticleData.h"
19
#include "PartonExtractor.xh"
20
21
namespace
ThePEG
{
22
44
class
PartonExtractor
:
public
HandlerBase
,
public
LastXCombInfo
<> {
45
47
friend
class
XComb
;
48
49
public
:
50
52
typedef
map<cPPtr,PBIPtr>
PartonBinInstanceMap
;
53
54
public
:
55
61
PartonExtractor
();
62
66
virtual
~PartonExtractor
();
68
69
public
:
70
77
virtual
bool
canHandle
(
const
cPDPair
&) {
return
true
; }
78
84
virtual
PartonPairVec
getPartons
(
Energy
maxEnergy,
const
cPDPair
&,
85
const
Cuts
&)
const
;
86
92
virtual
Energy2
newScale
();
93
98
virtual
void
colourConnect
(
tPPtr
particle,
tPPtr
parton,
99
const
tPVector
& remnants)
const
;
100
108
virtual
PBIPair
newRemnants
(
tPPair
oldp,
tPPair
newp,
tStepPtr
step);
109
114
virtual
pair<int,int>
nDims
(
const
PBPair & pbins);
115
120
virtual
void
prepare
(
const
PBIPair
& pbins);
121
125
virtual
void
updatePartonBinInstances
(
const
PBIPair
& pbins);
126
130
virtual
bool
generateL
(
const
PBIPair
& pbins,
131
const
double
* r1,
const
double
* r2);
132
138
virtual
void
generateL
(
PartonBinInstance
& pb,
const
double
* r);
139
144
virtual
Energy2
generateSHat
(
Energy2
s,
const
PBIPair
& pbins,
145
const
double
* r1,
const
double
* r2,
146
bool
mepartons =
false
);
147
154
virtual
double
fullFn
(
const
PBIPair
& pbins,
Energy2
scale,
155
pair<bool,bool> noLastPDF = make_pair(
false
,
false
));
156
160
virtual
void
construct
(
const
PBIPair
& pbins,
tStepPtr
step)
const
;
161
169
virtual
void
constructRemnants
(
const
PBIPair
& pbins,
tSubProPtr
sub,
170
tStepPtr
step)
const
;
171
184
virtual
LorentzRotation
185
boostRemnants
(
PBIPair
& bins,
LorentzMomentum
k1,
LorentzMomentum
k2,
186
bool
side1,
bool
side2)
const
;
188
195
tPBIPtr
partonBinInstance
(
tcPPtr
)
const
;
196
200
void
select
(
tXCombPtr
newXComb);
201
203
208
int
maxTries
()
const
{
return
theMaxTries
; }
209
217
tcPDFPtr
getPDF
(
tcPDPtr
particle)
const
;
218
219
protected
:
220
224
238
virtual
bool
generate
(
PartonBinInstance
& pb,
const
double
* r,
239
Energy2
shat,
const
Lorentz5Momentum
& first,
240
bool
haveMEPartons =
false
);
241
245
virtual
double
fullFn
(
const
PartonBinInstance
& pb,
246
bool
noLastPDF =
false
);
247
253
virtual
void
construct
(
PartonBinInstance
& pb,
254
tStepPtr
step,
bool
boost =
true
)
const
;
255
260
PBIPtr
newRemnants
(
tPBIPtr
oldpb,
tPPtr
newp,
const
LorentzMomentum
& k);
261
265
void
addNewRemnants
(
tPBIPtr
oldpb,
tPBIPtr
newpb,
tStepPtr
step);
266
278
virtual
void
transformRemnants
(
LorentzMomentum
& Ph,
LorentzMomentum
& Pr,
279
const
LorentzMomentum
& k,
280
const
LorentzMomentum
& P)
const
;
281
293
virtual
void
294
constructRemnants
(
PartonBinInstance
& pb,
LorentzMomentum
& Ph,
295
const
LorentzMomentum
& k)
const
;
297
298
public
:
299
306
void
persistentOutput
(
PersistentOStream
& os)
const
;
307
313
void
persistentInput
(
PersistentIStream
& is,
int
version);
315
319
static
void
Init
();
320
321
protected
:
322
327
virtual
void
addPartons
(tPBPtr incoming ,
const
PDFCuts
& cuts,
328
tcPDFPtr
pdf
,PartonVector & pbins)
const
;
329
333
tcPDFPtr
noPDF
()
const
{
return
theNoPDF
; }
334
339
template
<
typename
Iterator>
340
void
findConnect
(
tColinePtr
line,
tPPtr
parton,
bool
anti,
341
Iterator first, Iterator last)
const
{
342
for
( ; first != last; ++first ) {
343
if
( *first != parton && (**first).hasColour(anti) &&
344
!(**first).colourLine(anti) ) {
345
line->addColoured(*first, anti);
346
return
;
347
}
348
}
349
throw
RemColException(*
this
);
350
}
351
352
protected
:
353
360
virtual
IBPtr
clone
()
const
;
361
366
virtual
IBPtr
fullclone
()
const
;
368
371
376
virtual
void
dofinish
();
378
379
private
:
380
384
PartonBinInstanceMap
&
partonBinInstances
()
const
{
385
assert(
lastXCombPtr
());
386
return
lastXCombPtr
()->partonBinInstanceMap();
387
}
388
392
vector<PDFPtr>
theSpecialDensities
;
393
397
PDFPtr
theFirstPDF
;
398
402
PDFPtr
theSecondPDF
;
403
407
PDFPtr
theNoPDF
;
408
413
int
theMaxTries
;
414
420
bool
flatSHatY
;
421
422
private
:
423
427
static
ClassDescription<PartonExtractor>
initPartonExtractor
;
428
432
PartonExtractor
&
operator=
(
const
PartonExtractor
&) =
delete
;
433
434
};
435
440
template
<>
441
struct
BaseClassTrait
<
PartonExtractor
,1>:
public
ClassTraitsType
{
443
typedef
HandlerBase
NthBase
;
444
};
445
448
template
<>
450
struct
ClassTraits<PartonExtractor>:
public
ClassTraitsBase<PartonExtractor> {
451
static
string
className
() {
return
"ThePEG::PartonExtractor"
; }
452
};
453
456
}
457
458
#endif
/* ThePEG_PartonExtractor_H */
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
ThePEG::Cuts
Cuts is a class for implementing kinematical cuts in ThePEG.
Definition:
Cuts.h:53
ThePEG::HandlerBase
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition:
HandlerBase.h:151
ThePEG::LastXCombInfo
LastXCombInfo is a templated class giving easy access to the information in an XComb object.
Definition:
LastXCombInfo.h:32
ThePEG::LastXCombInfo::lastXCombPtr
tXCPtr lastXCombPtr() const
Return a pointer to the last selected XComb.
Definition:
LastXCombInfo.h:50
ThePEG::LastXCombInfo::pdf
PDFT pdf(tcPPtr parton) const
Return the parton density used to extract the given parton.
Definition:
LastXCombInfo.h:85
ThePEG::Lorentz5Vector< Energy >
ThePEG::LorentzRotation
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
Definition:
LorentzRotation.h:27
ThePEG::LorentzVector< Energy >
ThePEG::PDFCuts
The PDFCuts class is used to specify cuts on scale and momentum fractions for which a PDFBase object ...
Definition:
PDFCuts.h:27
ThePEG::PartonBinInstance
PartonBinInstance is used to store information about the generation of a given parton extraction for ...
Definition:
PartonBinInstance.h:28
ThePEG::PartonExtractor
The PartonExtractor is a base class defining the interface to objects responsible for extracting part...
Definition:
PartonExtractor.h:44
ThePEG::PartonExtractor::PartonExtractor
PartonExtractor()
Default constructor.
ThePEG::PartonExtractor::theNoPDF
PDFPtr theNoPDF
The NoPDF object.
Definition:
PartonExtractor.h:407
ThePEG::PartonExtractor::newRemnants
PBIPtr newRemnants(tPBIPtr oldpb, tPPtr newp, const LorentzMomentum &k)
Used by the public newRemnants() for each of the parton bins.
ThePEG::PartonExtractor::generate
virtual bool generate(PartonBinInstance &pb, const double *r, Energy2 shat, const Lorentz5Momentum &first, bool haveMEPartons=false)
Used by generateSHat() for each of the final parton bins.
ThePEG::PartonExtractor::generateL
virtual bool generateL(const PBIPair &pbins, const double *r1, const double *r2)
Generate for all parton extractions.
ThePEG::PartonExtractor::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::PartonExtractor::constructRemnants
virtual void constructRemnants(const PBIPair &pbins, tSubProPtr sub, tStepPtr step) const
Construct remnants for partons created outside of this extractor.
ThePEG::PartonExtractor::fullFn
virtual double fullFn(const PartonBinInstance &pb, bool noLastPDF=false)
Used by the public fullFn() for each of the final parton bins.
ThePEG::PartonExtractor::fullFn
virtual double fullFn(const PBIPair &pbins, Energy2 scale, pair< bool, bool > noLastPDF=make_pair(false, false))
Return the product of all density functions.
ThePEG::PartonExtractor::construct
virtual void construct(PartonBinInstance &pb, tStepPtr step, bool boost=true) const
Used by the public construct() for each of the final parton bins.
ThePEG::PartonExtractor::updatePartonBinInstances
virtual void updatePartonBinInstances(const PBIPair &pbins)
Update information on the given parton bin instances.
ThePEG::PartonExtractor::transformRemnants
virtual void transformRemnants(LorentzMomentum &Ph, LorentzMomentum &Pr, const LorentzMomentum &k, const LorentzMomentum &P) const
Transform remnant momentum.
ThePEG::PartonExtractor::noPDF
tcPDFPtr noPDF() const
The NoPDF object.
Definition:
PartonExtractor.h:333
ThePEG::PartonExtractor::findConnect
void findConnect(tColinePtr line, tPPtr parton, bool anti, Iterator first, Iterator last) const
Connect the first (anti) coloured particle in the given range (not equal to parton) and connect it to...
Definition:
PartonExtractor.h:340
ThePEG::PartonExtractor::generateSHat
virtual Energy2 generateSHat(Energy2 s, const PBIPair &pbins, const double *r1, const double *r2, bool mepartons=false)
Generate the rest of the degrees of freedom to calculate and the product of all densitiy functions.
ThePEG::PartonExtractor::construct
virtual void construct(const PBIPair &pbins, tStepPtr step) const
Construct remnants and add them to the step.
ThePEG::PartonExtractor::operator=
PartonExtractor & operator=(const PartonExtractor &)=delete
Private and non-existent assignment operator.
ThePEG::PartonExtractor::initPartonExtractor
static ClassDescription< PartonExtractor > initPartonExtractor
Describe a concrete class with persistent data.
Definition:
PartonExtractor.h:427
ThePEG::PartonExtractor::select
void select(tXCombPtr newXComb)
Set the XComb object describing the current hard sub-process.
ThePEG::PartonExtractor::theSpecialDensities
vector< PDFPtr > theSpecialDensities
A list of special PDFBase objects to be used.
Definition:
PartonExtractor.h:392
ThePEG::PartonExtractor::newRemnants
virtual PBIPair newRemnants(tPPair oldp, tPPair newp, tStepPtr step)
If remnants has already been created for the given parton, remove them from the given step and genera...
ThePEG::PartonExtractor::PartonBinInstanceMap
map< cPPtr, PBIPtr > PartonBinInstanceMap
A map of PartonBinInstance objects indexed by the extracted parton.
Definition:
PartonExtractor.h:52
ThePEG::PartonExtractor::maxTries
int maxTries() const
The maximum number of attempts allowed when trying to generate remnants.
Definition:
PartonExtractor.h:208
ThePEG::PartonExtractor::partonBinInstances
PartonBinInstanceMap & partonBinInstances() const
The PartonBinInstance's used mapped to the respective partons.
Definition:
PartonExtractor.h:384
ThePEG::PartonExtractor::getPartons
virtual PartonPairVec getPartons(Energy maxEnergy, const cPDPair &, const Cuts &) const
Return a vector of possible pairs of parton bins which can be produced within a given maximum total p...
ThePEG::PartonExtractor::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::PartonExtractor::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::PartonExtractor::theSecondPDF
PDFPtr theSecondPDF
PDFBase object to override second PDF.
Definition:
PartonExtractor.h:402
ThePEG::PartonExtractor::colourConnect
virtual void colourConnect(tPPtr particle, tPPtr parton, const tPVector &remnants) const
Connect the remnants with the colour lines of the extracted parton.
ThePEG::PartonExtractor::prepare
virtual void prepare(const PBIPair &pbins)
Prepare the given parton bin instances for generating a new event.
ThePEG::PartonExtractor::getPDF
tcPDFPtr getPDF(tcPDPtr particle) const
Return the PDFBase object to be used for the incoming particle type.
ThePEG::PartonExtractor::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::PartonExtractor::addNewRemnants
void addNewRemnants(tPBIPtr oldpb, tPBIPtr newpb, tStepPtr step)
Used by the public newRemnants() for each of the parton bins.
ThePEG::PartonExtractor::theFirstPDF
PDFPtr theFirstPDF
PDFBase object to override first PDF.
Definition:
PartonExtractor.h:397
ThePEG::PartonExtractor::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::PartonExtractor::theMaxTries
int theMaxTries
The maximum number of tries allowed when trying to produce remnants.
Definition:
PartonExtractor.h:413
ThePEG::PartonExtractor::nDims
virtual pair< int, int > nDims(const PBPair &pbins)
Determine the number of random numbers needed to calculate and the product of all densitiy functions...
ThePEG::PartonExtractor::dofinish
virtual void dofinish()
Finalize this object.
ThePEG::PartonExtractor::constructRemnants
virtual void constructRemnants(PartonBinInstance &pb, LorentzMomentum &Ph, const LorentzMomentum &k) const
Construct remnants recursively for the parton represented by pb.
ThePEG::PartonExtractor::partonBinInstance
tPBIPtr partonBinInstance(tcPPtr) const
Return the corresponding parton bin instance for a given extracted parton.
ThePEG::PartonExtractor::canHandle
virtual bool canHandle(const cPDPair &)
Return true if this parton extractor can handle the given types of incoming particles.
Definition:
PartonExtractor.h:77
ThePEG::PartonExtractor::boostRemnants
virtual LorentzRotation boostRemnants(PBIPair &bins, LorentzMomentum k1, LorentzMomentum k2, bool side1, bool side2) const
Get boost for hard subsystem and boost remnants.
ThePEG::PartonExtractor::flatSHatY
bool flatSHatY
True if this extractor should override the -generation in the PDFs and generate a flat distribution i...
Definition:
PartonExtractor.h:420
ThePEG::PartonExtractor::addPartons
virtual void addPartons(tPBPtr incoming, const PDFCuts &cuts, tcPDFPtr pdf, PartonVector &pbins) const
Add parton bins to pbins for the given incoming particle and the specified cuts.
ThePEG::PartonExtractor::newScale
virtual Energy2 newScale()
May be overriden by sub-classes which have their own oppinion about what scale to use in a hard subpr...
ThePEG::PartonExtractor::generateL
virtual void generateL(PartonBinInstance &pb, const double *r)
Used by generateL() for each of the final parton bins.
ThePEG::PartonExtractor::~PartonExtractor
virtual ~PartonExtractor()
Destructor.
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Pointer::TransientRCPtr
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition:
RCPtr.h:519
ThePEG::Qty< 0, 1, 0 >
ThePEG::XComb
The XComb class stores all information about the generation of a hard sub-proces for a given pair of ...
Definition:
XComb.h:43
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::cPDPair
pair< cPDPtr, cPDPtr > cPDPair
A pair of pointers to const ParticleData objects.
Definition:
Containers.h:118
ThePEG::PBIPair
pair< PBIPtr, PBIPtr > PBIPair
A pair of pointers to PartonBinInstance objects.
Definition:
PartonBinInstance.h:20
ThePEG::tPVector
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition:
Containers.h:82
ThePEG::tPPair
pair< tPPtr, tPPtr > tPPair
A pair of transient pointers to const Particle objects.
Definition:
Containers.h:133
ThePEG::BaseClassTrait
BaseClassTraits describes the base classes of the templated class.
Definition:
ClassTraits.h:156
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsType
ClassTraitsType is an empty, non-polymorphic, base class.
Definition:
ClassTraits.h:30
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6