BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVectorParticle Class Reference

#include <EvtVectorParticle.hh>

+ Inheritance diagram for EvtVectorParticle:

Public Member Functions

 EvtVectorParticle ()
 
virtual ~EvtVectorParticle ()
 
void init (EvtId part_n, double e, double px, double py, double pz)
 
void init (EvtId part_n, const EvtVector4R &p)
 
EvtVector4C epsParent (int i) const
 
EvtVector4C eps (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 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)
 
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 30 of file EvtVectorParticle.hh.

Constructor & Destructor Documentation

◆ EvtVectorParticle()

EvtVectorParticle::EvtVectorParticle ( )
inline

Definition at line 34 of file EvtVectorParticle.hh.

34{}

◆ ~EvtVectorParticle()

EvtVectorParticle::~EvtVectorParticle ( )
virtual

Definition at line 31 of file EvtVectorParticle.cc.

31{}

Member Function Documentation

◆ eps()

EvtVector4C EvtVectorParticle::eps ( int  i) const
inlinevirtual

Returns polarization vector in the particles own restframe.

Reimplemented from EvtParticle.

Definition at line 40 of file EvtVectorParticle.hh.

40{return _eps[i];}

◆ epsParent()

EvtVector4C EvtVectorParticle::epsParent ( int  i) const
inlinevirtual

Returns polarization vector in the parents restframe.

Reimplemented from EvtParticle.

Definition at line 39 of file EvtVectorParticle.hh.

39{return boostTo(_eps[i],this->getP4());}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121

◆ init() [1/2]

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

Initialiaze particle with id and 4momentum.

Implements EvtParticle.

Definition at line 47 of file EvtVectorParticle.cc.

47 {
48
49 _validP4=true;
50 setp(p4);
51 setpart_num(part_n);
52
53 _eps[0].set(0.0,1.0,0.0,0.0);
54 _eps[1].set(0.0,0.0,1.0,0.0);
55 _eps[2].set(0.0,0.0,0.0,1.0);
56
58}
void setLifetime()
Definition: EvtParticle.cc:93
void setp(double e, double px, double py, double pz)
Definition: EvtParticle.hh:398
void setpart_num(EvtId particle_number)
Definition: EvtParticle.hh:400
void set(int, const EvtComplex &)
Definition: EvtVector4C.hh:109

◆ init() [2/2]

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

Definition at line 34 of file EvtVectorParticle.cc.

34 {
35
36 _validP4=true;
37 setp(e,px,py,pz);
38 setpart_num(part_n);
39
40 _eps[0].set(0.0,1.0,0.0,0.0);
41 _eps[1].set(0.0,0.0,1.0,0.0);
42 _eps[2].set(0.0,0.0,0.0,1.0);
43
45}

Referenced by EvtGen::generateEvent(), and EvtParticleFactory::particleFactory().

◆ rotateToHelicityBasis() [1/2]

EvtSpinDensity EvtVectorParticle::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 61 of file EvtVectorParticle.cc.

61 {
62
63 static EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
64 static EvtVector4C ezero(0.0,0.0,0.0,1.0);
65 static EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
66
67 static EvtVector4C eplusC(eplus.conj());
68 static EvtVector4C ezeroC(ezero.conj());
69 static EvtVector4C eminusC(eminus.conj());
70
72 R.SetDim(3);
73
74 for ( int i=0; i<3; i++ ) {
75 R.Set(0,i,(eplusC)*_eps[i]);
76 R.Set(1,i,(ezeroC)*_eps[i]);
77 R.Set(2,i,(eminusC)*_eps[i]);
78 }
79
80 return R;
81
82}
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ rotateToHelicityBasis() [2/2]

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

Implements EvtParticle.

Definition at line 85 of file EvtVectorParticle.cc.

87 {
88
89 EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
90 EvtVector4C ezero(0.0,0.0,0.0,1.0);
91 EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
92
93 eplus.applyRotateEuler(alpha,beta,gamma);
94 ezero.applyRotateEuler(alpha,beta,gamma);
95 eminus.applyRotateEuler(alpha,beta,gamma);
96
98 R.SetDim(3);
99
100
101 for ( int i=0; i<3; i++ ) {
102 R.Set(0,i,(eplus.conj())*_eps[i]);
103 R.Set(1,i,(ezero.conj())*_eps[i]);
104 R.Set(2,i,(eminus.conj())*_eps[i]);
105 }
106
107 return R;
108
109}
const double alpha

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