File: TensorWaveFunction.h

package info (click to toggle)
thepeg 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 9,312 kB
  • ctags: 11,509
  • sloc: cpp: 57,129; sh: 11,315; java: 3,212; lisp: 1,402; makefile: 830; ansic: 58; perl: 3
file content (364 lines) | stat: -rw-r--r-- 9,524 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
// -*- C++ -*-
//
// TensorWaveFunction.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef ThePEG_TensorWaveFunction_H
#define ThePEG_TensorWaveFunction_H
//
// This is the declaration of the TensorWaveFunction class.
//
#include "WaveFunctionBase.h"
#include "VectorWaveFunction.h"
#include <ThePEG/Helicity/LorentzTensor.h>
#include <ThePEG/Helicity/TensorSpinInfo.h>
#include <ThePEG/EventRecord/Particle.h>
#include <ThePEG/EventRecord/RhoDMatrix.h>

namespace ThePEG {
namespace Helicity {

/**\ingroup Helicity
 * Definition of the enumerated values of the phase to include in the 
 * calculation of the polarization tensor.
 */
enum TensorPhase {
  tensor_phase, /**< Include the phase factor.*/
  tensor_nophase, /**< No phase-factor. */
  default_tensor_phase=tensor_nophase /**< Default option.*/
};

/** \ingroup Helicity
 *  \author Peter Richardson
 *
 *  The TensorWaveFunction class is designed to store the wavefunction
 *  of a tensor in a form suitable for use in helicity amplitude 
 *  calculations of the matrix element using a similar philosophy to the 
 *  FORTRAN HELAS code.
 * 
 *  In addition to storing the tensor using the LorentzTensor class
 *  it inherits from the WaveFunctionBase class to provide storage of
 *  the momentum and ParticleData for the tensor particle.
 *
 *  This class also contains the code which does the actually 
 *  calculation of the tensor wavefunction.
 *
 *  There are two choices available for the calculation of the 
 *  wavefunction. These are set using the TensorPhase enumeration 
 *  which specifies a default choice.
 *  The first choice, tensor_phase, includes a phase factor 
 *  \f$\exp(\pm i \phi)\f$ for the \f$\pm\f$ helicity states while the second, 
 *  tensor_nophase, does not.
 *
 *  N.B. In our convention 
 *        0 is the \f$-2\f$ helicity state,
 *        1 is the \f$-1\f$ helicity state,
 *        2 is the \f$ 0\f$ helicity state,
 *        3 is the \f$+1\f$ helicity state and
 *        4 is the \f$+2\f$ helicity state.
 *
 *  @see WaveFunctionBase
 *  @see LorentzTensor
 *  @see VectorWaveFunction
 */
class TensorWaveFunction : public WaveFunctionBase {

public:

  /** @name Standard constructors and destructors. */
  //@{
  /**
   * Constructor, set the momentum and Wavefunction, the direction can also
   * be specified. 
   * @param p The momentum.
   * @param part The ParticleData pointer
   * @param wave The wavefunction, \e i.e. the polarization vector.
   * @param dir The direction of the particle.
   */
  TensorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
		     const LorentzTensor<double> & wave,
		     Direction  dir=intermediate) 
    : WaveFunctionBase(p,part,dir), _wf(wave)
  {
    assert(iSpin()==PDT::Spin2);
  }

  /**
   * Constructor, set the momentum and the components of the tensor.
   * @param p The momentum.
   * @param part The ParticleData pointer
   * @param xx The \f$xx\f$ component.
   * @param xy The \f$xy\f$ component.
   * @param xz The \f$xz\f$ component.
   * @param xt The \f$xt\f$ component.
   * @param yx The \f$yx\f$ component.
   * @param yy The \f$yy\f$ component.
   * @param yz The \f$yz\f$ component.
   * @param yt The \f$yt\f$ component.
   * @param zx The \f$zx\f$ component.
   * @param zy The \f$zy\f$ component.
   * @param zz The \f$zz\f$ component.
   * @param zt The \f$zt\f$ component.
   * @param tx The \f$tx\f$ component.
   * @param ty The \f$ty\f$ component.
   * @param tz The \f$tz\f$ component.
   * @param tt The \f$tt\f$ component.
   */
  TensorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
		     Complex xx,Complex xy,Complex xz,Complex xt,Complex yx,
		     Complex yy,Complex yz,Complex yt,Complex zx,Complex zy,
		     Complex zz,Complex zt,Complex tx,Complex ty,Complex tz,
		     Complex tt) 
    : WaveFunctionBase(p,part), _wf(xx,xy,xz,xt,
				    yx,yy,yz,yt,
				    zx,zy,zz,zt,
				    tx,ty,tz,tt)
  {
    assert(iSpin()==PDT::Spin2);
  }

  /**
   * Constructor, set the momentum, helicity, direction and optionally the phase
   * @param p The momentum.
   * @param part The ParticleData pointer
   * @param ihel The helicity (0,1,2,3,4 as described above.)
   * @param dir The direction.
   * @param phase The phase choice.
   */
  TensorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
		     unsigned int ihel,Direction dir,
		     TensorPhase phase=default_tensor_phase) 
    : WaveFunctionBase(p,part,dir)
  {
    assert(iSpin()==PDT::Spin2);
    calculateWaveFunction(ihel,phase);
  }

  /**
   * Constructor, set the 5-momentum and direction, zero the wavefunction.
   * @param p The momentum.
   * @param part The ParticleData pointer.
   * @param dir The direction.
   */
  TensorWaveFunction(const Lorentz5Momentum & p,
		     tcPDPtr part,Direction dir) 
    : WaveFunctionBase(p,part,dir), _wf()
  {
    assert(iSpin()==PDT::Spin2);
  }

  /** 
   * Default constructor.
   */
  TensorWaveFunction() {}

  /**
   *  Special for spin correlations \todo make static?
   */
  TensorWaveFunction(vector<TensorWaveFunction> & wave,
		     tPPtr part,Direction dir,bool time,bool massless,
		     bool=true,
		     TensorPhase phase=default_tensor_phase) {
    calculateWaveFunctions(wave,part,dir,massless,phase);
    constructSpinInfo(wave,part,dir,time,massless);
  }
  //@}

  /**
   *  Access to the wavefunction and its components.
   */
  //@{
  /**
   * Subscript operator for the wavefunction.
   */
  Complex operator ()(int i, int j) const {
    return _wf(i,j);
  }

  /**
   * Set components by index.
   */
  Complex & operator () (int i, int j) {
    return _wf(i,j);
  }

  /**
   * Return wavefunction as polarization vector.
   */
  const LorentzTensor<double> & wave() const {return _wf;}

  /**
   * Get the \f$xx\f$ component.
   */
  Complex xx() const {return _wf.xx();}

  /**
   * Get the \f$yx\f$ component.
   */
  Complex yx() const {return _wf.yx();}

  /**
   * Get the \f$zx\f$ component.
   */
  Complex zx() const {return _wf.zx();}

  /**
   * Get the \f$tx\f$ component.
   */
  Complex tx() const {return _wf.tx();}

  /**
   * Get the \f$xy\f$ component.
   */
  Complex xy() const {return _wf.xy();}

  /**
   * Get the \f$yy\f$ component.
   */
  Complex yy() const {return _wf.yy();}

  /**
   * Get the \f$zy\f$ component.
   */
  Complex zy() const {return _wf.zy();}

  /**
   * Get the \f$ty\f$ component.
   */
  Complex ty() const {return _wf.ty();}

  /**
   * Get the \f$xz\f$ component.
   */
  Complex xz() const {return _wf.xz();}

  /**
   * Get the \f$yz\f$ component.
   */
  Complex yz() const {return _wf.yz();}

  /**
   * Get the \f$zz\f$ component.
   */
  Complex zz() const {return _wf.zz();}

  /**
   * Get the \f$tz\f$ component.
   */
  Complex tz() const {return _wf.tz();}

  /**
   * Get the \f$xt\f$ component.
   */
  Complex xt() const {return _wf.xt();}

  /**
   * Get the \f$yt\f$ component.
   */
  Complex yt() const {return _wf.yt();}

  /**
   * Get the \f$zt\f$ component.
   */
  Complex zt() const {return _wf.zt();}

  /**
   * Get the \f$tt\f$ component.
   */
  Complex tt() const {return _wf.tt();}
  //@}

  /**
   * Reset functions.
   */
  //@{

  /**
   * Reset helicity (recalculate the tensor ).
   * @param ihel The new helicity (0,1,2,3,4 as described above.)
   * @param phase The phase choice.
   */
  void reset(unsigned int ihel,TensorPhase phase=default_tensor_phase) {
    calculateWaveFunction(ihel,phase);
  }
  //@}

public:

  /**
   *  Perform the Lorentz transformation of the wave function
   */
  void transform(const LorentzRotation & r) {
    _wf.transform(r);
    transformMomentum(r);
  }

public:

  /**
   *  Calculate the wavefunctions
   */
  static void calculateWaveFunctions(vector<LorentzTensor<double> > & waves,
				     tPPtr particle,Direction,bool massless,
				     TensorPhase phase=default_tensor_phase);

  /**
   *  Calculate the wavefunctions
   */
  static void calculateWaveFunctions(vector<TensorWaveFunction> & waves,
				     tPPtr particle,Direction,bool massless,
				     TensorPhase phase=default_tensor_phase);

  /**
   *  Calculate the wavefunctions
   */
  static void calculateWaveFunctions(vector<LorentzTensor<double> > & waves,
				     RhoDMatrix & rho,
				     tPPtr particle,Direction,bool massless,
				     TensorPhase phase=default_tensor_phase);

  /**
   *  Calculate the wavefunctions
   */
  static void calculateWaveFunctions(vector<TensorWaveFunction> & waves,
				     RhoDMatrix & rho,
				     tPPtr particle,Direction,bool massless,
				     TensorPhase phase=default_tensor_phase);

  /**
   *  Construct the SpinInfo object
   */
  static void constructSpinInfo(const vector<LorentzTensor<double> > & waves,
				tPPtr part,Direction dir, bool time,bool massless);

  /**
   *  Construct the SpinInfo object
   */
  static void constructSpinInfo(const vector<TensorWaveFunction> & waves,
				tPPtr part,Direction dir, bool time,bool massless);

private:

  /**
   * Calculate the wavefunction.
   * @param ihel The helicity (0,1,2,3,4 as described above.)
   * @param phase The phase choice.
   */
  void calculateWaveFunction(unsigned int ihel,
			     TensorPhase phase=default_tensor_phase);

private:

  /**
   * Storage of the wavefunction as a Lorentz Tensor.
   */
  LorentzTensor<double> _wf;

};
}
}

#endif