Ignore:
Timestamp:
05/01/04 09:57:15 (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/MCalibrationChargeCalc.cc

    r3849 r3923  
    229229const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit       = 0.2;
    230230const Float_t MCalibrationChargeCalc::fgPheErrLimit            = 4.;
     231const Float_t MCalibrationChargeCalc::fgFFactorErrLimit        = 3.;
    231232// --------------------------------------------------------------------------
    232233//
     
    245246// - fChargeErrLimit    to fgChargeErrLimit   
    246247// - fChargeRelErrLimit to fgChargeRelErrLimit
     248// - fFFactorErrLimit   to fgFFactorErrLimit
    247249// - fLambdaCheckLimit  to fgLambdaCheckLimit
    248250// - fLambdaErrLimit    to fgLambdaErrLimit
     
    256258    : fBadPixels(NULL), fCam(NULL), fBlindPixel(NULL), fPINDiode(NULL),
    257259      fQECam(NULL), fGeom(NULL), fPedestals(NULL), fEvtTime(NULL)
    258       {
    259 
     260{
     261       
    260262  fName  = name  ? name  : "MCalibrationChargeCalc";
    261263  fTitle = title ? title : "Task to calculate the calibration constants and MCalibrationCam ";
     
    269271  SetChargeErrLimit(); 
    270272  SetChargeRelErrLimit();
     273  SetFFactorErrLimit();
    271274  SetLambdaCheckLimit();
    272275  SetLambdaErrLimit();
     
    12071210                            + fQECam->GetPlexiglassQERelVar();
    12081211
     1212  const UInt_t nareas   = fGeom->GetNumAreas();
     1213
     1214  Float_t lowlim           [nareas];
     1215  Float_t upplim           [nareas];
     1216  Float_t avffactorphotons [nareas];
     1217  Float_t avffactorphotvar [nareas];
     1218  Int_t   numffactor       [nareas];
     1219
     1220  memset(lowlim          ,0, nareas   * sizeof(Float_t));
     1221  memset(upplim          ,0, nareas   * sizeof(Float_t));
     1222  memset(avffactorphotons,0, nareas   * sizeof(Float_t));
     1223  memset(avffactorphotvar,0, nareas   * sizeof(Float_t));
     1224  memset(numffactor      ,0, nareas   * sizeof(Int_t));
     1225
    12091226  const UInt_t npixels  = fGeom->GetNumPixels();
    12101227
     
    12401257        *fLog << warn << GetDescriptor()
    12411258              << ": Cannot update Quantum efficiencies with the F-Factor Method" << endl;
     1259
     1260      const Int_t aidx = (*fGeom)[i].GetAidx();
     1261
     1262      avffactorphotons[aidx] += pix.GetMeanFFactorFADC2Phot();
     1263      avffactorphotvar[aidx] += pix.GetMeanFFactorFADC2PhotVar();
     1264      numffactor[aidx]++;
     1265    }
     1266
     1267  for (UInt_t i=0; i<nareas; i++)
     1268    {
     1269      avffactorphotons[i] /= numffactor[i];
     1270      avffactorphotvar[i] /= numffactor[i];
     1271      lowlim  [i] = avffactorphotons[i] - fFFactorErrLimit*TMath::Sqrt(avffactorphotvar[i]);
     1272      upplim  [i] = avffactorphotons[i] + fFFactorErrLimit*TMath::Sqrt(avffactorphotvar[i]);
     1273    }
     1274 
     1275  for (UInt_t i=0; i<npixels; i++)
     1276    {
     1277     
     1278      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i];
     1279
     1280      if (!pix.IsFFactorMethodValid())
     1281        continue;
     1282     
     1283      const Float_t ffactor = pix.GetMeanFFactorFADC2Phot();
     1284      MBadPixelsPix    &bad = (*fBadPixels)[i];
     1285
     1286      const Int_t   aidx   = (*fGeom)[i].GetAidx();
     1287
     1288      if ( ffactor < lowlim[aidx] || ffactor > upplim[aidx] )
     1289        {
     1290          *fLog << warn << GetDescriptor() << ": Deviating F-Factor: "
     1291                << Form("%4.2f",ffactor) << " out of accepted limits: ["
     1292                << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in pixel " << i << endl;
     1293          bad.SetUncalibrated( MBadPixelsPix::kDeviatingFFactor );
     1294          bad.SetUnsuitable  ( MBadPixelsPix::kUnsuitableRun    );
     1295          pix.SetExcluded();
     1296        }
    12421297    }
    12431298}
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc

    r3908 r3923  
    4141//
    4242const Int_t   MHCalibrationRelTimePix::fgRelTimeNbins    = 900;
    43 const Axis_t  MHCalibrationRelTimePix::fgRelTimeFirst    = -13.;
    44 const Axis_t  MHCalibrationRelTimePix::fgRelTimeLast     =  13.;
     43const Axis_t  MHCalibrationRelTimePix::fgRelTimeFirst    = -5.;
     44const Axis_t  MHCalibrationRelTimePix::fgRelTimeLast     =  5.;
    4545const Float_t MHCalibrationRelTimePix::fgFADCSliceWidth  =  3.3333;
    4646// --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.