herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
MatchboxRambo.h
1// -*- C++ -*-
2//
3// MatchboxRambo.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_MatchboxRambo_H
10#define Herwig_MatchboxRambo_H
11//
12// This is the declaration of the MatchboxRambo class.
13//
14
15#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
29
30public:
31
36
37public:
38
42 virtual void setXComb(tStdXCombPtr);
43
47 virtual double generateTwoToNKinematics(const double*,
48 vector<Lorentz5Momentum>& momenta);
49
54 virtual int nDimPhasespace(int nFinal) const {
55 if ( nFinal == 1 )
56 return 1;
57 return 4*nFinal;
58 }
59
60protected:
61
67
68 typedef double ArgType;
69 typedef Energy ValType;
70
71 static double aUnit() { return 1.; }
72 static Energy vUnit() { return 1.*GeV; }
73
74 Energy operator() (double xi) const;
75
76 Energy w;
77 cPDVector::const_iterator dataBegin;
78 cPDVector::const_iterator dataEnd;
79 vector<Lorentz5Momentum>::const_iterator momentaBegin;
80 vector<Lorentz5Momentum>::const_iterator momentaEnd;
81
82 ReshuffleEquation(Energy q,
83 cPDVector::const_iterator dBegin,
84 cPDVector::const_iterator dEnd,
85 vector<Lorentz5Momentum>::const_iterator mBegin,
86 vector<Lorentz5Momentum>::const_iterator mEnd)
87 : w(q),
88 dataBegin(dBegin), dataEnd(dEnd),
89 momentaBegin(mBegin),
90 momentaEnd(mEnd) {}
91
92 };
93
94public:
95
103
109 void persistentInput(PersistentIStream & is, int version);
111
118 static void Init();
119
120protected:
121
128 virtual IBPtr clone() const;
129
134 virtual IBPtr fullclone() const;
136
137
138// If needed, insert declarations of virtual function defined in the
139// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
140
141
142private:
143
149
154
160
164 map<cPDVector,ofstream*> referenceSamples;
165
170
174 void dumpReference(const vector<Lorentz5Momentum>&, double) const;
175
176};
177
178}
179
180#endif /* Herwig_MatchboxRambo_H */
MatchboxPhasespace defines an abstract interface to a phase space generator.
MatchboxRambo implements RAMBO phase space generation.
Definition: MatchboxRambo.h:28
static void Init()
The standard Init function used to initialize the interfaces.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void setXComb(tStdXCombPtr)
Prepare a phase space generator for the given xcomb object.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void dumpReference(const vector< Lorentz5Momentum > &, double) const
Write the generated point to the reference sample.
ofstream * referenceSample
The stream to fill for the reference sample.
MatchboxRambo & operator=(const MatchboxRambo &)=delete
The assignment operator is private and must never be called.
MatchboxRambo()
The default constructor.
virtual IBPtr clone() const
Make a simple clone of this object.
bool theMakeReferenceSample
True, if a reference sample of phasespace points should be generated.
virtual double generateTwoToNKinematics(const double *, vector< Lorentz5Momentum > &momenta)
Generate a phase space point and return its weight.
map< cPDVector, ofstream * > referenceSamples
Map processes to streams for reference samples.
bool needToReshuffle
Whether or not we need to reshuffle.
virtual int nDimPhasespace(int nFinal) const
Return the number of random numbers required to produce a given multiplicity final state.
Definition: MatchboxRambo.h:54
-*- C++ -*-
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
The function object defining the equation to be solved.
Definition: MatchboxRambo.h:66