Unique names for functions enforced.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jan 2004 10:16:45 +0000 (10:16 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jan 2004 10:16:45 +0000 (10:16 +0000)
EVGEN/AliGenCocktail.cxx
EVGEN/AliGenParam.cxx
EVGEN/AliGenParam.h

index 24d88d4..a039886 100644 (file)
@@ -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++;
  }
index fd3d5ed..4fefe48 100644 (file)
@@ -166,16 +166,22 @@ void AliGenParam::Init()
     <img src="picts/AliGenParam.gif">
   */
   //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
index 3ed485a..4788a2c 100644 (file)
@@ -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