Changeset 3426


Ignore:
Timestamp:
03/07/04 17:10:43 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3421 r3426  
    1919
    2020  * mcalib/MCalibrationChargePix.[h,cc]
     21    - include MBadPixelsCam
     22
     23  * mcalib/MCalibrationChargeCam.[h,cc]
    2124    - include MBadPixelsCam
    2225
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3354 r3426  
    131131#include "MGeomPix.h"
    132132
     133#include "MBadPixelsCam.h"
     134#include "MBadPixelsPix.h"
     135
    133136#include "MCalibrationChargePix.h"
    134137#include "MCalibrationChargeBlindPix.h"
     
    152155    : fBlindPixel(NULL),
    153156      fPINDiode(NULL),
     157      fGeomCam(NULL),
     158      fBadPixels(NULL),
    154159      fOffsets(NULL),
    155160      fSlopes(NULL),
     
    296301    {
    297302     
    298       if (pix->IsChargeValid() && !pix->IsExcluded() && !pix->IsOscillating())
    299         {
     303      if ((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK() && !pix->IsExcluded())
     304        {                           
    300305
    301306            *fLog << all << "Pix " << pix->GetPixId()
     
    320325      {
    321326       
    322         if (!pix->IsExcluded() && !pix->IsChargeValid())
     327        if (!pix->IsExcluded() && !(*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK())
    323328          {
    324329
     
    345350    {
    346351
    347       if ( pix->IsOscillating()  && !pix->IsExcluded())
     352      if ( (*fBadPixels)[pix->GetPixId()].IsCalibrationOscillating()  && !pix->IsExcluded())
    348353        {
    349354
     
    509514      break;
    510515    case 4:
    511       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     516      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    512517        return kFALSE;
    513518      val = (*this)[idx].GetChargeProb();
    514519      break;
    515520    case 5:
    516       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     521      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    517522        return kFALSE;
    518523      if ((*this)[idx].GetRSigmaCharge() == -1.)
     
    521526      break;
    522527    case 6:
    523       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     528      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    524529        return kFALSE;   
    525530      if ((*this)[idx].GetRSigmaCharge() == -1.)
     
    528533      break;
    529534    case 7:
    530       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     535      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    531536        return kFALSE;
    532537      if ((*this)[idx].GetRSigmaCharge() == -1.)
     
    535540      break;
    536541    case 8:
    537       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     542      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    538543        return kFALSE;
    539544      if ((*this)[idx].GetRSigmaCharge() == -1.)
     
    551556      break;
    552557    case 9:
    553       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     558      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    554559        return kFALSE;
    555560      val = (*this)[idx].GetPheFFactorMethod();
    556561      break;
    557562    case 10:
    558       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     563      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    559564        return kFALSE;
    560565      val = (*this)[idx].GetPheFFactorMethodErr();
    561566      break;
    562567    case 11:
    563       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     568      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    564569        return kFALSE;
    565570      val = (*this)[idx].GetMeanConversionFFactorMethod();
    566571      break;
    567572    case 12:
    568       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     573      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    569574        return kFALSE;
    570575      val = (*this)[idx].GetConversionFFactorMethodErr();
    571576      break;
    572577    case 13:
    573       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     578      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    574579        return kFALSE;
    575580      val = (*this)[idx].GetTotalFFactorFFactorMethod();
    576581      break;
    577582    case 14:
    578       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())
     583      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid())
    579584        return kFALSE;
    580585      val = (*this)[idx].GetTotalFFactorErrFFactorMethod();
    581586      break;
    582587    case 15:
    583       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     588      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    584589        return kFALSE;
    585590      val = fBlindPixel->GetMeanFluxInsidePlexiglass()*area;
    586591      break;
    587592    case 16:
    588       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     593      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    589594        return kFALSE;
    590595      val = fBlindPixel->GetMeanFluxErrInsidePlexiglass()*area;
    591596      break;
    592597    case 17:
    593       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     598      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    594599        return kFALSE;
    595600      val = (*this)[idx].GetMeanConversionBlindPixelMethod();
    596601      break;
    597602    case 18:
    598       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     603      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    599604        return kFALSE;
    600605      val = (*this)[idx].GetConversionBlindPixelMethodErr();
    601606      break;
    602607    case 19:
    603       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     608      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    604609        return kFALSE;
    605610      val = (*this)[idx].GetTotalFFactorBlindPixelMethod();
    606611      break;
    607612    case 20:
    608       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())
     613      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid())
    609614        return kFALSE;
    610615      val = (*this)[idx].GetTotalFFactorErrBlindPixelMethod();
    611616      break;
    612617    case 21:
    613       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     618      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    614619        return kFALSE;
    615620      val = fPINDiode->GetMeanFluxOutsidePlexiglass()*area;
    616621      break;
    617622    case 22:
    618       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     623      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    619624        return kFALSE;
    620625      val = fPINDiode->GetMeanFluxErrOutsidePlexiglass()*area;
    621626      break;
    622627    case 23:
    623       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     628      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    624629        return kFALSE;
    625630      val = (*this)[idx].GetMeanConversionPINDiodeMethod();
    626631      break;
    627632    case 24:
    628       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     633      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    629634        return kFALSE;
    630635      val = (*this)[idx].GetConversionPINDiodeMethodErr();
    631636      break;
    632637    case 25:
    633       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     638      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    634639        return kFALSE;
    635640      val = (*this)[idx].GetTotalFFactorPINDiodeMethod();
    636641      break;
    637642    case 26:
    638       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())
     643      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid())
    639644        return kFALSE;
    640645      val = (*this)[idx].GetTotalFFactorErrPINDiodeMethod();
     
    657662      if ((*this)[idx].IsExcluded())
    658663        return kFALSE;
    659       if (!(*this)[idx].IsChargeValid())
     664      if (!(*fBadPixels)[idx].IsCalibrationSignalOK())
    660665        val = 1;
    661666      else
     
    665670      if ((*this)[idx].IsExcluded())
    666671        return kFALSE;
    667       if ((*this)[idx].IsHiGainOscillating())
     672      if ((*fBadPixels)[idx].IsCalibrationOscillating())
    668673        val = 1;
    669674      else
     
    673678      if ((*this)[idx].IsExcluded())
    674679        return kFALSE;
    675       if ((*this)[idx].IsLoGainOscillating())
     680      if ((*fBadPixels)[idx].IsCalibrationOscillating())
    676681        val = 1;
    677682      else
     
    689694      break;
    690695    case 34:
    691       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     696      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    692697        return kFALSE;
    693698      if ((*this)[idx].IsHiGainSaturation())
     
    741746      break;
    742747    case 42:
    743       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     748      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    744749        return kFALSE;
    745750      val = (*this)[idx].GetAbsTimeMean();
    746751      break;
    747752    case 43:
    748       if ((*this)[idx].IsExcluded() || !(*this)[idx].IsChargeValid())
     753      if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK())
    749754        return kFALSE;
    750755      val = (*this)[idx].GetAbsTimeRms();
     
    781786    {
    782787
    783       if(pix->IsChargeValid())
     788      if((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK())
    784789        {
    785790         
     
    824829    {
    825830
    826       if (pix->IsChargeValid())
     831      if((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK())
    827832        {
    828833
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h

    r3350 r3426  
    1616class MCalibrationChargePINDiode;
    1717class MCalibrationChargePix;
     18class MBadPixelsCam;
    1819class MCalibrationChargeCam : public MParContainer, public MCamEvent
    1920{
     
    2122 
    2223  Int_t fNumPixels;
    23   TClonesArray *fPixels;                                        //-> Array of MCalibrationPix with fit results
    24   MCalibrationChargePix *fAverageInnerPix;                      //-> Average Pixel of all events
    25   MCalibrationChargePix *fAverageOuterPix;                      //-> Average Pixel of all events
     24  TClonesArray *fPixels;                         //-> Array of MCalibrationPix with fit results
     25  MCalibrationChargePix *fAverageInnerPix;       //-> Average Pixel of all events
     26  MCalibrationChargePix *fAverageOuterPix;       //-> Average Pixel of all events
    2627 
    27   const MCalibrationChargeBlindPix *fBlindPixel;                //! Pointer to the Blind Pixel with fit results
    28   const MCalibrationChargePINDiode *fPINDiode;                  //! Pointer to the PIN Diode with fit results
     28  const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
     29  const MCalibrationChargePINDiode *fPINDiode;   //! Pointer to the PIN Diode with fit results
    2930
    30   const MGeomCam             *fGeomCam;                         //! Need geom cam to know which pixel in inner or outer
     31  const MGeomCam                   *fGeomCam;    //! Need geom cam to know which pixel in inner or outer
     32  const MBadPixelsCam              *fBadPixels;  //! Bad Pixels cam, only for reading
    3133
    32   TH1D* fOffsets;                                               //!
    33   TH1D* fSlopes;                                                //!
     34  TH1D* fOffsets;                                //!
     35  TH1D* fSlopes;                                 //!
    3436 
    35   TH2D* fOffvsSlope;                                            //!
     37  TH2D* fOffvsSlope;                             //!
    3638
    3739  UInt_t  fNumExcludedPixels;
     
    5254  void SetNumPixelsExcluded(  const UInt_t n )            {  fNumExcludedPixels = n; }
    5355  void SetGeomCam(  const MGeomCam *geom)                 {  fGeomCam = geom;        }
     56  void SetBadPixelsCam(  const MBadPixelsCam *bad)                 {  fBadPixels = bad;        }
    5457
    5558  void SetPINDiode  ( const MCalibrationChargePINDiode *d ) {  fPINDiode   = d;      }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3422 r3426  
    122122          kChargeValid, kTimeFitValid,
    123123          kHiGainFitted, kLoGainFitted,
    124           kHiGainOscillating, kLoGainOscillating,
    125           kMeanTimeInFirstBin, kMeanTimeInLastBin,
    126124          kBlindPixelMethodValid, kFFactorMethodValid,
    127125          kPINDiodeMethodValid, kCombinedMethodValid };
     
    152150  void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelErrLimit = f; }
    153151
    154   void SetMeanTimeInFirstBin( const Bool_t b = kTRUE );
    155   void SetMeanTimeInLastBin ( const Bool_t b = kTRUE );
    156 
    157152  // Charges
    158153  void SetHiGainMeanCharge      ( const Float_t f ) { fHiGainMeanCharge      = f; }
     
    192187  void SetLoGainSaturation    (  const Bool_t b = kTRUE );
    193188  void SetExcluded            (  const Bool_t b = kTRUE );
    194   void SetChargeValid         (  const Bool_t b = kTRUE );
    195189  void SetHiGainFitted        (  const Bool_t b = kTRUE );
    196190  void SetLoGainFitted        (  const Bool_t b = kTRUE );
    197   void SetHiGainOscillating   (  const Bool_t b = kTRUE );
    198   void SetLoGainOscillating   (  const Bool_t b = kTRUE );
    199191  void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
    200192  void SetFFactorMethodValid  (  const Bool_t b = kTRUE );
     
    278270  Bool_t IsHiGainSaturation()                  const;
    279271  Bool_t IsLoGainSaturation()                  const;
    280   Bool_t IsChargeValid()                       const;
    281272  Bool_t IsHiGainFitted()                      const;
    282273  Bool_t IsLoGainFitted()                      const;
    283274  Bool_t IsFitted()                            const;
    284   Bool_t IsHiGainOscillating()                 const;
    285   Bool_t IsLoGainOscillating()                 const;
    286   Bool_t IsOscillating()                       const;
    287275  Bool_t IsBlindPixelMethodValid()             const;
    288276  Bool_t IsPINDiodeMethodValid()               const;
     
    290278  Bool_t IsCombinedMethodValid()               const;
    291279
    292   Bool_t IsMeanTimeInFirstBin()                const;
    293   Bool_t IsMeanTimeInLastBin()                 const;
    294 
    295280  void   DefinePixId(Int_t i);
    296281
     
    298283  void  ApplyLoGainConversion();
    299284
    300   void CheckChargeValidity ( MBadPixelsPix *bad=NULL );
    301   void CheckTimeValidity   ( MBadPixelsPix *bad=NULL );
     285  Bool_t CheckChargeValidity ( MBadPixelsPix *bad=NULL );
     286  Bool_t CheckTimeValidity   ( MBadPixelsPix *bad=NULL );
    302287  Bool_t CalcReducedSigma();
    303288  Bool_t CalcFFactorMethod();
Note: See TracChangeset for help on using the changeset viewer.