]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Raw digits writing to file (B.Polichtchouk)
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jan 2007 11:07:26 +0000 (11:07 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jan 2007 11:07:26 +0000 (11:07 +0000)
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSReconstructor.cxx

index e6fc516e0a7f9e413f99b8b197c4c43ed8ea2265..06ee60461440e7ff62550724c9121d1a1e0babdb 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.99  2006/11/07 16:49:51  kharlov
+ * Corrections for next event switch in case of raw data (B.Polichtchouk)
+ *
  * Revision 1.98  2006/10/27 17:14:27  kharlov
  * Introduce AliDebug and AliLog (B.Polichtchouk)
  *
@@ -560,6 +563,13 @@ void AliPHOSClusterizerv1::CleanDigits(TClonesArray * digits)
     digit->SetIndexInList(i) ;     
   }
 
+  //Overwrite digits tree
+  AliPHOSGetter* gime = AliPHOSGetter::Instance();
+  TTree * treeD = gime->TreeD();
+  treeD->Branch("PHOS", &digits);
+  treeD->Fill() ;
+  gime->WriteDigits("OVERWRITE");
+  gime->PhosLoader()->UnloadDigits() ;
 }
 //____________________________________________________________________________
 Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit) const
index 13d5c53f5e7c9e2d4179ce8d70f8a5b9713e2c10..80dde243d93641ae8da6fe6cd27c905148f2b244 100644 (file)
@@ -180,19 +180,8 @@ void AliPHOSReconstructor::FillESD(AliRunLoader* runLoader,
 
   Int_t eventNumber = runLoader->GetEventNumber() ;
 
-  if(eventNumber==0) {
-    rawReader->RewindEvents();
-    rawReader->NextEvent();
-  }
-
   AliPHOSGetter *gime = AliPHOSGetter::Instance();
-
-  Bool_t isOldRCUFormat = kFALSE;
-  TString opt = GetOption();
-  if(opt.Contains("OldRCUFormat"))
-    isOldRCUFormat = kTRUE;
-
-  gime->ReadRaw(rawReader,isOldRCUFormat) ;
+  gime->Event(eventNumber, "DRTP") ; 
 
   TClonesArray *recParticles  = gime->RecParticles();
   Int_t nOfRecParticles = recParticles->GetEntries();
@@ -228,7 +217,7 @@ void AliPHOSReconstructor::FillESD(AliRunLoader* runLoader,
        AliFatal(Form("Digit not found at the expected position %d!",iDigit));
       }
       else {
-       amplList[iDigit] = (UShort_t)(digit->GetEnergy()*500); // Energy in units of GeV/500
+       amplList[iDigit] = (UShort_t)digit->GetEnergy();
        digiList[iDigit] = (UShort_t)(digit->GetId());
       }
     }
@@ -241,7 +230,7 @@ void AliPHOSReconstructor::FillESD(AliRunLoader* runLoader,
     ec->SetM20(emcRP->GetM2z()) ;               //second moment M2z
     ec->SetNExMax(emcRP->GetNExMax());          //number of local maxima
     ec->SetNumberOfDigits(digitMult);           //digit multiplicity
-    ec->SetDigitAmplitude(amplList);            //energies in 1/500 of GeV
+    ec->SetDigitAmplitude(amplList);            //digit energies
     ec->SetDigitIndex(digiList);                //abs id of the cell
     ec->SetEmcCpvDistance(-1);                  //not yet implemented
     ec->SetClusterChi2(-1);                     //not yet implemented