Introducing the interaction time into the aliroot generators. In case of gaussian...
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.cxx
index 8917619..6c46455 100644 (file)
@@ -834,7 +834,7 @@ void AliGenPythia::Generate()
                    origin[1] = fVertex[1]+iparticle->Vy()/10; // [cm]
                    origin[2] = fVertex[2]+iparticle->Vz()/10; // [cm]
                    
-                   Float_t tof   = kconv*iparticle->T();
+                   Float_t tof   = fTime + kconv*iparticle->T();
                    Int_t ipa     = iparticle->GetFirstMother()-1;
                    Int_t iparent = (ipa > -1) ? pParent[ipa] : -1;
  
@@ -1174,7 +1174,7 @@ Int_t  AliGenPythia::GenerateMB()
            origin[1] = fVertex[1]+iparticle->Vy()/10; // [cm]
            origin[2] = fVertex[2]+iparticle->Vz()/10; // [cm]
            
-           Float_t tof = fEventTime + kconv * iparticle->T();
+           Float_t tof = fTime + fEventTime + kconv * iparticle->T();
 
            PushTrack(fTrackIt*trackIt, iparent, kf, 
                      p[0], p[1], p[2], p[3], 
@@ -1263,7 +1263,7 @@ void AliGenPythia::MakeHeader()
 //
 // Event Vertex 
     fHeader->SetPrimaryVertex(fVertex);
-    fHeader->SetInteractionTime(fEventTime);
+    fHeader->SetInteractionTime(fTime+fEventTime);
 //
 // Number of primaries
     fHeader->SetNProduced(fNprimaries);