Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2797)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2798)
@@ -4,4 +4,26 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+
+ 2004/01/14: Wolfgang Wittek
+
+   * macros/ONOFFAnalysis.C
+     - current version
+
+   * mhist/MHSigmaTheta.[h,cc]
+     - replace MPedestalCam by MPedPhotCam
+
+   * manalysis/MPad.[h,cc]
+               MSigmabar.[h,cc]
+               MSigmabarCalc.[h,cc]
+               MCT1PadONOFF.[h,cc]
+               MCT1PadSchweizer.[h,cc]
+               MPadding.[h,cc]
+     - replace MPedestalCam by MPedPhotCam
+
+   * manalysis/MPedPhotPix.[h,cc]
+     - uncomment SetRms()
+
+
  2004/01/13: Markus Gaug
  
Index: trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C
===================================================================
--- trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C	(revision 2797)
+++ trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C	(revision 2798)
@@ -197,5 +197,5 @@
 
     // Job A : 
-    //  - produce MHSigmaTheta plots for ON and OFF data
+    //  - produce MHSigmaTheta plots for ON, OFF and MC data
     //  - write out (or read in) these MHSigmaTheta plots
     //  - read ON (or OFF or MC) data
@@ -289,14 +289,10 @@
   // Job A
   //=========
-    // read ON data file 
-
-    //  - produce the 2D-histogram "sigmabar versus Theta" 
-    //    (SigmaTheta_ON.root) for ON data
-    //    (to be used for the padding of the MC gamma data)
-
-    //  - write a file of ON events (ON1.root) 
+
+    //  - produce the histograms "sigmabar versus Theta", etc. 
+    //    for ON, OFF and MC data (to be used for the padding)
+    //
+    //  - write root file of padded ON (OFF, MC) events (ON1.root, ...) 
     //    (after the standard cuts, before the g/h separation)
-    //    (to be used together with the corresponding MC gamma file (MC1.root)
-    //     for the optimization of the g/h separation)
 
 
@@ -304,7 +300,7 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job A" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job A" << endl;
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobA, WPad, RPad, Wout = " 
+    gLog << "Macro ONOFFAnalysis : JobA, WPad, RPad, Wout = " 
          << (JobA ? "kTRUE" : "kFALSE")  << ",  " 
          << (WPad ? "kTRUE" : "kFALSE")  << ",  " 
@@ -318,5 +314,7 @@
     TString fileON  = onfile;
     TString fileOFF = offfile;
-    gLog << "fileON, fileOFF = " << fileON << ",  " << fileOFF << endl;
+    TString fileMC  = mcfile;
+    gLog << "fileON, fileOFF, fileMC = " << fileON << ",  " 
+         << fileOFF << ",  " << fileMC   << endl;
 
     // name of file to conatin the histograms for the padding
@@ -353,5 +351,5 @@
     // generate histograms to be used in the padding
     // 
-    // read ON and OFF data files
+    // read ON, OFF and MC data files
     // generate (or read in) the padding histograms for ON and OFF data
     //                       and merge these histograms
@@ -526,4 +524,84 @@
 
       //-----------------------------------------
+      // MC events
+
+      gLog << "------------" << endl;
+      gLog << "MC events :" << endl;
+      gLog << "------------" << endl;
+
+      MTaskList tlistmc;
+      MParList plistmc;
+
+    MReadMarsFile  readMC("Events", fileMC);
+    read.DisableAutoScheme();
+    //      MCT1ReadPreProc readMC(fileMC);
+
+      MFSelBasic selthetamc;
+      selthetamc.SetCuts(-100.0, 29.5, 35.5);
+      MContinue contthetamc(&selthetamc);
+
+      MBlindPixelCalc blindmc;
+      blindmc.SetUseBlindPixels();
+
+      MFSelBasic selbasicmc;
+      MContinue contbasicmc(&selbasicmc);
+
+      MHBlindPixels blindMC("BlindPixelsMC");
+      MFillH fillblindMC("BlindPixelsMC[MHBlindPixels]", "MBlindPixels");
+      fillblindMC.SetName("FillBlindMC");
+
+      MSigmabarCalc sigbarcalcmc;
+
+      MHSigmaTheta sigthMC("SigmaThetaMC");
+      MFillH fillsigthetaMC ("SigmaThetaMC[MHSigmaTheta]", "MMcEvt");
+      fillsigthetaMC.SetName("FillSigThetaMC");     
+
+      //*****************************
+      // entries in MParList
+    
+      plistmc.AddToList(&tlistmc);
+      InitBinnings(&plistmc);
+      plistmc.AddToList(&blindMC);
+      plistmc.AddToList(&sigthMC);
+
+
+      //*****************************
+      // entries in MTaskList
+    
+      tlistmc.AddToList(&readMC);
+      //tlistmc.AddToList(&contthetamc);
+
+      tlistmc.AddToList(&blindmc);
+
+      tlistmc.AddToList(&contbasicmc);
+      tlistmc.AddToList(&fillblindMC);
+      tlistmc.AddToList(&sigbarcalcmc);
+      tlistmc.AddToList(&fillsigthetaMC);
+
+      MProgressBar barmc;
+      MEvtLoop evtloopmc;
+      evtloopmc.SetParList(&plistmc);
+      evtloopmc.SetProgressBar(&barmc);
+
+      Int_t maxeventsmc = -1;
+      //Int_t maxeventsmc = 20000;
+      if ( !evtloopmc.Eventloop(maxeventsmc) )
+          return;
+
+      tlistmc.PrintStatistics(0, kTRUE);
+
+      blindMC.DrawClone();
+      sigthMC.DrawClone();
+
+      // save the histograms for the padding
+      TH2D *sigthmc     = sigthMC.GetSigmaTheta();
+      TH3D *sigpixthmc  = sigthMC.GetSigmaPixTheta();
+      TH3D *diffpixthmc = sigthMC.GetDiffPixTheta();
+
+      TH2D *blindidthmc = blindMC.GetBlindId();
+      TH2D *blindnthmc  = blindMC.GetBlindN();
+
+
+      //-----------------------------------------
 
       gLog << "End of generating the padding histograms" << endl;
@@ -762,5 +840,5 @@
 
 
-    gLog << "Macro MagicAnalysis : End of Job A" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job A" << endl;
     gLog << "===================================================" << endl;
  }
@@ -786,8 +864,8 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job B_RF_UP" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job B_RF_UP" << endl;
 
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobB_RF_UP, RTrainRF, CTrainRF, RTree, WRF = "
+    gLog << "Macro ONOFFAnalysis : JobB_RF_UP, RTrainRF, CTrainRF, RTree, WRF = "
          << (JobB_RF_UP ? "kTRUE" : "kFALSE")  << ",  " 
          << (RTrainRF ?   "kTRUE" : "kFALSE")  << ",  " 
@@ -1290,5 +1368,5 @@
 
       gLog << "" << endl;
-      gLog << "Macro MagicAnalysis : matrix of training events for gammas written onto file "
+      gLog << "Macro ONOFFAnalysis : matrix of training events for gammas written onto file "
            << NameGammas << endl;
 
@@ -1302,5 +1380,5 @@
 
       gLog << "" << endl;
-      gLog << "Macro MagicAnalysis : matrix of training events for hadrons written onto file "
+      gLog << "Macro ONOFFAnalysis : matrix of training events for hadrons written onto file "
            << NameHadrons << endl;
 
@@ -1369,5 +1447,5 @@
     gLog << "" << endl;
     gLog << "========================================================" << endl;
-    gLog << "Macro MagicAnalysis : start growing trees" << endl;
+    gLog << "Macro ONOFFAnalysis : start growing trees" << endl;
 
     MTaskList tlist2;
@@ -1654,5 +1732,5 @@
   }
 
-    gLog << "Macro MagicAnalysis : End of Job B_RF_UP" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job B_RF_UP" << endl;
     gLog << "=======================================================" << endl;
  }
@@ -1674,8 +1752,8 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job B_SC_UP" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job B_SC_UP" << endl;
 
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobB_SC_UP, CMatrix, RMatrix, WOptimize, RTest, WSC = "
+    gLog << "Macro ONOFFAnalysis : JobB_SC_UP, CMatrix, RMatrix, WOptimize, RTest, WSC = "
          << (JobB_SC_UP ? "kTRUE" : "kFALSE")  << ",  " 
          << (CMatrix    ? "kTRUE" : "kFALSE")  << ",  "
@@ -2230,5 +2308,5 @@
 
 
-    gLog << "Macro MagicAnalysis : End of Job B_SC_UP" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job B_SC_UP" << endl;
     gLog << "=======================================================" << endl;
  }
@@ -2249,8 +2327,8 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job C" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job C" << endl;
 
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobC = " 
+    gLog << "Macro ONOFFAnalysis : JobC = " 
          << (JobC ? "kTRUE" : "kFALSE")  << endl;
 
@@ -2458,5 +2536,5 @@
     DeleteBinnings(&pliston);
 
-    gLog << "Macro MagicAnalysis : End of Job C" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job C" << endl;
     gLog << "===================================================" << endl;
  }
@@ -2477,8 +2555,8 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job D" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job D" << endl;
 
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobD = " 
+    gLog << "Macro ONOFFAnalysis : JobD = " 
          << (JobD        ? "kTRUE" : "kFALSE")  << endl;
 
@@ -2698,5 +2776,5 @@
     DeleteBinnings(&pliston);
 
-    gLog << "Macro MagicAnalysis : End of Job D" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job D" << endl;
     gLog << "=======================================================" << endl;
  }
@@ -2723,8 +2801,8 @@
  {
     gLog << "=====================================================" << endl;
-    gLog << "Macro MagicAnalysis : Start of Job E_XX" << endl;
+    gLog << "Macro ONOFFAnalysis : Start of Job E_XX" << endl;
 
     gLog << "" << endl;
-    gLog << "Macro MagicAnalysis : JobE_XX, CCollArea, OEEst, WEX = " 
+    gLog << "Macro ONOFFAnalysis : JobE_XX, CCollArea, OEEst, WEX = " 
          << (JobE_XX ? "kTRUE" : "kFALSE")  << ",  " 
          << (CCollArea?"kTRUE" : "kFALSE")  << ",  " 
@@ -2951,5 +3029,5 @@
     // Optimization of energy estimator
     //
-    gLog << "Macro MagicAnalysis.C : calling MagicEEst" << endl;
+    gLog << "Macro ONOFFAnalysis.C : calling MagicEEst" << endl;
 
     TString inpath("");
@@ -2960,5 +3038,5 @@
             howMany,  maxhadronness, maxalpha, maxdist,
             binsE, binsTheta);
-    gLog << "Macro MagicAnalysis.C : returning from MagicEEst" << endl;
+    gLog << "Macro ONOFFAnalysis.C : returning from MagicEEst" << endl;
  }
 
@@ -2972,5 +3050,5 @@
     gLog << "================================================================"
          << endl;
-    gLog << "Macro MagicAnalysis.C : read parameters of energy estimator and migration matrix from file '"
+    gLog << "Macro ONOFFAnalysis.C : read parameters of energy estimator and migration matrix from file '"
          << energyParName << "'" << endl;
     TFile enparam(energyParName);
@@ -3307,5 +3385,5 @@
   }
 
-    gLog << "Macro Analysis : End of Job E_XX" << endl;
+    gLog << "Macro ONOFFAnalysis : End of Job E_XX" << endl;
     gLog << "=======================================================" << endl;
  }
Index: trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.cc	(revision 2798)
@@ -85,6 +85,7 @@
 #include "MCerPhotEvt.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
+
 #include "MBlindPixels.h"
 
@@ -910,8 +911,8 @@
      }
   
-   fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
+   fPed = (MPedPhotCam*)pList->FindObject("MPedPhotCam");
    if (!fPed)
      {
-       *fLog << err << "MPedestalCam not found... aborting." << endl;
+       *fLog << err << "MPedPhotCam not found... aborting." << endl;
        return kFALSE;
      }
@@ -1014,5 +1015,5 @@
       continue;
 
-    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetPedestalRms());
+    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetRms());
   }
 
@@ -1038,6 +1039,6 @@
   //  Int_t j = pix.GetPixId();
 
-  //  MPedestalPix &ppix = fPed->operator[](j);
-  //  ppix.SetMeanRms(0.0);
+  //  MPedPhotPix &ppix = fPed->operator[](j);
+  //  ppix.SetRms(0.0);
   //}
   //$$$$$$$$$$$$$$$$$$$$$$$$$$
@@ -1404,6 +1405,6 @@
     Double_t ratioArea = 1.0 / fCam->GetPixRatio(j);
 
-    MPedestalPix &ppix = (*fPed)[j];
-    Double_t oldsigma = ppix.GetPedestalRms();
+    MPedPhotPix &ppix = (*fPed)[j];
+    Double_t oldsigma = ppix.GetRms();
     Double_t oldsigma2 = oldsigma*oldsigma;
 
@@ -1602,5 +1603,5 @@
 
     Double_t newsigma = sqrt( oldsigma2 + addSig2 ); 
-    ppix.SetPedestalRms( newsigma );
+    ppix.SetRms( newsigma );
 
     fHSigmaPedestal->Fill( oldsigma, newsigma );
Index: trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PadONOFF.h	(revision 2798)
@@ -16,5 +16,5 @@
 class MGeomCam;
 class MCerPhotEvt;
-class MPedestalCam;
+class MPedPhotCam;
 class MMcEvt;
 class MSigmabar;
@@ -32,5 +32,5 @@
     MSigmabar      *fSigmabar;
     MMcEvt         *fMcEvt;
-    MPedestalCam   *fPed;
+    MPedPhotCam   *fPed;
     MBlindPixels   *fBlinds;
 
Index: trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.cc	(revision 2798)
@@ -84,6 +84,7 @@
 #include "MCerPhotEvt.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
+
 #include "MBlindPixels.h"
 
@@ -197,8 +198,8 @@
      }
   
-   fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
+   fPed = (MPedPhotCam*)pList->FindObject("MPedPhotCam");
    if (!fPed)
      {
-       *fLog << err << "MPedestalCam not found... aborting." << endl;
+       *fLog << err << "MPedPhotCam not found... aborting." << endl;
        return kFALSE;
      }
@@ -293,5 +294,5 @@
       continue;
 
-    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetPedestalRms());
+    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetRms());
   }
 
@@ -316,6 +317,6 @@
   //  Int_t j = pix.GetPixId();
 
-  //  MPedestalPix &ppix = fPed->operator[](j);
-  //  ppix.SetMeanRms(0.0);
+  //  MPedPhotPix &ppix = fPed->operator[](j);
+  //  ppix.SetRms(0.0);
   //}
   //$$$$$$$$$$$$$$$$$$$$$$$$$$
@@ -543,6 +544,6 @@
     Double_t ratioArea = 1.0 / fCam->GetPixRatio(j);
 
-    MPedestalPix &ppix = (*fPed)[j];
-    Double_t oldsigma = ppix.GetPedestalRms();
+    MPedPhotPix &ppix = (*fPed)[j];
+    Double_t oldsigma = ppix.GetRms();
     Double_t oldsigma2 = oldsigma*oldsigma;
 
@@ -706,5 +707,5 @@
 
     Double_t newsigma = sqrt(oldsigma2 + addSig2);
-    ppix.SetPedestalRms(newsigma);
+    ppix.SetRms(newsigma);
 
     fHSigmaPedestal->Fill(oldsigma, newsigma);
Index: trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PadSchweizer.h	(revision 2798)
@@ -16,5 +16,5 @@
 class MGeomCam;
 class MCerPhotEvt;
-class MPedestalCam;
+class MPedPhotCam;
 class MMcEvt;
 class MSigmabar;
@@ -29,5 +29,5 @@
     MSigmabar      *fSigmabar;
     MMcEvt         *fMcEvt;
-    MPedestalCam   *fPed;
+    MPedPhotCam   *fPed;
     MBlindPixels   *fBlinds;
 
Index: trunk/MagicSoft/Mars/manalysis/MPad.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPad.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MPad.cc	(revision 2798)
@@ -76,6 +76,7 @@
 #include "MCerPhotEvt.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
+
 #include "MBlindPixels.h"
 
@@ -1477,8 +1478,8 @@
      }
   
-   fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
+   fPed = (MPedPhotCam*)pList->FindObject("MPedPhotCam");
    if (!fPed)
      {
-       *fLog << err << "MPad : MPedestalCam not found... aborting." 
+       *fLog << err << "MPad : MPedPhotCam not found... aborting." 
              << endl;
        return kFALSE;
@@ -1600,5 +1601,5 @@
       continue;
 
-    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetPedestalRms());
+    fEvt->AddPixel(i, 0.0, (*fPed)[i].GetRms());
   }
 
@@ -1989,6 +1990,6 @@
     Double_t ratioArea = 1.0 / fCam->GetPixRatio(j);
 
-    MPedestalPix &ppix = (*fPed)[j];
-    Double_t oldsigma_phot = ppix.GetPedestalRms();
+    MPedPhotPix &ppix = (*fPed)[j];
+    Double_t oldsigma_phot = ppix.GetRms();
     Double_t oldsigma = oldsigma_phot * fPEperPhoton;
     Double_t oldsigma2 = oldsigma*oldsigma;
@@ -2140,5 +2141,5 @@
     Double_t newsigma = sqrt( oldsigma2 + addSig2 ); 
     Double_t newsigma_phot = newsigma / fPEperPhoton; 
-    ppix.SetPedestalRms( newsigma_phot );
+    ppix.SetRms( newsigma_phot );
 
     fHSigmaPedestal->Fill( oldsigma_phot, newsigma_phot );
Index: trunk/MagicSoft/Mars/manalysis/MPad.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPad.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MPad.h	(revision 2798)
@@ -16,5 +16,5 @@
 class MGeomCam;
 class MCerPhotEvt;
-class MPedestalCam;
+class MPedPhotCam;
 class MMcEvt;
 class MSigmabar;
@@ -32,5 +32,5 @@
     MSigmabar      *fSigmabar;
     MMcEvt         *fMcEvt;
-    MPedestalCam   *fPed;
+    MPedPhotCam    *fPed;
     MBlindPixels   *fBlinds;
 
Index: trunk/MagicSoft/Mars/manalysis/MPadding.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPadding.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MPadding.cc	(revision 2798)
@@ -93,6 +93,6 @@
 #include "MCerPhotPix.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
 
 ClassImp(MPadding);
@@ -239,8 +239,8 @@
      }
   
-   fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
+   fPed = (MPedPhotCam*)pList->FindObject("MPedPhotCam");
    if (!fPed)
      {
-       *fLog << err << dbginf << "MPedestalCam not found... aborting." << endl;
+       *fLog << err << dbginf << "MPedPhotCam not found... aborting." << endl;
        return kFALSE;
      }
@@ -443,11 +443,11 @@
      pix.SetErrorPhot( newerror );
 
-     MPedestalPix &ppix = (*fPed)[i];
-
-     ppix.SetMeanRms(0);
-
-     const Double_t oldsigma = ppix.GetMeanRms();
+     MPedPhotPix &ppix = (*fPed)[i];
+
+     ppix.SetRms(0);
+
+     const Double_t oldsigma = ppix.GetRms();
      const Double_t newsigma = sqrt( oldsigma*oldsigma + quadraticDiff*area );
-     ppix.SetMeanRms( newsigma );
+     ppix.SetRms( newsigma );
 
      fHSigmaPedestal->Fill( oldsigma, newsigma );
Index: trunk/MagicSoft/Mars/manalysis/MPadding.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPadding.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MPadding.h	(revision 2798)
@@ -10,7 +10,6 @@
 class MGeomCam;
 class MCerPhotEvt;
-class MPedestalCam;
+class MPedPhotCam;
 class MMcEvt;
-class MPedestalCam;
 class MSigmabar;
 class MParList;
@@ -23,5 +22,5 @@
     MSigmabar    *fSigmabar;
     MMcEvt       *fMcEvt;
-    MPedestalCam *fPed;
+    MPedPhotCam  *fPed;
 
     Int_t     fRunType;
Index: trunk/MagicSoft/Mars/manalysis/MPedPhotPix.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedPhotPix.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MPedPhotPix.h	(revision 2798)
@@ -21,5 +21,5 @@
 
     //void SetMean(Float_t f) { fMean = f; }
-    //void SetRms(Float_t f)  { fRms  = f; }
+    void SetRms(Float_t f)  { fRms  = f; }
     void Set(Float_t m, Float_t r) { fMean = m; fRms = r; }
 
Index: trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSigmabar.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MSigmabar.cc	(revision 2798)
@@ -50,6 +50,6 @@
 #include "MCerPhotPix.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
 
 ClassImp(MSigmabar);
@@ -95,5 +95,5 @@
 // determination of sector to which a respective pixel belongs
 //
-Float_t MSigmabar::Calc(const MGeomCam &geom, const MPedestalCam &ped, 
+Float_t MSigmabar::Calc(const MGeomCam &geom, const MPedPhotCam &ped, 
                         const MCerPhotEvt &evt)
 {
@@ -154,5 +154,5 @@
 
         // count only those pixels which have a sigma != 0.0
-        const Float_t sigma = ped[idx].GetPedestalRms();
+        const Float_t sigma = ped[idx].GetRms();
 
         if ( sigma <= 0 )
Index: trunk/MagicSoft/Mars/manalysis/MSigmabar.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSigmabar.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MSigmabar.h	(revision 2798)
@@ -9,5 +9,5 @@
 class MParList;
 class MCerPhotEvt;
-class MPedestalCam;
+class MPedPhotCam;
 
 class MSigmabar : public MParContainer
@@ -44,5 +44,5 @@
     //    void SetSigmabarOuter(Float_t f) { fSigmabarOuter = f; }   
 
-    Float_t Calc(const MGeomCam &geom, const MPedestalCam &ped, const MCerPhotEvt &evt);
+    Float_t Calc(const MGeomCam &geom, const MPedPhotCam &ped, const MCerPhotEvt &evt);
       
     ClassDef(MSigmabar, 1)  // Storage Container for Sigmabar
Index: trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc	(revision 2798)
@@ -35,5 +35,5 @@
 //  Input Containers:
 //   MGeomCam
-//   MPedestalCam
+//   MPedPhotCam
 //   MRawRunHeader
 //   MMcEvt  (FIXME: Must be replaced by a 'real-data' container)
@@ -53,5 +53,5 @@
 
 #include "MGeomCam.h"
-#include "MPedestalCam.h"
+#include "MPedPhotCam.h"
 
 #include "MSigmabar.h"
@@ -90,8 +90,8 @@
     }
 
-    fPed = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
+    fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
     if (!fPed)
     {
-        *fLog << err << "MPedestalCam not found... aborting." << endl;
+        *fLog << err << "MPedPhotCam not found... aborting." << endl;
         return kFALSE;
     }
Index: trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h	(revision 2797)
+++ trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h	(revision 2798)
@@ -14,6 +14,6 @@
 #endif
 
-#ifndef MARS_MPedestalCam
-#include "MPedestalCam.h"
+#ifndef MARS_MPedPhotCam
+#include "MPedPhotCam.h"
 #endif
 
@@ -36,5 +36,5 @@
     MCerPhotEvt    *fEvt;
     MGeomCam       *fCam;
-    MPedestalCam   *fPed;
+    MPedPhotCam   *fPed;
     MRawRunHeader  *fRun;
     MSigmabar      *fSig;
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2797)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2798)
@@ -47,6 +47,6 @@
 #include "MGeomCam.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
+#include "MPedPhotCam.h"
+#include "MPedPhotPix.h"
 
 #include "MCerPhotEvt.h"
@@ -117,8 +117,8 @@
         *fLog << warn << "MMcEvt not found... aborting." << endl;
 
-    fPed = (MPedestalCam*)plist->FindObject("MPedestalCam");
+    fPed = (MPedPhotCam*)plist->FindObject("MPedPhotCam");
     if (!fPed)
     {
-        *fLog << err << "MPedestalCam not found... aborting." << endl;
+        *fLog << err << "MPedPhotCam not found... aborting." << endl;
         return kFALSE;
     }
@@ -204,10 +204,10 @@
 
         const Int_t id = cerpix.GetPixId();
-        const MPedestalPix &pix = (*fPed)[id];
+        const MPedPhotPix &pix = (*fPed)[id];
 
         // ratio is the area of pixel 0 
         //          divided by the area of the current pixel
         const Double_t ratio = fCam->GetPixRatio(id);
-        const Double_t sigma = pix.GetPedestalRms();
+        const Double_t sigma = pix.GetRms();
 
         fSigmaPixTheta.Fill(theta, (Double_t)id, sigma);
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2797)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2798)
@@ -16,7 +16,6 @@
 class MGeomCam;
 class MCerPhotEvt;
-class MPedestalCam;
 class MMcEvt;
-class MPedestalCam;
+class MPedPhotCam;
 class MSigmabar;
 class MParList;
@@ -27,5 +26,5 @@
 private:
     const MGeomCam *fCam;        //!
-    MPedestalCam   *fPed;        //!
+    MPedPhotCam    *fPed;        //!
     MCerPhotEvt    *fEvt;        //!
     MSigmabar      *fSigmabar;   //!
