Ions have to be added to root particle database.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Jan 2006 16:54:20 +0000 (16:54 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Jan 2006 16:54:20 +0000 (16:54 +0000)
TFluka/TFluka.cxx
TFluka/TFluka.h

index 6acbbfc..05661d2 100644 (file)
@@ -62,6 +62,7 @@
 #include "TLorentzVector.h"
 #include "TArrayI.h"
 #include "TArrayD.h"
+#include "TDatabasePDG.h"
 
 // Fluka methods that may be needed.
 #ifndef WIN32 
@@ -215,7 +216,11 @@ void TFluka::Init() {
     }
 
     fApplication->InitGeometry();
-    
+
+    //
+    // Add ions to PDG Data base
+    //
+     AddParticlesToPdgDataBase();
 }
 
 
@@ -2107,3 +2112,32 @@ extern "C" {
     }
 }
 
+void TFluka::AddParticlesToPdgDataBase() const
+{
+
+//
+// Add particles to the PDG data base
+
+    TDatabasePDG *pdgDB = TDatabasePDG::Instance();
+
+    const Int_t kion=10000000;
+
+    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;
+//
+// Ions
+//
+
+  pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
+                     0,3,"Ion",kion+10020);
+  pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
+                     khShGev/(12.33*kYear2Sec),3,"Ion",kion+10030);
+  pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
+                     khShGev/(12.33*kYear2Sec),6,"Ion",kion+20040);
+  pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
+                     0,6,"Ion",kion+20030);
+}
+
index 1dead60..e9a3b2b 100644 (file)
@@ -382,6 +382,7 @@ class TFluka : public TVirtualMC {
   virtual void         ForceDecayTime(Float_t){;}
   private:
   void PrintHeader();
+  void AddParticlesToPdgDataBase() const;
   TFluka(const TFluka &mc): TVirtualMC(mc) {;}
   TFluka & operator=(const TFluka &) {return (*this);}