Fix for https://savannah.cern.ch/bugs/index.php?93538
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 09:26:25 +0000 (09:26 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 09:26:25 +0000 (09:26 +0000)
EVGEN/AliGenCocktail.cxx
STEER/STEER/AliGenerator.h

index 8fb50fa..800602e 100644 (file)
@@ -231,8 +231,7 @@ AddGenerator(AliGenerator *Generator, const char* Name, Float_t RateExp, TFormul
                ntimes = nsig;
              }
            }
-
-         gen->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2));
+         gen->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2), fTime);
          
          for (Int_t i = 0; i < ntimes; i++) gen->Generate();
          entry->SetLast(partArray->GetEntriesFast());
@@ -252,7 +251,7 @@ AddGenerator(AliGenerator *Generator, const char* Name, Float_t RateExp, TFormul
        entry = (AliGenCocktailEntry*) fEntries->At(i);
        entry->SetFirst(0);
        gen = entry->Generator();
-       gen->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2));
+       gen->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2), fTime);
        gen->Generate();
        entry->SetLast(partArray->GetEntriesFast());
     } 
index eb78a0e..fa2aaf0 100644 (file)
@@ -60,8 +60,8 @@ class AliGenerator : public TNamed, public AliRndm
     virtual void SetVertexSmear(VertexSmear_t smear) {fVertexSmear = smear;}
     virtual void SetCutVertexZ(Float_t cut=999999.) {fCutVertexZ = cut;}
     virtual void SetVertexSource(VertexSource_t source = kInternal) {fVertexSource = source;}
-    virtual void SetVertex(Float_t vx, Float_t vy, Float_t vz)
-       {fVertex[0] = vx; fVertex[1] = vy; fVertex[2] = vz;}
+    virtual void SetVertex(Float_t vx, Float_t vy, Float_t vz, Float_t t = 0)
+    {fVertex[0] = vx; fVertex[1] = vy; fVertex[2] = vz; fTime = t;}
     void SetVertexGenerator(AliVertexGenerator* vertexGenerator)
       {fVertexGenerator = vertexGenerator; fVertexSource = kExternal; fVertexSmear = kPerEvent;}
     void SetPileUpTimeWindow(Float_t pileUpTimeW) {fPileUpTimeWindow = pileUpTimeW;}