Changeset 4669


Ignore:
Timestamp:
08/17/04 23:31:30 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4663 r4669  
    2222
    2323 2004/08/17: Markus Gaug
     24 
     25   * msignal/MExtractBlindPixel.[h,cc]
     26     - remove fModified which is taken care of in MJCalibration by the
     27       correct initialization
     28
     29   * mcalib/MCalibrationChargeBlindCam.[h,cc]
     30     - now a base class for different types of blind pixels cams.
     31     - moved fBlindPixels away from pointer, analogue to MGeomCam
     32
     33   * mcalib/MHCalibrationChargeBlindCam.[h,cc]
     34     - updated to new call to GetNumBlindPixels()
     35
     36   * mcalib/Makefile
     37   * mcalib/CalibLinkDef.h
     38   * mcalib/MCalibrationChargeBlindCamOneOldStyle.[h,cc]
     39   * mcalib/MCalibrationChargeBlindCamTwoNewStye.[h,cc]
     40     - new classes deriving from and intializing
     41       MCalibrationChargeBlindCam
     42
     43   * mcalib/MCalibrationChargeBlindPix.[h,cc]
     44     - derive from MCalibrationPix instead of MCalibrationChargePix
     45     - create possibility to intialize QE's, etc. from outside
     46     - fix default to previous behaviour such that old code can still
     47       run on old files without changes
    2448
    2549   * macros/calibration.C
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r4649 r4669  
    2323#pragma link C++ class MCalibrationChargeCam+;
    2424#pragma link C++ class MCalibrationChargePix+;
     25#pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+;
     26#pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+;
    2527#pragma link C++ class MCalibrationChargeBlindCam+;
    2628#pragma link C++ class MCalibrationChargeBlindPix+;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.cc

    r4401 r4669  
    2727// MCalibrationChargeBlindCam                                               
    2828//                                                               
    29 // Base class for Blind Pixels Calibration results.
     29// Base class for Blind Pixels Calibration results. Derived classes intialize
     30// the actual values of the MCalibrationBlindPix's.
    3031//
    3132// Contains TClonesArrays for the following objects:
     
    3637// - InitSize()
    3738//
     39// See also: MCalibrationChargeBlindCamOneOldStyle
     40//
    3841/////////////////////////////////////////////////////////////////////////////
    3942#include "MCalibrationChargeBlindCam.h"
     
    4144
    4245#include "MCalibrationCam.h"
    43 #include "MCalibrationPix.h"
    44 
    45 #include "MLog.h"
    46 #include "MLogManip.h"
    47 
    48 #include <TClonesArray.h>
     46#include "MParContainer.h"
    4947
    5048ClassImp(MCalibrationChargeBlindCam);
     
    5452//
    5553// Default constructor.
    56 //
    57 // Set the following pointer to NULL:
    58 // - fBlindPixels
    5954//
    6055// Initializes:
     
    6863// has to be performed in order to get the dimension correctly.
    6964//
    70 MCalibrationChargeBlindCam::MCalibrationChargeBlindCam(const char *name, const char *title)
    71     : fPulserColor(MCalibrationCam::kNONE),
    72       fBlindPixels(NULL),
    73       fValid(kFALSE)
     65MCalibrationChargeBlindCam::MCalibrationChargeBlindCam(UInt_t nblind,const char *name, const char *title)
     66    : fNumBlindPixels(nblind),
     67      fPulserColor(MCalibrationCam::kNONE),
     68      fBlindPixels(nblind)
    7469{
     70
    7571  fName  = name  ? name  : "MCalibrationChargeBlindCam";
    76   fTitle = title ? title : "Container for the Calibration Information of the blind pixels in the camera";
     72  fTitle = title ? title : "Calibration Information of blinded pixels in camera";
    7773
    78   fBlindPixels = new TClonesArray("MCalibrationChargeBlindPix",1);
     74   //
     75  // make sure that the destructor delete all contained objects
     76  //
     77  fBlindPixels.SetOwner();
     78 
     79  for (UInt_t i=0; i<nblind; i++)
     80    fBlindPixels[i] = new MCalibrationChargeBlindPix;
     81 
    7982}
    8083
    81 // --------------------------------------------------------------------------
    82 //
    83 // Deletes the following TClonesArray's of MCalibrationPix containers (if exist):
    84 // - fBlindPixels
    85 //
    86 MCalibrationChargeBlindCam::~MCalibrationChargeBlindCam()
    87 {
    88 
    89   //
    90   // delete fBlindPixels should delete all Objects stored inside
    91   //
    92   delete fBlindPixels;
    93 
    94 }
    9584
    9685// --------------------------------------
     
    10089void MCalibrationChargeBlindCam::Clear(Option_t *o)
    10190{
    102 
    103   fBlindPixels->ForEach(TObject, Clear)();
    104 
    105   return;
     91  fBlindPixels.ForEach(TObject, Clear)();
    10692}
    10793
    10894// -----------------------------------------------------
    10995//
    110 // own copy function to do the initialization correctly
     96// copy 'constructor'
    11197//
    11298void MCalibrationChargeBlindCam::Copy(TObject& object) const
    11399{
    114  
     100
     101  MParContainer::Copy(object);
     102
    115103  MCalibrationChargeBlindCam &calib = (MCalibrationChargeBlindCam&)object;
    116  
    117   MParContainer::Copy(calib);
    118  
    119   calib.fPulserColor          = fPulserColor;
    120  
    121   const Int_t n3 = GetSize();
    122   if (n3 != 0)
     104  calib.fPulserColor    = fPulserColor;
     105  calib.fNumBlindPixels = fNumBlindPixels;
     106
     107  for (UInt_t i=0; i<fNumBlindPixels; i++)
    123108    {
    124       calib.InitSize(n3);
    125       for (int i=0; i<n3; i++)
    126         (*this)[i].Copy(calib[i]);
     109      calib.fBlindPixels[i] = new MCalibrationChargeBlindPix;
     110      (*this)[i].Copy(calib[i]);
    127111    }
    128  
    129112}
    130 
    131 // -------------------------------------------------------------------
    132 //
    133 // Calls TClonesArray::ExpandCreate() for fBlindPixels
    134 //
    135 void MCalibrationChargeBlindCam::InitSize(const UInt_t i)
    136 {
    137   fBlindPixels->ExpandCreate(i);
    138 }
    139 
    140113
    141114// --------------------------------------------------------------------------
     
    145118MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i)
    146119{
    147   return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels->UncheckedAt(i));
     120  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i));
    148121}
    149122
     
    154127const MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i) const
    155128{
    156   return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels->UncheckedAt(i));
     129  return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i));
    157130}
     131
    158132
    159133// --------------------------------------------------------------------------
    160134//
    161 // Returns the current size of the TClonesArray fBlindPixels
    162 // independently if the MCalibrationChargeBlindPix is filled with values or not.
    163 //
    164 const Int_t MCalibrationChargeBlindCam::GetSize() const
    165 {
    166   return fBlindPixels->GetEntriesFast();
    167 }
    168 
    169 // --------------------------------------------------------------------------
    170 //
    171 // Print first the results of the pixels
    172 // and then the ones which are not FitValid
     135// Print the results of the blind pixels
    173136//
    174137void MCalibrationChargeBlindCam::Print(Option_t *o) const
    175138{
    176139
    177   *fLog << all << GetDescriptor() << ":" << endl;
    178   int id = 0;
    179  
    180   *fLog << all << "Calibrated Blind pixels:" << endl;
    181   *fLog << all << endl;
    182 
    183   TIter Next(fBlindPixels);
    184   MCalibrationChargeBlindPix *pix;
    185   while ((pix=(MCalibrationChargeBlindPix*)Next()))
    186     {
    187      
    188       if (pix->IsSinglePheFitOK())
    189         {                           
    190 
    191           *fLog << all
    192                 << Form("%s%3i","BlindPixel: ",pix->GetPixId())
    193                 << Form("%s%4.2f%s%4.2f","  Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr())
    194                 << Form("%s%4.2f%s%4.2f","  Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err())
    195                 << Form("%s%4.2f%s%4.2f","  Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err())
    196                 << Form("%s%4.2f%s%4.2f","  Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err())
    197                 << Form("%s%4.2f%s%4.2f","  Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err())
    198                 << endl;
    199           *fLog << all
    200                 << " Pedestal Fit OK? :" << pix->IsPedestalFitOK()
    201                 << Form("%s%4.2f%s%4.2f","  Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl;
    202           *fLog << all
    203                 << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable()
    204                 << Form("%s%4.2f%s%4.2f","  Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr())
    205                 << endl;
    206           id++;
    207         }
    208     }
    209   *fLog << all << id << " blind pixels OK" << endl;
    210   id = 0;
    211  
    212   TIter Next2(fBlindPixels);
    213   while ((pix=(MCalibrationChargeBlindPix*)Next2()))
    214     {
    215      
    216       if (!pix->IsSinglePheFitOK())
    217         {                           
    218 
    219           *fLog << all
    220                 << Form("%s%3i","BlindPixel: ",pix->GetPixId())
    221                 << Form("%s%4.2f%s%4.2f","  Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr())
    222                 << Form("%s%4.2f%s%4.2f","  Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err())
    223                 << Form("%s%4.2f%s%4.2f","  Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err())
    224                 << Form("%s%4.2f%s%4.2f","  Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err())
    225                 << Form("%s%4.2f%s%4.2f","  Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err())
    226                 << endl;
    227           *fLog << all
    228                 << " Pedestal Fit OK? :" << pix->IsPedestalFitOK()
    229                 << Form("%s%4.2f%s%4.2f","  Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl;
    230           *fLog << all
    231                 << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable()
    232                 << Form("%s%4.2f%s%4.2f","  Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr())
    233                 << endl;
    234           id++;
    235         }
    236     }
    237   *fLog << all << id << " blind pixels NOT OK" << endl;
    238  
     140  fBlindPixels.Print();
    239141}
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.h

    r4401 r4669  
    11#ifndef MARS_MCalibrationChargeBlindCam
    22#define MARS_MCalibrationChargeBlindCam
     3
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
     7
     8#ifndef ROOT_TObjArray
     9#include <TObjArray.h>
     10#endif
    311
    412#ifndef MARS_MCalibrationCam
     
    715
    816class MCalibrationChargeBlindPix;
    9 class TClonesArray;
    1017class MCalibrationChargeBlindCam : public MParContainer
    1118{
    1219private:
    1320
     21  UInt_t fNumBlindPixels;                       // Number of blind pixels
     22 
    1423  MCalibrationCam::PulserColor_t fPulserColor;  // Colour of the pulsed LEDs
    1524
    16   TClonesArray *fBlindPixels;                   //-> Array of MCalibrationChargeBlindPix
    17 
    18   Bool_t fValid;
     25  TObjArray fBlindPixels;                       // Array of MCalibrationChargeBlindPix
    1926
    2027public:
    21   MCalibrationChargeBlindCam(const char *name=NULL, const char *title=NULL);
    22   ~MCalibrationChargeBlindCam();
     28
     29  MCalibrationChargeBlindCam(UInt_t nblind=0,const char *name=NULL, const char *title=NULL);
    2330 
    2431  void   Clear ( Option_t *o="" );
    2532  void   Copy ( TObject& obj ) const;
    26 
     33 
    2734  // Getters
    28   const Int_t                          GetSize()        const;
    29   const MCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; }
     35  UInt_t               GetNumBlindPixels()  const { return fNumBlindPixels; }
     36  MCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; }
    3037
    3138        MCalibrationChargeBlindPix &operator[] ( UInt_t i );
    3239  const MCalibrationChargeBlindPix &operator[] ( UInt_t i ) const;
    3340
    34   Bool_t IsValid() const { return fValid; }
    35 
    3641  // Setters
    3742  void  SetColor ( const MCalibrationCam::PulserColor_t col )  { fPulserColor = col; }
    38   void  SetValid () { fValid = kTRUE; }
    3943
    40   // Inits
    41   void  InitSize( const UInt_t i);
    42  
    4344  // Prints
    4445  void   Print(Option_t *o="") const;
    4546
    46   ClassDef(MCalibrationChargeBlindCam, 1) // Container Blind Pixel Calibration Results Camera
     47  ClassDef(MCalibrationChargeBlindCam, 2) // Container Blind Pixel Calibration Results Camera
    4748};
    4849
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h

    r4230 r4669  
    66#endif
    77
    8 #ifndef MARS_MCalibrationChargePix
    9 #include "MCalibrationChargePix.h"
     8#ifndef MARS_MCalibrationPix
     9#include "MCalibrationPix.h"
    1010#endif
    1111
    12 class MCalibrationChargeBlindPix : public MCalibrationChargePix
     12class MCalibrationChargeBlindPix : public MCalibrationPix
    1313{
    1414private:
    1515
    16   static const Float_t gkBlindPixelArea;               //! The Blind Pixel area in mm^2
    17   static const Float_t gkBlindPixelAttGreen;           //! Attenuation Filter at 520 nm
    18   static const Float_t gkBlindPixelAttBlue ;           //! Attenuation Filter at 460 nm
    19   static const Float_t gkBlindPixelAttUV   ;           //! Attenuation Filter at 370 nm
    20   static const Float_t gkBlindPixelAttCT1  ;           //! Attenuation Filter at 370 nm
    21   static const Float_t gkBlindPixelQEUnCoatedGreen;    //! Quantum Efficiency at 520 nm
    22   static const Float_t gkBlindPixelQEUnCoatedBlue ;    //! Quantum Efficiency at 460 nm
    23   static const Float_t gkBlindPixelQEUnCoatedUV   ;    //! Quantum Efficiency at 370 nm
    24   static const Float_t gkBlindPixelQEUnCoatedCT1  ;    //! Quantum Efficiency at 370 nm
    25   static const Float_t gkBlindPixelQEUnCoatedGreenErr; //! Uncertainty QEUnCoated at 520 nm
    26   static const Float_t gkBlindPixelQEUnCoatedBlueErr ; //! Uncertainty QEUnCoated at 460 nm
    27   static const Float_t gkBlindPixelQEUnCoatedUVErr   ; //! Uncertainty QEUnCoated at 370 nm
    28   static const Float_t gkBlindPixelQEUnCoatedCT1Err  ; //! Uncertainty QEUnCoated at 370 nmu
    29   static const Float_t gkBlindPixelQECoatedGreen;      //! Quantum Efficiency at 520 nm
    30   static const Float_t gkBlindPixelQECoatedBlue ;      //! Quantum Efficiency at 460 nm
    31   static const Float_t gkBlindPixelQECoatedUV   ;      //! Quantum Efficiency at 370 nm
    32   static const Float_t gkBlindPixelQECoatedCT1  ;      //! Quantum Efficiency at 370 nm
    33   static const Float_t gkBlindPixelQECoatedGreenErr;   //! Uncertainty QECoated at 520 nm
    34   static const Float_t gkBlindPixelQECoatedBlueErr ;   //! Uncertainty QECoated at 460 nm
    35   static const Float_t gkBlindPixelQECoatedUVErr   ;   //! Uncertainty QECoated at 370 nm
    36   static const Float_t gkBlindPixelQECoatedCT1Err  ;   //! Uncertainty QECoated at 370 nmu
    37   static const Float_t gkBlindPixelCollectionEff;      //! Collection Efficiency
    38   static const Float_t gkBlindPixelCollectionEffErr;   //! Uncertainty Collection Efficiency
     16  static const Float_t fgArea;         //! The Blind Pixel area in mm^2
     17  static const Float_t fgAttGreen;     //! Attenuation Filter at 520 nm
     18  static const Float_t fgAttBlue ;     //! Attenuation Filter at 460 nm
     19  static const Float_t fgAttUV   ;     //! Attenuation Filter at 370 nm
     20  static const Float_t fgAttCT1  ;     //! Attenuation Filter at 370 nm
     21  static const Float_t fgAttErr;       //! Error Att. Filter at all w.l.
     22  static const Float_t fgQEGreen;      //! Quantum Efficiency at 520 nm
     23  static const Float_t fgQEBlue ;      //! Quantum Efficiency at 460 nm
     24  static const Float_t fgQEUV   ;      //! Quantum Efficiency at 370 nm
     25  static const Float_t fgQECT1  ;      //! Quantum Efficiency at 370 nm
     26  static const Float_t fgQEErrGreen;   //! Uncertainty QEUnCoated at 520 nm
     27  static const Float_t fgQEErrBlue;    //! Uncertainty QEUnCoated at 460 nm
     28  static const Float_t fgQEErrUV   ;   //! Uncertainty QEUnCoated at 370 nm
     29  static const Float_t fgQEErrCT1  ;   //! Uncertainty QEUnCoated at 370 nmu
     30  static const Float_t fgCollEffGreen; //! Collecttion Efficiency
     31  static const Float_t fgCollEffBlue;  //! Collecttion Efficiency
     32  static const Float_t fgCollEffUV;    //! Collecttion Efficiency
     33  static const Float_t fgCollEffCT1;   //! Collecttion Efficiency
     34  static const Float_t fgCollEffErr;   //! Uncertainty Collection Efficiency
    3935
    40   Float_t fLambda;                  // Mean Poisson fit
    41   Float_t fLambdaCheck;             // Mean Pedestal Check (Gauss) fit
    42   Float_t fLambdaCheckErr;          // Error mean pedestal Check fit
    43   Float_t fLambdaVar;               // Variance lambda Poisson fit
    44   Float_t fFluxInsidePlexiglass;    // Number photons in INNER PIXEL inside the plexiglass
    45   Float_t fFluxInsidePlexiglassVar; // Variance number of photons in INNER PIXEL
    46   Float_t fMu0;                     // Position pedestal peak
    47   Float_t fMu0Err;                  // Error pos. pedestal-peak
    48   Float_t fMu1;                     // Position first photo-electron peak
    49   Float_t fMu1Err;                  // Error pos. first photo-electon peak
    50   Float_t fSigma0;                  // Width pedestal peak
    51   Float_t fSigma0Err;               // Error width pedestal peak
    52   Float_t fSigma1;                  // Width first photo-electron peak 
    53   Float_t fSigma1Err;               // Error width first photo-electron peak 
     36  Float_t fArea;                       // Blind Pixel Area
     37  TArrayF fAtt;                        // Attenuation filter (per color)
     38  TArrayF fAttErr;                     // Error attnuation filter (per color)
     39  TArrayF fQE;                         // Quantum eff. (per color)
     40  TArrayF fQEErr;                      // Error Quantum eff. (per color)
     41  TArrayF fCollEff;                    // Coll eff. (per color)
     42  TArrayF fCollEffErr;                 // Error coll. eff. (per color)
     43                                       
     44  Float_t fLambda;                     // Mean Poisson fit
     45  Float_t fLambdaCheck;                // Mean Pedestal Check (Gauss) fit
     46  Float_t fLambdaCheckErr;             // Error mean pedestal Check fit
     47  Float_t fLambdaVar;                  // Variance lambda Poisson fit
     48  Float_t fFluxInsidePlexiglass;       // Number photons in INNER PIXEL inside the plexiglass
     49  Float_t fFluxInsidePlexiglassVar;    // Variance number of photons in INNER PIXEL
     50  Float_t fMu0;                        // Position pedestal peak
     51  Float_t fMu0Err;                     // Error pos. pedestal-peak
     52  Float_t fMu1;                        // Position first photo-electron peak
     53  Float_t fMu1Err;                     // Error pos. first photo-electon peak
     54  Float_t fSigma0;                     // Width pedestal peak
     55  Float_t fSigma0Err;                  // Error width pedestal peak
     56  Float_t fSigma1;                     // Width first photo-electron peak 
     57  Float_t fSigma1Err;                  // Error width first photo-electron peak 
    5458
    5559  enum { kOscillating, kPedestalFitOK, kSinglePheFitOK, kChargeFitValid,
    56          kFluxInsidePlexiglassAvailable, kCoated };
     60         kFluxInsidePlexiglassAvailable };   // Possible validity flags
    5761
    58   MCalibrationCam::PulserColor_t fColor;
     62  MCalibrationCam::PulserColor_t fColor;     // Colour of the used pulser light
    5963
    60   const Float_t GetBlindPixelQEGreen() const;
    61   const Float_t GetBlindPixelQEBlue () const;
    62   const Float_t GetBlindPixelQEUV   () const;
    63   const Float_t GetBlindPixelQECT1  () const;
    64 
    65   const Float_t GetBlindPixelQEGreenRelVar     () const;
    66   const Float_t GetBlindPixelQEBlueRelVar      () const;
    67   const Float_t GetBlindPixelQEUVRelVar        () const;
    68   const Float_t GetBlindPixelQECT1RelVar       () const;
    69   const Float_t GetBlindPixelCollectionEffRelVar  () const;   
    70 
    71  public:
     64public:
    7265
    7366  MCalibrationChargeBlindPix(const char *name=NULL, const char *title=NULL);
    74   ~MCalibrationChargeBlindPix() {}
    7567 
    7668  Bool_t CalcFluxInsidePlexiglass();
     
    7870 
    7971  // Getters
    80   MCalibrationCam::PulserColor_t GetColor () const { return fColor;                }
    81   Float_t GetLambda                       () const { return fLambda;               }
    82   Float_t GetLambdaErr                    () const;
    83   Float_t GetLambdaRelVar                 () const; 
    84   Float_t GetLambdaCheck                  () const { return fLambdaCheck;          }
    85   Float_t GetLambdaCheckErr               () const { return fLambdaCheckErr;       }
    86   Float_t GetFluxInsidePlexiglass         () const { return fFluxInsidePlexiglass; }
    87   Float_t GetFluxInsidePlexiglassErr      () const;
    88   Float_t GetFluxInsidePlexiglassRelVar   () const; 
    89   Float_t GetMu0                          () const { return fMu0;                  }
    90   Float_t GetMu0Err                       () const { return fMu0Err;               }
    91   Float_t GetMu1                          () const { return fMu1;                  }
    92   Float_t GetMu1Err                       () const { return fMu1Err;               }
    93   Float_t GetSigma0                       () const { return fSigma0;               }
    94   Float_t GetSigma0Err                    () const { return fSigma0Err;            }
    95   Float_t GetSigma1                       () const { return fSigma1;               }
    96   Float_t GetSigma1Err                    () const { return fSigma1Err;            }
     72  const Float_t GetAtt          () const;
     73  const Float_t GetAttRelVar    () const;
     74  const Float_t GetQE           () const;
     75  const Float_t GetQERelVar     () const;
     76  const Float_t GetCollEff      () const;
     77  const Float_t GetCollEffRelVar() const;   
    9778
    98   Bool_t  IsCoated                        () const; 
    99   Bool_t  IsOscillating                   () const;
    100   Bool_t  IsChargeFitValid                () const;
    101   Bool_t  IsPedestalFitOK                 () const;
    102   Bool_t  IsSinglePheFitOK                () const;
    103   Bool_t  IsFluxInsidePlexiglassAvailable () const;
     79  const MCalibrationCam::PulserColor_t GetColor () const { return fColor;                }
     80  const Float_t GetLambda                       () const { return fLambda;               }
     81  const Float_t GetLambdaErr                    () const;
     82  const Float_t GetLambdaRelVar                 () const; 
     83  const Float_t GetLambdaCheck                  () const { return fLambdaCheck;          }
     84  const Float_t GetLambdaCheckErr               () const { return fLambdaCheckErr;       }
     85  const Float_t GetFluxInsidePlexiglass         () const { return fFluxInsidePlexiglass; }
     86  const Float_t GetFluxInsidePlexiglassErr      () const;
     87  const Float_t GetFluxInsidePlexiglassRelVar   () const; 
     88  const Float_t GetMu0                          () const { return fMu0;                  }
     89  const Float_t GetMu0Err                       () const { return fMu0Err;               }
     90  const Float_t GetMu1                          () const { return fMu1;                  }
     91  const Float_t GetMu1Err                       () const { return fMu1Err;               }
     92  const Float_t GetSigma0                       () const { return fSigma0;               }
     93  const Float_t GetSigma0Err                    () const { return fSigma0Err;            }
     94  const Float_t GetSigma1                       () const { return fSigma1;               }
     95  const Float_t GetSigma1Err                    () const { return fSigma1Err;            }
     96
     97  const Bool_t  IsOscillating                   () const;
     98  const Bool_t  IsChargeFitValid                () const;
     99  const Bool_t  IsPedestalFitOK                 () const;
     100  const Bool_t  IsSinglePheFitOK                () const;
     101  const Bool_t  IsFluxInsidePlexiglassAvailable () const;
     102
     103  void Print(Option_t *opt=NULL) const;
    104104 
    105105  // Setters
     106  void SetArea      ( Float_t f )                                           { fArea            = f; }
     107  void SetAtt       ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAtt       [col] = f; }
     108  void SetAttErr    ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAttErr    [col] = f; } 
     109  void SetQE        ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQE        [col] = f; } 
     110  void SetQEErr     ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQEErr     [col] = f; } 
     111  void SetCollEff   ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEff   [col] = f; }
     112  void SetCollEffErr( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEffErr[col] = f; }   
     113
    106114  void SetColor          ( const MCalibrationCam::PulserColor_t color ) { fColor      = color; }
    107115  void SetLambda         ( const Float_t f )                            { fLambda         = f; }
     
    118126  void SetSigma1Err      ( const Float_t f )                            { fSigma1Err      = f; }
    119127
    120   void SetCoated         ( const Bool_t  b=kTRUE ); 
    121128  void SetOscillating    ( const Bool_t  b=kTRUE );
    122129  void SetChargeFitValid ( const Bool_t  b=kTRUE );
     
    125132  void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE);
    126133
    127   ClassDef(MCalibrationChargeBlindPix, 2)       // Container Charge Calibration Results Blind Pixel
     134  ClassDef(MCalibrationChargeBlindPix, 3)       // Container Charge Calibration Results Blind Pixel
    128135};
    129136
    130137#endif
    131 
    132 
    133 
    134 
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc

    r4602 r4669  
    189189  if (!fCam)
    190190    {
    191         *fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl;
    192         return kFALSE;
    193     }
    194 
    195   fCam->InitSize(nblindpixels);
     191      *fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl;
     192      return kFALSE;
     193    }
     194
     195  if (fCam->GetNumBlindPixels() != nblindpixels)
     196    {
     197      *fLog << err << "Size mismatch in MCalibrationChargeBlindCam ... abort." << endl;     
     198      *fLog << err << "Size of MCalibrationChargeBlindCam: " << fCam->GetNumBlindPixels()
     199            << "Size of MExtractedSignalBlindPixel: " << nblindpixels << endl;
     200      return kFALSE;
     201    }
     202 
    196203
    197204  const Int_t samples = fSignal->GetNumFADCSamples();
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc

    r4641 r4669  
    484484  }
    485485
    486   fBlindPix->SetValid(kTRUE);
    487 
    488486  fMeanPedestal     = fSignal->GetPed();
    489487  fMeanPedestalErr  = fSignal->GetPedErr();
     
    499497
    500498  FitPedestal();
     499
     500  fBlindPix->SetValid(kTRUE);
    501501
    502502  if (FitSinglePhe())
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r4649 r4669  
    4848           MCalibrationChargeCam.cc \
    4949           MCalibrationChargePix.cc  \
     50           MCalibrationChargeBlindCamOneOldStyle.cc  \
     51           MCalibrationChargeBlindCamTwoNewStyle.cc  \
    5052           MCalibrationChargeBlindCam.cc  \
    5153           MCalibrationChargeBlindPix.cc  \
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc

    r4606 r4669  
    7070using namespace std;
    7171
    72 const Int_t   MExtractBlindPixel::fgNumBlindPixels   = 2;
    73 const UInt_t  MExtractBlindPixel::fgBlindPixelIds[3] = { 559, 560, 561 };
    7472const UInt_t  MExtractBlindPixel::fgBlindPixelIdx    = 559;
    7573const Byte_t  MExtractBlindPixel::fgHiGainFirst      =  10;
     
    140138//
    141139// Initializes:
    142 // - fModified to kFALSE
    143140// - fBlindPixelIdx to 0
    144141// - fExtractionType to 0
     
    155152{
    156153
    157   fModified       = kFALSE;
    158154  fExtractionType = 0;
    159155
     
    244240    delete [] fHiGainSecondDeriv;
    245241
    246   if (fModified)
    247   {
    248     for (Int_t i=0;i<fNumBlindPixels;i++)
    249       {
    250         SetBlindPixelIdx(fgBlindPixelIds[i],i);
    251         fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i);
    252       }
    253   }
    254   else
    255     fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
     242  for (Int_t i=0;i<fNumBlindPixels;i++)
     243    fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(i),i);
    256244
    257245  fBlindPixel->SetExtractionType(fExtractionType);
  • trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h

    r4605 r4669  
    1515private:
    1616
    17   static const Int_t   fgNumBlindPixels;   //! Default number of blind pixels after modification run 
    18   static const UInt_t  fgBlindPixelIds[3]; //! Default blind pixel indices after modification run
    1917  static const UInt_t  fgBlindPixelIdx;    //! Default blind pixels index before modification run
    2018  static const Byte_t  fgHiGainFirst;      //! Default First FADC slice Hi-Gain Signal (currently set to: 10   )
     
    3836  Int_t   fNSBFilterLimit;                 // Limit of sum of FADC slices for filter part
    3937
    40   Bool_t  fModified;                       // Is the run taken after the modifications?
    4138  Byte_t  fExtractionType;                 // What extraction type has been chosen?
    42 
    4339  Int_t   fNumBlindPixels;                 // Current number of blind pixels
    4440 
     
    7369  void SetExtractionType( const ExtractionType_t typ=kAmplitude );
    7470  void SetNSBFilterLimit( const Int_t   lim=fgNSBFilterLimit )  { fNSBFilterLimit = lim;   }     
    75   void SetModified     ( const Bool_t b=kTRUE)               {   fModified = b;    }
    7671 
    77   void SetNumBlindPixels( const Int_t   num=fgNumBlindPixels )  { fNumBlindPixels = num;   }
     72  void SetNumBlindPixels( const Int_t   num=1 )  { fNumBlindPixels = num;   }
    7873 
    7974  void SetRange         ( const Byte_t  hifirst=0, const Byte_t hilast=0,
Note: See TracChangeset for help on using the changeset viewer.