Ignore:
Timestamp:
06/16/04 10:39:19 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r4291 r4296  
    253253    // (at angle = 90 deg)
    254254
    255     // Set now the conversion from ADC counts to photoelectrons (in case
    256     // no previous calibration existed in the parameter list).
     255    // Set now the default conversion from ADC counts to "photoelectrons"
     256    // (in case no previous calibration existed in the parameter list).
    257257    // As default we want 1 photon = 1 inner pixel ADC count
    258     // (this will make Size to be in ADC counts which is what we want for
    259     // the MC calibration loop. To achieve this we set the ADC to
     258    // (this will make Size to be in ADC counts, which is what we want for
     259    // the MC calibration loop). To achieve this we set the ADC to
    260260    // photoelectron conversion equal to the QE, which will later make the
    261     // ADC to photon conversion factor to be = 1.
     261    // ADC to photon conversion factor (= ADC2PhotEl/QE) to be = 1.
    262262    //
    263263    fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE;
    264264
    265265    //
    266     // Set the ADC to photons conversion factor for outer pixels.
    267     // One can choose not to apply the known (in MC) gain factor between
    268     // inner and outer pixels, (fOuterPixelsGainScaling = kFALSE),
     266    // Set the default ADC to "photoelectrons" conversion factor for outer
     267    // pixels. One can choose not to apply the known (in MC) gain factor
     268    // between inner and outer pixels, (in case fOuterPixelsGainScaling = kFALSE),
    269269    // which may be useful for display purposes.
    270     // If we apply the factor, we must take into account the different
    271     // gain photoelectrons->ADC counts, and also apply the correct QE
    272     // (see comment above) for the outer pixels through the factor
    273     // fOuterPixelsLightCollection.
     270    // If on the contrary we apply the factor, we must take into account the
     271    // different gains photoelectrons->ADC counts, given in MC by fAmplitude
     272    // and fAmplitudeOuter. This "default" calibration is such that a shower
     273    // completely contained in the inner part would have Size in ADC counts,
     274    // whereas one partially in the outer part would have Size in "equivalent
     275    // inner ADC counts" : the "same" shower (light density distribution) would
     276    // have the same Size no matter where in the camera it lies. For this we have
     277    // also to set later (see below) the right QE for outer pixels, which may
     278    // be different from that of inner pixels.
    274279    //
    275280
    276281    if (fOuterPixelsGainScaling)
    277282      fADC2PhElOuter =  MCalibrationQEPix::gkDefaultAverageQE
    278           * fOuterPixelsLightCollection
    279           * (fAmplitude / fAmplitudeOuter);
     283        * (fAmplitude / fAmplitudeOuter);
    280284    else
    281285      fADC2PhElOuter = fADC2PhElInner;
     
    306310          fADC2PhElOuter : fADC2PhElInner;
    307311
     312
    308313        calpix.SetMeanConvFADC2Phe(adc2photel);
    309314        calpix.SetMeanConvFADC2PheVar(0.);
     
    314319    //
    315320    // Now set the average QE for each type of pixels. Correct outer pixels
    316     // by different light collection efficiency.
     321    // for different light collection efficiency.
    317322    //
    318323    num = fQECam->GetSize();
     
    320325    {
    321326        MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i];
    322         Float_t avqe =
    323             (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))?
    324             MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection:
    325             MCalibrationQEPix::gkDefaultAverageQE;
     327
     328        Float_t avqe = MCalibrationQEPix::gkDefaultAverageQE;
     329
     330        if (fOuterPixelsGainScaling)
     331          if (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))
     332            avqe = MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection;
    326333
    327334        qepix.SetAverageQE(avqe);
Note: See TracChangeset for help on using the changeset viewer.