BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtParticleFactory Class Reference

#include <EvtParticleFactory.hh>

Static Public Member Functions

static EvtParticleparticleFactory (EvtSpinType::spintype spinType)
 
static EvtParticleparticleFactory (EvtId id, EvtVector4R p4)
 
static EvtParticleparticleFactory (EvtId id, EvtVector4R p4, EvtSpinDensity rho)
 

Detailed Description

Definition at line 31 of file EvtParticleFactory.hh.

Member Function Documentation

◆ particleFactory() [1/3]

EvtParticle * EvtParticleFactory::particleFactory ( EvtId  id,
EvtVector4R  p4 
)
static

Definition at line 207 of file EvtParticleFactory.cc.

208 {
209
210 EvtSpinDensity rho;
212
213 return particleFactory(id,p4,rho);
214
215}
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static EvtParticle * particleFactory(EvtSpinType::spintype spinType)
void SetDiag(int n)
static int getSpinStates(spintype stype)
Definition: EvtSpinType.hh:64

◆ particleFactory() [2/3]

EvtParticle * EvtParticleFactory::particleFactory ( EvtId  id,
EvtVector4R  p4,
EvtSpinDensity  rho 
)
static

Definition at line 100 of file EvtParticleFactory.cc.

102 {
103
105
106 if ( thisSpin == EvtSpinType::SCALAR ) {
107 EvtScalarParticle *myPart;
108 myPart=new EvtScalarParticle;
109 myPart->init(id, p4);
110 myPart->setSpinDensityForward(rho);
111 return myPart;
112 }
113
114 if ( thisSpin == EvtSpinType::VECTOR ) {
115 EvtVectorParticle *myPart;
116 myPart=new EvtVectorParticle;
117 myPart->init(id, p4);
118 myPart->setSpinDensityForward(rho);
119 return myPart;
120 }
121 if ( thisSpin == EvtSpinType::DIRAC ) {
122 EvtDiracParticle *myPart;
123 myPart=new EvtDiracParticle;
124 myPart->init(id, p4);
125 myPart->setSpinDensityForward(rho);
126 return myPart;
127 }
128 if ( thisSpin == EvtSpinType::NEUTRINO ) {
129 EvtNeutrinoParticle *myPart;
130 myPart=new EvtNeutrinoParticle;
131 myPart->init(id, p4);
132 myPart->setSpinDensityForward(rho);
133 return myPart;
134 }
135 if ( thisSpin == EvtSpinType::PHOTON ) {
136 EvtPhotonParticle *myPart;
137 myPart=new EvtPhotonParticle;
138 myPart->init(id, p4);
139 myPart->setSpinDensityForward(rho);
140 return myPart;
141 }
142 if ( thisSpin == EvtSpinType::TENSOR ) {
143 EvtTensorParticle *myPart;
144 myPart=new EvtTensorParticle;
145 myPart->init(id, p4);
146 myPart->setSpinDensityForward(rho);
147 return myPart;
148 }
149 if ( thisSpin == EvtSpinType::STRING ) {
150 EvtStringParticle *myPart;
151 myPart=new EvtStringParticle;
152 myPart->init(id, p4);
153 myPart->setSpinDensityForward(rho);
154 return myPart;
155 }
156 if ( thisSpin == EvtSpinType::SPIN3 ) {
157 EvtHighSpinParticle *myPart;
158 myPart=new EvtHighSpinParticle;
159 myPart->init(id, p4);
160 myPart->setSpinDensityForward(rho);
161 return myPart;
162 }
163 if ( thisSpin == EvtSpinType::SPIN5HALF ) {
164 EvtHighSpinParticle *myPart;
165 myPart=new EvtHighSpinParticle;
166 myPart->init(id, p4);
167 myPart->setSpinDensityForward(rho);
168 return myPart;
169 }
170 if ( thisSpin == EvtSpinType::SPIN7HALF ) {
171 EvtHighSpinParticle *myPart;
172 myPart=new EvtHighSpinParticle;
173 myPart->init(id, p4);
174 myPart->setSpinDensityForward(rho);
175 return myPart;
176 }
177 if ( thisSpin == EvtSpinType::RARITASCHWINGER ) {
180 myPart->init(id, p4);
181 myPart->setSpinDensityForward(rho);
182 return myPart;
183 }
184 if ( thisSpin == EvtSpinType::SPIN4 ) {
185 EvtHighSpinParticle *myPart;
186 myPart=new EvtHighSpinParticle;
187 myPart->init(id, p4);
188 myPart->setSpinDensityForward(rho);
189 return myPart;
190 }
191
192 report(ERROR,"EvtGen")<<"Error in EvtParticleFactory::particleFactory"<<endl;
193 report(ERROR,"EvtGen")<<"Tried to create non-existing particle"
194 <<" with spin type:"<<thisSpin
195 <<" and name:"<<EvtPDL::name(id).c_str()<<endl;
196 report(ERROR,"EvtGen")<<"Will terminate execution"<<endl;
197
198
199
200 ::abort();
201
202 return 0;
203
204}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
void init(EvtId part_n, const EvtVector4R &p4)
void init(EvtId id, const EvtVector4R &p)
void init(EvtId part_n, const EvtVector4R &p4)
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
void setSpinDensityForward(const EvtSpinDensity &rho)
Definition: EvtParticle.hh:321
void init(EvtId part_n, double e, double px, double py, double pz)
void init(EvtId id, const EvtVector4R &p4)
void init(EvtId part_n, double e, double px, double py, double pz)
void init(EvtId id, const EvtVector4R &p4)
void init(EvtId part_n, double e, double px, double py, double pz)
void init(EvtId part_n, double e, double px, double py, double pz)

◆ particleFactory() [3/3]

EvtParticle * EvtParticleFactory::particleFactory ( EvtSpinType::spintype  spinType)
static

Definition at line 46 of file EvtParticleFactory.cc.

46 {
47
48 if ( spinType == EvtSpinType::SCALAR ) {
49 return new EvtScalarParticle;
50 }
51
52 if ( spinType == EvtSpinType::VECTOR ) {
53 return new EvtVectorParticle;
54 }
55 if ( spinType == EvtSpinType::DIRAC ) {
56 return new EvtDiracParticle;
57 }
58 if ( spinType == EvtSpinType::NEUTRINO ) {
59 return new EvtNeutrinoParticle;
60 }
61 if ( spinType == EvtSpinType::PHOTON ) {
62 return new EvtPhotonParticle;
63 }
64 if ( spinType == EvtSpinType::TENSOR ) {
65 return new EvtTensorParticle;
66 }
67 if ( spinType == EvtSpinType::STRING ) {
68 return new EvtStringParticle;
69 }
70 if ( spinType == EvtSpinType::RARITASCHWINGER ) {
72 }
73 if ( spinType == EvtSpinType::SPIN5HALF ) {
74 return new EvtHighSpinParticle;
75 }
76 if ( spinType == EvtSpinType::SPIN3 ) {
77 return new EvtHighSpinParticle;
78 }
79 if ( spinType == EvtSpinType::SPIN7HALF ) {
80 return new EvtHighSpinParticle;
81 }
82 if ( spinType == EvtSpinType::SPIN4 ) {
83 return new EvtHighSpinParticle;
84 }
85
86 report(ERROR,"EvtGen")<<"Error in EvtParticleFactory::particleFactory"<<endl;
87 report(ERROR,"EvtGen")<<"Tried to create non-existing particle"
88 <<" with spin type:"<<spinType<<endl;
89 report(ERROR,"EvtGen")<<"Will terminate execution"<<endl;
90
91
92 ::abort();
93
94 return 0;
95
96
97}

Referenced by EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), EvtGen::generateDecay(), EvtConExc::init(), EvtParticle::makeDaughters(), particleFactory(), and EvtPsi3Sdecay::PHSPDecay().


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