thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
EventRecord
SpinInfo.h
1
// -*- C++ -*-
2
//
3
// SpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
5
//
6
// ThePEG 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 ThePEG_SpinInfo_H
10
#define ThePEG_SpinInfo_H
11
// This is the declaration of the SpinInfo class.
12
13
#include "ThePEG/EventRecord/EventInfoBase.h"
14
#include "ThePEG/PDT/PDT.h"
15
#include "ThePEG/Interface/ClassDocumentation.h"
16
#include "HelicityVertex.h"
17
18
namespace
ThePEG
{
19
58
class
SpinInfo
:
public
EventInfoBase
{
59
60
public
:
61
65
enum
DevelopedStatus
{
66
Undeveloped
=0,
67
Developed
=1,
68
NeedsUpdate
=2,
69
StopUpdate
=3
70
};
71
72
public
:
73
79
SpinInfo
()
80
:
_timelike
(false),
_prodloc
(-1),
_decayloc
(-1),
81
_decayed
(false),
_developed
(
Undeveloped
),
82
_oldDeveloped
(
Undeveloped
) {}
83
90
SpinInfo
(
PDT::Spin
s,
91
const
Lorentz5Momentum
& p =
Lorentz5Momentum
(),
92
bool
time =
false
)
93
:
_timelike
(time),
_prodloc
(-1),
_decayloc
(-1),
94
_decayed
(false),
95
_developed
(
Undeveloped
),
_oldDeveloped
(
Undeveloped
),
96
_rhomatrix
(s),
_Dmatrix
(s),
_spin
(s),
97
_productionmomentum
(p),
_currentmomentum
(p) {}
98
102
SpinInfo
(
const
SpinInfo
&);
104
105
public
:
106
111
virtual
bool
hasPolarization
()
const
{
return
false
; }
112
121
virtual
DPair
polarization
()
const
{
return
DPair
(); }
122
123
public
:
124
128
static
void
Init
();
129
136
virtual
void
rebind
(
const
EventTranslationMap
& trans);
137
141
virtual
EIPtr
clone
()
const
;
142
146
void
update
()
const
;
147
151
virtual
void
transform
(
const
LorentzMomentum
& m,
const
LorentzRotation
& r) {
152
_currentmomentum
= m;
153
_currentmomentum
.
transform
(r);
154
}
155
159
virtual
void
reset
() {
160
_currentmomentum
=
_productionmomentum
;
161
}
162
163
public
:
164
165
171
void
productionVertex
(VertexPtr in)
const
{
172
_production
=in;
173
// add to the list of outgoing if timelike
174
int
temp(-1);
175
if
(
_timelike
) in->addOutgoing(
this
,temp);
176
// or incoming if spacelike
177
else
in->addIncoming(
this
,temp);
178
_prodloc
=temp;
179
}
180
184
tcVertexPtr
productionVertex
()
const
{
return
_production
; }
185
189
void
decayVertex
(VertexPtr in)
const
{
190
if
(in) {
191
_decay
=in;
192
if
(
_timelike
) {
193
int
temp(-1);
194
in->addIncoming(
this
,temp);
195
_decayloc
=temp;
196
assert(temp==0);
197
}
198
else
{
199
int
temp(-1);
200
in->addOutgoing(
this
,temp);
201
_decayloc
=temp;
202
}
203
}
204
else
{
205
_decay
=VertexPtr();
206
_decayloc
=-1;
207
}
208
}
209
213
tcVertexPtr
decayVertex
()
const
{
return
_decay
; }
215
221
bool
decayed
()
const
{
return
_decayed
; }
222
226
void
decayed
(
bool
b)
const
{
_decayed
= b; }
227
232
DevelopedStatus
developed
()
const
{
return
_developed
; }
233
237
void
decay
(
bool
recursive=
false
)
const
;
238
242
virtual
void
undecay
()
const
;
243
247
void
develop
()
const
;
248
252
void
needsUpdate
()
const
{
253
if
(
_developed
!=
NeedsUpdate
)
_oldDeveloped
=
_developed
;
254
_developed
=
NeedsUpdate
;
255
}
256
261
void
stopUpdate
()
const
{
_developed
=
StopUpdate
;}
262
266
PDT::Spin
iSpin
()
const
{
return
_spin
; }
267
271
const
Lorentz5Momentum
&
productionMomentum
()
const
{
272
return
_productionmomentum
;
273
}
274
278
const
Lorentz5Momentum
&
currentMomentum
()
const
{
279
return
_currentmomentum
;
280
}
281
285
bool
timelike
()
const
{
return
_timelike
; }
287
295
int
productionLocation
()
const
{
return
_prodloc
;}
296
300
int
decayLocation
()
const
{
return
_decayloc
;}
302
303
public
:
304
310
RhoDMatrix
rhoMatrix
()
const
{
return
_rhomatrix
; }
311
315
RhoDMatrix
&
rhoMatrix
() {
return
_rhomatrix
; }
316
320
RhoDMatrix
DMatrix
()
const
{
return
_Dmatrix
; }
321
325
RhoDMatrix
&
DMatrix
() {
return
_Dmatrix
; }
327
328
public
:
329
333
bool
isNear
(
const
Lorentz5Momentum
& p) {
334
return
currentMomentum
().
isNear
(p,
_eps
);
335
}
336
337
private
:
338
342
static
NoPIOClassDescription<SpinInfo>
initSpinInfo
;
343
347
SpinInfo
&
operator=
(
const
SpinInfo
&) =
delete
;
348
349
private
:
350
355
void
redevelop
()
const
;
356
360
void
redecay
()
const
;
361
362
private
:
363
367
mutable
VertexPtr
_production
;
368
372
mutable
VertexPtr
_decay
;
373
379
bool
_timelike
;
380
384
mutable
int
_prodloc
;
385
389
mutable
int
_decayloc
;
390
395
mutable
bool
_decayed
;
396
401
mutable
DevelopedStatus
_developed
;
402
407
mutable
DevelopedStatus
_oldDeveloped
;
408
412
mutable
RhoDMatrix
_rhomatrix
;
413
417
mutable
RhoDMatrix
_Dmatrix
;
418
422
PDT::Spin
_spin
;
423
427
Lorentz5Momentum
_productionmomentum
;
428
432
mutable
Lorentz5Momentum
_decaymomentum
;
433
437
Lorentz5Momentum
_currentmomentum
;
438
443
static
const
double
_eps
;
444
};
445
446
}
447
448
449
namespace
ThePEG
{
450
457
template
<>
458
struct
BaseClassTrait<
ThePEG
::SpinInfo,1>:
public
ClassTraitsType {
460
typedef
EventInfoBase
NthBase
;
461
};
462
467
template
<>
468
struct
ClassTraits<
ThePEG
::SpinInfo>
469
:
public
ClassTraitsBase<ThePEG::SpinInfo> {
473
static
string
className
() {
return
"ThePEG::SpinInfo"
; }
474
};
475
478
}
479
480
#endif
/* ThePEG_SpinInfo_H */
ThePEG::EventInfoBase
EventInfoBase is a base class for information objects.
Definition:
EventInfoBase.h:27
ThePEG::Lorentz5Vector< Energy >
ThePEG::Lorentz5Vector::transform
Lorentz5Vector & transform(const LorentzRotation &r)
Perform a Lorentz transformation.
Definition:
Lorentz5Vector.h:259
ThePEG::LorentzRotation
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
Definition:
LorentzRotation.h:27
ThePEG::LorentzVector< Energy >
ThePEG::LorentzVector::isNear
bool isNear(const LorentzVector< Value > &w, double epsilon) const
Are two vectors nearby, using Euclidean measure ?
Definition:
LorentzVector.h:310
ThePEG::NoPIOClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class without persistent dat...
Definition:
ClassDescription.h:381
ThePEG::PDT::Spin
Spin
Definition of enumerated values used for spin information.
Definition:
PDT.h:32
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Rebinder
Rebinder is a class associating pairs of pointers to objects.
Definition:
Rebinder.h:27
ThePEG::RhoDMatrix
The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are require...
Definition:
RhoDMatrix.h:28
ThePEG::SpinInfo
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition:
SpinInfo.h:58
ThePEG::SpinInfo::_oldDeveloped
DevelopedStatus _oldDeveloped
Has the particle been developed? (I.e.
Definition:
SpinInfo.h:407
ThePEG::SpinInfo::productionVertex
void productionVertex(VertexPtr in) const
Set the vertex at which the particle was produced.
Definition:
SpinInfo.h:171
ThePEG::SpinInfo::decay
void decay(bool recursive=false) const
Calculate the rho matrix for the decay if not already done.
ThePEG::SpinInfo::productionLocation
int productionLocation() const
Access to the locations.
Definition:
SpinInfo.h:295
ThePEG::SpinInfo::transform
virtual void transform(const LorentzMomentum &m, const LorentzRotation &r)
Perform a lorentz rotation of the spin information.
Definition:
SpinInfo.h:151
ThePEG::SpinInfo::_productionmomentum
Lorentz5Momentum _productionmomentum
Momentum of the particle when it was produced.
Definition:
SpinInfo.h:427
ThePEG::SpinInfo::_currentmomentum
Lorentz5Momentum _currentmomentum
Current momentum of the particle.
Definition:
SpinInfo.h:437
ThePEG::SpinInfo::_decay
VertexPtr _decay
Pointers to the decay vertex for the particle.
Definition:
SpinInfo.h:372
ThePEG::SpinInfo::needsUpdate
void needsUpdate() const
Needs update.
Definition:
SpinInfo.h:252
ThePEG::SpinInfo::SpinInfo
SpinInfo()
Default constructor.
Definition:
SpinInfo.h:79
ThePEG::SpinInfo::_Dmatrix
RhoDMatrix _Dmatrix
Storage of the decay matrix.
Definition:
SpinInfo.h:417
ThePEG::SpinInfo::DMatrix
RhoDMatrix DMatrix() const
Access the D matrix.
Definition:
SpinInfo.h:320
ThePEG::SpinInfo::hasPolarization
virtual bool hasPolarization() const
Returns true if the polarization() has been implemented in a subclass.
Definition:
SpinInfo.h:111
ThePEG::SpinInfo::reset
virtual void reset()
Reset - Undoes any transformations and calls undecay.
Definition:
SpinInfo.h:159
ThePEG::SpinInfo::_eps
static const double _eps
A small energy for comparing momenta to check if Lorentz Transformations should be performed.
Definition:
SpinInfo.h:443
ThePEG::SpinInfo::productionMomentum
const Lorentz5Momentum & productionMomentum() const
Return the momentum of the particle when it was produced.
Definition:
SpinInfo.h:271
ThePEG::SpinInfo::_prodloc
int _prodloc
Location in the hard vertex array at production.
Definition:
SpinInfo.h:384
ThePEG::SpinInfo::rhoMatrix
RhoDMatrix rhoMatrix() const
Access the rho matrix.
Definition:
SpinInfo.h:310
ThePEG::SpinInfo::_rhomatrix
RhoDMatrix _rhomatrix
Storage of the rho matrix.
Definition:
SpinInfo.h:412
ThePEG::SpinInfo::initSpinInfo
static NoPIOClassDescription< SpinInfo > initSpinInfo
Describe a concrete class without persistent data.
Definition:
SpinInfo.h:342
ThePEG::SpinInfo::_timelike
bool _timelike
Is this is timelike (true) or spacelike (false ) particle? This is used to decide if the particle is ...
Definition:
SpinInfo.h:379
ThePEG::SpinInfo::redecay
void redecay() const
Recursively recalulate all the rho matrices from the top of the chain.
ThePEG::SpinInfo::SpinInfo
SpinInfo(PDT::Spin s, const Lorentz5Momentum &p=Lorentz5Momentum(), bool time=false)
Standard Constructor.
Definition:
SpinInfo.h:90
ThePEG::SpinInfo::undecay
virtual void undecay() const
Calculate the rho matrix for the decay if not already done.
ThePEG::SpinInfo::DMatrix
RhoDMatrix & DMatrix()
Access the D matrix.
Definition:
SpinInfo.h:325
ThePEG::SpinInfo::productionVertex
tcVertexPtr productionVertex() const
Get the vertex at which the particle was produced.
Definition:
SpinInfo.h:184
ThePEG::SpinInfo::_spin
PDT::Spin _spin
The spin of the particle.
Definition:
SpinInfo.h:422
ThePEG::SpinInfo::rhoMatrix
RhoDMatrix & rhoMatrix()
Access the rho matrix.
Definition:
SpinInfo.h:315
ThePEG::SpinInfo::develop
void develop() const
Set the developed flag and calculate the D matrix for the decay.
ThePEG::SpinInfo::DevelopedStatus
DevelopedStatus
Status for the implementation of spin correlations.
Definition:
SpinInfo.h:65
ThePEG::SpinInfo::Developed
@ Developed
Developed.
Definition:
SpinInfo.h:67
ThePEG::SpinInfo::StopUpdate
@ StopUpdate
Stop recalculating at this spin info.
Definition:
SpinInfo.h:69
ThePEG::SpinInfo::NeedsUpdate
@ NeedsUpdate
Developed but needs recalculating due to some change.
Definition:
SpinInfo.h:68
ThePEG::SpinInfo::Undeveloped
@ Undeveloped
Not developed.
Definition:
SpinInfo.h:66
ThePEG::SpinInfo::decayLocation
int decayLocation() const
Decay Location.
Definition:
SpinInfo.h:300
ThePEG::SpinInfo::iSpin
PDT::Spin iSpin() const
Return 2s+1 for the particle.
Definition:
SpinInfo.h:266
ThePEG::SpinInfo::rebind
virtual void rebind(const EventTranslationMap &trans)
Rebind to cloned objects.
ThePEG::SpinInfo::decayVertex
void decayVertex(VertexPtr in) const
Set the vertex at which the particle decayed or branched.
Definition:
SpinInfo.h:189
ThePEG::SpinInfo::redevelop
void redevelop() const
Set the developed flag and calculate the D matrix for the decay, and all decays further up the chain.
ThePEG::SpinInfo::decayVertex
tcVertexPtr decayVertex() const
Get the vertex at which the particle decayed or branched.
Definition:
SpinInfo.h:213
ThePEG::SpinInfo::polarization
virtual DPair polarization() const
Return the angles of the polarization vector as a pair of doubles.
Definition:
SpinInfo.h:121
ThePEG::SpinInfo::currentMomentum
const Lorentz5Momentum & currentMomentum() const
The current momentum of the particle.
Definition:
SpinInfo.h:278
ThePEG::SpinInfo::operator=
SpinInfo & operator=(const SpinInfo &)=delete
Private and non-existent assignment operator.
ThePEG::SpinInfo::decayed
void decayed(bool b) const
Set if the particle has decayed.
Definition:
SpinInfo.h:226
ThePEG::SpinInfo::stopUpdate
void stopUpdate() const
Used for an unstable particle to temporarily stop redevelop and redecay at that particle.
Definition:
SpinInfo.h:261
ThePEG::SpinInfo::timelike
bool timelike() const
Return true if particle is timelike (rather than spacelike).
Definition:
SpinInfo.h:285
ThePEG::SpinInfo::Init
static void Init()
Standard Init function.
ThePEG::SpinInfo::_production
VertexPtr _production
Pointer to the production vertex for the particle.
Definition:
SpinInfo.h:367
ThePEG::SpinInfo::_developed
DevelopedStatus _developed
Has the particle been developed? (I.e.
Definition:
SpinInfo.h:401
ThePEG::SpinInfo::_decayloc
int _decayloc
Location in the hard vertex array at decay.
Definition:
SpinInfo.h:389
ThePEG::SpinInfo::SpinInfo
SpinInfo(const SpinInfo &)
Copy-constructor.
ThePEG::SpinInfo::_decayed
bool _decayed
Has the particle been decayed? (I.e.
Definition:
SpinInfo.h:395
ThePEG::SpinInfo::decayed
bool decayed() const
Has the particle decayed?
Definition:
SpinInfo.h:221
ThePEG::SpinInfo::developed
DevelopedStatus developed() const
Return true if the decay matrix required to perform the decays of the siblings of a particle has been...
Definition:
SpinInfo.h:232
ThePEG::SpinInfo::clone
virtual EIPtr clone() const
Standard clone method.
ThePEG::SpinInfo::isNear
bool isNear(const Lorentz5Momentum &p)
Check if momentum is near to the current momentum.
Definition:
SpinInfo.h:333
ThePEG::SpinInfo::update
void update() const
Method to handle the delelation.
ThePEG::SpinInfo::_decaymomentum
Lorentz5Momentum _decaymomentum
Momentum of the particle when it decayed.
Definition:
SpinInfo.h:432
ThePEG::Units::Lorentz5Momentum
Lorentz5Vector< Energy > Lorentz5Momentum
A momentum in four-dimensional space-time with an explicit invariant mass component.
Definition:
Unitsystem.h:156
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::DPair
pair< double, double > DPair
A pair of doubles.
Definition:
Containers.h:166
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6