]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changes needed to read both target and projectile data from Hijing
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Apr 2005 07:29:32 +0000 (07:29 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Apr 2005 07:29:32 +0000 (07:29 +0000)
ZDC/AliZDCDigitizer.cxx
ZDC/AliZDCMerger.cxx

index ab23cb2a23dd41958aca56f3b4f1f0caa5b6fc0a..68ab2159b0abe2fdce9208c45cb5ef3b68f9f836 100644 (file)
@@ -148,9 +148,9 @@ void AliZDCDigitizer::Exec(Option_t* /*option*/)
     if (!genHeader) continue;
     if (!genHeader->InheritsFrom(AliGenHijingEventHeader::Class())) continue;
     impPar = ((AliGenHijingEventHeader*) genHeader)->ImpactParameter();
-    // Until there is only 1 ZDC set the # of spectators must be divided by 2!!!
-    specN = ((AliGenHijingEventHeader*) genHeader)->Spectatorsn() / 2;
-    specP = ((AliGenHijingEventHeader*) genHeader)->Spectatorsp() / 2;
+    // 
+    specN = ((AliGenHijingEventHeader*) genHeader)->ProjSpectatorsn();
+    specP = ((AliGenHijingEventHeader*) genHeader)->ProjSpectatorsp();
     AliDebug(2, Form("\n b = %f fm, Nspecn = %d, Nspecp = %d\n",
                      impPar, specN, specP));
   }
@@ -264,7 +264,7 @@ void AliZDCDigitizer::SpectatorSignal(Int_t SpecType, Int_t numEvents,
   }
   for(pl=0;pl<numEvents;pl++){
      rnd[pl] = (Int_t) (9999*gRandom->Rndm());
-     if(rnd[pl] >= 9998) rnd[pl] = 9997;
+     if(rnd[pl] >= 9999) rnd[pl] = 9998;
      //printf("        rnd[%d] = %d\n",pl,rnd[pl]);     
   }
   // Sorting vector in ascending order with C function QSORT 
index 8f9bb36c23dc09f4c7828d79e19aaa8041b866f2..532e1fbdfd8292b59bd21462b65cc8536bdc39be 100644 (file)
@@ -120,11 +120,9 @@ void AliZDCMerger::Background(Float_t &fImpPar, Int_t &fSpecn, Int_t &fSpecp)
     AliHeader *header = gAlice->GetHeader();
     AliGenEventHeader* mcHeader = header->GenEventHeader();
     fImpPar = ((AliGenHijingEventHeader*) mcHeader)->ImpactParameter();
-    Int_t dSpecn  = ((AliGenHijingEventHeader*) mcHeader)->Spectatorsn();
-    Int_t dSpecp  = ((AliGenHijingEventHeader*) mcHeader)->Spectatorsp();
-    // Until there is only 1 ZDC set the # of spectators must be divided by 2!!!
-    fSpecn = dSpecn/2;
-    fSpecp = dSpecp/2;
+    fSpecn  = ((AliGenHijingEventHeader*) mcHeader)->ProjSpectatorsn();
+    fSpecp  = ((AliGenHijingEventHeader*) mcHeader)->ProjSpectatorsp();
+    // 
     printf("\n HIJING ev. #%d - b = %f fm, Nspecn = %d, Nspecp = %d\n",
             fNEvBgr,fImpPar,fSpecn,fSpecp);
 }
@@ -286,7 +284,7 @@ void AliZDCMerger::ExtractSignal(Int_t SpecType)
   }
   for(pl=0;pl<numEvents;pl++){
      rnd[pl] = (Int_t) (9999*gRandom->Rndm());
-     if(rnd[pl] >= 9998) rnd[pl] = 9997;
+     if(rnd[pl] >= 9999) rnd[pl] = 9998;
      //printf("        rnd[%d] = %d\n",pl,rnd[pl]);     
   }
   // Sorting vector in ascending order with C function QSORT