File indexing completed on 2026-08-06 09:24:14
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Herwig_MatchboxRambo_H
0010 #define Herwig_MatchboxRambo_H
0011
0012
0013
0014
0015 #include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
0016
0017 namespace Herwig {
0018
0019 using namespace ThePEG;
0020
0021
0022
0023
0024
0025
0026
0027
0028 class MatchboxRambo: public MatchboxPhasespace {
0029
0030 public:
0031
0032
0033
0034
0035 MatchboxRambo();
0036
0037 public:
0038
0039
0040
0041
0042 virtual void setXComb(tStdXCombPtr);
0043
0044
0045
0046
0047 virtual double generateTwoToNKinematics(const double*,
0048 vector<Lorentz5Momentum>& momenta);
0049
0050
0051
0052
0053
0054 virtual int nDimPhasespace(int nFinal) const {
0055 if ( nFinal == 1 )
0056 return 1;
0057 return 4*nFinal;
0058 }
0059
0060 protected:
0061
0062
0063
0064
0065
0066 struct ReshuffleEquation {
0067
0068 typedef double ArgType;
0069 typedef Energy ValType;
0070
0071 static double aUnit() { return 1.; }
0072 static Energy vUnit() { return 1.*GeV; }
0073
0074 Energy operator() (double xi) const;
0075
0076 Energy w;
0077 cPDVector::const_iterator dataBegin;
0078 cPDVector::const_iterator dataEnd;
0079 vector<Lorentz5Momentum>::const_iterator momentaBegin;
0080 vector<Lorentz5Momentum>::const_iterator momentaEnd;
0081
0082 ReshuffleEquation(Energy q,
0083 cPDVector::const_iterator dBegin,
0084 cPDVector::const_iterator dEnd,
0085 vector<Lorentz5Momentum>::const_iterator mBegin,
0086 vector<Lorentz5Momentum>::const_iterator mEnd)
0087 : w(q),
0088 dataBegin(dBegin), dataEnd(dEnd),
0089 momentaBegin(mBegin),
0090 momentaEnd(mEnd) {}
0091
0092 };
0093
0094 public:
0095
0096
0097
0098
0099
0100
0101
0102 void persistentOutput(PersistentOStream & os) const;
0103
0104
0105
0106
0107
0108
0109 void persistentInput(PersistentIStream & is, int version);
0110
0111
0112
0113
0114
0115
0116
0117
0118 static void Init();
0119
0120 protected:
0121
0122
0123
0124
0125
0126
0127
0128 virtual IBPtr clone() const;
0129
0130
0131
0132
0133
0134 virtual IBPtr fullclone() const;
0135
0136
0137
0138
0139
0140
0141
0142 private:
0143
0144
0145
0146
0147
0148 MatchboxRambo & operator=(const MatchboxRambo &) = delete;
0149
0150
0151
0152
0153 bool needToReshuffle;
0154
0155
0156
0157
0158
0159 bool theMakeReferenceSample;
0160
0161
0162
0163
0164 map<cPDVector,ofstream*> referenceSamples;
0165
0166
0167
0168
0169 ofstream* referenceSample;
0170
0171
0172
0173
0174 void dumpReference(const vector<Lorentz5Momentum>&, double) const;
0175
0176 };
0177
0178 }
0179
0180 #endif