File indexing completed on 2026-08-06 09:38:21
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ThePEG_HelicityVertex_H
0010 #define ThePEG_HelicityVertex_H
0011
0012
0013 #include "HelicityVertex.fh"
0014 #include "ThePEG/EventRecord/EventConfig.h"
0015 #include "ThePEG/Utilities/ClassDescription.h"
0016 #include "RhoDMatrix.h"
0017 #include "ThePEG/Utilities/Rebinder.h"
0018 #include "ThePEG/Helicity/HelicityDefinitions.h"
0019
0020 namespace ThePEG {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 class HelicityVertex: public EventInfoBase {
0042
0043 public:
0044
0045
0046
0047
0048 friend ostream & operator<<(ostream & os, const HelicityVertex & vert);
0049
0050 public:
0051
0052
0053 typedef vector<tcSpinPtr> SpinVector;
0054
0055 public:
0056
0057
0058
0059
0060 static void Init();
0061
0062
0063
0064
0065
0066
0067
0068 virtual void rebind(const EventTranslationMap & trans);
0069
0070 public:
0071
0072
0073
0074
0075
0076
0077 const SpinVector & incoming() const {return _incoming;}
0078
0079
0080
0081
0082 const SpinVector & outgoing() const {return _outgoing;}
0083
0084
0085
0086
0087
0088
0089 void addIncoming(tcSpinPtr spin, int & loc) {
0090 if(loc<0) {
0091 _incoming.push_back(spin);
0092 loc=_incoming.size()-1;
0093 }
0094 else {
0095 _incoming[loc] = spin;
0096 }
0097 }
0098
0099
0100
0101
0102
0103
0104 void addOutgoing(tcSpinPtr spin, int & loc) {
0105 if(loc<0) {
0106 _outgoing.push_back(spin);
0107 loc=_outgoing.size()-1;
0108 }
0109 else {
0110 _outgoing[loc]= spin;
0111 }
0112 }
0113
0114
0115
0116
0117 void resetIncoming(tcSpinPtr spin, int loc) {
0118 assert( loc < int(_incoming.size()) && loc >= 0 );
0119 _incoming[loc]=spin;
0120 }
0121
0122
0123
0124
0125 void resetOutgoing(tcSpinPtr spin, int loc) {
0126 assert( loc < int(_outgoing.size()) && loc >= 0 );
0127 _outgoing[loc]=spin;
0128 }
0129
0130
0131 public:
0132
0133
0134
0135
0136
0137
0138 virtual RhoDMatrix getRhoMatrix(int loc,bool recursive) const = 0;
0139
0140
0141
0142
0143 virtual RhoDMatrix getDMatrix(int loc) const = 0;
0144
0145
0146 private:
0147
0148
0149
0150
0151 static AbstractNoPIOClassDescription<HelicityVertex> initHelicityVertex;
0152
0153
0154
0155
0156 HelicityVertex & operator=(const HelicityVertex &) = delete;
0157
0158 private:
0159
0160
0161
0162
0163 SpinVector _incoming;
0164
0165
0166
0167
0168 SpinVector _outgoing;
0169
0170 };
0171
0172
0173
0174
0175 inline ostream & operator<<(ostream & os, const HelicityVertex & vert) {
0176 os << "the incoming particles at the vertex are" << endl;
0177 for(unsigned int ix=0;ix<vert._incoming.size();++ix) {
0178 os << "the " << ix << " th incoming particle " << vert._incoming[ix] << "\n";
0179 }
0180 os << "the outgoing particles at the vertex are" << endl;
0181 for(unsigned int ix=0;ix<vert._outgoing.size();++ix) {
0182 os << "the " << ix << " th outgoing particle " << vert._outgoing[ix] << "\n";
0183 }
0184 return os;
0185 }
0186
0187 }
0188
0189
0190 namespace ThePEG {
0191
0192
0193
0194
0195
0196
0197
0198 template <>
0199 struct BaseClassTrait<ThePEG::HelicityVertex,1>
0200 : public ClassTraitsType {
0201
0202 typedef EventInfoBase NthBase;
0203 };
0204
0205
0206
0207
0208
0209 template <>
0210 struct ClassTraits<ThePEG::HelicityVertex>
0211 : public ClassTraitsBase<ThePEG::HelicityVertex> {
0212
0213
0214
0215 static string className() { return "ThePEG::HelicityVertex"; }
0216 };
0217
0218
0219
0220 }
0221
0222 #endif