Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 1998)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 1999)
@@ -1,3 +1,18 @@
                                                  -*-*- END OF LINE -*-*-
+
+ 2003/04/24: Wolfgang Wittek
+
+    * mfilter/MFCT1SelFinal.cc
+      - small correction in output
+
+    * mhistmc/MHMcCT1CollectionArea.cc
+      - plot all 3 histograms in DrawClone()
+
+    * manalysis/MPadSchweizer.[h,cc]
+      - cleanup as proposed by Thomas
+      - new member function SetHistograms() to set the pointers to the
+        histograms to be used in the padding
+
+
 
  2003/04/24: Antonio Stamerra
Index: /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc	(revision 1998)
+++ /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc	(revision 1999)
@@ -69,5 +69,4 @@
 #include "TH2.h"
 #include "TH3.h"
-#include "TProfile.h"
 #include "TRandom.h"
 #include "TCanvas.h"
@@ -93,20 +92,18 @@
 // Default constructor. 
 //
-MPadSchweizer::MPadSchweizer(const char *name, const char *title,
-                             TH2D *fHist2, TH3D *fHist3, TH3D *fHist3Diff) : 
-               fRunType(0), fGroup(0)
+MPadSchweizer::MPadSchweizer(const char *name, const char *title) 
 {
   fName  = name  ? name  : "MPadSchweizer";
   fTitle = title ? title : "Task for the padding (Schweizer)";
 
-  fHSigmaTheta    = fHist2;
-  fHSigmaPixTheta = fHist3;
-  fHDiffPixTheta  = fHist3Diff;
-
-  fHSigmaTheta->SetDirectory(NULL);
-  fHSigmaPixTheta->SetDirectory(NULL);
-  fHDiffPixTheta->SetDirectory(NULL);
-
-  Print();
+  //fHSigmaTheta    = fHist2;
+  //fHSigmaPixTheta = fHist3;
+  //fHDiffPixTheta  = fHist3Diff;
+
+  //fHSigmaTheta->SetDirectory(NULL);
+  //fHSigmaPixTheta->SetDirectory(NULL);
+  //fHDiffPixTheta->SetDirectory(NULL);
+
+  //Print();
 }
 
@@ -122,6 +119,39 @@
 // --------------------------------------------------------------------------
 //
+// Set the references to the histograms to be used in the padding
+//
+//
+void MPadSchweizer::SetHistograms(TH2D *fHist2, TH3D *fHist3, TH3D *fHist3Diff)
+{
+  fHSigmaTheta    = fHist2;
+  fHSigmaPixTheta = fHist3;
+  fHDiffPixTheta  = fHist3Diff;
+
+  fHSigmaTheta->SetDirectory(NULL);
+  fHSigmaPixTheta->SetDirectory(NULL);
+  fHDiffPixTheta->SetDirectory(NULL);
+
+  Print();
+}
+
+// --------------------------------------------------------------------------
+//
 // Set the option for the padding 
 //
+//  There are 2 options for the padding :                                  //
+//                                                                         //
+//  1) fPadFlag = 1 :                                                      //
+//     Generate first a Sigmabar using the 2D-histogram Sigmabar vs. Theta //
+//     (fHSigmaTheta). Then generate a pedestal sigma for each pixel using //
+//     the 3D-histogram Theta, pixel no., Sigma^2-Sigmabar^2               //
+//     (fHDiffPixTheta).                                                   //
+//                                                                         //
+//     This is the preferred option as it takes into account the           //
+//     correlations between the Sigma of a pixel and Sigmabar.             //
+//                                                                         //
+//  2) fPadFlag = 2 :                                                      //
+//     Generate a pedestal sigma for each pixel using the 3D-histogram     //
+//     Theta, pixel no., Sigma (fHSigmaPixTheta).                          //
+//                                                                         //
 void MPadSchweizer::SetPadFlag(Int_t padflag)
 {
Index: /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.h
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.h	(revision 1998)
+++ /trunk/MagicSoft/Mars/manalysis/MPadSchweizer.h	(revision 1999)
@@ -14,5 +14,4 @@
 #include "TH2.h"
 #include "TH3.h"
-#include "TProfile.h"
 
 
@@ -21,5 +20,4 @@
 class MPedestalCam;
 class MMcEvt;
-class MPedestalCam;
 class MSigmabar;
 class MParList;
@@ -63,7 +61,9 @@
 
 public:
-    MPadSchweizer(const char *name, const char *title,
-                  TH2D *fHist2, TH3D *fHist3, TH3D *fHist3Diff);
+    MPadSchweizer(const char *name=NULL, const char *title=NULL);
     ~MPadSchweizer();
+
+    void SetHistograms(TH2D     *fHist2=NULL, TH3D *fHist3=NULL, 
+                       TH3D *fHist3Diff=NULL);
 
     Bool_t PreProcess(MParList *pList);
@@ -72,6 +72,4 @@
     
     void SetPadFlag(Int_t padflag);
-    void SetRunType(Int_t runtype) { fRunType =  runtype; }
-    void SetGroup(Int_t group)     { fGroup   =  group; }
 
     ClassDef(MPadSchweizer, 0)    // task for the padding (Schweizer)
Index: /trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc	(revision 1998)
+++ /trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc	(revision 1999)
@@ -83,11 +83,10 @@
 void MFCT1SelFinal::SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax) 
 { 
-  fHadronnessMax = hadmax; 
+  fHadronnessMax =   hadmax; 
   fAlphaMax      = alphamax;
-  fDistMax       = distmax; 
-
-  *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax = "
-        << fHadronnessMax << ",  " << fAlphaMax << ",  fDistMax = " << fDistMax 
-<<  endl;
+  fDistMax       =  distmax; 
+
+  *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = "
+        << fHadronnessMax << ",  " << fAlphaMax << ",  " << fDistMax <<  endl;
 }
 
Index: /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 1998)
+++ /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 1999)
@@ -183,5 +183,6 @@
 TObject *MHMcCT1CollectionArea::DrawClone(Option_t* option) const
 {
-  TCanvas *c = MH::MakeDefCanvas(fHistCol);
+  TCanvas &c = *MakeDefCanvas("CollArea", "Collection area plots", 600, 600);
+  c.Divide(2,2);
 
   //
@@ -190,10 +191,21 @@
   gROOT->SetSelectedPad(NULL);
 
+  c.cd(1);
+  fHistCol->SetDirectory(NULL);
   fHistCol->DrawCopy(option);
 
-  c->Modified();
-  c->Update();
-
-  return c;
+  c.cd(2);
+  fHistSel->SetDirectory(NULL);
+  fHistSel->DrawCopy(option);
+
+  c.cd(3);
+  fHistAll->SetDirectory(NULL);
+  fHistAll->DrawCopy(option);
+
+
+  c.Modified();
+  c.Update();
+
+  return &c;
 }
 
