BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDiracParticle Class Reference

#include <EvtDiracParticle.hh>

+ Inheritance diagram for EvtDiracParticle:

Public Member Functions

 EvtDiracParticle ()
 
virtual ~EvtDiracParticle ()
 
void init (EvtId part_n, const EvtVector4R &p4)
 
EvtDiracSpinor spParent (int i) const
 
EvtDiracSpinor sp (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 31 of file EvtDiracParticle.hh.

Constructor & Destructor Documentation

◆ EvtDiracParticle()

EvtDiracParticle::EvtDiracParticle ( )

Definition at line 38 of file EvtDiracParticle.cc.

38 {
39
40 return;
41
42}

◆ ~EvtDiracParticle()

EvtDiracParticle::~EvtDiracParticle ( )
virtual

Definition at line 35 of file EvtDiracParticle.cc.

35{}

Member Function Documentation

◆ init()

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

Initialiaze particle with id and 4momentum.

Implements EvtParticle.

Definition at line 44 of file EvtDiracParticle.cc.

44 {
45
46 _validP4=true;
47 setp(p4);
48 setpart_num(part_n);
49
50 if (EvtPDL::getStdHep(part_n)==0){
51 report(ERROR,"EvtGen") << "Error in EvtDiracParticle::init, part_n="
52 << part_n.getId()<<endl;
53 ::abort();
54 }
55
56 if (EvtPDL::getStdHep(part_n)>0){
57
58 _spinorRest[0].set(EvtComplex(sqrt(2.0*mass()),0.0),EvtComplex(0.0,0.0),
59 EvtComplex(0.0,0.0),EvtComplex(0.0,0.0));
60 _spinorRest[1].set(EvtComplex(0.0,0.0),EvtComplex(sqrt(2.0*mass()),0.0),
61 EvtComplex(0.0,0.0),EvtComplex(0.0,0.0));
62
63 _spinorParent[0]=boostTo(_spinorRest[0],p4);
64 _spinorParent[1]=boostTo(_spinorRest[1],p4);
65
66
67 }
68 else{
69
70 _spinorRest[0].set(EvtComplex(0.0,0.0),EvtComplex(0.0,0.0),
71 EvtComplex(sqrt(2.0*mass()),0.0),EvtComplex(0.0,0.0));
72 _spinorRest[1].set(EvtComplex(0.0,0.0),EvtComplex(0.0,0.0),
73 EvtComplex(0.0,0.0),EvtComplex(sqrt(2.0*mass()),0.0));
74
75 _spinorParent[0]=boostTo(_spinorRest[0],p4);
76 _spinorParent[1]=boostTo(_spinorRest[1],p4);
77
78
79
80 }
81
83}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
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)
int getId() const
Definition: EvtId.hh:41
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
void setLifetime()
Definition: EvtParticle.cc:93
void setp(double e, double px, double py, double pz)
Definition: EvtParticle.hh:384
double mass() const
Definition: EvtParticle.cc:127
void setpart_num(EvtId particle_number)
Definition: EvtParticle.hh:386

Referenced by EvtBsquark::decay(), and EvtParticleFactory::particleFactory().

◆ rotateToHelicityBasis() [1/2]

EvtSpinDensity EvtDiracParticle::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 88 of file EvtDiracParticle.cc.

88 {
89
90 EvtDiracSpinor spplus;
91 EvtDiracSpinor spminus;
92
93 double sqmt2=sqrt(2.*(getP4().mass()));
94
95 if (EvtPDL::getStdHep(getId())>0){
96 spplus.set(1.0,0.0,0.0,0.0);
97 spminus.set(0.0,1.0,0.0,0.0);
98 } else {
99 spplus.set(0.0,0.0,1.0,0.0);
100 spminus.set(0.0,0.0,0.0,1.0);
101 }
102
103
105 R.SetDim(2);
106
107 for (int i=0; i<2; i++) {
108 R.Set(0,i,(spplus*_spinorRest[i])/sqmt2);
109 R.Set(1,i,(spminus*_spinorRest[i])/sqmt2);
110 }
111
112 return R;
113
114}
EvtId getId() const
Definition: EvtParticle.cc:113
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ rotateToHelicityBasis() [2/2]

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

Implements EvtParticle.

Definition at line 117 of file EvtDiracParticle.cc.

119 {
120
121
122 EvtDiracSpinor spplus;
123 EvtDiracSpinor spminus;
124
125 double sqmt2=sqrt(2.*(getP4().mass()));
126
127 if (EvtPDL::getStdHep(getId())>0){
128 spplus.set(1.0,0.0,0.0,0.0);
129 spminus.set(0.0,1.0,0.0,0.0);
130 } else {
131 spplus.set(0.0,0.0,1.0,0.0);
132 spminus.set(0.0,0.0,0.0,1.0);
133 }
134
135 spplus.applyRotateEuler(alpha,beta,gamma);
136 spminus.applyRotateEuler(alpha,beta,gamma);
137
139 R.SetDim(2);
140
141 for (int i=0; i<2; i++) {
142 R.Set(0,i,(spplus*_spinorRest[i])/sqmt2);
143 R.Set(1,i,(spminus*_spinorRest[i])/sqmt2);
144 }
145
146 return R;
147
148}
const double alpha
void applyRotateEuler(double alpha, double beta, double gamma)

◆ sp()

EvtDiracSpinor EvtDiracParticle::sp ( int  i) const
inlinevirtual

Returns Dirac spinor in the particles own restframe for a Dirac particle.

Reimplemented from EvtParticle.

Definition at line 40 of file EvtDiracParticle.hh.

40{return _spinorRest[i];}

◆ spParent()

EvtDiracSpinor EvtDiracParticle::spParent ( int  i) const
inlinevirtual

Returns Dirac spinor in the parents restframe for a Dirac particle.

Reimplemented from EvtParticle.

Definition at line 39 of file EvtDiracParticle.hh.

39{return _spinorParent[i];}

Referenced by EvtBsquark::decay(), and EvtLambdaP_BarGamma::decay().


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