Ignore:
Timestamp:
09/03/04 18:37:09 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r4780 r4850  
    269269}
    270270
    271 // ----------------------------------------------------------------------------------------------
    272 //
    273 // Search all available QE's of a certain colour after the combination of the three methods
    274 // compare them to the default QE of that colour and
    275 // add up a weighted average (wav) and a sum of weights (sumw)
    276 //
    277 // FIXME: This has to be replaced by a decent fit the QE-spectrum!
    278 //
    279 void MCalibrationQEPix::AddAverageCombinedQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
    280 {
    281 
    282   if (IsCombinedMethodValid (col))
    283   {
    284     const Float_t newavqe    =   GetQECombined(col)       / GetDefaultQE (col)
    285                                / GetLightGuidesEff    (col) / GetPMTCollectionEff();
    286     const Float_t newavqevar = ( GetQECombinedRelVar(col) + GetDefaultQERelVar(col)
    287                                + GetLightGuidesEffRelVar(col) + GetPMTCollectionEffRelVar()  )
    288                                * newavqe * newavqe;
    289     const Float_t weight     = 1./newavqevar;
    290     wav  += newavqe * weight;
    291     sumw += weight;
    292 
    293   }
    294 }
    295271
    296272// ----------------------------------------------------------------------------------------------
     
    12801256{
    12811257 
    1282   Float_t weightedav = 0.;
    1283   Float_t sumweights = 0.;
    1284 
    1285   AddAverageCombinedQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
    1286   AddAverageCombinedQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
    1287   AddAverageCombinedQEs(MCalibrationCam::kUV   , weightedav, sumweights);
    1288   AddAverageCombinedQEs(MCalibrationCam::kCT1  , weightedav, sumweights);
    1289 
    1290   if (weightedav == 0. || sumweights == 0.)
    1291     return kFALSE;
    1292 
    1293   fAvNormCombined     = weightedav / sumweights;
    1294   fAvNormCombinedVar  = 1./ sumweights ;
    1295 
    1296   SetAverageQECombinedAvailable();
     1258  fAvNormCombinedVar = 0.;
     1259  fAvNormCombined    = 0.;
     1260 
     1261  if (fAvNormBlindPixel > 0. && fAvNormBlindPixelVar > 0.)
     1262    {
     1263      const Float_t weight = 1./fAvNormBlindPixelVar;
     1264      fAvNormCombinedVar  += weight;
     1265      fAvNormCombined     += fAvNormBlindPixel*weight;
     1266    }
     1267 
     1268  if (fAvNormFFactor    > 0. && fAvNormFFactorVar > 0. )
     1269    {
     1270      const Float_t weight = 1./fAvNormFFactorVar;
     1271      fAvNormCombinedVar  += weight;
     1272      fAvNormCombined     += fAvNormFFactor*weight;
     1273    }
     1274 
     1275  if (fAvNormPINDiode > 0. && fAvNormPINDiodeVar > 0. )
     1276    {
     1277      const Float_t weight = 1./fAvNormPINDiodeVar;
     1278      fAvNormCombinedVar  += weight;
     1279      fAvNormCombined     += fAvNormPINDiode*weight;
     1280    }
     1281 
     1282  fAvNormCombined = ( fAvNormCombinedVar > 0.) ? -1. : fAvNormCombined/fAvNormCombinedVar ;
     1283 
     1284  if (fAvNormCombined > 0.)
     1285    SetAverageQECombinedAvailable();
    12971286
    12981287  return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h

    r4241 r4850  
    6969
    7070  void  AddAverageBlindPixelQEs( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
    71   void  AddAverageCombinedQEs  ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
    7271  void  AddAverageFFactorQEs  ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
    7372  void  AddAveragePINDiodeQEs  ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
Note: See TracChangeset for help on using the changeset viewer.