]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/scripts/DrawDigits.C
update from salvatore
[u/mrichter/AliRoot.git] / FMD / scripts / DrawDigits.C
index 572b492eaaeaa0f58ff8c7073f736c4012eea28c..62ddea5b4d5b23684bf58ac4a35ed107ee75b4ef 100644 (file)
@@ -37,17 +37,20 @@ private:
   TH1D* fAdc; // Histogram 
 public:
   //__________________________________________________________________
-  DrawDigits(Int_t m=1100, Double_t amin=-0.5, Double_t amax=1099.5) 
+  DrawDigits(Int_t m=1100, Double_t amin=-0.5, Double_t amax=1023.5) 
+    : AliFMDInput("galice.root")
   { 
     AddLoad(kDigits);
     fAdc = new TH1D("adc", "ADC", m, amin, amax);
     fAdc->SetXTitle("ADC value");
+    fAdc->Sumw2();
   }
   //__________________________________________________________________
   Bool_t ProcessDigit(AliFMDDigit* digit)
   {
     if (!digit) return kTRUE;
     fAdc->Fill(digit->Counts());
+    digit->Print("l");
     return kTRUE;
   }
   //__________________________________________________________________
@@ -60,6 +63,7 @@ public:
     gStyle->SetPadColor(0);
     gStyle->SetPadBorderSize(0);
     fAdc->SetStats(kFALSE);
+    fAdc->Scale(1. / fAdc->GetEntries());
     fAdc->Draw();
     return kTRUE;
   }