// Files can be chained.
// Author: andreas.morsch@cern.ch
-#include "TPDGCode.h"
-#include "TDatabasePDG.h"
+#include <stdlib.h>
+
+#include <TDatabasePDG.h>
+#include <TPDGCode.h>
+#include <RVersion.h>
+#include <TChain.h>
+#include <TFile.h>
+#include <TTree.h>
+#include <TVirtualMC.h>
#include "AliGenFLUKAsource.h"
#include "AliRun.h"
-
-#include <TFile.h>
-#include <TTree.h>
-#include <TChain.h>
-#include <stdlib.h>
ClassImp(AliGenFLUKAsource)
AliGenFLUKAsource::AliGenFLUKAsource()
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);
}
-void AliGenFLUKAsource::Copy(AliGenFLUKAsource &) const
+void AliGenFLUKAsource::Copy(TObject &) const
{
Fatal("Copy","Not implemented!\n");
}