X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=EVGEN%2FAliGenGeVSim.cxx;h=b22b588083351cdba35f8c39ee2f4a3879bbdd75;hp=7204daad670e443dd9c401732d2394af58703c97;hb=330378456818217c875a96e575a0d12e978d15af;hpb=5420ed567f1daa24c5615b6005e3a21b3f62ce44 diff --git a/EVGEN/AliGenGeVSim.cxx b/EVGEN/AliGenGeVSim.cxx index 7204daad670..b22b5880833 100644 --- a/EVGEN/AliGenGeVSim.cxx +++ b/EVGEN/AliGenGeVSim.cxx @@ -63,7 +63,7 @@ // //////////////////////////////////////////////////////////////////////////////// - +#include #include #include #include @@ -568,8 +568,13 @@ void AliGenGeVSim::SetFormula(Int_t pdg) { // standard models +#if ROOT_VERSION_CODE >= ROOT_VERSION(5,99,0) + if (fModel == 1) fCurrentForm = fPtFormula->GetFormula(); + if (fModel > 1 && fModel < 5) fCurrentForm = fPtYFormula[fModel-2]->GetFormula(); +#else if (fModel == 1) fCurrentForm = fPtFormula; if (fModel > 1 && fModel < 5) fCurrentForm = fPtYFormula[fModel-2]; +#endif // custom model defined by a formula @@ -577,12 +582,22 @@ void AliGenGeVSim::SetFormula(Int_t pdg) { if (fModel == 5) { fCurrentForm = 0; +#if ROOT_VERSION_CODE >= ROOT_VERSION(5,99,0) + TF2* tmpTF2 = (TF2*)gROOT->GetFunction(pattern[0]); + if (tmpTF2) fCurrentForm = tmpTF2->GetFormula(); +#else fCurrentForm = (TF2*)gROOT->GetFunction(pattern[0]); +#endif if (!fCurrentForm) { snprintf(buff, 40, pattern[1], pdg); +#if ROOT_VERSION_CODE >= ROOT_VERSION(5,99,0) + tmpTF2 = (TF2*)gROOT->GetFunction(buff); + if (tmpTF2) fCurrentForm = tmpTF2->GetFormula(); +#else fCurrentForm = (TF2*)gROOT->GetFunction(buff); +#endif if (!fCurrentForm) Error(where, msg[0], pdg); }