SetVertexSmear: Delegate call to all generators. (T. Kuhr)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2004 14:44:50 +0000 (14:44 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2004 14:44:50 +0000 (14:44 +0000)
EVGEN/AliGenCocktail.cxx
EVGEN/AliGenCocktail.h

index 36cc83769d62026bbe88d81feae9dc559a163a69..0cd0a24f45c25312ebf6c88386e3e879656b11ff 100644 (file)
@@ -186,6 +186,17 @@ AddGenerator(AliGenerator *Generator, const char* Name, Float_t RateExp)
     gAlice->SetGenEventHeader(header); 
 }
 
+void AliGenCocktail::SetVertexSmear(VertexSmear_t smear)
+{
+// Set vertex smearing and propagate it to the generators
+
+  AliGenerator::SetVertexSmear(smear);
+  TIter next(fEntries);
+  while (AliGenCocktailEntry* entry = (AliGenCocktailEntry*)next()) {
+    entry->Generator()->SetVertexSmear(smear);
+  }
+}
+
 AliGenCocktailEntry *  AliGenCocktail::FirstGenerator()
 {
 // Iterator over generators: Initialisation
index 20afc493b1b720a136cdeec9163359f4222b51e8..8883b6a0826ff776fc3f06b0175475d903b50953 100644 (file)
@@ -25,6 +25,7 @@ class AliGenCocktail : public AliGenerator
     virtual void Init();
     virtual void FinishRun();
     virtual void Generate();
+    virtual void SetVertexSmear(VertexSmear_t smear);
     //
     // Add a new generator to the list
     virtual void AddGenerator