Ignore:
Timestamp:
06/16/04 10:39:19 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc

    r3852 r4296  
    2828//
    2929//  Input Containers:
     30//   MMcConfigRunHeader
    3031//   MRawRunHeader
    3132//   MMcFadcHeader
     
    5758#include "MGeomCam.h"
    5859#include "MRawRunHeader.h"
     60#include "MMcConfigRunHeader.h"
    5961
    6062#include "MHillas.h"
     
    194196  }
    195197
     198  // Now check the light collection for inner and outer pixels to
     199  // calculate the ratio between the two. FIXME! Light collection
     200  // depends on the incidence angle of the light w.r.t. the camera
     201  // plane. For the moment we take the ratio for light impinging
     202  // perpendicular to the camera plane.
     203  //
     204  // FIXME! We should look for AddSerialNumber("MMcConfigRunHeader") but
     205  // for the moment the stereo version of camera does not write one such
     206  // header per telescope (it should!)
     207  //
     208  MMcConfigRunHeader* mcconfig = (MMcConfigRunHeader*) pList->FindObject("MMcConfigRunHeader");
     209  if (!mcconfig)
     210    {
     211      *fLog << err << "MMcConfigRunHeader" << " not found... aborting." << endl;
     212      return kFALSE;
     213    }
     214  TArrayF innerlightcoll = mcconfig->GetLightCollectionFactor();
     215  TArrayF outerlightcoll = mcconfig->GetLightCollectionFactorOuter();
     216
     217  // In principle outer pixels seem to have a different average light
     218  // collection efficiency than outer ones. We set here the factor between
     219  // the two.
     220
     221  fOuterPixelsLightCollection = outerlightcoll[90] / innerlightcoll[90];
     222  // (at angle = 90 deg)
     223
     224
    196225  return kTRUE;
    197226}
     
    210239        return kTRUE;
    211240
     241    const Float_t size = fHillas->GetSize();
     242    const Float_t innersize = fNew->GetInnerSize();
     243
     244    // Size will at this point be in ADC counts (still uncalibrated)
    212245    //
    213246    // Exclude events with low Size (larger fluctuations)
     
    216249    //   
    217250
    218     const Float_t size = fHillas->GetSize();
    219     // Size will at this point be in ADC counts (still uncalibrated)
    220 
    221251    if (size < 1000)
    222252        return kTRUE;
    223253
    224     fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size));
    225     fHistPhot2PhotEl->Fill( (Float_t) fMcEvt->GetPhotElfromShower() /
    226                         (Float_t) fMcEvt->GetPassPhotCone() );
     254    //
     255    // PATCH: Convert number of photoelectrons in camera to the approximate number
     256    // of photoelectrons that would have been registered if all pixels had the same
     257    // light collection efficiency as inner ones (called here "corrected_photel").
     258    //
     259 
     260    const Float_t inner_photel = (Float_t) fMcEvt->GetPhotElfromShower() * innersize / size;
     261    const Float_t outer_photel = (Float_t) fMcEvt->GetPhotElfromShower() - inner_photel;
     262
     263    const Float_t corrected_photel = inner_photel + outer_photel / fOuterPixelsLightCollection;
     264
     265
     266    //    fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size));
     267
     268    fHistADC2PhotEl->Fill(TMath::Log10(corrected_photel/size));
     269    fHistPhot2PhotEl->Fill( corrected_photel / (Float_t) fMcEvt->GetPassPhotCone() );
    227270
    228271    return kTRUE;
     
    270313        MCalibrationQEPix     &qepix  = (MCalibrationQEPix&)    (*fQECam) [i];
    271314
    272         qepix.SetAverageQE(fPhot2PhotEl);
     315        Float_t qe = fPhot2PhotEl;
     316        if (fGeom->GetPixRatio(i) < 1.)
     317          qe *= fOuterPixelsLightCollection;
     318        qepix.SetAverageQE(qe);
    273319
    274320        qepix.SetAvNormFFactor(1.);
     
    284330        //
    285331        // We take into account the (possibly) different gain of outer pixels:
     332        // FIXME: we are now assuming that all inner pixels have the same gain, and all
     333        // outer pixels have the same gain (different from inner ones though). This can
     334        // only be like this in camera 0.7, but may change in future versions of camera.
    286335        //
     336
    287337        if (fGeom->GetPixRatio(i) < 1.)
    288338          factor *= fHeaderFadc->GetAmplitud()/fHeaderFadc->GetAmplitudOuter();
  • trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h

    r3852 r4296  
    2727    MMcFadcHeader             *fHeaderFadc;
    2828
    29     Float_t fADC2PhotEl;   // Conversion factor (photel / ADC count)
    30     Float_t fPhot2PhotEl;  // Conversion factor (photons / photoelectron) = average QE
     29    Float_t fADC2PhotEl;   // Conversion factor (photel / ADC count). FOR INER PIXELS
     30    Float_t fPhot2PhotEl;  // Conversion factor (photons / photoelectron) = average QE. FOR INER PIXELS
    3131    Long_t  fEvents;
     32    Float_t fOuterPixelsLightCollection; // Light collection efficiency (plexiglas, light guide) of
     33                                         // outer pixels w.r.t inner ones
    3234
    3335    TH1F*   fHistADC2PhotEl;
Note: See TracChangeset for help on using the changeset viewer.