]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDGainDA.cxx
Added summary plots to the gain DA. Changed the preprocessor to read detector coordin...
[u/mrichter/AliRoot.git] / FMD / AliFMDGainDA.cxx
index d39fde56ec26aa3473929bb7c8e2785bc6cd015a..a7d32ccbbb5a41b6d7a45cd1c313d00e53ed7eae 100644 (file)
@@ -54,7 +54,9 @@ AliFMDGainDA::AliFMDGainDA()
     fEventsPerChannel(16),
     fCurrentPulse(16),
     fCurrentChannel(16),
-    fNumberOfStripsPerChip(128)
+    fNumberOfStripsPerChip(128),
+    fSummaryGains("GainsSummary","Summary of gains",51200,0,51200),
+    fCurrentSummaryStrip(0)
 {
   fCurrentPulse.Reset(0);
   fCurrentChannel.Reset(0);
@@ -72,7 +74,9 @@ AliFMDGainDA::AliFMDGainDA(const AliFMDGainDA & gainDA)
      fEventsPerChannel(gainDA.fEventsPerChannel),
      fCurrentPulse(gainDA.fCurrentPulse),
      fCurrentChannel(gainDA.fCurrentChannel),
-     fNumberOfStripsPerChip(gainDA.fNumberOfStripsPerChip)
+     fNumberOfStripsPerChip(gainDA.fNumberOfStripsPerChip),
+     fSummaryGains(gainDA.fSummaryGains),
+     fCurrentSummaryStrip(gainDA.fCurrentSummaryStrip)
 {  
   fCurrentPulse.Reset(0);
   fCurrentChannel.Reset(0);
@@ -191,6 +195,9 @@ void AliFMDGainDA::Analyse(UShort_t det,
              << chi2ndf                     <<"\n";
   
   
+  fSummaryGains.SetBinContent(fCurrentSummaryStrip,fitFunc.GetParameter(1));
+  fSummaryGains.SetBinError(fCurrentSummaryStrip,fitFunc.GetParError(1));
+  fCurrentSummaryStrip++;
   if(fSaveHistograms) {
     gDirectory->cd(GetSectorPath(det,ring, sec, kTRUE));
     
@@ -215,6 +222,13 @@ void AliFMDGainDA::Analyse(UShort_t det,
   }  
 }
 
+//_____________________________________________________________________
+void AliFMDGainDA::Terminate(TFile* diagFile)
+{
+  diagFile->cd();
+  fSummaryGains.Write();
+}
+
 //_____________________________________________________________________
 void AliFMDGainDA::WriteHeaderToFile() 
 {