From c5c3e4b0b743c0bfbd26fe71ce3ab3361baf48f4 Mon Sep 17 00:00:00 2001 From: morsch Date: Wed, 7 Jan 2004 10:16:45 +0000 Subject: [PATCH] Unique names for functions enforced. --- EVGEN/AliGenCocktail.cxx | 6 +++++- EVGEN/AliGenParam.cxx | 18 ++++++++++++------ EVGEN/AliGenParam.h | 4 ++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/EVGEN/AliGenCocktail.cxx b/EVGEN/AliGenCocktail.cxx index 24d88d4df01..a039886c5a6 100644 --- a/EVGEN/AliGenCocktail.cxx +++ b/EVGEN/AliGenCocktail.cxx @@ -90,9 +90,13 @@ AddGenerator(AliGenerator *Generator, char* Name, Float_t RateExp) Generator->SetTrackingFlag(fTrackIt); // // Add generator to list - + char theName[256]; + sprintf(theName, "%s_%d",Name, fNGenerators); + Generator->SetName(theName); + AliGenCocktailEntry *entry = new AliGenCocktailEntry(Generator, Name, RateExp); + fEntries->Add(entry); fNGenerators++; } diff --git a/EVGEN/AliGenParam.cxx b/EVGEN/AliGenParam.cxx index fd3d5ed7f7e..4fefe48e44d 100644 --- a/EVGEN/AliGenParam.cxx +++ b/EVGEN/AliGenParam.cxx @@ -166,16 +166,22 @@ void AliGenParam::Init() */ //End_Html - - fPtPara = new TF1("Pt-Parametrization",fPtParaFunc,fPtMin,fPtMax,0); + char name[256]; + sprintf(name, "pt-parameterisation for %s", GetName()); + + fPtPara = new TF1(name, fPtParaFunc, fPtMin, fPtMax,0); // Set representation precision to 10 MeV - Int_t npx= Int_t((fPtMax-fPtMin)/fDeltaPt); + Int_t npx= Int_t((fPtMax - fPtMin) / fDeltaPt); fPtPara->SetNpx(npx); + + sprintf(name, "y-parameterisation for %s", GetName()); + fYPara = new TF1(name, fYParaFunc, fYMin, fYMax, 0); - fYPara = new TF1("Y-Parametrization",fYParaFunc,fYMin,fYMax,0); - TF1 ptPara("Pt-Parametrization(0,15)",fPtParaFunc,0,15,0); - TF1 yPara("Y-Parametrization(-6,6)",fYParaFunc,-6,6,0); + sprintf(name, "pt-for-%s", GetName()); + TF1 ptPara(name ,fPtParaFunc, 0, 15, 0); + sprintf(name, "y-for-%s", GetName()); + TF1 yPara(name, fYParaFunc, -6, 6, 0); // // dN/dy| y=0 diff --git a/EVGEN/AliGenParam.h b/EVGEN/AliGenParam.h index 3ed485a53a4..4788a2c1d33 100644 --- a/EVGEN/AliGenParam.h +++ b/EVGEN/AliGenParam.h @@ -49,8 +49,8 @@ class AliGenParam : public AliGenMC Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function - TF1* fPtPara; //!Transverse momentum parameterisation - TF1* fYPara; //!Rapidity parameterisation + TF1* fPtPara; // Transverse momentum parameterisation + TF1* fYPara; // Rapidity parameterisation Int_t fParam; // Parameterisation type Float_t fdNdy0; // central multiplicity per event Float_t fYWgt; // Y-weight -- 2.43.0