Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4668)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4669)
@@ -22,4 +22,28 @@
 
  2004/08/17: Markus Gaug
+ 
+   * msignal/MExtractBlindPixel.[h,cc]
+     - remove fModified which is taken care of in MJCalibration by the 
+       correct initialization
+
+   * mcalib/MCalibrationChargeBlindCam.[h,cc]
+     - now a base class for different types of blind pixels cams. 
+     - moved fBlindPixels away from pointer, analogue to MGeomCam
+
+   * mcalib/MHCalibrationChargeBlindCam.[h,cc]
+     - updated to new call to GetNumBlindPixels()
+
+   * mcalib/Makefile
+   * mcalib/CalibLinkDef.h
+   * mcalib/MCalibrationChargeBlindCamOneOldStyle.[h,cc]
+   * mcalib/MCalibrationChargeBlindCamTwoNewStye.[h,cc]
+     - new classes deriving from and intializing 
+       MCalibrationChargeBlindCam 
+
+   * mcalib/MCalibrationChargeBlindPix.[h,cc]
+     - derive from MCalibrationPix instead of MCalibrationChargePix
+     - create possibility to intialize QE's, etc. from outside
+     - fix default to previous behaviour such that old code can still 
+       run on old files without changes
 
    * macros/calibration.C
Index: trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 4669)
@@ -23,4 +23,6 @@
 #pragma link C++ class MCalibrationChargeCam+;
 #pragma link C++ class MCalibrationChargePix+;
+#pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+;
+#pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+;
 #pragma link C++ class MCalibrationChargeBlindCam+;
 #pragma link C++ class MCalibrationChargeBlindPix+;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.cc	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.cc	(revision 4669)
@@ -27,5 +27,6 @@
 // MCalibrationChargeBlindCam                                               
 //                                                               
-// Base class for Blind Pixels Calibration results. 
+// Base class for Blind Pixels Calibration results. Derived classes intialize
+// the actual values of the MCalibrationBlindPix's. 
 //
 // Contains TClonesArrays for the following objects:
@@ -36,4 +37,6 @@
 // - InitSize()
 //
+// See also: MCalibrationChargeBlindCamOneOldStyle
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MCalibrationChargeBlindCam.h"
@@ -41,10 +44,5 @@
 
 #include "MCalibrationCam.h"
-#include "MCalibrationPix.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include <TClonesArray.h>
+#include "MParContainer.h"
 
 ClassImp(MCalibrationChargeBlindCam);
@@ -54,7 +52,4 @@
 //
 // Default constructor. 
-//
-// Set the following pointer to NULL:
-// - fBlindPixels
 //
 // Initializes:
@@ -68,29 +63,23 @@
 // has to be performed in order to get the dimension correctly.
 //
-MCalibrationChargeBlindCam::MCalibrationChargeBlindCam(const char *name, const char *title)
-    : fPulserColor(MCalibrationCam::kNONE), 
-      fBlindPixels(NULL), 
-      fValid(kFALSE)
+MCalibrationChargeBlindCam::MCalibrationChargeBlindCam(UInt_t nblind,const char *name, const char *title)
+    : fNumBlindPixels(nblind), 
+      fPulserColor(MCalibrationCam::kNONE), 
+      fBlindPixels(nblind)
 {
+
   fName  = name  ? name  : "MCalibrationChargeBlindCam";
-  fTitle = title ? title : "Container for the Calibration Information of the blind pixels in the camera";
+  fTitle = title ? title : "Calibration Information of blinded pixels in camera";
 
-  fBlindPixels = new TClonesArray("MCalibrationChargeBlindPix",1);
+   //
+  // make sure that the destructor delete all contained objects
+  //
+  fBlindPixels.SetOwner();
+  
+  for (UInt_t i=0; i<nblind; i++)
+    fBlindPixels[i] = new MCalibrationChargeBlindPix;
+  
 }
 
-// --------------------------------------------------------------------------
-//
-// Deletes the following TClonesArray's of MCalibrationPix containers (if exist):
-// - fBlindPixels
-//
-MCalibrationChargeBlindCam::~MCalibrationChargeBlindCam()
-{
-
-  //
-  // delete fBlindPixels should delete all Objects stored inside
-  // 
-  delete fBlindPixels;
-
-}
 
 // --------------------------------------
@@ -100,42 +89,26 @@
 void MCalibrationChargeBlindCam::Clear(Option_t *o)
 {
-
-  fBlindPixels->ForEach(TObject, Clear)();
-
-  return;
+  fBlindPixels.ForEach(TObject, Clear)();
 }
 
 // -----------------------------------------------------
 //
-// own copy function to do the initialization correctly
+// copy 'constructor'
 //
 void MCalibrationChargeBlindCam::Copy(TObject& object) const
 {
-  
+
+  MParContainer::Copy(object);
+
   MCalibrationChargeBlindCam &calib = (MCalibrationChargeBlindCam&)object;
-  
-  MParContainer::Copy(calib);
-  
-  calib.fPulserColor          = fPulserColor;
-  
-  const Int_t n3 = GetSize();
-  if (n3 != 0)
+  calib.fPulserColor    = fPulserColor;
+  calib.fNumBlindPixels = fNumBlindPixels;
+
+  for (UInt_t i=0; i<fNumBlindPixels; i++)
     {
-      calib.InitSize(n3);
-      for (int i=0; i<n3; i++)
-        (*this)[i].Copy(calib[i]);
+      calib.fBlindPixels[i] = new MCalibrationChargeBlindPix;
+      (*this)[i].Copy(calib[i]);
     }
-  
 }
-
-// -------------------------------------------------------------------
-//
-// Calls TClonesArray::ExpandCreate() for fBlindPixels
-//
-void MCalibrationChargeBlindCam::InitSize(const UInt_t i)
-{
-  fBlindPixels->ExpandCreate(i);
-}
-
 
 // --------------------------------------------------------------------------
@@ -145,5 +118,5 @@
 MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i)
 {
-  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels->UncheckedAt(i));
+  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i));
 }
 
@@ -154,86 +127,15 @@
 const MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i) const
 {
-  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels->UncheckedAt(i));
+  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i));
 }
+
 
 // --------------------------------------------------------------------------
 //
-// Returns the current size of the TClonesArray fBlindPixels 
-// independently if the MCalibrationChargeBlindPix is filled with values or not.
-//
-const Int_t MCalibrationChargeBlindCam::GetSize() const
-{
-  return fBlindPixels->GetEntriesFast();
-}
-
-// --------------------------------------------------------------------------
-//
-// Print first the results of the pixels 
-// and then the ones which are not FitValid
+// Print the results of the blind pixels 
 //
 void MCalibrationChargeBlindCam::Print(Option_t *o) const
 {
 
-  *fLog << all << GetDescriptor() << ":" << endl;
-  int id = 0;
-  
-  *fLog << all << "Calibrated Blind pixels:" << endl;
-  *fLog << all << endl;
-
-  TIter Next(fBlindPixels);
-  MCalibrationChargeBlindPix *pix;
-  while ((pix=(MCalibrationChargeBlindPix*)Next()))
-    {
-      
-      if (pix->IsSinglePheFitOK()) 
-	{                            
-
-          *fLog << all 
-                << Form("%s%3i","BlindPixel: ",pix->GetPixId())
-                << Form("%s%4.2f%s%4.2f","  Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr())
-		<< Form("%s%4.2f%s%4.2f","  Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err())
-		<< Form("%s%4.2f%s%4.2f","  Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err()) 
-		<< Form("%s%4.2f%s%4.2f","  Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err())
-		<< Form("%s%4.2f%s%4.2f","  Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err())
-		<< endl;
-	  *fLog << all
-                << " Pedestal Fit OK? :" << pix->IsPedestalFitOK() 
-		<< Form("%s%4.2f%s%4.2f","  Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl;
-	  *fLog << all
-                << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable() 
-		<< Form("%s%4.2f%s%4.2f","  Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr())
-		<< endl;
-          id++;
-	}
-    }
-  *fLog << all << id << " blind pixels OK" << endl;
-  id = 0;
-  
-  TIter Next2(fBlindPixels);
-  while ((pix=(MCalibrationChargeBlindPix*)Next2()))
-    {
-      
-      if (!pix->IsSinglePheFitOK()) 
-	{                            
-
-          *fLog << all 
-                << Form("%s%3i","BlindPixel: ",pix->GetPixId())
-                << Form("%s%4.2f%s%4.2f","  Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr())
-		<< Form("%s%4.2f%s%4.2f","  Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err())
-		<< Form("%s%4.2f%s%4.2f","  Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err()) 
-		<< Form("%s%4.2f%s%4.2f","  Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err())
-		<< Form("%s%4.2f%s%4.2f","  Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err())
-		<< endl;
-	  *fLog << all
-                << " Pedestal Fit OK? :" << pix->IsPedestalFitOK() 
-		<< Form("%s%4.2f%s%4.2f","  Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl;
-	  *fLog << all
-                << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable() 
-		<< Form("%s%4.2f%s%4.2f","  Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr())
-		<< endl;
-          id++;
-	}
-    }
-  *fLog << all << id << " blind pixels NOT OK" << endl;
-  
+  fBlindPixels.Print();
 }
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.h	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.h	(revision 4669)
@@ -1,4 +1,12 @@
 #ifndef MARS_MCalibrationChargeBlindCam
 #define MARS_MCalibrationChargeBlindCam
+
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif
+
+#ifndef ROOT_TObjArray
+#include <TObjArray.h>
+#endif
 
 #ifndef MARS_MCalibrationCam
@@ -7,42 +15,35 @@
 
 class MCalibrationChargeBlindPix;
-class TClonesArray;
 class MCalibrationChargeBlindCam : public MParContainer
 {
 private:
 
+  UInt_t fNumBlindPixels;                       // Number of blind pixels
+  
   MCalibrationCam::PulserColor_t fPulserColor;  // Colour of the pulsed LEDs
 
-  TClonesArray *fBlindPixels;                   //-> Array of MCalibrationChargeBlindPix
-
-  Bool_t fValid;
+  TObjArray fBlindPixels;                       // Array of MCalibrationChargeBlindPix
 
 public:
-  MCalibrationChargeBlindCam(const char *name=NULL, const char *title=NULL);
-  ~MCalibrationChargeBlindCam();
+
+  MCalibrationChargeBlindCam(UInt_t nblind=0,const char *name=NULL, const char *title=NULL);
   
   void   Clear ( Option_t *o="" );
   void   Copy ( TObject& obj ) const;
-
+  
   // Getters
-  const Int_t                          GetSize()        const;
-  const MCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; }
+  UInt_t               GetNumBlindPixels()  const { return fNumBlindPixels; }
+  MCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; }
 
         MCalibrationChargeBlindPix &operator[] ( UInt_t i );
   const MCalibrationChargeBlindPix &operator[] ( UInt_t i ) const;
 
-  Bool_t IsValid() const { return fValid; }
-
   // Setters
   void  SetColor ( const MCalibrationCam::PulserColor_t col )  { fPulserColor = col; }
-  void  SetValid () { fValid = kTRUE; }
 
-  // Inits
-  void  InitSize( const UInt_t i);
-  
   // Prints
   void   Print(Option_t *o="") const;
 
-  ClassDef(MCalibrationChargeBlindCam, 1) // Container Blind Pixel Calibration Results Camera
+  ClassDef(MCalibrationChargeBlindCam, 2) // Container Blind Pixel Calibration Results Camera
 };
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.cc	(revision 4669)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.cc	(revision 4669)
@@ -0,0 +1,149 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Markus Gaug   07/2004 <mailto:markus@ifae.es>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                               
+// MCalibrationChargeBlindCamOneOldStyle                                               
+//                                                               
+// Blind Pixels Calibration camera until run 31693. The blind pixel camera 
+// consisted then only of one non-coated blind pixel with poorly known 
+// quantum efficiency read out in hardware ID 560.
+//
+// See also: MCalibrationChargeBlindCam
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MCalibrationChargeBlindCamOneOldStyle.h"
+#include "MCalibrationChargeBlindPix.h"
+
+#include "MCalibrationCam.h"
+
+ClassImp(MCalibrationChargeBlindCamOneOldStyle);
+
+using namespace std;
+// --------------------------------------------------------------------------
+//
+// Default constructor. 
+//
+// - CreatePixs();
+// - CreateAreas();   
+// - CreateAtts();   
+// - CreateQEs();     
+// - CreateCollEffs();
+//
+MCalibrationChargeBlindCamOneOldStyle::MCalibrationChargeBlindCamOneOldStyle(const char *name)
+    : MCalibrationChargeBlindCam(1,name,"One Blind Pixel in camera - old style")
+{
+
+  CreatePixs    ();    
+  CreateAreas   ();   
+  CreateAtts    ();   
+  CreateQEs     ();     
+  CreateCollEffs();
+
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Only one blind pixel with ID 559
+//
+void MCalibrationChargeBlindCamOneOldStyle::CreatePixs() 
+{
+
+  (*this)[0].SetPixId(559);
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// Only one blind pixel with exactly 100 mm^2 area
+//
+void MCalibrationChargeBlindCamOneOldStyle::CreateAreas() 
+{
+
+  (*this)[0].SetArea(100.);
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// One blind pixel with poorly known qe's: average of David measurments with 
+// 4% error.
+//
+void MCalibrationChargeBlindCamOneOldStyle::CreateQEs() 
+{
+  
+  (*this)[0].SetQE         ( 0.154,      MCalibrationCam::kGREEN );
+  (*this)[0].SetQE         ( 0.226,      MCalibrationCam::kBLUE  );
+  (*this)[0].SetQE         ( 0.247,      MCalibrationCam::kUV    );
+  (*this)[0].SetQE         ( 0.247,      MCalibrationCam::kCT1   );
+
+  (*this)[0].SetQEErr      ( 0.005,   MCalibrationCam::kGREEN );
+  (*this)[0].SetQEErr      ( 0.007,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetQEErr      ( 0.01,    MCalibrationCam::kUV    );
+  (*this)[0].SetQEErr      ( 0.01,    MCalibrationCam::kCT1   );
+
+}
+
+// --------------------------------------------------------------------------
+//
+// One blind pixel with poorly known coll.eff's: email from Eckart with 
+// estimates depending on colour, but 5% error (maybe more??)
+//
+void MCalibrationChargeBlindCamOneOldStyle::CreateCollEffs() 
+{
+
+  (*this)[0].SetCollEff    ( 0.99, MCalibrationCam::kGREEN );
+  (*this)[0].SetCollEff    ( 0.93, MCalibrationCam::kBLUE  );
+  (*this)[0].SetCollEff    ( 0.90, MCalibrationCam::kUV    );
+  (*this)[0].SetCollEff    ( 0.90, MCalibrationCam::kCT1   );
+
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
+  
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// One blind pixel with very well known attenuation 0.01 (datasheet delivered 
+// with filter, precision better than 1%
+//
+void MCalibrationChargeBlindCamOneOldStyle::CreateAtts() 
+{
+
+  (*this)[0].SetAtt    ( 1.97, MCalibrationCam::kGREEN );
+  (*this)[0].SetAtt    ( 1.96, MCalibrationCam::kBLUE  );
+  (*this)[0].SetAtt    ( 1.95, MCalibrationCam::kUV    );
+  (*this)[0].SetAtt    ( 1.95, MCalibrationCam::kCT1   );
+
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kGREEN );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kUV    );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kCT1   );
+  
+}
+
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.h	(revision 4669)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.h	(revision 4669)
@@ -0,0 +1,25 @@
+#ifndef MARS_MCalibrationChargeBlindCamOneOldStyle
+#define MARS_MCalibrationChargeBlindCamOneOldStyle
+
+#ifndef MARS_MCalibrationChargeBlindCam
+#include "MCalibrationChargeBlindCam.h"
+#endif
+
+class MCalibrationChargeBlindCamOneOldStyle : public MCalibrationChargeBlindCam
+{
+private:
+
+  void CreatePixs();
+  void CreateAreas();
+  void CreateAtts();
+  void CreateQEs();
+  void CreateCollEffs();
+  
+public:
+
+  MCalibrationChargeBlindCamOneOldStyle(const char *name=NULL);
+  
+  ClassDef(MCalibrationChargeBlindCamOneOldStyle, 1) // Container Blind Pixel Calibration Results - until run 31693
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.cc	(revision 4669)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.cc	(revision 4669)
@@ -0,0 +1,184 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Markus Gaug   07/2004 <mailto:markus@ifae.es>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                               
+// MCalibrationChargeBlindCamTwoNewStyle                                               
+//                                                               
+// Blind Pixels Calibration camera after run 31693. The blind pixel camera 
+// consisted then of two non-coated blind pixel with very well known 
+// quantum efficiency read out in hardware ID 560 and 561.
+//
+// See also: MCalibrationChargeBlindCam
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MCalibrationChargeBlindCamTwoNewStyle.h"
+#include "MCalibrationChargeBlindPix.h"
+
+#include "MCalibrationCam.h"
+
+ClassImp(MCalibrationChargeBlindCamTwoNewStyle);
+
+using namespace std;
+// --------------------------------------------------------------------------
+//
+// Default constructor. 
+//
+// - CreatePixs();
+// - CreateAreas();   
+// - CreateAtts();   
+// - CreateQEs();     
+// - CreateCollEffs();
+//
+MCalibrationChargeBlindCamTwoNewStyle::MCalibrationChargeBlindCamTwoNewStyle(const char *name)
+    : MCalibrationChargeBlindCam(2,name,"Two Blind Pixels in camera - new style")
+{
+
+  CreatePixs    ();    
+  CreateAreas   ();   
+  CreateAtts    ();   
+  CreateQEs     ();     
+  CreateCollEffs();
+
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Two blind pixels with ID 559 and 560 (software)
+//
+void MCalibrationChargeBlindCamTwoNewStyle::CreatePixs() 
+{
+
+  (*this)[0].SetPixId(559);
+  (*this)[1].SetPixId(560);
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// Two blind pixels with exactly 100 mm^2 area
+//
+void MCalibrationChargeBlindCamTwoNewStyle::CreateAreas() 
+{
+
+  (*this)[0].SetArea(100.);
+  (*this)[1].SetArea(100.);
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// Two blind pixels with very well known qe's: David's measurments with 
+// 1% error.
+//
+void MCalibrationChargeBlindCamTwoNewStyle::CreateQEs() 
+{
+  
+  (*this)[0].SetQE         ( 0.178,   MCalibrationCam::kGREEN );
+  (*this)[0].SetQE         ( 0.265,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetQE         ( 0.283,   MCalibrationCam::kUV    );
+  (*this)[0].SetQE         ( 0.283,   MCalibrationCam::kCT1   );
+
+  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kGREEN );
+  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kUV    );
+  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kCT1   );
+
+  (*this)[1].SetQE         ( 0.167,   MCalibrationCam::kGREEN );
+  (*this)[1].SetQE         ( 0.252,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetQE         ( 0.269,   MCalibrationCam::kUV    );
+  (*this)[1].SetQE         ( 0.269,   MCalibrationCam::kCT1   );
+
+  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kGREEN );
+  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kUV    );
+  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kCT1   );
+
+}
+
+// --------------------------------------------------------------------------
+//
+// One blind pixel with poorly known coll.eff's: email from Eckart with 
+// estimates depending on colour, but 5% error (maybe more??)
+//
+void MCalibrationChargeBlindCamTwoNewStyle::CreateCollEffs() 
+{
+
+  (*this)[0].SetCollEff    ( 0.99,   MCalibrationCam::kGREEN );
+  (*this)[0].SetCollEff    ( 0.93,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetCollEff    ( 0.90,   MCalibrationCam::kUV    );
+  (*this)[0].SetCollEff    ( 0.90,   MCalibrationCam::kCT1   );
+
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
+  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
+  
+  (*this)[1].SetCollEff    ( 0.99,   MCalibrationCam::kGREEN );
+  (*this)[1].SetCollEff    ( 0.93,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetCollEff    ( 0.90,   MCalibrationCam::kUV    );
+  (*this)[1].SetCollEff    ( 0.90,   MCalibrationCam::kCT1   );
+
+  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
+  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
+  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
+  
+  
+}
+
+// --------------------------------------------------------------------------
+//
+// One blind pixel has a very well known attenuation 0.01 (datasheet delivered 
+// with filter, precision better than 1%
+//
+// The second blind pixel is not yet so well known, the company does not reply.
+// Attenuation: 0.001 (datasheet not delivered with filter, precision guaranteed to 5%)
+//
+void MCalibrationChargeBlindCamTwoNewStyle::CreateAtts() 
+{
+
+  (*this)[0].SetAtt    ( 1.97,   MCalibrationCam::kGREEN );
+  (*this)[0].SetAtt    ( 1.96,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetAtt    ( 1.95,   MCalibrationCam::kUV    );
+  (*this)[0].SetAtt    ( 1.95,   MCalibrationCam::kCT1   );
+
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kGREEN );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kBLUE  );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kUV    );
+  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kCT1   );
+  
+  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kGREEN );
+  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kUV    );
+  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kCT1   );
+
+  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kGREEN );
+  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kBLUE  );
+  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kUV    );
+  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kCT1   );
+  
+}
+
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.h	(revision 4669)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.h	(revision 4669)
@@ -0,0 +1,25 @@
+#ifndef MARS_MCalibrationChargeBlindCamTwoNewStyle
+#define MARS_MCalibrationChargeBlindCamTwoNewStyle
+
+#ifndef MARS_MCalibrationChargeBlindCam
+#include "MCalibrationChargeBlindCam.h"
+#endif
+
+class MCalibrationChargeBlindCamTwoNewStyle : public MCalibrationChargeBlindCam
+{
+private:
+
+  void CreatePixs();
+  void CreateAreas();
+  void CreateAtts();
+  void CreateQEs();
+  void CreateCollEffs();
+  
+public:
+
+  MCalibrationChargeBlindCamTwoNewStyle(const char *name=NULL);
+  
+  ClassDef(MCalibrationChargeBlindCamTwoNewStyle, 1) // Container Blind Pixel Calibration Results - after run 31693
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h	(revision 4669)
@@ -6,71 +6,63 @@
 #endif
 
-#ifndef MARS_MCalibrationChargePix
-#include "MCalibrationChargePix.h"
+#ifndef MARS_MCalibrationPix
+#include "MCalibrationPix.h"
 #endif
 
-class MCalibrationChargeBlindPix : public MCalibrationChargePix
+class MCalibrationChargeBlindPix : public MCalibrationPix
 {
 private:
 
-  static const Float_t gkBlindPixelArea;               //! The Blind Pixel area in mm^2
-  static const Float_t gkBlindPixelAttGreen;           //! Attenuation Filter at 520 nm 
-  static const Float_t gkBlindPixelAttBlue ;           //! Attenuation Filter at 460 nm 
-  static const Float_t gkBlindPixelAttUV   ;           //! Attenuation Filter at 370 nm 
-  static const Float_t gkBlindPixelAttCT1  ;           //! Attenuation Filter at 370 nm
-  static const Float_t gkBlindPixelQEUnCoatedGreen;    //! Quantum Efficiency at 520 nm
-  static const Float_t gkBlindPixelQEUnCoatedBlue ;    //! Quantum Efficiency at 460 nm
-  static const Float_t gkBlindPixelQEUnCoatedUV   ;    //! Quantum Efficiency at 370 nm
-  static const Float_t gkBlindPixelQEUnCoatedCT1  ;    //! Quantum Efficiency at 370 nm
-  static const Float_t gkBlindPixelQEUnCoatedGreenErr; //! Uncertainty QEUnCoated at 520 nm 
-  static const Float_t gkBlindPixelQEUnCoatedBlueErr ; //! Uncertainty QEUnCoated at 460 nm 
-  static const Float_t gkBlindPixelQEUnCoatedUVErr   ; //! Uncertainty QEUnCoated at 370 nm 
-  static const Float_t gkBlindPixelQEUnCoatedCT1Err  ; //! Uncertainty QEUnCoated at 370 nmu
-  static const Float_t gkBlindPixelQECoatedGreen;      //! Quantum Efficiency at 520 nm
-  static const Float_t gkBlindPixelQECoatedBlue ;      //! Quantum Efficiency at 460 nm
-  static const Float_t gkBlindPixelQECoatedUV   ;      //! Quantum Efficiency at 370 nm
-  static const Float_t gkBlindPixelQECoatedCT1  ;      //! Quantum Efficiency at 370 nm
-  static const Float_t gkBlindPixelQECoatedGreenErr;   //! Uncertainty QECoated at 520 nm 
-  static const Float_t gkBlindPixelQECoatedBlueErr ;   //! Uncertainty QECoated at 460 nm 
-  static const Float_t gkBlindPixelQECoatedUVErr   ;   //! Uncertainty QECoated at 370 nm 
-  static const Float_t gkBlindPixelQECoatedCT1Err  ;   //! Uncertainty QECoated at 370 nmu
-  static const Float_t gkBlindPixelCollectionEff;      //! Collection Efficiency
-  static const Float_t gkBlindPixelCollectionEffErr;   //! Uncertainty Collection Efficiency
+  static const Float_t fgArea;         //! The Blind Pixel area in mm^2
+  static const Float_t fgAttGreen;     //! Attenuation Filter at 520 nm 
+  static const Float_t fgAttBlue ;     //! Attenuation Filter at 460 nm 
+  static const Float_t fgAttUV   ;     //! Attenuation Filter at 370 nm 
+  static const Float_t fgAttCT1  ;     //! Attenuation Filter at 370 nm
+  static const Float_t fgAttErr;       //! Error Att. Filter at all w.l.
+  static const Float_t fgQEGreen;      //! Quantum Efficiency at 520 nm
+  static const Float_t fgQEBlue ;      //! Quantum Efficiency at 460 nm
+  static const Float_t fgQEUV   ;      //! Quantum Efficiency at 370 nm
+  static const Float_t fgQECT1  ;      //! Quantum Efficiency at 370 nm
+  static const Float_t fgQEErrGreen;   //! Uncertainty QEUnCoated at 520 nm 
+  static const Float_t fgQEErrBlue;    //! Uncertainty QEUnCoated at 460 nm 
+  static const Float_t fgQEErrUV   ;   //! Uncertainty QEUnCoated at 370 nm 
+  static const Float_t fgQEErrCT1  ;   //! Uncertainty QEUnCoated at 370 nmu
+  static const Float_t fgCollEffGreen; //! Collecttion Efficiency
+  static const Float_t fgCollEffBlue;  //! Collecttion Efficiency
+  static const Float_t fgCollEffUV;    //! Collecttion Efficiency
+  static const Float_t fgCollEffCT1;   //! Collecttion Efficiency
+  static const Float_t fgCollEffErr;   //! Uncertainty Collection Efficiency
 
-  Float_t fLambda;                  // Mean Poisson fit
-  Float_t fLambdaCheck;             // Mean Pedestal Check (Gauss) fit
-  Float_t fLambdaCheckErr;          // Error mean pedestal Check fit
-  Float_t fLambdaVar;               // Variance lambda Poisson fit
-  Float_t fFluxInsidePlexiglass;    // Number photons in INNER PIXEL inside the plexiglass
-  Float_t fFluxInsidePlexiglassVar; // Variance number of photons in INNER PIXEL 
-  Float_t fMu0;                     // Position pedestal peak
-  Float_t fMu0Err;                  // Error pos. pedestal-peak
-  Float_t fMu1;                     // Position first photo-electron peak
-  Float_t fMu1Err;                  // Error pos. first photo-electon peak
-  Float_t fSigma0;                  // Width pedestal peak
-  Float_t fSigma0Err;               // Error width pedestal peak
-  Float_t fSigma1;                  // Width first photo-electron peak  
-  Float_t fSigma1Err;               // Error width first photo-electron peak  
+  Float_t fArea;                       // Blind Pixel Area 
+  TArrayF fAtt;                        // Attenuation filter (per color)
+  TArrayF fAttErr;                     // Error attnuation filter (per color)
+  TArrayF fQE;                         // Quantum eff. (per color)
+  TArrayF fQEErr;                      // Error Quantum eff. (per color)
+  TArrayF fCollEff;                    // Coll eff. (per color)
+  TArrayF fCollEffErr;                 // Error coll. eff. (per color)
+                                        
+  Float_t fLambda;                     // Mean Poisson fit
+  Float_t fLambdaCheck;                // Mean Pedestal Check (Gauss) fit
+  Float_t fLambdaCheckErr;             // Error mean pedestal Check fit
+  Float_t fLambdaVar;                  // Variance lambda Poisson fit
+  Float_t fFluxInsidePlexiglass;       // Number photons in INNER PIXEL inside the plexiglass
+  Float_t fFluxInsidePlexiglassVar;    // Variance number of photons in INNER PIXEL 
+  Float_t fMu0;                        // Position pedestal peak
+  Float_t fMu0Err;                     // Error pos. pedestal-peak
+  Float_t fMu1;                        // Position first photo-electron peak
+  Float_t fMu1Err;                     // Error pos. first photo-electon peak
+  Float_t fSigma0;                     // Width pedestal peak
+  Float_t fSigma0Err;                  // Error width pedestal peak
+  Float_t fSigma1;                     // Width first photo-electron peak  
+  Float_t fSigma1Err;                  // Error width first photo-electron peak  
 
   enum { kOscillating, kPedestalFitOK, kSinglePheFitOK, kChargeFitValid, 
-         kFluxInsidePlexiglassAvailable, kCoated };
+         kFluxInsidePlexiglassAvailable };   // Possible validity flags 
 
-  MCalibrationCam::PulserColor_t fColor;
+  MCalibrationCam::PulserColor_t fColor;     // Colour of the used pulser light
 
-  const Float_t GetBlindPixelQEGreen() const; 
-  const Float_t GetBlindPixelQEBlue () const; 
-  const Float_t GetBlindPixelQEUV   () const; 
-  const Float_t GetBlindPixelQECT1  () const; 
-
-  const Float_t GetBlindPixelQEGreenRelVar     () const; 
-  const Float_t GetBlindPixelQEBlueRelVar      () const; 
-  const Float_t GetBlindPixelQEUVRelVar        () const; 
-  const Float_t GetBlindPixelQECT1RelVar       () const;
-  const Float_t GetBlindPixelCollectionEffRelVar  () const;   
-
- public:
+public:
 
   MCalibrationChargeBlindPix(const char *name=NULL, const char *title=NULL);
-  ~MCalibrationChargeBlindPix() {}
   
   Bool_t CalcFluxInsidePlexiglass();
@@ -78,30 +70,46 @@
   
   // Getters
-  MCalibrationCam::PulserColor_t GetColor () const { return fColor;                }
-  Float_t GetLambda                       () const { return fLambda;               }
-  Float_t GetLambdaErr                    () const;
-  Float_t GetLambdaRelVar                 () const;  
-  Float_t GetLambdaCheck                  () const { return fLambdaCheck;          }
-  Float_t GetLambdaCheckErr               () const { return fLambdaCheckErr;       }
-  Float_t GetFluxInsidePlexiglass         () const { return fFluxInsidePlexiglass; }
-  Float_t GetFluxInsidePlexiglassErr      () const;
-  Float_t GetFluxInsidePlexiglassRelVar   () const;  
-  Float_t GetMu0                          () const { return fMu0;                  }
-  Float_t GetMu0Err                       () const { return fMu0Err;               }
-  Float_t GetMu1                          () const { return fMu1;                  }
-  Float_t GetMu1Err                       () const { return fMu1Err;               }
-  Float_t GetSigma0                       () const { return fSigma0;               }
-  Float_t GetSigma0Err                    () const { return fSigma0Err;            } 
-  Float_t GetSigma1                       () const { return fSigma1;               }
-  Float_t GetSigma1Err                    () const { return fSigma1Err;            }
+  const Float_t GetAtt          () const; 
+  const Float_t GetAttRelVar    () const; 
+  const Float_t GetQE           () const; 
+  const Float_t GetQERelVar     () const; 
+  const Float_t GetCollEff      () const;
+  const Float_t GetCollEffRelVar() const;   
 
-  Bool_t  IsCoated                        () const;  
-  Bool_t  IsOscillating                   () const;
-  Bool_t  IsChargeFitValid                () const;
-  Bool_t  IsPedestalFitOK                 () const;
-  Bool_t  IsSinglePheFitOK                () const;
-  Bool_t  IsFluxInsidePlexiglassAvailable () const;
+  const MCalibrationCam::PulserColor_t GetColor () const { return fColor;                }
+  const Float_t GetLambda                       () const { return fLambda;               }
+  const Float_t GetLambdaErr                    () const;
+  const Float_t GetLambdaRelVar                 () const;  
+  const Float_t GetLambdaCheck                  () const { return fLambdaCheck;          }
+  const Float_t GetLambdaCheckErr               () const { return fLambdaCheckErr;       }
+  const Float_t GetFluxInsidePlexiglass         () const { return fFluxInsidePlexiglass; }
+  const Float_t GetFluxInsidePlexiglassErr      () const;
+  const Float_t GetFluxInsidePlexiglassRelVar   () const;  
+  const Float_t GetMu0                          () const { return fMu0;                  }
+  const Float_t GetMu0Err                       () const { return fMu0Err;               }
+  const Float_t GetMu1                          () const { return fMu1;                  }
+  const Float_t GetMu1Err                       () const { return fMu1Err;               }
+  const Float_t GetSigma0                       () const { return fSigma0;               }
+  const Float_t GetSigma0Err                    () const { return fSigma0Err;            } 
+  const Float_t GetSigma1                       () const { return fSigma1;               }
+  const Float_t GetSigma1Err                    () const { return fSigma1Err;            }
+
+  const Bool_t  IsOscillating                   () const;
+  const Bool_t  IsChargeFitValid                () const;
+  const Bool_t  IsPedestalFitOK                 () const;
+  const Bool_t  IsSinglePheFitOK                () const;
+  const Bool_t  IsFluxInsidePlexiglassAvailable () const;
+
+  void Print(Option_t *opt=NULL) const;
   
   // Setters
+  void SetArea      ( Float_t f )                                           { fArea            = f; }
+  void SetAtt       ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAtt       [col] = f; }
+  void SetAttErr    ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAttErr    [col] = f; }  
+  void SetQE        ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQE        [col] = f; }  
+  void SetQEErr     ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQEErr     [col] = f; }  
+  void SetCollEff   ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEff   [col] = f; }
+  void SetCollEffErr( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEffErr[col] = f; }   
+
   void SetColor          ( const MCalibrationCam::PulserColor_t color ) { fColor      = color; }
   void SetLambda         ( const Float_t f )                            { fLambda         = f; }
@@ -118,5 +126,4 @@
   void SetSigma1Err      ( const Float_t f )                            { fSigma1Err      = f; }
 
-  void SetCoated         ( const Bool_t  b=kTRUE );  
   void SetOscillating    ( const Bool_t  b=kTRUE );
   void SetChargeFitValid ( const Bool_t  b=kTRUE );
@@ -125,10 +132,6 @@
   void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE);
 
-  ClassDef(MCalibrationChargeBlindPix, 2)	// Container Charge Calibration Results Blind Pixel
+  ClassDef(MCalibrationChargeBlindPix, 3)	// Container Charge Calibration Results Blind Pixel
 };
 
 #endif
-
-
-
-
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc	(revision 4669)
@@ -189,9 +189,16 @@
   if (!fCam)
     {
-	*fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl;
-	return kFALSE;
-    }
-
-  fCam->InitSize(nblindpixels);
+      *fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl;
+      return kFALSE;
+    }
+
+  if (fCam->GetNumBlindPixels() != nblindpixels)
+    {
+      *fLog << err << "Size mismatch in MCalibrationChargeBlindCam ... abort." << endl;      
+      *fLog << err << "Size of MCalibrationChargeBlindCam: " << fCam->GetNumBlindPixels() 
+            << "Size of MExtractedSignalBlindPixel: " << nblindpixels << endl;
+      return kFALSE;
+    }
+  
 
   const Int_t samples = fSignal->GetNumFADCSamples();
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc	(revision 4669)
@@ -484,6 +484,4 @@
   }
 
-  fBlindPix->SetValid(kTRUE);
-
   fMeanPedestal     = fSignal->GetPed();
   fMeanPedestalErr  = fSignal->GetPedErr();
@@ -499,4 +497,6 @@
 
   FitPedestal();
+
+  fBlindPix->SetValid(kTRUE);
 
   if (FitSinglePhe())
Index: trunk/MagicSoft/Mars/mcalib/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mcalib/Makefile	(revision 4668)
+++ trunk/MagicSoft/Mars/mcalib/Makefile	(revision 4669)
@@ -48,4 +48,6 @@
            MCalibrationChargeCam.cc \
            MCalibrationChargePix.cc  \
+           MCalibrationChargeBlindCamOneOldStyle.cc  \
+           MCalibrationChargeBlindCamTwoNewStyle.cc  \
            MCalibrationChargeBlindCam.cc  \
            MCalibrationChargeBlindPix.cc  \
Index: trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc	(revision 4668)
+++ trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc	(revision 4669)
@@ -70,6 +70,4 @@
 using namespace std;
 
-const Int_t   MExtractBlindPixel::fgNumBlindPixels   = 2;
-const UInt_t  MExtractBlindPixel::fgBlindPixelIds[3] = { 559, 560, 561 };
 const UInt_t  MExtractBlindPixel::fgBlindPixelIdx    = 559;
 const Byte_t  MExtractBlindPixel::fgHiGainFirst      =  10;
@@ -140,5 +138,4 @@
 //
 // Initializes:
-// - fModified to kFALSE
 // - fBlindPixelIdx to 0
 // - fExtractionType to 0
@@ -155,5 +152,4 @@
 {
 
-  fModified       = kFALSE;
   fExtractionType = 0;
 
@@ -244,14 +240,6 @@
     delete [] fHiGainSecondDeriv;
 
-  if (fModified)
-  {
-    for (Int_t i=0;i<fNumBlindPixels;i++)
-      {
-        SetBlindPixelIdx(fgBlindPixelIds[i],i);
-        fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i);
-      }
-  }
-  else
-    fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
+  for (Int_t i=0;i<fNumBlindPixels;i++)
+    fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(i),i);
 
   fBlindPixel->SetExtractionType(fExtractionType);
Index: trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h	(revision 4668)
+++ trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h	(revision 4669)
@@ -15,6 +15,4 @@
 private:
 
-  static const Int_t   fgNumBlindPixels;   //! Default number of blind pixels after modification run  
-  static const UInt_t  fgBlindPixelIds[3]; //! Default blind pixel indices after modification run
   static const UInt_t  fgBlindPixelIdx;    //! Default blind pixels index before modification run
   static const Byte_t  fgHiGainFirst;      //! Default First FADC slice Hi-Gain Signal (currently set to: 10   ) 
@@ -38,7 +36,5 @@
   Int_t   fNSBFilterLimit;                 // Limit of sum of FADC slices for filter part
 
-  Bool_t  fModified;                       // Is the run taken after the modifications? 
   Byte_t  fExtractionType;                 // What extraction type has been chosen?
-
   Int_t   fNumBlindPixels;                 // Current number of blind pixels
   
@@ -73,7 +69,6 @@
   void SetExtractionType( const ExtractionType_t typ=kAmplitude );
   void SetNSBFilterLimit( const Int_t   lim=fgNSBFilterLimit )  { fNSBFilterLimit = lim;   }     
-  void SetModified     ( const Bool_t b=kTRUE)               {   fModified = b;    }
   
-  void SetNumBlindPixels( const Int_t   num=fgNumBlindPixels )  { fNumBlindPixels = num;   }
+  void SetNumBlindPixels( const Int_t   num=1 )  { fNumBlindPixels = num;   }
   
   void SetRange         ( const Byte_t  hifirst=0, const Byte_t hilast=0, 
