BOSS
7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtHighSpinParticle.cc
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Environment:
4
// This software is part of the EvtGen package developed jointly
5
// for the BaBar and CLEO collaborations. If you use all or part
6
// of it, please give an appropriate acknowledgement.
7
//
8
// Copyright Information: See EvtGen/COPYRIGHT
9
// Copyright (C) 1998 Caltech, UCSB
10
//
11
// Module: EvtHighSpinParticle.cc
12
//
13
// Description: Class to describe particles with spin>2.
14
//
15
// Modification history:
16
//
17
// RYD August 8, 2000 Module created
18
//
19
//------------------------------------------------------------------------
20
//
21
#include "
EvtGenBase/EvtPatches.hh
"
22
#include "
EvtGenBase/EvtPatches.hh
"
23
#include <iostream>
24
#include <math.h>
25
#include <assert.h>
26
#include "
EvtGenBase/EvtHighSpinParticle.hh
"
27
#include "
EvtGenBase/EvtVector4R.hh
"
28
#include "
EvtGenBase/EvtPDL.hh
"
29
#include "
EvtGenBase/EvtSpinDensity.hh
"
30
#include "
EvtGenBase/EvtdFunction.hh
"
31
32
33
EvtHighSpinParticle::~EvtHighSpinParticle
() {}
34
35
36
void
EvtHighSpinParticle::init
(
EvtId
id
,
const
EvtVector4R
& p4){
37
38
_validP4
=
true
;
39
setp
(p4);
40
setpart_num
(
id
);
41
42
setLifetime
();
43
44
}
45
46
EvtSpinDensity
EvtHighSpinParticle::rotateToHelicityBasis
()
const
{
47
48
int
n
=
EvtSpinType::getSpinStates
(
EvtPDL::getSpinType
(
getId
()));
49
50
EvtSpinDensity
R;
51
R.SetDiag(
n
);
52
53
return
R;
54
55
}
56
57
58
59
EvtSpinDensity
EvtHighSpinParticle::rotateToHelicityBasis
(
double
alpha
,
60
double
beta,
61
double
gamma)
const
{
62
63
int
i,j;
64
65
int
n
=
EvtSpinType::getSpinStates
(
EvtPDL::getSpinType
(
getId
()));
66
67
EvtSpinDensity
R;
68
R.SetDim(
n
);
69
70
int
J2=
EvtSpinType::getSpin2
(
EvtPDL::getSpinType
(
getId
()));
71
72
assert(
n
==J2+1);
73
74
int
*lambda2;
75
76
lambda2=
new
int
[J2+1];
77
78
for
(i=0;i<J2+1;i++){
79
lambda2[i]=J2-i*2;
80
}
81
82
83
for
(i=0;i<
n
;i++){
84
for
(j=0;j<
n
;j++){
85
R.Set(i,j,
EvtdFunction::d
(J2,lambda2[j],lambda2[i],-beta)*
86
exp
(
EvtComplex
(0.0,-0.5*(
alpha
*lambda2[i]-gamma*lambda2[j]))));
87
}
88
}
89
90
delete
[] lambda2;
91
92
return
R;
93
94
95
}
96
97
n
const Int_t n
Definition:
DataBase/tau_mode.c:65
exp
EvtComplex exp(const EvtComplex &c)
Definition:
EvtComplex.hh:252
EvtHighSpinParticle.hh
EvtPDL.hh
EvtPatches.hh
EvtSpinDensity.hh
EvtVector4R.hh
EvtdFunction.hh
alpha
const double alpha
Definition:
FastVertexFit.cxx:4
EvtComplex
Definition:
EvtComplex.hh:28
EvtHighSpinParticle::init
void init(EvtId id, const EvtVector4R &p)
Definition:
EvtHighSpinParticle.cc:36
EvtHighSpinParticle::~EvtHighSpinParticle
virtual ~EvtHighSpinParticle()
Definition:
EvtHighSpinParticle.cc:33
EvtHighSpinParticle::rotateToHelicityBasis
EvtSpinDensity rotateToHelicityBasis() const
Definition:
EvtHighSpinParticle.cc:46
EvtId
Definition:
EvtId.hh:27
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition:
EvtPDL.hh:61
EvtParticle::_validP4
bool _validP4
Definition:
EvtParticle.hh:407
EvtParticle::getId
EvtId getId() const
Definition:
EvtParticle.cc:113
EvtParticle::setLifetime
void setLifetime()
Definition:
EvtParticle.cc:93
EvtParticle::setp
void setp(double e, double px, double py, double pz)
Definition:
EvtParticle.hh:398
EvtParticle::setpart_num
void setpart_num(EvtId particle_number)
Definition:
EvtParticle.hh:400
EvtSpinDensity
Definition:
EvtSpinDensity.hh:27
EvtSpinType::getSpin2
static int getSpin2(spintype stype)
Definition:
EvtSpinType.hh:34
EvtSpinType::getSpinStates
static int getSpinStates(spintype stype)
Definition:
EvtSpinType.hh:64
EvtVector4R
Definition:
EvtVector4R.hh:29
EvtdFunction::d
static double d(int j, int m1, int m2, double theta)
Definition:
EvtdFunction.cc:30
source
Generator
BesEvtGen
BesEvtGen-00-03-90
src
EvtGen
EvtGenBase
EvtHighSpinParticle.cc
Generated by
1.9.6