Ignore:
Timestamp:
04/08/04 20:52:59 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc

    r3638 r3689  
    5555#include "MCalibrationChargePix.h"
    5656#include "MCalibrationChargeCam.h"
     57
     58#include "MCalibrationQEPix.h"
     59#include "MCalibrationQECam.h"
     60
    5761#include "MExtractedSignalCam.h"
    5862#include "MExtractedSignalPix.h"
     
    121125        *fLog << inf << AddSerialNumber("MCalibrationChargeCam") << " already exists... " << endl;
    122126    }
     127
     128    fQECam = (MCalibrationQECam*) pList->FindObject(AddSerialNumber("MCalibrationQECam"));
     129    if (!fQECam)
     130    {
     131        fQECam = (MCalibrationQECam*) pList->FindCreateObj(AddSerialNumber("MCalibrationQECam"));
     132        if (!fQECam)
     133            return kFALSE;
     134    }
     135    else
     136    {
     137        fFillQECam = kFALSE;
     138        *fLog << inf << AddSerialNumber("MCalibrationQECam") << " already exists... " << endl;
     139    }
     140
    123141
    124142    fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam"));
     
    235253    const int num = fCalCam->GetSize();
    236254
    237     fCalCam->SetBlindPixelMethodValid(kTRUE);
    238 
     255    fCalCam->SetFFactorMethodValid   ( kTRUE );
     256    fQECam->SetFFactorMethodValid    ( kTRUE );
     257    fQECam->SetBlindPixelMethodValid ( kTRUE );
     258    fQECam->SetCombinedMethodValid   ( kTRUE );
     259    fQECam->SetPINDiodeMethodValid   ( kTRUE ); 
     260   
    239261    for (int i=0; i<num; i++)
    240262    {
    241263        MCalibrationChargePix &calpix = (MCalibrationChargePix&)(*fCalCam)[i];
    242264
    243         calpix.SetBlindPixelMethodValid();
     265        calpix.SetFFactorMethodValid();
    244266
    245267        calpix.SetConversionHiLo(fConversionHiLo);
     
    247269
    248270        //
    249         // Write conversion factor ADC to photons (different for inner
     271        // Write conversion factor ADC to photo-electrons (different for inner
    250272        // and outer pixels).
    251273        //
    252 
    253274        Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))?
    254275          fADC2PhOuter : fADC2PhInner;
    255276
    256         calpix.SetConversionBlindPixelMethod(adc2phot, 0., 0.);
     277        //
     278        // FIXME: This has now to be split into a adc2phe part and a phe2phot (==QE) part
     279        //
     280        const Float_t qe = MCalibrationQEPix::gkDefaultAverageQE;
     281        calpix.SetMeanConvFADC2Phe(adc2phot*qe); // here, the FADC to phe part should go.
     282        calpix.SetMeanConvFADC2PheVar(0.);
     283        calpix.SetMeanFFactorFADC2Phot(0.);
     284
    257285    }
    258286
     
    306334
    307335        MCalibrationChargePix &calpix = (MCalibrationChargePix&)(*fCalCam)[i];
    308         Float_t adc2phot = calpix.GetMeanConversionBlindPixelMethod();
     336        //        MCalibrationQEPix     &qepix  = (MCalibrationQEPix&)    (*fQECam) [i];
     337
     338        Float_t qe       = MCalibrationQEPix::gkDefaultAverageQE;
     339        Float_t adc2phot = calpix.GetMeanConvFADC2Phe() / qe;
    309340        Float_t hi2lo    = calpix.GetConversionHiLo();
    310341
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h

    r3345 r3689  
    77
    88class MCalibrationChargeCam;
     9class MCalibrationQECam;
    910class MPedPhotCam;
    1011class MGeomCam;
     
    2122
    2223    MCalibrationChargeCam *fCalCam;
     24    MCalibrationQECam     *fQECam;   
    2325    MPedPhotCam           *fPedPhotCam;
    2426    MGeomCam              *fGeom;
     
    2628    MExtractedSignalCam   *fSignalCam;
    2729
    28     Float_t fADC2PhInner; // Conversion factor from ADC counts to photons
     30    Float_t fADC2PhInner; // Conversion factor from ADC counts to photo-electrons
    2931    Float_t fADC2PhOuter; // for inner and outer pixels.
    3032
    3133    Bool_t  fFillCalibrationCam;
     34    Bool_t  fFillQECam;   
    3235    Bool_t  fOuterPixelsGainScaling;
    3336
Note: See TracChangeset for help on using the changeset viewer.