File indexing completed on 2026-08-06 09:24:06
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_TwoBodyDecayMatrixElement_H
0010 #define HERWIG_TwoBodyDecayMatrixElement_H
0011
0012
0013
0014 #include "DecayMatrixElement.h"
0015
0016 namespace Herwig {
0017
0018 using namespace ThePEG;
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 class TwoBodyDecayMatrixElement: public DecayMatrixElement {
0032
0033 public:
0034
0035
0036
0037
0038
0039
0040 TwoBodyDecayMatrixElement() : DecayMatrixElement(2) {}
0041
0042
0043
0044
0045
0046
0047
0048 TwoBodyDecayMatrixElement(PDT::Spin spinin,PDT::Spin outspin1,PDT::Spin outspin2)
0049 : DecayMatrixElement(2,spinin) {
0050 outspin().push_back(outspin1);
0051 outspin().push_back(outspin2);
0052 }
0053
0054
0055
0056
0057
0058
0059 TwoBodyDecayMatrixElement(PDT::Spin inspin,vector<PDT::Spin> spinout)
0060 : DecayMatrixElement(2,inspin) {
0061 assert(spinout.size()==2);
0062 outspin() = spinout;
0063 }
0064
0065
0066
0067
0068
0069 TwoBodyDecayMatrixElement(vector<PDT::Spin> extspin)
0070 : DecayMatrixElement(2,extspin[0]) {
0071 assert(extspin.size()==3);
0072 outspin() = vector<PDT::Spin>(extspin.begin()+1,extspin.end());
0073 }
0074
0075
0076 public:
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086 RhoDMatrix calculateDMatrix(const vector<RhoDMatrix> & rhoout) const;
0087
0088
0089
0090
0091
0092
0093
0094 RhoDMatrix calculateRhoMatrix(int ipart,const RhoDMatrix & rhoin,
0095 const vector<RhoDMatrix> & rhoout) const;
0096
0097
0098
0099
0100
0101
0102 Complex contract(const RhoDMatrix & rhoin) const;
0103
0104
0105
0106
0107
0108
0109
0110 Complex contract(const TwoBodyDecayMatrixElement & con,
0111 const RhoDMatrix & rhoin);
0112
0113
0114 public:
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126 Complex operator () (unsigned int inhel, unsigned int outhel1,
0127 unsigned int outhel2) const {
0128 return matrixElement_[inhel][outhel1][outhel2];
0129 }
0130
0131
0132
0133
0134
0135
0136
0137 Complex & operator () (unsigned int inhel, unsigned int outhel1,
0138 unsigned int outhel2) {
0139 return matrixElement_[inhel][outhel1][outhel2];
0140 }
0141
0142
0143
0144
0145 Complex operator () (unsigned int , unsigned int ,
0146 unsigned int , unsigned int ) const {
0147 assert(false);
0148 static const Complex out = 0.;
0149 return out;
0150 }
0151
0152
0153
0154
0155 Complex & operator () (unsigned int , unsigned int ,
0156 unsigned int , unsigned int ) {
0157 assert(false);
0158 static Complex out = 0.;
0159 return out;
0160 }
0161
0162
0163
0164
0165 Complex operator () (unsigned int , unsigned int ,
0166 unsigned int , unsigned int ,
0167 unsigned int ) const {
0168 assert(false);
0169 static const Complex out = 0.;
0170 return out;
0171 }
0172
0173
0174
0175
0176 Complex & operator () (unsigned int , unsigned int ,
0177 unsigned int , unsigned int ,
0178 unsigned int ) {
0179 assert(false);
0180 static Complex out = 0.;
0181 return out;
0182 }
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193 Complex operator () (unsigned int , unsigned int ,
0194 unsigned int , unsigned int ,
0195 unsigned int , unsigned int ) const {
0196 assert(false);
0197 static const Complex out = 0.;
0198 return out;
0199 }
0200
0201
0202
0203
0204 Complex & operator () (unsigned int , unsigned int ,
0205 unsigned int , unsigned int ,
0206 unsigned int , unsigned int ) {
0207 assert(false);
0208 static Complex out = 0.;
0209 return out;
0210 }
0211
0212
0213
0214
0215 Complex operator () (unsigned int ,unsigned int ,
0216 unsigned int ,unsigned int ,
0217 unsigned int ,unsigned int ,
0218 unsigned int ) const {
0219 assert(false);
0220 static const Complex out = 0.;
0221 return out;
0222 }
0223
0224
0225
0226
0227 Complex & operator () (unsigned int , unsigned int ,
0228 unsigned int , unsigned int ,
0229 unsigned int , unsigned int ,
0230 unsigned int ) {
0231 assert(false);
0232 static Complex out = 0.;
0233 return out;
0234 }
0235
0236
0237
0238
0239
0240 Complex operator () (const vector<unsigned int> & in) const {
0241 assert(in.size()==3);
0242 return matrixElement_[in[0]][in[1]][in[2]];
0243 }
0244
0245
0246
0247
0248
0249 Complex & operator () (const vector<unsigned int> & in) {
0250 assert(in.size()==3);
0251 return matrixElement_[in[0]][in[1]][in[2]];
0252 }
0253
0254
0255
0256
0257
0258 void zero() {
0259 for(unsigned int ix=0;ix<5;++ix) {
0260 for(unsigned int iy=0;iy<5;++iy) {
0261 for(unsigned int iz=0;iz<5;++iz) {
0262 matrixElement_[ix][iy][iz]=0.;
0263 }
0264 }
0265 }
0266 }
0267
0268 private:
0269
0270
0271
0272
0273 Complex matrixElement_[5][5][5];
0274
0275 };
0276
0277 }
0278
0279 #endif