herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ProductionMatrixElement.h
1 // -*- C++ -*-
2 //
3 // ProductionMatrixElement.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_ProductionMatrixElement_H
10 #define HERWIG_ProductionMatrixElement_H
11 //
12 // This is the declaration of the ProductionMatrixElement class.
13 
14 #include <ThePEG/EventRecord/RhoDMatrix.h>
15 
16 namespace Herwig {
17 
18 
19 using namespace ThePEG;
20 
35 
36 public:
37 
47 
56  PDT::Spin out2);
57 
67  PDT::Spin out2,PDT::Spin out3);
68 
79  PDT::Spin out2,PDT::Spin out3, PDT::Spin out4);
80 
92  PDT::Spin out2,PDT::Spin out3, PDT::Spin out4,
93  PDT::Spin out5);
94 
107  PDT::Spin out2,PDT::Spin out3, PDT::Spin out4,
108  PDT::Spin out5, PDT::Spin out6);
109 
116  ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,vector<PDT::Spin> out);
117 
123 
124 public:
125 
132  vector<PDT::Spin> inspin() {return _inspin;}
133 
138  vector<PDT::Spin> outspin() {return _outspin;}
140 
141 public:
142 
153  Complex operator () (unsigned int in1,unsigned int in2,
154  unsigned int out) const;
155 
164  Complex & operator () (unsigned int in1,unsigned int in2,
165  unsigned int out);
166 
176  Complex operator () (unsigned int in1,unsigned int in2,
177  unsigned int out1,unsigned int out2) const;
178 
188  Complex & operator () (unsigned int in1,unsigned int in2,
189  unsigned int out1,unsigned int out2);
190 
201  Complex operator () (unsigned int in1,unsigned int in2,
202  unsigned int out1,unsigned int out2,
203  unsigned int out3) const;
204 
215  Complex & operator () (unsigned int in1,unsigned int in2,
216  unsigned int out1,unsigned int out2,
217  unsigned int out3);
218 
230  Complex operator () (unsigned int in1,unsigned int in2,
231  unsigned int out1,unsigned int out2,
232  unsigned int out3,unsigned int out4) const;
233 
245  Complex & operator () (unsigned int in1,unsigned int in2,
246  unsigned int out1,unsigned int out2,
247  unsigned int out3, unsigned int out4);
248 
261  Complex operator () (unsigned int in1,unsigned int in2,
262  unsigned int out1,unsigned int out2,
263  unsigned int out3,unsigned int out4,
264  unsigned int out5) const;
265 
278  Complex & operator () (unsigned int in1,unsigned int in2,
279  unsigned int out1,unsigned int out2,
280  unsigned int out3, unsigned int out4,
281  unsigned int out5);
282 
296  Complex operator () (unsigned int in1,unsigned int in2,
297  unsigned int out1,unsigned int out2,
298  unsigned int out3,unsigned int out4,
299  unsigned int out5,unsigned int out6) const;
300 
314  Complex & operator () (unsigned int in1,unsigned int in2,
315  unsigned int out1,unsigned int out2,
316  unsigned int out3, unsigned int out4,
317  unsigned int out5, unsigned int out6);
318 
325  Complex operator () (vector<unsigned int> hel) const;
326 
333  Complex & operator () (vector<unsigned int> hel);
335 
336 public:
337 
341  RhoDMatrix calculateDMatrix(int,const RhoDMatrix &,
342  const vector<RhoDMatrix> &) const;
343 
347  RhoDMatrix calculateRhoMatrix(int,const RhoDMatrix &,
348  const RhoDMatrix &,
349  const vector<RhoDMatrix> &) const;
350 
354  double average() const;
355 
359  double average(const RhoDMatrix & in1,
360  const RhoDMatrix & in2) const;
361 
365  Complex average(const ProductionMatrixElement & me2,
366  const RhoDMatrix & in1,
367  const RhoDMatrix & in2) const;
368 
369 public:
370 
374  void reset(const ProductionMatrixElement & x) const;
375 
379  static void Init();
380 
381 private:
382 
386  void setMESize();
387 
388 private:
389 
393  mutable unsigned int _nout;
394 
398  mutable vector<PDT::Spin> _inspin;
399 
403  mutable vector<PDT::Spin> _outspin;
404 
408  mutable vector<Complex> _matrixelement;
409 
413  mutable vector<int> _constants;
414 
415 };
416 
417 }
418 
419 #endif /* HERWIG_ProductionMatrixElement_H */
vector< PDT::Spin > _inspin
Spin of the incoming particles as 2s+1.
ProductionMatrixElement()
Default constructor.
std::complex< double > Complex
vector< PDT::Spin > inspin()
Get the spins of the incoming particles particle.
vector< Complex > _matrixelement
Storage of the matrix element, a vector is better for memory usage.
The storage of the helicity amplitude expression for the matrix element of a hard process...
vector< int > _constants
Constants needed to map the index of the vector to a helicity structure.
vector< PDT::Spin > outspin()
Get the spins of the outgoing particles.
unsigned int _nout
Number of outgoing particles.
vector< PDT::Spin > _outspin
Spins of the outgoing particles.
-*- C++ -*-