]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - THijing/AliGenHijing.cxx
Bringing CMakeLists under svn maintenance
[u/mrichter/AliRoot.git] / THijing / AliGenHijing.cxx
index 425e062e3541a19c10e3d5ce0dc9b168ac781268..915e8cf34baeb786f9594e08f74fbaccd822891c 100644 (file)
@@ -45,7 +45,7 @@ AliGenHijing::AliGenHijing()
      fKeep(0),
      fQuench(1),
      fShadowing(1),
-     fDecaysOff(1),
+     fDecaysOff(3),
      fTrigger(0),     
      fEvaluate(0),
      fSelectAll(0),
@@ -74,7 +74,6 @@ AliGenHijing::AliGenHijing()
      fLHC(kFALSE),
      fRandomPz(kFALSE),
      fNoHeavyQuarks(kFALSE),
-     fEventTime(0.),
      fHeader(AliGenHijingEventHeader("Hijing"))
 {
   // Constructor
@@ -90,7 +89,7 @@ AliGenHijing::AliGenHijing(Int_t npart)
      fKeep(0),
      fQuench(1),
      fShadowing(1),
-     fDecaysOff(1),
+     fDecaysOff(3),
      fTrigger(0),     
      fEvaluate(0),
      fSelectAll(0),
@@ -119,7 +118,6 @@ AliGenHijing::AliGenHijing(Int_t npart)
      fLHC(kFALSE),
      fRandomPz(kFALSE),
      fNoHeavyQuarks(kFALSE),
-     fEventTime(0.),
      fHeader(AliGenHijingEventHeader("Hijing"))
 {
 // Default PbPb collisions at 5. 5 TeV
@@ -222,6 +220,7 @@ void AliGenHijing::Generate()
   Float_t polar[3]    =   {0,0,0};
   Float_t origin[3]   =   {0,0,0};
   Float_t origin0[3]  =   {0,0,0};
+  Float_t time0 = 0.;
   Float_t p[3];
   Float_t tof;
 
@@ -238,10 +237,12 @@ void AliGenHijing::Generate()
   fTrials = 0;
   
   for (j = 0;j < 3; j++) origin0[j] = fOrigin[j];
+  time0 = fTimeOrigin;
 
   if(fVertexSmear == kPerEvent) {
       Vertex();
       for (j=0; j < 3; j++) origin0[j] = fVertex[j];
+      time0 = fTime;
   } 
 
 
@@ -283,7 +284,7 @@ void AliGenHijing::Generate()
       fVertex[0] = origin0[0];
       fVertex[1] = origin0[1]; 
       fVertex[2] = origin0[2];
-      
+      fTime = time0;
 //
 //      First select parent particles
 //
@@ -354,11 +355,6 @@ void AliGenHijing::Generate()
          } // selected
       } // particle loop final state
 
-//
-//    Time of the interactions
-      Float_t tInt = 0.;
-      if (fPileUpTimeWindow > 0.) tInt = fPileUpTimeWindow * (2. * gRandom->Rndm() - 1.);
-
 //
 // Write particles to stack
 
@@ -375,16 +371,8 @@ void AliGenHijing::Generate()
              origin[0] = origin0[0]+iparticle->Vx()/10;
              origin[1] = origin0[1]+iparticle->Vy()/10;
              origin[2] = origin0[2]+iparticle->Vz()/10;
-             fEventTime = 0.;
-             
-             if (TestBit(kVertexRange)) {
-                 fEventTime = sign * origin0[2] / 2.99792458e10;
-                 tof = kconv * iparticle->T() + fEventTime;
-             } else {
-                 tof = kconv * iparticle->T();
-                 fEventTime = tInt;
-                 if (fPileUpTimeWindow > 0.) tof += tInt;
-             }
+             tof = time0+kconv * iparticle->T();
+
              imo = -1;
              TParticle* mother = 0;
              if (hasMother) {
@@ -438,6 +426,7 @@ void AliGenHijing::EvaluateCrossSections()
 
     printf("\n Projectile Radius (fm): %f \n",fHijing->GetHIPR1(34));
     printf("\n Target     Radius (fm): %f \n",fHijing->GetHIPR1(35));    
+    printf("\n Inelastic and total cross section (mb) %f %f \n",fHijing->GetHINT1(12), fHijing->GetHINT1(13));    
     Int_t i;
     Float_t oldvalue= 0.;
 
@@ -492,7 +481,7 @@ void AliGenHijing::EvaluateCrossSections()
     fDnDb      = new TGraph(i, b, si2);
 }
 
-Bool_t AliGenHijing::DaughtersSelection(TParticle* iparticle)
+Bool_t AliGenHijing::DaughtersSelection(const TParticle* iparticle)
 {
 //
 // Looks recursively if one of the daughters has been selected
@@ -544,7 +533,7 @@ Bool_t AliGenHijing::SelectFlavor(Int_t pid)
     return res;
 }
 
-Bool_t AliGenHijing::Stable(TParticle*  particle) const
+Bool_t AliGenHijing::Stable(const TParticle*  particle) const
 {
 // Return true for a stable particle
 //
@@ -602,7 +591,7 @@ void AliGenHijing::MakeHeader()
     fHeader.SetTrials(fTrials);
 // Event Vertex
     fHeader.SetPrimaryVertex(fVertex);
-    fHeader.SetInteractionTime(fEventTime);
+    fHeader.SetInteractionTime(fTime);
     AddHeader(&fHeader);
     fCollisionGeometry = &fHeader;
 }