139 #include "StParticleTable.hh"
140 #include "StParticleDefinition.hh"
142 #include "StarPDGEncoding.hh"
143 #define kUndefined _undefined_particle_id++
144 long _undefined_particle_id = 2000000000;
146 #if defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500
147 #include <ospace/stl/src/treeaux.cpp>
150 #include "StAntiDeuteron.hh"
151 #include "StAntiTriton.hh"
152 #include "StAntiAlpha.hh"
153 #include "StAntiHelium3.hh"
154 #include "StAntiHyperTriton.hh"
155 #include "StHyperTriton.hh"
156 #include "StHDibaryon.hh"
157 #include "StHyperNuclei.hh"
161 StParticleTable::~StParticleTable() {}
179 StParticleTable::StParticleTable()
185 typedef mGeantPdgMapType::value_type geantPdgPairType;
189 #define Geant2Pdg(X,Y, DCAY) { \
194 mGeantPdgMap.insert(geantPdgPairType(X,Y)); \
201 Geant2Pdg(1, 22, gamma);
202 Geant2Pdg(2, -11, e+);
203 Geant2Pdg(3, 11, e-);
204 Geant2Pdg(4, 12, neutrino);
205 Geant2Pdg(5, -13, mu+);
206 Geant2Pdg(6, 13, mu-);
207 Geant2Pdg(7, 111, pi0);
208 Geant2Pdg(8, 211, pi+);
209 Geant2Pdg(9, -211, pi-);
210 Geant2Pdg(10, 130, K0_Long);
211 Geant2Pdg(11, 321, Kaon+ );
212 Geant2Pdg(12, -321, Kaon- );
213 Geant2Pdg(13, 2112, neutron);
214 Geant2Pdg(14, 2212, proton);
215 Geant2Pdg(15, -2212, antiproton);
216 Geant2Pdg(16, 310, K0_short);
217 Geant2Pdg(17, 221, eta);
218 Geant2Pdg(18, 3122, lambda);
219 Geant2Pdg(19, 3222, sigma+);
220 Geant2Pdg(20, 3212, sigma0);
221 Geant2Pdg(21, 3112, sigma-);
222 Geant2Pdg(22, 3322, Xi0);
223 Geant2Pdg(23, 3312, XiMinus);
224 Geant2Pdg(24, 3334, Omega);
225 Geant2Pdg(25, -2112, AntiNeutron );
226 Geant2Pdg(26, -3122, AntiLambda );
227 Geant2Pdg(27, -3222, AntiSigma- );
228 Geant2Pdg(28, -3212, AntiSigma0 );
229 Geant2Pdg(29, -3112, AntiSigma+ );
230 Geant2Pdg(30, -3322, AntiXi0 );
231 Geant2Pdg(31, -3312, AntiXi+ );
232 Geant2Pdg(32, -3334, AntiOmega+ );
233 Geant2Pdg(33, -15, AntiTau );
234 Geant2Pdg(34, 15, Tau);
235 Geant2Pdg(35, 411, D+ );
236 Geant2Pdg(36, -411, D- );
237 Geant2Pdg(37, 421, D0);
238 Geant2Pdg(38, -421, AntiD0 );
239 Geant2Pdg(39, 431, Ds+ );
240 Geant2Pdg(40, -431, Ds- );
241 Geant2Pdg(41, 4122, Lambda_c+ );
242 Geant2Pdg(42, 24, W+ );
243 Geant2Pdg(43, -24, W- );
244 Geant2Pdg(44, 23, Z0 );
246 Geant2Pdg(45, hid(1,2) , Deuteron );
247 Geant2Pdg(46, hid(1,3) , Triton ) ;
248 Geant2Pdg(47, hid(2,4) , Alpha ) ;
249 Geant2Pdg(48, kUndefined, Geantino );
250 Geant2Pdg(49, hid(2,3) , Helium3 );
251 Geant2Pdg(50, 22, Cerenkov );
253 Geant2Pdg(54, -hid(2,3) , AntiHelium3 );
261 Geant2Pdg(52, kHyperTriton, HyperTriton );
267 Geant2Pdg( 60, +413, DStar+ );
268 Geant2Pdg( 61, -413, DStar- );
269 Geant2Pdg( 62, +423, DStar0 );
270 Geant2Pdg( 63, -423, DStar0Bar );
274 Geant2Pdg(70, +521, B+);
275 Geant2Pdg(71, -521, B-);
276 Geant2Pdg(72, +511, B0);
277 Geant2Pdg(73, -511, B0Bar );
284 Geant2Pdg( 97, -3122, LambdaBar --> pbar + pi+ );
285 Geant2Pdg( 98, +3122, Lambda --> p + pi- );
288 Geant2Pdg( 149, kDalitz, Pi0 --> e+ e- gamma );
292 Geant2Pdg(150, 223, omega);
293 Geant2Pdg(151, 333, phi);
294 Geant2Pdg(152, 113, rho);
295 Geant2Pdg(153, 213, rho+);
296 Geant2Pdg(154, -213, rho-);
297 Geant2Pdg(155, 311, K0);
298 Geant2Pdg(156, -311, K0Bar);
307 Geant2Pdg( 160, 443, JPsi );
308 Geant2Pdg( 167, 100443, Psi2c );
309 Geant2Pdg( 169, 200443, Psi2c );
311 Geant2Pdg( 161, 553, Upsilon1S);
312 Geant2Pdg( 162, 100553, Upsilon2S);
313 Geant2Pdg( 163, 200553, Upsilon3S);
319 Geant2Pdg( 164, 553, Upsilon1S);
320 Geant2Pdg( 165, 100553, Upsilon2S);
321 Geant2Pdg( 166, 200553, Upsilon3S);
323 Geant2Pdg( 168, 443, JPsi);
328 Geant2Pdg( 701, +3224, Sigma(1385)+ );
329 Geant2Pdg( 702, +3114, Sigma(1385)- );
330 Geant2Pdg( 703, -3114, SigmaBar(1385)+ );
331 Geant2Pdg( 704, -3224, SigmaBar(1385)- );
332 Geant2Pdg( 707, 100311, K0-->pi+pi- );
336 Geant2Pdg( +995, +20003122, Lambda(1520) );
337 Geant2Pdg( +996, -20003122, LamdaBar(1520) );
343 Geant2Pdg( 10007, 111, pi0 --> e+ e- gamma );
345 Geant2Pdg( 10010, 130, K0 Long --> nu e- pi+ );
346 Geant2Pdg( 10110, 130, K0 Long --> nu e+ pi- );
348 Geant2Pdg(10017, 221, eta --> e+ e- gamma);
349 Geant2Pdg(10018, 3122, lambda --> p + pi- );
350 Geant2Pdg(10026,-3122, lambdaBar --> pbar + pi+ );
351 Geant2Pdg(10039, 431, D_s_+ --> phi + pi+ w/ phi --> K+ K- );
352 Geant2Pdg(10040, -431, D_s_- --> phi + pi- w/ phi --> K+ K- );
353 Geant2Pdg(10150, 223, omega --> e+ e- );
354 Geant2Pdg(10151, 333, phi --> K+ K- );
355 Geant2Pdg(11151, 333, phi --> e+ e- );
357 Geant2Pdg(10011, 321, Kaon+ --> mu+ nu );
358 Geant2Pdg(10012, -321, Kaon- --> mu- nu );
360 Geant2Pdg(11011, 321, Kaon+ --> pi+ pi0 );
361 Geant2Pdg(11012, -321, Kaon- --> pi- pi0 );
363 Geant2Pdg(12011, 321, Kaon+ --> 2 pi+ pi- );
364 Geant2Pdg(12012, -321, Kaon- --> 2 pi- pi+ );
366 Geant2Pdg(13011, 321, Kaon+ --> e+ nu pi0 );
367 Geant2Pdg(13012, -321, Kaon- --> e- nu pi0 );
369 Geant2Pdg(14011, 321, Kaon+ --> mu+ nu pi0 );
370 Geant2Pdg(14012, -321, Kaon- --> mu- nu pi0 );
372 Geant2Pdg(15011, 321, Kaon+ --> pi+ pi0 pi0 );
373 Geant2Pdg(15012, -321, Kaon- --> pi- pi0 pi0 );
375 Geant2Pdg(10013, 313, Kstar0 --> K+ pi- );
378 Geant2Pdg( 10060, +413, DStar+ );
379 Geant2Pdg( 10061, -413, DStar- );
380 Geant2Pdg( 10062, +423, DStar0 );
381 Geant2Pdg( 10063, -423, DStar0Bar );
384 Geant2Pdg( 40001, -3334, Omega+);
385 Geant2Pdg( 40002, 3334, Omega-);
386 Geant2Pdg( 40003, +3312, XiMinus );
387 Geant2Pdg( 40004, -3312, XiPlus );
388 Geant2Pdg( 40005, +3322, XiZero );
389 Geant2Pdg( 40006, +3322, XiZeroBar );
391 Geant2Pdg( 40007, +3324, XiZero 1530 );
392 Geant2Pdg( 40008, -3324, XiZero 1530 bar );
399 Geant2Pdg( 50045, -hid(1,2) , anti-deuteron );
400 Geant2Pdg( 50046, -hid(1,3) , anti-triton );
401 Geant2Pdg( 50047, -hid(2,4) , anti-alpha );
402 Geant2Pdg( 50048, -hid(2,3) , anti-He3 );
408 Geant2Pdg( 61053, kHyperTriton, H3(Lambda) --> He3 piminus );
409 Geant2Pdg( 61054, kAntiHyperTriton, AntiH3(Lambda) --> AntiHe3 piplus );
410 Geant2Pdg( 62053, kHyperTriton, H3(Lambda) --> d p piminus );
411 Geant2Pdg( 62054, kAntiHyperTriton, AntiH3(Lambda) --> dbar pbar piplus );
412 Geant2Pdg( 63053, kHyperTriton, H3(Lambda) --> quasi 2 body);
413 Geant2Pdg( 63054, kAntiHyperTriton, AntiH3(Lambda) --> quasi 2 body);
415 Geant2Pdg( 61055, hid(1,3,1), H4(Lambda) --> He4 piminus );
416 Geant2Pdg( 61057, hid(2,3,1), He4(Lambda) --> He3 proton piminus );
417 Geant2Pdg( 61059, hid(2,4,1), He5(Lambda) --> He4 proton piminus );
419 Geant2Pdg( 61056, -hid(1,3,1), H4(Lambda)Bar --> He4Bar piplus );
427 Geant2Pdg( 60001, kUndefined, H-Dibaryon --> Lambda + piminus + proton );
429 Geant2Pdg( 60801, 801, H0-strangelet --> proton + Sigma- );
442 return particleTable();
448 return mParticleTable;
451 unsigned int StParticleTable::entries()
const {
return mNameMap.size();}
453 unsigned int StParticleTable::size()
const {
return mNameMap.size();}
455 bool StParticleTable::contains(
const string& name)
const
457 return (findParticle(name) != 0);
460 bool StParticleTable::contains(
int pdgId)
const
462 return (findParticle(pdgId) != 0);
465 bool StParticleTable::containsGeantId(
int geantId)
const
467 return (findParticleByGeantId(geantId) != 0);
472 mNameMapType::const_iterator i = mNameMap.find(name);
473 if (i == mNameMap.end())
481 mPdgMapType::const_iterator p = mPdgMap.find(pdgId);
482 if (p == mPdgMap.end())
499 p = findParticle(
string(
"deuteron"));
502 p = findParticle(
string(
"triton"));
505 p = findParticle(
string(
"alpha"));
508 p = findParticle(
string(
"He3"));
511 p = findParticle(
string(
"opticalphoton"));
514 p = StAntiDeuteron::instance();
517 p = StAntiTriton::instance();
520 p = StAntiAlpha::instance();
525 p = StAntiHelium3::instance();
532 p = StHyperTriton::instance();
538 p = StAntiHyperTriton::instance();
543 p = StHDibaryon::instance();
550 mGeantPdgMapType::const_iterator i = mGeantPdgMap.find(geantId);
551 if (i != mGeantPdgMap.end())
552 p = findParticle((*i).second);
560 typedef mPdgMapType::value_type pdgPairType;
561 typedef mNameMapType::value_type namePairType;
563 if (p->pdgEncoding() != 0)
564 mPdgMap.insert(pdgPairType(p->pdgEncoding(), p));
565 mNameMap.insert(namePairType(p->name(), p));
570 mPdgMapType::iterator i = mPdgMap.find(p->pdgEncoding());
571 if (i != mPdgMap.end()) mPdgMap.erase(i);
573 mNameMapType::iterator j = mNameMap.find(p->name());
574 if (j != mNameMap.end()) mNameMap.erase(j);
577 void StParticleTable::dump(ostream& os)
579 mNameMapType::iterator i;
580 for (i = mNameMap.begin(); i != mNameMap.end(); ++i)
581 cout << *((*i).second) << endl;
585 StVecPtrParticleDefinition
586 StParticleTable::allParticles()
const
588 StVecPtrParticleDefinition vec;
589 mNameMapType::const_iterator i;
590 for (i = mNameMap.begin(); i != mNameMap.end(); ++i)
591 vec.push_back((*i).second);