CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtTensorParticle Class Reference

#include <EvtTensorParticle.hh>

+ Inheritance diagram for EvtTensorParticle:

Public Member Functions

 EvtTensorParticle ()
 
virtual ~EvtTensorParticle ()
 
void init (EvtId part_n, double e, double px, double py, double pz)
 
void init (EvtId part_n, const EvtVector4R &p4)
 
EvtTensor4C epsTensorParent (int i) const
 
EvtTensor4C epsTensor (int i) 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
 
virtual void init (EvtId part_n, const EvtVector4R &p4)=0
 
void addDaug (EvtParticle *node)
 
void decay ()
 
void deleteTree ()
 
void deleteDaughters (bool keepChannel=false)
 
void setChannel (int i)
 
void setGeneratorFlag (int flag)
 
int getGeneratorFlag ()
 
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)
 
virtual EvtSpinDensity rotateToHelicityBasis () const =0
 
virtual EvtSpinDensity rotateToHelicityBasis (double alpha, double beta, double gamma) const =0
 
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

- 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 27 of file EvtTensorParticle.hh.

Constructor & Destructor Documentation

◆ EvtTensorParticle()

EvtTensorParticle::EvtTensorParticle ( )
inline

Definition at line 31 of file EvtTensorParticle.hh.

31{}

◆ ~EvtTensorParticle()

EvtTensorParticle::~EvtTensorParticle ( )
virtual

Definition at line 32 of file EvtTensorParticle.cc.

32{}

Member Function Documentation

◆ epsTensor()

EvtTensor4C EvtTensorParticle::epsTensor ( int  i) const
virtual

Returns tensor in the particles own restframe for a spin 2 particle.

Reimplemented from EvtParticle.

Definition at line 78 of file EvtTensorParticle.cc.

78 {
79
80 return eps[i];
81
82} //eps

◆ epsTensorParent()

EvtTensor4C EvtTensorParticle::epsTensorParent ( int  i) const
virtual

Returns tensor in the parents restframe for a spin 2 particle.

Reimplemented from EvtParticle.

Definition at line 68 of file EvtTensorParticle.cc.

68 {
69
70 EvtTensor4C temp=eps[i];
71
72 temp.applyBoostTo(this->getP4());
73 return temp;
74
75} //epsParent
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
void applyBoostTo(const EvtVector4R &p4)
Definition: EvtTensor4C.cc:107

◆ init() [1/2]

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

Initialiaze particle with id and 4momentum.

Implements EvtParticle.

Definition at line 34 of file EvtTensorParticle.cc.

34 {
35
36 init(part_n,p4.get(0),p4.get(1)
37 ,p4.get(2),p4.get(3));
38
40
41
42}
void setLifetime()
Definition: EvtParticle.cc:93
void init(EvtId part_n, double e, double px, double py, double pz)
double get(int i) const
Definition: EvtVector4R.hh:179

◆ init() [2/2]

void EvtTensorParticle::init ( EvtId  part_n,
double  e,
double  px,
double  py,
double  pz 
)

Definition at line 44 of file EvtTensorParticle.cc.

44 {
45
46 _validP4=true;
47 setp(e,px,py,pz);
48 setpart_num(part_n);
49
50 eps[0].setdiag(0.0,-1.0/sqrt(6.0),-1.0/sqrt(6.0),
51 2.0/sqrt(6.0));
52 eps[1].setdiag(0.0,1.0/sqrt(2.0),-1.0/sqrt(2.0),0.0);
53 eps[2].setdiag(0.0,0.0,0.0,0.0);
54 eps[3].setdiag(0.0,0.0,0.0,0.0);
55 eps[4].setdiag(0.0,0.0,0.0,0.0);
56
57 eps[2].set(1,2,EvtComplex(1.0/sqrt(2.0),0.0));
58 eps[2].set(2,1,EvtComplex(1.0/sqrt(2.0),0.0));
59 eps[3].set(1,3,EvtComplex(1.0/sqrt(2.0),0.0));
60 eps[3].set(3,1,EvtComplex(1.0/sqrt(2.0),0.0));
61 eps[4].set(2,3,EvtComplex(1.0/sqrt(2.0),0.0));
62 eps[4].set(3,2,EvtComplex(1.0/sqrt(2.0),0.0));
63
65
66}
void setp(double e, double px, double py, double pz)
Definition: EvtParticle.hh:384
void setpart_num(EvtId particle_number)
Definition: EvtParticle.hh:386
void setdiag(double t00, double t11, double t22, double t33)
Definition: EvtTensor4C.cc:218
void set(int i, int j, const EvtComplex &c)
Definition: EvtTensor4C.hh:122

Referenced by EvtKstarstargamma::decay(), init(), and EvtParticleFactory::particleFactory().

◆ rotateToHelicityBasis() [1/2]

EvtSpinDensity EvtTensorParticle::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 86 of file EvtTensorParticle.cc.

86 {
87
88
89 static EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
90 static EvtVector4C ezero(0.0,0.0,0.0,1.0);
91 static EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
92
93 static EvtTensor4C dPpp(directProd(eplus,eplus));
94 static EvtTensor4C dPp0(directProd(eplus,ezero));
95 static EvtTensor4C dP0p(directProd(ezero,eplus));
96 static EvtTensor4C dPpm(directProd(eplus,eminus));
97 static EvtTensor4C dP00(directProd(ezero,ezero));
98 static EvtTensor4C dPmp(directProd(eminus,eplus));
99 static EvtTensor4C dPmm(directProd(eminus,eminus));
100 static EvtTensor4C dPm0(directProd(eminus,ezero));
101 static EvtTensor4C dP0m(directProd(ezero,eminus));
102
103 static EvtTensor4C es0(conj(dPpp));
104 static EvtTensor4C es1(conj((1/sqrt(2.0))*dPp0 +(1/sqrt(2.0))*dP0p));
105 static EvtTensor4C es2(conj((1/sqrt(6.0))*dPpm +(2/sqrt(6.0))*dP00 +(1/sqrt(6.0))*dPmp));
106 static EvtTensor4C es3(conj((1/sqrt(2.0))*dPm0 +(1/sqrt(2.0))*dP0m));
107 static EvtTensor4C es4(conj(dPmm));
108
109
111 R.SetDim(5);
112
113 for (int j=0; j<5; j++) {
114 R.Set(0,j,cont(es0,eps[j]));
115 R.Set(1,j,cont(es1,eps[j]));
116 R.Set(2,j,cont(es2,eps[j]));
117 R.Set(3,j,cont(es3,eps[j]));
118 R.Set(4,j,cont(es4,eps[j]));
119 }
120 return R;
121
122}
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cc:175
Evt3Rank3C directProd(const EvtVector3C &c1, const EvtVector3C &c2, const EvtVector3C &c3)
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)
Definition: EvtTensor4C.cc:312
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ rotateToHelicityBasis() [2/2]

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

Implements EvtParticle.

Definition at line 125 of file EvtTensorParticle.cc.

127 {
128
129 EvtTensor4C es[5];
130
131 static EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
132 static EvtVector4C ezero(0.0,0.0,0.0,1.0);
133 static EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
134
135 eplus.applyRotateEuler(alpha,beta,gamma);
136 ezero.applyRotateEuler(alpha,beta,gamma);
137 eminus.applyRotateEuler(alpha,beta,gamma);
138
139 for (int i=0; i<5; i++) es[i].zero();
140
141 es[0]=directProd(eplus,eplus);
142 es[1] =(1/sqrt(2.0))*directProd(eplus,ezero)
143 +(1/sqrt(2.0))*directProd(ezero,eplus);
144 es[2] =(1/sqrt(6.0))*directProd(eplus,eminus)
145 +(2/sqrt(6.0))*directProd(ezero,ezero)
146 +(1/sqrt(6.0))*directProd(eminus,eplus);
147 es[3] =(1/sqrt(2.0))*directProd(eminus,ezero)
148 +(1/sqrt(2.0))*directProd(ezero,eminus);
149 es[4]=directProd(eminus,eminus);
150
151 for (int i=0; i<5; i++) es[i]=conj(es[i]);
152
154 R.SetDim(5);
155
156 for (int i=0; i<5; i++)
157 for (int j=0; j<5; j++)
158 R.Set(i,j,cont(es[i],eps[j]));
159
160 return R;
161
162}
const DifNumber zero
const double alpha

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