BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRaritaSchwingerParticle Class Reference

#include <EvtRaritaSchwingerParticle.hh>

+ Inheritance diagram for EvtRaritaSchwingerParticle:

Public Member Functions

 EvtRaritaSchwingerParticle ()
 
virtual ~EvtRaritaSchwingerParticle ()
 
void init (EvtId id, const EvtVector4R &p4)
 
EvtRaritaSchwinger spRSParent (int) const
 
EvtRaritaSchwinger spRS (int) const
 
EvtSpinDensity rotateToHelicityBasis () const
 
EvtSpinDensity rotateToHelicityBasis (double alpha, double beta, double gamma) const
 
- Public Member Functions inherited from EvtParticle
 EvtParticle ()
 
virtual ~EvtParticle ()
 
virtual EvtVector4C epsParent (int i) const
 
virtual EvtVector4C eps (int i) const
 
virtual EvtVector4C epsParentPhoton (int i)
 
virtual EvtVector4C epsPhoton (int i)
 
virtual EvtDiracSpinor spParent (int) const
 
virtual EvtDiracSpinor sp (int) const
 
virtual EvtDiracSpinor spParentNeutrino () const
 
virtual EvtDiracSpinor spNeutrino () const
 
virtual EvtTensor4C epsTensorParent (int i) const
 
virtual EvtTensor4C epsTensor (int i) const
 
void addDaug (EvtParticle *node)
 
void decay ()
 
void deleteTree ()
 
void deleteDaughters (bool keepChannel=false)
 
void setChannel (int i)
 
void setGeneratorFlag (int flag)
 
int getGeneratorFlag ()
 
void setIntFlag (std::vector< int > vi)
 
std::vector< int > getIntFlag ()
 
void makeDaughters (int ndaug, EvtId *id)
 
double initializePhaseSpace (int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
 
EvtParticlegetDaug (int i)
 
EvtParticlenextIter (EvtParticle *rootOfTree=0)
 
void makeStdHep (EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
 
void makeStdHep (EvtStdHep &stdhep)
 
EvtVector4R getP4Lab ()
 
EvtVector4R getP4Restframe ()
 
EvtVector4R get4Pos ()
 
EvtParticlegetParent ()
 
void insertDaugPtr (int idaug, EvtParticle *partptr)
 
double mass () const
 
int firstornot () const
 
void setFirstOrNot ()
 
void resetFirstOrNot ()
 
EvtId getId () const
 
EvtSpinType::spintype getSpinType () const
 
int getSpinStates () const
 
const EvtVector4RgetP4 () const
 
void setP4 (const EvtVector4R &p4)
 
int getChannel () const
 
int getNDaug () const
 
void resetNDaug ()
 
void printTree () const
 
void printTreeRec (int level) const
 
std::string writeTreeRec (std::string) const
 
void dumpTree () const
 
void dumpTreeRec (int level, int dj) const
 
std::string treeStr () const
 
std::string treeStrRec (int level) const
 
void printParticle () const
 
void setLifetime (double tau)
 
void setLifetime ()
 
double getLifetime ()
 
void setDiagonalSpinDensity ()
 
void setVectorSpinDensity ()
 
void setPolarizedSpinDensity (double r00, double r11, double r22)
 
void setSpinDensityForward (const EvtSpinDensity &rho)
 
void setSpinDensityForwardHelicityBasis (const EvtSpinDensity &rho)
 
void setSpinDensityForwardHelicityBasis (const EvtSpinDensity &rho, double alpha, double beta, double gamma)
 
EvtSpinDensity getSpinDensityForward ()
 
void setSpinDensityBackward (const EvtSpinDensity &rho)
 
EvtSpinDensity getSpinDensityBackward ()
 
void noLifeTime ()
 
void setId (EvtId id)
 
void initDecay (bool useMinMass=false)
 
void generateMassTree ()
 
double compMassProb ()
 
void setMass (double m)
 
bool isInitialized ()
 
bool hasValidP4 ()
 
bool isDecayed ()
 
double * decayProb ()
 
void setDecayProb (double p)
 
void setInclusiveMode (int im)
 
int getInclusiveMode ()
 

Additional Inherited Members

- Static Public Attributes inherited from EvtParticle
static int _NextLevelDauNum =0
 
static EvtId _NextLevelId [20]
 
static EvtVector4R _NextLevelP4 [20]
 
- Protected Member Functions inherited from EvtParticle
void setp (double e, double px, double py, double pz)
 
void setp (const EvtVector4R &p4)
 
void setpart_num (EvtId particle_number)
 
- Protected Attributes inherited from EvtParticle
bool _validP4
 

Detailed Description

Definition at line 30 of file EvtRaritaSchwingerParticle.hh.

Constructor & Destructor Documentation

◆ EvtRaritaSchwingerParticle()

EvtRaritaSchwingerParticle::EvtRaritaSchwingerParticle ( )

Definition at line 38 of file EvtRaritaSchwingerParticle.cc.

38 {
39
40 return;
41
42}

◆ ~EvtRaritaSchwingerParticle()

EvtRaritaSchwingerParticle::~EvtRaritaSchwingerParticle ( )
virtual

Definition at line 34 of file EvtRaritaSchwingerParticle.cc.

34 {
35}

Member Function Documentation

◆ init()

void EvtRaritaSchwingerParticle::init ( EvtId part_n,
const EvtVector4R & p4 )
virtual

Initialiaze particle with id and 4momentum.

Implements EvtParticle.

Definition at line 44 of file EvtRaritaSchwingerParticle.cc.

44 {
45
46 _validP4=true;
47 setp(p4);
48 setpart_num(id);
49
50 if (EvtPDL::getStdHep(id)==0){
51 report(ERROR,"EvtGen") << "Error in EvtRaritaSchwingerParticle::init, part_n="
52 << id.getId()<<endl;
53 ::abort();
54 }
55
56 static EvtVector4R e1(0.0,1.0,0.0,0.0);
57 static EvtVector4R e2(0.0,0.0,1.0,0.0);
58 static EvtVector4R e3(0.0,0.0,0.0,1.0);
59
60
61 if (EvtPDL::getStdHep(id)>0){
62
63 EvtDiracSpinor u1,u2;
64
65 u1.set(EvtComplex(sqrt(2.0*mass()),0.0),EvtComplex(0.0,0.0),
66 EvtComplex(0.0,0.0),EvtComplex(0.0,0.0));
67 u2.set(EvtComplex(0.0,0.0),EvtComplex(sqrt(2.0*mass()),0.0),
68 EvtComplex(0.0,0.0),EvtComplex(0.0,0.0));
69
70
71
72 _spinorRest[0]=dirProd(e3,u1+u2);
73 _spinorRest[1]=dirProd(e1+EvtComplex(0.0,1.0)*e2,u1);
74 _spinorRest[2]=dirProd(e1-EvtComplex(0.0,1.0)*e2,u2);
75 _spinorRest[3]=dirProd(e1,(u1+u2))+dirProd(EvtComplex(0.0,1.0)*e2,(u1-u2));
76
77 _spinor[0]=boostTo(_spinorRest[0],p4);
78 _spinor[1]=boostTo(_spinorRest[1],p4);
79 _spinor[2]=boostTo(_spinorRest[2],p4);
80 _spinor[3]=boostTo(_spinorRest[3],p4);
81
82 }
83 else{
84
85 EvtDiracSpinor u1,u2;
86
87 u1.set(EvtComplex(0.0,0.0),EvtComplex(0.0,0.0),
88 EvtComplex(sqrt(2.0*mass()),0.0),EvtComplex(0.0,0.0));
89 u2.set(EvtComplex(0.0,0.0),EvtComplex(0.0,0.0),
90 EvtComplex(0.0,0.0),EvtComplex(sqrt(2.0*mass()),0.0));
91
92
93
94 _spinorRest[0]=dirProd(e3,(u1+u2));
95 _spinorRest[1]=dirProd(e1+EvtComplex(0.0,1.0)*e2,u1);
96 _spinorRest[2]=dirProd(e1-EvtComplex(0.0,1.0)*e2,u2);
97 _spinorRest[3]=dirProd(e1,(u1+u2))+dirProd(EvtComplex(0.0,1.0)*e2,(u1-u2));
98
99 _spinor[0]=boostTo(_spinorRest[0],p4);
100 _spinor[1]=boostTo(_spinorRest[1],p4);
101 _spinor[2]=boostTo(_spinorRest[2],p4);
102 _spinor[3]=boostTo(_spinorRest[3],p4);
103
104 }
105
106 setLifetime();
107}
Double_t e1
Double_t e2
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
EvtRaritaSchwinger dirProd(EvtVector4R v, EvtDiracSpinor u)
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ ERROR
Definition EvtReport.hh:49
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
static int getStdHep(EvtId id)
Definition EvtPDL.hh:56
void setLifetime()
void setp(double e, double px, double py, double pz)
double mass() const
void setpart_num(EvtId particle_number)
double double double * p4
Definition qcdloop1.h:77

Referenced by EvtParticleFactory::particleFactory().

◆ rotateToHelicityBasis() [1/2]

EvtSpinDensity EvtRaritaSchwingerParticle::rotateToHelicityBasis ( ) const
virtual

Returns a rotation matrix need to rotate the basis state to the helicity basis. The EvtSpinDensity matrix is just use as a matrix here. This function is to be implemented in each derived class.

Implements EvtParticle.

Definition at line 124 of file EvtRaritaSchwingerParticle.cc.

124 {
125
126 double sqmt2=sqrt(2.0*(this->getP4().mass()));
127
128 EvtDiracSpinor spplus;
129 EvtDiracSpinor spminus;
130
131 if (EvtPDL::getStdHep(getId())>0){
132 spplus.set(1.0,0.0,0.0,0.0);
133 spminus.set(0.0,1.0,0.0,0.0);
134 } else {
135 spplus.set(0.0,0.0,1.0,0.0);
136 spminus.set(0.0,0.0,0.0,1.0);
137 }
138
139 EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
140 EvtVector4C ezero(0.0,0.0,0.0,1.0);
141 EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
142
143 EvtRaritaSchwinger sppp=dirProd(eplus,spplus);
144 EvtRaritaSchwinger spp=dirProd(sqrt(2.0/3.0)*ezero,spplus)+
145 dirProd(sqrt(1.0/3.0)*eplus,spminus);
146 EvtRaritaSchwinger spm=dirProd(sqrt(2.0/3.0)*ezero,spminus)+
147 dirProd(sqrt(1.0/3.0)*eminus,spplus);
148 EvtRaritaSchwinger spmm=dirProd(eminus,spminus);
149
150 //
151
153 R.SetDim(4);
154
155
156 for ( int i=0; i<4; i++) {
157 R.Set(0,i,(sppp*_spinorRest[i])/sqmt2);
158 R.Set(1,i,(spp*_spinorRest[i])/sqmt2);
159 R.Set(2,i,(spm*_spinorRest[i])/sqmt2);
160 R.Set(3,i,(spmm*_spinorRest[i])/sqmt2);
161 }
162
163 return R;
164
165}
EvtId getId() const
const EvtVector4R & getP4() const
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:27

◆ rotateToHelicityBasis() [2/2]

EvtSpinDensity EvtRaritaSchwingerParticle::rotateToHelicityBasis ( double alpha,
double beta,
double gamma ) const
virtual

Implements EvtParticle.

Definition at line 168 of file EvtRaritaSchwingerParticle.cc.

170 {
171
172 EvtDiracSpinor spplus;
173 EvtDiracSpinor spminus;
174
175 if (EvtPDL::getStdHep(getId())>0){
176 spplus.set(1.0,0.0,0.0,0.0);
177 spminus.set(0.0,1.0,0.0,0.0);
178 } else {
179 spplus.set(0.0,0.0,1.0,0.0);
180 spminus.set(0.0,0.0,0.0,1.0);
181 }
182
183 EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
184 EvtVector4C ezero(0.0,0.0,0.0,1.0);
185 EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
186
187 EvtRaritaSchwinger sppp=dirProd(eplus,spplus);
188 EvtRaritaSchwinger spp=dirProd(sqrt(2.0/3.0)*ezero,spplus)+
189 dirProd(sqrt(1.0/3.0)*eplus,spminus);
190 EvtRaritaSchwinger spm=dirProd(sqrt(2.0/3.0)*ezero,spminus)+
191 dirProd(sqrt(1.0/3.0)*eminus,spplus);
192 EvtRaritaSchwinger spmm=dirProd(eminus,spminus);
193 //
194
195 sppp.applyRotateEuler(alpha,beta,gamma);
196 spp.applyRotateEuler(alpha,beta,gamma);
197 spm.applyRotateEuler(alpha,beta,gamma);
198 spmm.applyRotateEuler(alpha,beta,gamma);
199
201 R.SetDim(4);
202
203 double sqmt2=sqrt(2.0*(this->getP4().mass()));
204
205 for ( int i=0; i<4; i++) {
206 R.Set(0,i,(sppp*_spinorRest[i])/sqmt2);
207 R.Set(1,i,(spp*_spinorRest[i])/sqmt2);
208 R.Set(2,i,(spm*_spinorRest[i])/sqmt2);
209 R.Set(3,i,(spmm*_spinorRest[i])/sqmt2);
210 }
211
212 return R;
213
214}
const double alpha
void applyRotateEuler(double alpha, double beta, double gamma)

◆ spRS()

EvtRaritaSchwinger EvtRaritaSchwingerParticle::spRS ( int i) const

Definition at line 116 of file EvtRaritaSchwingerParticle.cc.

116 {
117
118 return _spinorRest[i];
119
120}

◆ spRSParent()

EvtRaritaSchwinger EvtRaritaSchwingerParticle::spRSParent ( int i) const

Definition at line 110 of file EvtRaritaSchwingerParticle.cc.

110 {
111
112 return _spinor[i];
113
114}

The documentation for this class was generated from the following files: