]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - THerwig/AliGenHerwig.cxx
AliPythiaBase() added to constructor
[u/mrichter/AliRoot.git] / THerwig / AliGenHerwig.cxx
index 874682545d4203f266a01ec721b52bb47f6ad158..f33112a4dc7d17384c9ec1529ddeaffc13acecaf 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -34,6 +35,9 @@
 #include "AliRun.h"
 #include "driver.h"
 
+using std::cerr;
+using std::endl;
+
 ClassImp(AliGenHerwig)
 
 
@@ -60,8 +64,6 @@ ClassImp(AliGenHerwig)
     fMaxPr(10),
     fMaxErrors(1000),
     fEnSoft(1),
-    fEv1Pr(0),
-    fEv2Pr(0),
     fFileName(0),
     fEtaMinParton(-20.),     
     fEtaMaxParton(20.),     
@@ -100,8 +102,6 @@ AliGenHerwig::AliGenHerwig(Int_t npart)
     fMaxPr(10),
     fMaxErrors(1000),
     fEnSoft(1),
-    fEv1Pr(0),
-    fEv2Pr(0),
     fFileName(0),
     fEtaMinParton(-20.),     
     fEtaMaxParton(20.),     
@@ -126,13 +126,6 @@ AliGenHerwig::~AliGenHerwig()
 // Destructor
 }
 
-void AliGenHerwig::SetEventListRange(Int_t eventFirst, Int_t eventLast)
-{
-  fEv1Pr = eventFirst;
-  fEv2Pr = eventLast;
-  if ( fEv2Pr == -1 ) fEv2Pr = fEv1Pr;
-}
-
 void AliGenHerwig::Init()
 {
 // Initialisation
@@ -147,6 +140,7 @@ void AliGenHerwig::Init()
   fHerwig->SetPTMIN(fPtHardMin);
   fHerwig->SetPTMAX(fPtHardMax);
   fHerwig->SetPTRMS(fPtRMS);
+  printf("SetMAXPR %15d \n", fMaxPr);
   fHerwig->SetMAXPR(fMaxPr);
   fHerwig->SetMAXER(fMaxErrors);
   fHerwig->SetENSOF(fEnSoft);
@@ -308,14 +302,6 @@ void AliGenHerwig::Generate()
            if (!CheckParton(parton1, parton2))  continue ;
        } 
 
-       // 
-       if (gAlice) {
-           if (gAlice->GetEvNumber()>=fEv1Pr &&
-               gAlice->GetEvNumber()<=fEv2Pr) fHerwig->PrintEvt();
-
-       }
-
-       
        Int_t nc = 0;
        fNprimaries = 0;
        
@@ -340,7 +326,7 @@ void AliGenHerwig::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   iparent = (imo > -1) ? newPos[imo] : -1;
                Int_t   trackIt = (ks == 1) && fTrackIt;
                PushTrack(trackIt, iparent, kf,
@@ -527,7 +513,7 @@ void AliGenHerwig::MakeHeader()
 //
 // Event Vertex 
     fHeader->SetPrimaryVertex(fVertex);
-    
+    fHeader->SetInteractionTime(fTime);
 //
 // Number of primaries
     fHeader->SetNProduced(fNprimaries);