ClassImp(AliPDG)
- void AliPDG::AddParticlesToPdgDataBase()
+
+
+void AliPDG::AddParticlesToPdgDataBase()
{
//
// Add particles to the PDG data base
+//
+
+ static Bool_t bAdded = kFALSE;
+ // Check if already called
+ if(bAdded)return;
+ bAdded = true;
+
+ TDatabasePDG *pdgDB = TDatabasePDG::Instance();
+ const Int_t kspe=50000000;
- TDatabasePDG *pdgDB = TDatabasePDG::Instance();
- const Int_t kspe=50000000;
-/*
- const Int_t kion=10000000;
+ // PDG nuclear states are 10-digit numbers
+ // 10LZZZAAAI e.g. deuteron is
+ // 1000010020
+ const Int_t kion=1000000000;
+
+ const Double_t kAu2Gev=0.9314943228;
+ const Double_t khSlash = 1.0545726663e-27;
+ const Double_t kErg2Gev = 1/1.6021773349e-3;
+ const Double_t khShGev = khSlash*kErg2Gev;
+ const Double_t kYear2Sec = 3600*24*365.25;
- const Double_t kAu2Gev=0.9314943228;
- const Double_t khSlash = 1.0545726663e-27;
- const Double_t kErg2Gev = 1/1.6021773349e-3;
- const Double_t khShGev = khSlash*kErg2Gev;
- const Double_t kYear2Sec = 3600*24*365.25;
-*/
//
// Bottom mesons
// mass and life-time from PDG
pdgDB->AddParticle("p_diffr+","p_diffr+",0,kTRUE,
0,1,"QCD diffr. state",9902210);
-// Some particles produced by HERWIG
+ // Some particles produced by HERWIG
pdgDB->AddParticle("rho3(1690)0","rho(1690)0", 1.69, kTRUE,
0, 0,"rho", 117);
pdgDB->AddParticle("pion2(1670)0","pion2(1670)0", 1.67, kTRUE,
pdgDB->AddParticle("omega(1650)","omega(1650)", 1.65, kTRUE,
0, 0,"pion", 30223);
-// Done by default now from Pythia6 table!
-//
-//
-// Ions
-//
-/*
- pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
- 0,1,"Ion",kion+10020);
- pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
- khShGev/(12.33*kYear2Sec),1,"Ion",kion+10030);
- pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
- khShGev/(12.33*kYear2Sec),2,"Ion",kion+20040);
- pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
- 0,2,"Ion",kion+20030);
-*/
+ // IONS
+ //
+ // Done by default now from Pythia6 table
+ // Needed for other generators
+ // So check if already defined
+
+
+ Int_t ionCode = kion+10020;
+ if(!pdgDB->GetParticle(ionCode)){
+ pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
+ 0,1,"Ion",ionCode);
+ }
+
+ ionCode = kion+10030;
+ if(!pdgDB->GetParticle(ionCode)){
+ pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
+ khShGev/(12.33*kYear2Sec),1,"Ion",ionCode);
+ }
+
+ ionCode = kion+20030;
+ if(!pdgDB->GetParticle(ionCode)){
+ pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
+ 0,2,"Ion",ionCode);
+ }
+
+ ionCode = kion+20040;
+ if(!pdgDB->GetParticle(ionCode)){
+ pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
+ khShGev/(12.33*kYear2Sec),2,"Ion",ionCode);
+ }
+
+
// Special particles
//
pdgDB->AddParticle("Cherenkov","Cherenkov",0,kFALSE,
Bool_t AliStack::IsStable(Int_t pdg) const
{
-//
-// Decide whether particle (pdg) is stable
-//
+ //
+ // Decide whether particle (pdg) is stable
+ //
+
+
+ // All ions/nucleons are considered as stable
+ // Nuclear code is 10LZZZAAAI
+ if(pdg>1000000000)return kTRUE;
- const Int_t kNstable = 14;
- Int_t i;
-
- Int_t pdgStable[kNstable] = {
- kGamma, // Photon
- kElectron, // Electron
- kMuonPlus, // Muon
- kPiPlus, // Pion
- kKPlus, // Kaon
- kProton, // Proton
- kNeutron, // Neutron
- kLambda0, // Lambda_0
- kSigmaMinus, // Sigma Minus
- kSigma0, // Sigma_0
- kSigmaPlus, // Sigma Plus
- 3312, // Xsi Minus
- 3322, // Xsi
- 3334, // Omega
- };
+ const Int_t kNstable = 14;
+ Int_t i;
+
+ Int_t pdgStable[kNstable] = {
+ kGamma, // Photon
+ kElectron, // Electron
+ kMuonPlus, // Muon
+ kPiPlus, // Pion
+ kKPlus, // Kaon
+ kProton, // Proton
+ kNeutron, // Neutron
+ kLambda0, // Lambda_0
+ kSigmaMinus, // Sigma Minus
+ kSigma0, // Sigma_0
+ kSigmaPlus, // Sigma Plus
+ 3312, // Xsi Minus
+ 3322, // Xsi
+ 3334, // Omega
+ };
- Bool_t isStable = kFALSE;
- for (i = 0; i < kNstable; i++) {
- if (pdg == TMath::Abs(pdgStable[i])) {
- isStable = kTRUE;
- break;
- }
+ Bool_t isStable = kFALSE;
+ for (i = 0; i < kNstable; i++) {
+ if (pdg == TMath::Abs(pdgStable[i])) {
+ isStable = kTRUE;
+ break;
}
-
- return isStable;
+ }
+
+ return isStable;
}
Bool_t AliStack::IsPhysicalPrimary(Int_t index)