BOSS 8.0.0
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 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 31 of file EvtDiracParticle.hh.

Constructor & Destructor Documentation

◆ EvtDiracParticle()

EvtDiracParticle::EvtDiracParticle ( )

Definition at line 37 of file EvtDiracParticle.cc.

37{ return; }

◆ ~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 39 of file EvtDiracParticle.cc.

39 {
40
41 _validP4 = true;
42 setp( p4 );
43 setpart_num( part_n );
44
45 if ( EvtPDL::getStdHep( part_n ) == 0 )
46 {
47 report( ERROR, "EvtGen" ) << "Error in EvtDiracParticle::init, part_n=" << part_n.getId()
48 << endl;
49 ::abort();
50 }
51
52 if ( EvtPDL::getStdHep( part_n ) > 0 )
53 {
54
55 _spinorRest[0].set( EvtComplex( sqrt( 2.0 * mass() ), 0.0 ), EvtComplex( 0.0, 0.0 ),
56 EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ) );
57 _spinorRest[1].set( EvtComplex( 0.0, 0.0 ), EvtComplex( sqrt( 2.0 * mass() ), 0.0 ),
58 EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ) );
59
60 _spinorParent[0] = boostTo( _spinorRest[0], p4 );
61 _spinorParent[1] = boostTo( _spinorRest[1], p4 );
62 }
63 else
64 {
65
66 _spinorRest[0].set( EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ),
67 EvtComplex( sqrt( 2.0 * mass() ), 0.0 ), EvtComplex( 0.0, 0.0 ) );
68 _spinorRest[1].set( EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ),
69 EvtComplex( sqrt( 2.0 * mass() ), 0.0 ) );
70
71 _spinorParent[0] = boostTo( _spinorRest[0], p4 );
72 _spinorParent[1] = boostTo( _spinorRest[1], p4 );
73 }
74
76}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
int getId() const
Definition EvtId.hh:40
static int getStdHep(EvtId id)
Definition EvtPDL.hh:61
void setLifetime()
void setp(double e, double px, double py, double pz)
double mass() const
void setpart_num(EvtId particle_number)

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 78 of file EvtDiracParticle.cc.

78 {
79
80 EvtDiracSpinor spplus;
81 EvtDiracSpinor spminus;
82
83 double sqmt2 = sqrt( 2. * ( getP4().mass() ) );
84
85 if ( EvtPDL::getStdHep( getId() ) > 0 )
86 {
87 spplus.set( 1.0, 0.0, 0.0, 0.0 );
88 spminus.set( 0.0, 1.0, 0.0, 0.0 );
89 }
90 else
91 {
92 spplus.set( 0.0, 0.0, 1.0, 0.0 );
93 spminus.set( 0.0, 0.0, 0.0, 1.0 );
94 }
95
96 EvtSpinDensity R;
97 R.SetDim( 2 );
98
99 for ( int i = 0; i < 2; i++ )
100 {
101 R.Set( 0, i, ( spplus * _spinorRest[i] ) / sqmt2 );
102 R.Set( 1, i, ( spminus * _spinorRest[i] ) / sqmt2 );
103 }
104
105 return R;
106}
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
EvtId getId() const
const EvtVector4R & getP4() const
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:22

◆ rotateToHelicityBasis() [2/2]

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

Implements EvtParticle.

Definition at line 108 of file EvtDiracParticle.cc.

109 {
110
111 EvtDiracSpinor spplus;
112 EvtDiracSpinor spminus;
113
114 double sqmt2 = sqrt( 2. * ( getP4().mass() ) );
115
116 if ( EvtPDL::getStdHep( getId() ) > 0 )
117 {
118 spplus.set( 1.0, 0.0, 0.0, 0.0 );
119 spminus.set( 0.0, 1.0, 0.0, 0.0 );
120 }
121 else
122 {
123 spplus.set( 0.0, 0.0, 1.0, 0.0 );
124 spminus.set( 0.0, 0.0, 0.0, 1.0 );
125 }
126
127 spplus.applyRotateEuler( alpha, beta, gamma );
128 spminus.applyRotateEuler( alpha, beta, gamma );
129
130 EvtSpinDensity R;
131 R.SetDim( 2 );
132
133 for ( int i = 0; i < 2; i++ )
134 {
135 R.Set( 0, i, ( spplus * _spinorRest[i] ) / sqmt2 );
136 R.Set( 1, i, ( spminus * _spinorRest[i] ) / sqmt2 );
137 }
138
139 return R;
140}
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 38 of file EvtDiracParticle.hh.

38{ 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 37 of file EvtDiracParticle.hh.

37{ return _spinorParent[i]; }

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


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