ThePEG
1.8.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
EventRecord
HelicityVertex.h
1
// -*- C++ -*-
2
//
3
// HelicityVertex.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
5
//
6
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_HelicityVertex_H
10
#define ThePEG_HelicityVertex_H
11
// This is the declaration of the HelicityVertex class.
12
13
#include "HelicityVertex.fh"
14
#include "ThePEG/EventRecord/EventConfig.h"
15
#include "ThePEG/Utilities/ClassDescription.h"
16
#include "RhoDMatrix.h"
17
#include "ThePEG/Utilities/Rebinder.h"
18
#include "ThePEG/Helicity/HelicityDefinitions.h"
19
20
namespace
ThePEG {
21
41
class
HelicityVertex
:
public
EventInfoBase
{
42
43
public
:
44
48
friend
ostream &
operator<<
(ostream & os,
const
HelicityVertex
& vert);
49
50
public
:
51
53
typedef
vector<tcSpinPtr>
SpinVector
;
54
55
public
:
56
60
static
void
Init
();
61
68
virtual
void
rebind
(
const
EventTranslationMap
& trans);
69
70
public
:
71
77
const
SpinVector
&
incoming
()
const
{
return
_incoming
;}
78
82
const
SpinVector
&
outgoing
()
const
{
return
_outgoing
;}
83
89
void
addIncoming
(
tcSpinPtr
spin,
int
& loc) {
90
_incoming
.push_back(spin);
91
loc=
_incoming
.size()-1;
92
}
93
99
void
addOutgoing
(
tcSpinPtr
spin,
int
& loc) {
100
_outgoing
.push_back(spin);
101
loc=
_outgoing
.size()-1;
102
}
103
107
void
resetIncoming
(
tcSpinPtr
spin,
int
loc) {
108
assert( loc <
int
(
_incoming
.size()) && loc >= 0 );
109
_incoming
[loc]=spin;
110
}
111
115
void
resetOutgoing
(
tcSpinPtr
spin,
int
loc) {
116
assert( loc <
int
(
_outgoing
.size()) && loc >= 0 );
117
_outgoing
[loc]=spin;
118
}
120
121
public
:
122
128
virtual
RhoDMatrix
getRhoMatrix
(
int
loc,
bool
recursive)
const
= 0;
129
133
virtual
RhoDMatrix
getDMatrix
(
int
loc)
const
= 0;
135
136
private
:
137
141
static
AbstractNoPIOClassDescription<HelicityVertex>
initHelicityVertex
;
142
146
HelicityVertex
&
operator=
(
const
HelicityVertex
&);
147
148
private
:
149
153
SpinVector
_incoming
;
154
158
SpinVector
_outgoing
;
159
160
};
161
165
inline
ostream &
operator<<
(ostream & os,
const
HelicityVertex
& vert) {
166
os <<
"the incoming particles at the vertex are"
<< endl;
167
for
(
unsigned
int
ix=0;ix<vert.
_incoming
.size();++ix) {
168
os <<
"the "
<< ix <<
" th incoming particle "
<< vert.
_incoming
[ix] <<
"\n"
;
169
}
170
os <<
"the outgoing particles at the vertex are"
<< endl;
171
for
(
unsigned
int
ix=0;ix<vert.
_outgoing
.size();++ix) {
172
os <<
"the "
<< ix <<
" th outgoing particle "
<< vert.
_outgoing
[ix] <<
"\n"
;
173
}
174
return
os;
175
}
176
177
}
178
179
180
namespace
ThePEG {
181
188
template
<>
189
struct
BaseClassTrait<ThePEG::HelicityVertex,1>
190
:
public
ClassTraitsType {
192
typedef
EventInfoBase
NthBase
;
193
};
194
199
template
<>
200
struct
ClassTraits<ThePEG::HelicityVertex>
201
:
public
ClassTraitsBase<ThePEG::HelicityVertex> {
205
static
string
className
() {
return
"ThePEG::HelicityVertex"
; }
206
};
207
210
}
211
212
#endif
/* ThePEG_HelicityVertex_H */
Generated on Sat Jun 16 2012 16:51:04 for ThePEG by
1.8.1.1