#include <EvtParticleFactory.hh>
Static Public Member Functions | |
static EvtParticle * | particleFactory (EvtSpinType::spintype spinType) |
static EvtParticle * | particleFactory (EvtId id, EvtVector4R p4) |
static EvtParticle * | particleFactory (EvtId id, EvtVector4R p4, EvtSpinDensity rho) |
Definition at line 31 of file EvtParticleFactory.hh.
EvtParticle * EvtParticleFactory::particleFactory | ( | EvtId | id, | |
EvtVector4R | p4, | |||
EvtSpinDensity | rho | |||
) | [static] |
Definition at line 100 of file EvtParticleFactory.cc.
References EvtSpinType::DIRAC, calibUtil::ERROR, EvtPDL::getSpinType(), EvtRaritaSchwingerParticle::init(), EvtHighSpinParticle::init(), EvtStringParticle::init(), EvtTensorParticle::init(), EvtPhotonParticle::init(), EvtNeutrinoParticle::init(), EvtDiracParticle::init(), EvtVectorParticle::init(), EvtScalarParticle::init(), EvtPDL::name(), EvtSpinType::NEUTRINO, EvtSpinType::PHOTON, EvtSpinType::RARITASCHWINGER, report(), EvtSpinType::SCALAR, EvtParticle::setSpinDensityForward(), EvtSpinType::SPIN3, EvtSpinType::SPIN4, EvtSpinType::SPIN5HALF, EvtSpinType::SPIN7HALF, EvtSpinType::STRING, EvtSpinType::TENSOR, and EvtSpinType::VECTOR.
00102 { 00103 00104 EvtSpinType::spintype thisSpin=EvtPDL::getSpinType(id); 00105 00106 if ( thisSpin == EvtSpinType::SCALAR ) { 00107 EvtScalarParticle *myPart; 00108 myPart=new EvtScalarParticle; 00109 myPart->init(id, p4); 00110 myPart->setSpinDensityForward(rho); 00111 return myPart; 00112 } 00113 00114 if ( thisSpin == EvtSpinType::VECTOR ) { 00115 EvtVectorParticle *myPart; 00116 myPart=new EvtVectorParticle; 00117 myPart->init(id, p4); 00118 myPart->setSpinDensityForward(rho); 00119 return myPart; 00120 } 00121 if ( thisSpin == EvtSpinType::DIRAC ) { 00122 EvtDiracParticle *myPart; 00123 myPart=new EvtDiracParticle; 00124 myPart->init(id, p4); 00125 myPart->setSpinDensityForward(rho); 00126 return myPart; 00127 } 00128 if ( thisSpin == EvtSpinType::NEUTRINO ) { 00129 EvtNeutrinoParticle *myPart; 00130 myPart=new EvtNeutrinoParticle; 00131 myPart->init(id, p4); 00132 myPart->setSpinDensityForward(rho); 00133 return myPart; 00134 } 00135 if ( thisSpin == EvtSpinType::PHOTON ) { 00136 EvtPhotonParticle *myPart; 00137 myPart=new EvtPhotonParticle; 00138 myPart->init(id, p4); 00139 myPart->setSpinDensityForward(rho); 00140 return myPart; 00141 } 00142 if ( thisSpin == EvtSpinType::TENSOR ) { 00143 EvtTensorParticle *myPart; 00144 myPart=new EvtTensorParticle; 00145 myPart->init(id, p4); 00146 myPart->setSpinDensityForward(rho); 00147 return myPart; 00148 } 00149 if ( thisSpin == EvtSpinType::STRING ) { 00150 EvtStringParticle *myPart; 00151 myPart=new EvtStringParticle; 00152 myPart->init(id, p4); 00153 myPart->setSpinDensityForward(rho); 00154 return myPart; 00155 } 00156 if ( thisSpin == EvtSpinType::SPIN3 ) { 00157 EvtHighSpinParticle *myPart; 00158 myPart=new EvtHighSpinParticle; 00159 myPart->init(id, p4); 00160 myPart->setSpinDensityForward(rho); 00161 return myPart; 00162 } 00163 if ( thisSpin == EvtSpinType::SPIN5HALF ) { 00164 EvtHighSpinParticle *myPart; 00165 myPart=new EvtHighSpinParticle; 00166 myPart->init(id, p4); 00167 myPart->setSpinDensityForward(rho); 00168 return myPart; 00169 } 00170 if ( thisSpin == EvtSpinType::SPIN7HALF ) { 00171 EvtHighSpinParticle *myPart; 00172 myPart=new EvtHighSpinParticle; 00173 myPart->init(id, p4); 00174 myPart->setSpinDensityForward(rho); 00175 return myPart; 00176 } 00177 if ( thisSpin == EvtSpinType::RARITASCHWINGER ) { 00178 EvtRaritaSchwingerParticle *myPart; 00179 myPart=new EvtRaritaSchwingerParticle; 00180 myPart->init(id, p4); 00181 myPart->setSpinDensityForward(rho); 00182 return myPart; 00183 } 00184 if ( thisSpin == EvtSpinType::SPIN4 ) { 00185 EvtHighSpinParticle *myPart; 00186 myPart=new EvtHighSpinParticle; 00187 myPart->init(id, p4); 00188 myPart->setSpinDensityForward(rho); 00189 return myPart; 00190 } 00191 00192 report(ERROR,"EvtGen")<<"Error in EvtParticleFactory::particleFactory"<<endl; 00193 report(ERROR,"EvtGen")<<"Tried to create non-existing particle" 00194 <<" with spin type:"<<thisSpin 00195 <<" and name:"<<EvtPDL::name(id).c_str()<<endl; 00196 report(ERROR,"EvtGen")<<"Will terminate execution"<<endl; 00197 00198 00199 00200 ::abort(); 00201 00202 return 0; 00203 00204 }
EvtParticle * EvtParticleFactory::particleFactory | ( | EvtId | id, | |
EvtVector4R | p4 | |||
) | [static] |
Definition at line 207 of file EvtParticleFactory.cc.
References EvtSpinType::getSpinStates(), EvtPDL::getSpinType(), particleFactory(), and EvtSpinDensity::SetDiag().
00208 { 00209 00210 EvtSpinDensity rho; 00211 rho.SetDiag(EvtSpinType::getSpinStates(EvtPDL::getSpinType(id))); 00212 00213 return particleFactory(id,p4,rho); 00214 00215 }
EvtParticle * EvtParticleFactory::particleFactory | ( | EvtSpinType::spintype | spinType | ) | [static] |
Definition at line 46 of file EvtParticleFactory.cc.
References EvtSpinType::DIRAC, calibUtil::ERROR, EvtSpinType::NEUTRINO, EvtSpinType::PHOTON, EvtSpinType::RARITASCHWINGER, report(), EvtSpinType::SCALAR, EvtSpinType::SPIN3, EvtSpinType::SPIN4, EvtSpinType::SPIN5HALF, EvtSpinType::SPIN7HALF, EvtSpinType::STRING, EvtSpinType::TENSOR, and EvtSpinType::VECTOR.
Referenced by EvtDecay::callBesEvtGen(), EvtDecay::callEvtGen(), EvtDecay::FinalState_make(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), EvtGen::generateDecay(), EvtConExc::init(), EvtParticle::makeDaughters(), particleFactory(), EvtPsi3Sdecay::PHSPDecay(), and EvtDecay::SuperBody3decay_make().
00046 { 00047 00048 if ( spinType == EvtSpinType::SCALAR ) { 00049 return new EvtScalarParticle; 00050 } 00051 00052 if ( spinType == EvtSpinType::VECTOR ) { 00053 return new EvtVectorParticle; 00054 } 00055 if ( spinType == EvtSpinType::DIRAC ) { 00056 return new EvtDiracParticle; 00057 } 00058 if ( spinType == EvtSpinType::NEUTRINO ) { 00059 return new EvtNeutrinoParticle; 00060 } 00061 if ( spinType == EvtSpinType::PHOTON ) { 00062 return new EvtPhotonParticle; 00063 } 00064 if ( spinType == EvtSpinType::TENSOR ) { 00065 return new EvtTensorParticle; 00066 } 00067 if ( spinType == EvtSpinType::STRING ) { 00068 return new EvtStringParticle; 00069 } 00070 if ( spinType == EvtSpinType::RARITASCHWINGER ) { 00071 return new EvtRaritaSchwingerParticle; 00072 } 00073 if ( spinType == EvtSpinType::SPIN5HALF ) { 00074 return new EvtHighSpinParticle; 00075 } 00076 if ( spinType == EvtSpinType::SPIN3 ) { 00077 return new EvtHighSpinParticle; 00078 } 00079 if ( spinType == EvtSpinType::SPIN7HALF ) { 00080 return new EvtHighSpinParticle; 00081 } 00082 if ( spinType == EvtSpinType::SPIN4 ) { 00083 return new EvtHighSpinParticle; 00084 } 00085 00086 report(ERROR,"EvtGen")<<"Error in EvtParticleFactory::particleFactory"<<endl; 00087 report(ERROR,"EvtGen")<<"Tried to create non-existing particle" 00088 <<" with spin type:"<<spinType<<endl; 00089 report(ERROR,"EvtGen")<<"Will terminate execution"<<endl; 00090 00091 00092 ::abort(); 00093 00094 return 0; 00095 00096 00097 }