]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenFLUKAsource.cxx
MC-dependent part of AliRun extracted in AliMC (F.Carminati)
[u/mrichter/AliRoot.git] / EVGEN / AliGenFLUKAsource.cxx
index 262ed422b594a1a7c4c2fca032eba2f2a10b7e19..c99ef8ee3aa5fe7c1265c1b83cc17947a8872b6e 100644 (file)
 // Files can be chained. 
 // Author: andreas.morsch@cern.ch
 
+#include <RVersion.h>
 #include "TPDGCode.h"
 #include "TDatabasePDG.h"
+#include <TVirtualMC.h>
 
 #include "AliGenFLUKAsource.h"
 #include "AliRun.h"
@@ -226,8 +228,11 @@ void AliGenFLUKAsource::Generate()
        part=kIfluge[int(ifip)-1];      
 //
 // Calculate momentum from kinetic energy and mass of the particle
+#if ROOT_VERSION_CODE > 197895
         amass = gMC->ParticleMass(part);
-
+#else
+       amass = (TDatabasePDG::Instance())->GetParticle(part)->Mass();
+#endif
        prwn=fEkin*sqrt(1. + 2.*amass/fEkin);