Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3111)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3112)
@@ -4,11 +4,46 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/02/12: Thomas Bretz
  
+   * mbase/MArray.[h,cc]:
+     - changed argument of CutEdges from pointer to reference
+
+   * mgeom/MGeomPix.h:
+     - fixed calculation of area of pixel. It was too big for a factor
+       or 2
+
+   * mjobs/MJCalibration.cc:
+     - slight change of name of a MHCamera
+
+   * manalysis/MExtractSignal.cc:
+     - slight change to the creation of the satpixels list
+     
+   * mcalib/MHCalibrationBlindPixel.cc, mcalib/MHCalibrationPixel.cc,
+     mcalib/MHGausEvent.cc:
+     - corrected call to ProjectArray
+     - corrected call to CutEdges
+     
+   * mfilter/MFCosmics.[h,cc]:
+     - small fixes to logging output
+     - small simplification to return statement
+     - declared CosmicsRejection const
+
+   * mhbase/MH.[h,cc]:
+     - changed argument of ProjectArray from pointer to reference
+     - added missing calcualtion of minimum
+     - removed obsolete SetEntries
+     - changed SetDirectory from NULL to gROOT
+
+
+
  2004/02/12: Javier López
 
    * macros/pointspreadfunction.C
+
      - added new macro that fits with a 2D gaussian the DC spot for an 
        star. It gives you the RMS of the PSF and the center of the star,
        very useful for misspointing studies.
+
+
 
  2004/02/11: Hendrik Bartko
Index: trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc	(revision 3112)
@@ -163,8 +163,8 @@
 
         if (satlo)
-          {
+        {
             sat++;
-            satpixels += Form("%d%s",pixel.GetPixelId()," ");
-          }
+            satpixels += Form(" %d", pixel.GetPixelId());
+        }
         
 
@@ -186,5 +186,5 @@
 
     if (sat)
-      *fLog << warn << "WARNING - Lo Gain saturated in " << sat << " pixels: " << satpixels << endl;
+        *fLog << warn << "WARNING - Lo Gain saturated in " << sat << " pixels with Index:" << satpixels << endl;
 
     fSignals->SetReadyToSave();
Index: trunk/MagicSoft/Mars/mbase/MArray.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArray.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mbase/MArray.cc	(revision 3112)
@@ -47,15 +47,14 @@
 //  Cuts the last entries of an array containing only zeros.
 //
-void MArray::CutEdges(TArrayD *arr)
+void MArray::CutEdges(TArrayD &arr)
 {
-  
-  Int_t i;
-  
-  for (i=arr->GetSize()-1;i>=0;i--)
-    if (arr->At(i) != 0)
-      {
-        arr->Set(i+1);
-        break;
-      }
+    const Int_t n = arr.GetSize();
+
+    for (Int_t i=n-1; i>=0; i--)
+        if (arr[i] != 0)
+        {
+            arr.Set(i+1);
+            break;
+        }
 }
 
@@ -64,15 +63,13 @@
 //  Cuts the last entries of an array containing only zeros.
 //
-void MArray::CutEdges(TArrayF *arr)
+void MArray::CutEdges(TArrayF &arr)
 {
-  
-  Int_t i;
-  
-  for (i=arr->GetSize()-1;i>=0;i--)
-    if (arr->At(i) != 0)
-      {
-        arr->Set(i+1);
-        break;
-      }
+    const Int_t n = arr.GetSize();
+
+    for (Int_t i=n-1; i>=0; i--)
+        if (arr[i] != 0)
+        {
+            arr.Set(i+1);
+            break;
+        }
 }
-
Index: trunk/MagicSoft/Mars/mbase/MArray.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArray.h	(revision 3111)
+++ trunk/MagicSoft/Mars/mbase/MArray.h	(revision 3112)
@@ -32,7 +32,6 @@
    virtual void Set(UInt_t n) = 0;
 
-   static void  CutEdges(TArrayF *arr);
-   static void  CutEdges(TArrayD *arr);        
-   
+   static void  CutEdges(TArrayF &arr);
+   static void  CutEdges(TArrayD &arr);
    
    ClassDef(MArray, 1)  //Abstract array base class for TObject derived Arrays
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc	(revision 3112)
@@ -268,7 +268,7 @@
   fPSDHiGain = fourier.PowerSpectrumDensity(fHiGains);
 
-  fHPSD = MH::ProjectArray(fPSDHiGain, fPSDNbins, 
-                           "PSDProjectionBlindPixel",
-                           "Power Spectrum Density Projection HiGain Blind Pixel");
+  fHPSD = ProjectArray(*fPSDHiGain, fPSDNbins,
+                       "PSDProjectionBlindPixel",
+                       "Power Spectrum Density Projection HiGain Blind Pixel");
 
   //
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 3112)
@@ -269,11 +269,11 @@
 
   if (IsUseLoGain())
-    fHPSD = MH::ProjectArray(fPSDLoGain, fPSDNbins, 
-                             Form("%s%d","PSDProjection",fPixId),
-                             Form("%s%d","Power Spectrum Density Projection LoGain ",fPixId));
+      fHPSD = ProjectArray(*fPSDLoGain, fPSDNbins,
+                           Form("%s%d","PSDProjection",fPixId),
+                           Form("%s%d","Power Spectrum Density Projection LoGain ",fPixId));
   else
-    fHPSD = MH::ProjectArray(fPSDHiGain, fPSDNbins, 
-                             Form("%s%d","PSDProjection",fPixId),
-                             Form("%s%d","Power Spectrum Density Projection HiGain ",fPixId));
+      fHPSD = ProjectArray(*fPSDHiGain, fPSDNbins,
+                           Form("%s%d","PSDProjection",fPixId),
+                           Form("%s%d","Power Spectrum Density Projection HiGain ",fPixId));
 
   //
Index: trunk/MagicSoft/Mars/mcalib/MHGausEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHGausEvent.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mcalib/MHGausEvent.cc	(revision 3112)
@@ -177,13 +177,12 @@
   
   // This cuts only the non-used zero's, but MFFT will later cut the rest
-  MArray::CutEdges(fEvents);
+  MArray::CutEdges(*fEvents);
 
   MFFT fourier;
 
-  fPowerSpectrum    = fourier.PowerSpectrumDensity(fEvents);
-
-  fHPowerProbability =  MH::ProjectArray(fPowerSpectrum, fPowerProbabilityBins,
-                                         "PowerProbability",
-                                         "Probability of Power occurrance");
+  fPowerSpectrum     = fourier.PowerSpectrumDensity(fEvents);
+  fHPowerProbability = ProjectArray(*fPowerSpectrum, fPowerProbabilityBins,
+                                    "PowerProbability",
+                                    "Probability of Power occurrance");
   //
   // First guesses for the fit (should be as close to reality as possible, 
Index: trunk/MagicSoft/Mars/mfilter/MFCosmics.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCosmics.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mfilter/MFCosmics.cc	(revision 3112)
@@ -48,4 +48,5 @@
 //
 //  Output Containers:
+//   -/-
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -77,5 +78,4 @@
       fRawEvt(NULL), fMaxEmptyPixels(230)
 {
-
     fName  = name  ? name  : "MFCosmics";
     fTitle = title ? title : "Filter to reject cosmics";
@@ -91,9 +91,8 @@
 Int_t MFCosmics::PreProcess(MParList *pList)
 {
-
     fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     if (!fRawEvt)
     {
-      *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl;
+      *fLog << err << "MRawEvtData not found... aborting." << endl;
       return kFALSE;
     }
@@ -101,15 +100,15 @@
     fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
     if (!fPedestals)
-      {
-        *fLog << err << dbginf << "Cannot find MPedestalCam ... aborting" << endl;
+    {
+        *fLog << err << "MPedestalCam not found... aborting." << endl;
         return kFALSE;
-      }
+    }
 
     fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
     if (!fSignals)
-      {
-        *fLog << err << dbginf << "Cannot find MExtractedSignalCam ... aborting" << endl;
+    {
+        *fLog << err << "MExtractedSignalCam not found... aborting." << endl;
         return kFALSE;
-      }
+    }
 
     memset(fCut, 0, sizeof(fCut));
@@ -124,7 +123,6 @@
 //  - MExtractedSignalCam
 //
-Bool_t MFCosmics::ReInit(MParList *pList )
-{
- 
+Bool_t MFCosmics::ReInit(MParList *pList)
+{
     fSqrtHiGainSamples = TMath::Sqrt((Float_t) fSignals->GetNumUsedHiGainFADCSlices());
 
@@ -140,9 +138,8 @@
 Int_t MFCosmics::Process()
 {
-
-  fResult = CosmicsRejection();
-  
-  fCut[fResult ? 0 : 1]++;
-  return kTRUE;
+    fResult = CosmicsRejection();
+
+    fCut[fResult ? 0 : 1]++;
+    return kTRUE;
 }
 
@@ -158,64 +155,58 @@
 // the outer pixels have some defect).
 //
-Bool_t MFCosmics::CosmicsRejection()
-{
-  
-  MRawEvtPixelIter pixel(fRawEvt);
-  
-  Int_t cosmicpix = 0;
-      
-  //
-  // Create a first loop to sort out the cosmics ...
-  // 
-  while (pixel.Next())
-    {
-      
-      const UInt_t idx = pixel.GetPixelId();
-      
-      MExtractedSignalPix &sig =  (*fSignals)[idx];
-      MPedestalPix        &ped =  (*fPedestals)[idx];
-      const Float_t pedrms      = ped.GetPedestalRms()*fSqrtHiGainSamples;
-      const Float_t sumhi       = sig.GetExtractedSignalHiGain();
-
-      //
-      // We consider a pixel as presumably due to cosmics 
-      // if its sum of FADC slices is lower than 3 pedestal RMS
-      //
-      if (sumhi < 3.*pedrms )  
-        cosmicpix++;
-    }
-  
-
-  //
-  // If the camera contains more than fMaxEmptyPixels
-  // presumed pixels due to cosmics, then the event is discarted. 
-  //
-  if (cosmicpix > fMaxEmptyPixels)
-    return kTRUE;
-
-  return kFALSE;
+Bool_t MFCosmics::CosmicsRejection() const
+{
+    MRawEvtPixelIter pixel(fRawEvt);
+
+    Int_t cosmicpix = 0;
+
+    //
+    // Create a first loop to sort out the cosmics ...
+    //
+    while (pixel.Next())
+    {
+        const UInt_t idx = pixel.GetPixelId();
+
+        MExtractedSignalPix &sig =  (*fSignals)[idx];
+        MPedestalPix        &ped =  (*fPedestals)[idx];
+
+        const Float_t pedrms = ped.GetPedestalRms()*fSqrtHiGainSamples;
+        const Float_t sumhi  = sig.GetExtractedSignalHiGain();
+
+        //
+        // We consider a pixel as presumably due to cosmics
+        // if its sum of FADC slices is lower than 3 pedestal RMS
+        //
+        if (sumhi < 3.*pedrms )
+            cosmicpix++;
+    }
+
+    //
+    // If the camera contains more than fMaxEmptyPixels
+    // presumed pixels due to cosmics, then the event is discarted.
+    //
+    return cosmicpix > fMaxEmptyPixels;
 }
 
 Int_t MFCosmics::PostProcess()
 {
-
-  if (GetNumExecutions()==0)
-    return kTRUE;
-  
-  *fLog << inf << endl;
-  *fLog << GetDescriptor() << " execution statistics:" << endl;
-  *fLog << dec << setfill(' ');
-  
-  *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
-  *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
-  *fLog << "%) Evts skipped due to: Cosmics Rejection applied " ;
-  *fLog << " (with fMaxEmptyPixels = " << fMaxEmptyPixels << ")" << endl;
-
-  *fLog << " " << setw(7) << fCut[0] << " (" << setw(3) ;
-  *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;
-  *fLog << "%) Evts survived the cosmics rejection!" << endl;
-  *fLog << endl;
-
-  return kTRUE;
-}
-
+    if (GetNumExecutions()==0)
+        return kTRUE;
+
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " execution statistics:" << endl;
+    *fLog << dec << setfill(' ');
+
+    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
+    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Cosmics Rejection applied " ;
+    *fLog << " (with fMaxEmptyPixels = " << fMaxEmptyPixels << ")" << endl;
+
+    *fLog << " " << setw(7) << fCut[0] << " (" << setw(3) ;
+    *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts survived the cosmics rejection!" << endl;
+    *fLog << endl;
+
+    return kTRUE;
+}
+
Index: trunk/MagicSoft/Mars/mfilter/MFCosmics.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCosmics.h	(revision 3111)
+++ trunk/MagicSoft/Mars/mfilter/MFCosmics.h	(revision 3112)
@@ -1,12 +1,4 @@
 #ifndef MARS_MFCosmics
 #define MARS_MFCosmics
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MFCosmics                                                               //
-//                                                                         //
-// Filter against cosmics (used especially by the calibration              //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
 
 #ifndef MARS_MFilter
@@ -22,32 +14,31 @@
 {
 private:
+    MPedestalCam        *fPedestals; // Pedestals of all pixels in the camera
+    MExtractedSignalCam *fSignals;   // Calibration events of all pixels in the camera
 
-  MPedestalCam             *fPedestals;    // Pedestals of all pixels in the camera
-  MExtractedSignalCam      *fSignals;      // Calibration events of all pixels in the camera
+    MRawEvtData         *fRawEvt;    // raw event data (time slices)
 
-  MRawEvtData              *fRawEvt;       // raw event data (time slices)
+    Int_t   fCut[2];
+    Bool_t  fResult;
 
-  Int_t   fCut[2];   
-  Bool_t  fResult;
-  Int_t   fMaxEmptyPixels;                 // Maximum number of empty pixels before declaring event as cosmic
-  Float_t fSqrtHiGainSamples;              // Square root of the number of used Hi-Gain Samples
-  
-  Bool_t ReInit(MParList *pList); 
-  Int_t PreProcess(MParList *pList);
-  Int_t Process();
-  Int_t PostProcess();
+    Int_t   fMaxEmptyPixels;         // Maximum number of empty pixels before declaring event as cosmic
+    Float_t fSqrtHiGainSamples;      // Square root of the number of used Hi-Gain Samples
 
-  Bool_t CosmicsRejection();
-  
-  Bool_t IsExpressionTrue() const { return fResult; }
+    Bool_t ReInit(MParList *pList);
+    Int_t  PreProcess(MParList *pList);
+    Int_t  Process();
+    Int_t  PostProcess();
+
+    Bool_t CosmicsRejection() const;
+
+    Bool_t IsExpressionTrue() const { return fResult; }
   
 public:
+    MFCosmics(const char *name=NULL, const char *title=NULL);
 
-  MFCosmics(const char *name=NULL, const char *title=NULL);
+    void  SetMaxEmptyPixels(const Int_t n) { fMaxEmptyPixels = n; }
+    Int_t GetMaxEmptyPixels() const        { return fMaxEmptyPixels; }
 
-  void SetMaxEmptyPixels(const Int_t n)             { fMaxEmptyPixels = n; }
-  Int_t GetMaxEmptyPixels()          const    { return fMaxEmptyPixels; }
-
-  ClassDef(MFCosmics, 0)   // Filter to perform a cosmics rejection
+    ClassDef(MFCosmics, 0)   // Filter to perform a cosmics rejection
 };
 
Index: trunk/MagicSoft/Mars/mgeom/MGeomPix.h
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomPix.h	(revision 3111)
+++ trunk/MagicSoft/Mars/mgeom/MGeomPix.h	(revision 3112)
@@ -34,5 +34,5 @@
     void Print(Option_t *opt=NULL) const;
 
-    void Set(Float_t x, Float_t y, Float_t d, UInt_t s=0) { fX=x; fY=y; fD=d; fA=d*d*gsTan60; fSector=s; }
+    void Set(Float_t x, Float_t y, Float_t d, UInt_t s=0) { fX=x; fY=y; fD=d; fA=d*d*gsTan60/2; fSector=s; }
 
     void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
@@ -46,5 +46,5 @@
     UInt_t  GetSector() const { return fSector; }
 
-    Float_t GetA() const { return fA; /*fD*fD*gsTan60;*/ }
+    Float_t GetA() const { return fA; /*fD*fD*gsTan60/2;*/ }
 
     Byte_t  GetNumNeighbors() const { return fNumNeighbors; }
Index: trunk/MagicSoft/Mars/mhbase/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 3112)
@@ -1082,84 +1082,92 @@
 }
 
-TH1I* MH::ProjectArray(const TArrayF *array, Int_t nbins, const char* name, const char* title)
-{
-
-  const Int_t size  = array->GetSize();
-  TH1I *h1=0;
-
-  //check if histogram with identical name exist
-  TObject *h1obj = gROOT->FindObject(name);
-  if (h1obj && h1obj->InheritsFrom("TH1I")) {
-    h1 = (TH1I*)h1obj;
-    h1->Reset();
-  }
-
-  Double_t max = 0.;
-  Double_t min = 0.;
-  Int_t newbins = 0;
-
-  // first loop over array to find the maximum:
-  for (Int_t i=0; i<size;i++)
-    if (array->At(i) > max)
-      max = array->At(i);
-
-  FindGoodLimits(nbins, newbins, min, max, kFALSE);
-
-  if (!h1)
-    {
-      h1 = new TH1I(name, title, newbins, min, max);
-      h1->SetXTitle("");
-      h1->SetYTitle("Counts");
-      h1->SetDirectory(NULL);
-    }
-  
+// --------------------------------------------------------------------------
+//
+// M.Gaug added this withouz Documentation
+//
+TH1I* MH::ProjectArray(const TArrayF &array, Int_t nbins, const char* name, const char* title)
+{
+    const Int_t size = array.GetSize();
+
+    TH1I *h1=0;
+
+    //check if histogram with identical name exist
+    TObject *h1obj = gROOT->FindObject(name);
+    if (h1obj && h1obj->InheritsFrom("TH1I"))
+    {
+        h1 = (TH1I*)h1obj;
+        h1->Reset();
+    }
+
+    Double_t min = size>0 ? array[0] : 0;
+    Double_t max = size>0 ? array[0] : 1;
+
+    // first loop over array to find the min and max
+    for (Int_t i=1; i<size;i++)
+    {
+        max = TMath::Max((Double_t)array[i], max);
+        min = TMath::Min((Double_t)array[i], min);
+    }
+
+    Int_t newbins = 0;
+    FindGoodLimits(nbins, newbins, min, max, kFALSE);
+
+    if (!h1)
+    {
+        h1 = new TH1I(name, title, newbins, min, max);
+        h1->SetXTitle("");
+        h1->SetYTitle("Counts");
+        h1->SetDirectory(gROOT);
+    }
+
     // Second loop to fill the histogram
-    for (Int_t i=0;i<size;i++) 
-      h1->Fill(array->At(i));
-
-    h1->SetEntries(size);
-    
+    for (Int_t i=0;i<size;i++)
+        h1->Fill(array[i]);
+
     return h1;
 }
 
-TH1I* MH::ProjectArray(const TArrayD *array, Int_t nbins, const char* name, const char* title)
-{
-
-  const Int_t size  = array->GetSize();
-  
-  TH1I *h1=0;
-
-  //check if histogram with identical name exist
-  TObject *h1obj = gROOT->FindObject(name);
-  if (h1obj && h1obj->InheritsFrom("TH1I")) {
-    h1 = (TH1I*)h1obj;
-    h1->Reset();
-  }
-
-  Double_t max = 0.;
-  Double_t min = 0.;
-  Int_t newbins = 0;
-
-  // first loop over array to find the maximum:
-  for (Int_t i=0; i<size;i++)
-    if (array->At(i) > max)
-      max = array->At(i);
-
-  FindGoodLimits( nbins, newbins, min, max, kFALSE);
-
-  if (!h1)
-    {
-      h1 = new TH1I(name, title, newbins, min, max);
-      h1->SetXTitle("");
-      h1->SetYTitle("Counts");
-      h1->SetDirectory(NULL);
-    }
-  
+// --------------------------------------------------------------------------
+//
+// M.Gaug added this withouz Documentation
+//
+TH1I* MH::ProjectArray(const TArrayD &array, Int_t nbins, const char* name, const char* title)
+{
+    const Int_t size = array.GetSize();
+    TH1I *h1=0;
+
+    //check if histogram with identical name exist
+    TObject *h1obj = gROOT->FindObject(name);
+    if (h1obj && h1obj->InheritsFrom("TH1I"))
+    {
+        h1 = (TH1I*)h1obj;
+        h1->Reset();
+    }
+
+    Double_t min = size>0 ? array[0] : 0;
+    Double_t max = size>0 ? array[0] : 1;
+
+    // first loop over array to find the min and max
+    for (Int_t i=1; i<size;i++)
+    {
+        max = TMath::Max(array[i], max);
+        min = TMath::Min(array[i], min);
+    }
+
+    Int_t newbins = 0;
+    FindGoodLimits(nbins, newbins, min, max, kFALSE);
+
+    if (!h1)
+    {
+        h1 = new TH1I(name, title, newbins, min, max);
+        h1->SetXTitle("");
+        h1->SetYTitle("Counts");
+        h1->SetDirectory(gROOT);
+    }
+
     // Second loop to fill the histogram
-    for (Int_t i=0;i<size;i++) 
-      h1->Fill(array->At(i));
-
-    h1->SetEntries(size);
-    
+    for (Int_t i=0;i<size;i++)
+        h1->Fill(array[i]);
+
     return h1;
 }
Index: trunk/MagicSoft/Mars/mhbase/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.h	(revision 3111)
+++ trunk/MagicSoft/Mars/mhbase/MH.h	(revision 3112)
@@ -92,8 +92,8 @@
     static Int_t CutEdges(TH1 *h, Int_t nbins);
 
-    static TH1I* ProjectArray(const TArrayF *array, Int_t nbins=30, const char* name="ProjectArray",
-                                                              const char* title="Projected Array");
-    static TH1I* ProjectArray(const TArrayD *array, Int_t nbins=30, const char* name="ProjectArray",
-                                                              const char* title="Projected Array");
+    static TH1I* ProjectArray(const TArrayF &array, Int_t nbins=30,
+                              const char* name="ProjectArray", const char* title="Projected Array");
+    static TH1I* ProjectArray(const TArrayD &array, Int_t nbins=30,
+                              const char* name="ProjectArray", const char* title="Projected Array");
     
     static void ProjectionX(TH1D &dest, const TH2 &src, Int_t firstybin=-1, Int_t lastybin=9999);
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3111)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3112)
@@ -223,5 +223,5 @@
     MHCamera disp16 (geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
     MHCamera disp17 (geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
-    MHCamera disp18 (geomcam, "Cal;Oscillating",    "Oscillating Pixels");
+    MHCamera disp18 (geomcam, "Cal;Oscillation",    "Oscillating Pixels");
     MHCamera disp19 (geomcam, "Cal;Saturation",     "Pixels with saturated Hi Gain");
 
