]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 24d88d4df01ac88c219c880de5ea073454f5805c..a039886c5a6f8c31100248ba25fac39d4ddb9a09 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 fd3d5ed7f7e706d5fcb4d499150ee07eea85d747..4fefe48e44d9ac0ab398de6449cb036d3cd3b289 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 3ed485a53a429d577c1f93cdda075b57fad81f63..4788a2c1d33595b41f3221d18d707366ab559211 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