Correction for Savannah bug 70586
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 25 Jul 2010 15:32:21 +0000 (15:32 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 25 Jul 2010 15:32:21 +0000 (15:32 +0000)
ZDC/AliZDC.cxx
ZDC/AliZDCDigitizer.cxx

index 9884dad..220a0bc 100644 (file)
@@ -680,52 +680,47 @@ Bool_t AliZDC::Raw2SDigits(AliRawReader* rawReader)
     return kFALSE;
   }
 
-//  // Event loop
-  Int_t iEvent = 0;
-  while(rawReader->NextEvent()){
-    (AliRunLoader::Instance())->GetEvent(iEvent++);
-    // Create the output digit tree
-    TTree* treeS = loader->TreeS();
-    if(!treeS){
-      loader->MakeTree("S");
-      treeS = loader->TreeS();
-    }
-    //
-    AliZDCSDigit sdigit;
-    AliZDCSDigit* psdigit = &sdigit;
-    const Int_t kBufferSize = 4000;
-    treeS->Branch("ZDC", "AliZDCSDigit",  &psdigit, kBufferSize);
-    //
-    AliZDCRawStream rawStream(rawReader);
-    Int_t sector[2], resADC, rawADC, corrADC, nPheVal;
-    Int_t jcount = 0;
-    while(rawStream.Next()){
-      if(rawStream.IsADCDataWord()){
-        //For the moment only in-time SDigits are foreseen (1st 48 raw values)
-        if(jcount < kNch){ 
-          for(Int_t j=0; j<2; j++) sector[j] = rawStream.GetSector(j);
-         rawADC = rawStream.GetADCValue();
-         resADC = rawStream.GetADCGain();
-         //printf("\t RAw2SDigits raw%d ->  RawADC[%d, %d, %d] read\n",
-         //    jcount, sector[0], sector[1], rawADC);
-         //
-         corrADC = rawADC - Pedestal(sector[0], sector[1], resADC);
-         if(corrADC<0) corrADC=0;
-         nPheVal = ADCch2Phe(sector[0], sector[1], corrADC, resADC);
-          //
-         //printf("\t \t ->  SDigit[%d, %d, %d] created\n",
-         //    sector[0], sector[1], nPheVal);
-         //
-          new(psdigit) AliZDCSDigit(sector, (Float_t) nPheVal, 0.);
-          treeS->Fill();
-          jcount++;
-        }
-      }//IsADCDataWord
-    }//rawStream.Next
-    // write the output tree
-    fLoader->WriteSDigits("OVERWRITE");
-    fLoader->UnloadSDigits();
-  }//Event loop 
+  // Create the output digit tree
+  TTree* treeS = loader->TreeS();
+  if(!treeS){
+    loader->MakeTree("S");
+    treeS = loader->TreeS();
+  }
+  //
+  AliZDCSDigit sdigit;
+  AliZDCSDigit* psdigit = &sdigit;
+  const Int_t kBufferSize = 4000;
+  treeS->Branch("ZDC", "AliZDCSDigit",  &psdigit, kBufferSize);
+  //
+  AliZDCRawStream rawStream(rawReader);
+  Int_t sector[2], resADC, rawADC, corrADC, nPheVal;
+  Int_t jcount = 0;
+  while(rawStream.Next()){
+    if(rawStream.IsADCDataWord()){
+      //For the moment only in-time SDigits are foreseen (1st 48 raw values)
+      if(jcount < kNch){ 
+       for(Int_t j=0; j<2; j++) sector[j] = rawStream.GetSector(j);
+        rawADC = rawStream.GetADCValue();
+        resADC = rawStream.GetADCGain();
+        //printf("\t RAw2SDigits raw%d ->  RawADC[%d, %d, %d] read\n",
+        //    jcount, sector[0], sector[1], rawADC);
+        //
+        corrADC = rawADC - Pedestal(sector[0], sector[1], resADC);
+        if(corrADC<0) corrADC=0;
+        nPheVal = ADCch2Phe(sector[0], sector[1], corrADC, resADC);
+       //
+        //printf("\t \t ->  SDigit[%d, %d, %d] created\n",
+        //    sector[0], sector[1], nPheVal);
+        //
+       new(psdigit) AliZDCSDigit(sector, (Float_t) nPheVal, 0.);
+       treeS->Fill();
+       jcount++;
+      }
+    }//IsADCDataWord
+  }//rawStream.Next
+  // write the output tree
+  fLoader->WriteSDigits("OVERWRITE");
+  fLoader->UnloadSDigits();
    
   return kTRUE;
 }
index ba52ea1..9fbc6a2 100644 (file)
@@ -149,16 +149,16 @@ Bool_t AliZDCDigitizer::Init()
   if((beamType.CompareTo("P-P")) == 0 || (beamType.CompareTo("p-p")) == 0){
     //PTM gains rescaled to beam energy for p-p
     if(fBeamEnergy != 0){
-    for(Int_t j = 0; j < 5; j++){
-        fPMGain[0][j] = 1.515831*(661.444/fBeamEnergy+0.000740671)*10000000;
-        fPMGain[1][j] = 0.674234*(864.350/fBeamEnergy+0.00234375)*10000000;
-        fPMGain[3][j] = 1.350938*(661.444/fBeamEnergy+0.000740671)*10000000; 
-        fPMGain[4][j] = 0.678597*(864.350/fBeamEnergy+0.00234375)*10000000;
-    }
-    fPMGain[2][1] = 0.869654*(1.32312-0.000101515*fBeamEnergy)*10000000;
-    fPMGain[2][2] = 1.030883*(1.32312-0.000101515*fBeamEnergy)*10000000;
-    AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
-       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][0]));
+      for(Int_t j = 0; j < 5; j++){
+          fPMGain[0][j] = 1.515831*(661.444/fBeamEnergy+0.000740671)*10000000;
+          fPMGain[1][j] = 0.674234*(864.350/fBeamEnergy+0.00234375)*10000000;
+          fPMGain[3][j] = 1.350938*(661.444/fBeamEnergy+0.000740671)*10000000; 
+          fPMGain[4][j] = 0.678597*(864.350/fBeamEnergy+0.00234375)*10000000;
+      }
+      fPMGain[2][1] = 0.869654*(1.32312-0.000101515*fBeamEnergy)*10000000;
+      fPMGain[2][2] = 1.030883*(1.32312-0.000101515*fBeamEnergy)*10000000;
+      AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
+       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
     }
   }
   else if((beamType.CompareTo("A-A")) == 0){
@@ -175,7 +175,7 @@ Bool_t AliZDCDigitizer::Init()
        fPMGain[4][j] = 100000./scalGainFactor;    
     }
     AliInfo(Form("    PMT gains for Pb-Pb @ %1.0f+%1.0f A GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
-       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][0]));
+       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
   }
     
   // ADC Caen V965