Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4321)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4322)
@@ -28,4 +28,6 @@
     - added one argument to CntCamContent to tell if event above or 
       below threshold have to be counted. Default is above, like before
+    - added one argument to Projection and ProjectionS giving the number 
+      of bins as argument (default 50 like before)
 
   * mcalib/MCalibrationChargeCalc.cc
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 4321)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 4322)
@@ -986,5 +986,5 @@
       area[0] = i;
 
-      TH1D *hist = camphes.ProjectionS(TArrayI(),area);
+      TH1D *hist = camphes.ProjectionS(TArrayI(),area,"_py",100);
       hist->Fit("gaus","Q");
       const Float_t mean  = hist->GetFunction("gaus")->GetParameter(1);
@@ -992,5 +992,5 @@
       const Int_t   ndf   = hist->GetFunction("gaus")->GetNDF();
 
-      if (ndf < 1)
+      if (ndf < 2)
         {
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons " 
@@ -1004,5 +1004,5 @@
       const Double_t prob = hist->GetFunction("gaus")->GetProb();
 
-      if (prob < 0.0005)
+      if (prob < 0.001)
         {
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons " 
@@ -1394,5 +1394,5 @@
       area[0] = i;
 
-      TH1D *hist = camffactor.ProjectionS(TArrayI(),area);
+      TH1D *hist = camffactor.ProjectionS(TArrayI(),area,"_py",100);
       hist->Fit("gaus","Q");
       const Float_t mean  = hist->GetFunction("gaus")->GetParameter(1);
@@ -1400,5 +1400,5 @@
       const Int_t   ndf   = hist->GetFunction("gaus")->GetNDF();
 
-      if (ndf < 1)
+      if (ndf < 2)
         {
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor " 
@@ -1412,5 +1412,5 @@
       const Double_t prob = hist->GetFunction("gaus")->GetProb();
 
-      if (prob < 0.0005)
+      if (prob < 0.001)
         {
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor " 
Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 4321)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 4322)
@@ -541,7 +541,6 @@
 // into account.
 //
-TH1D *MHCamera::ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name) const
-{
-    Int_t nbins = 50;
+TH1D *MHCamera::ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name, const Int_t nbins) const
+{
 
     // Create the projection histogram
Index: trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 4321)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 4322)
@@ -240,10 +240,13 @@
     UInt_t   GetNumPixels() const;
 
-    TH1D    *Projection(const char *name="_py") const { return ProjectionS(TArrayI(), TArrayI(), name); }
-    TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py") const
-    {
-        return ProjectionS(TArrayI(1, &sector), TArrayI(1, &aidx), name);
-    }
-    TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_py") const;
+    TH1D    *Projection(const char *name="_py", const Int_t nbins=50) const
+      {
+        return ProjectionS(TArrayI(), TArrayI(), name,nbins);
+      }
+    TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py", const Int_t nbins=50) const
+    {
+        return ProjectionS(TArrayI(1, &sector), TArrayI(1, &aidx), name, nbins);
+    }
+    TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_py", const Int_t nbins=50) const;
 
     TProfile *RadialProfile(const char *name="_rad") const { return  RadialProfileS(TArrayI(), TArrayI(), name);}
