Ignore:
Timestamp:
09/07/04 13:44:17 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r4882 r4885  
    200200  }
    201201 
    202   if (fLoGainArray->GetEntries()==0)
     202  if (fLoGainArray->GetEntries()==0 && fLoGain )
    203203  {
    204204      fLoGainArray->Expand(npixels);
     
    229229  }
    230230
    231   if (fAverageLoGainAreas->GetEntries()==0)
     231  if (fAverageLoGainAreas->GetEntries()==0 && fLoGain )
    232232  {
    233233    fAverageLoGainAreas->Expand(nareas);
     
    263263  }
    264264 
    265   if (fAverageLoGainSectors->GetEntries()==0)
     265  if (fAverageLoGainSectors->GetEntries()==0 && fLoGain )
    266266    {
    267267      fAverageLoGainSectors->Expand(nsectors);
     
    348348      const Int_t sector = (*fGeom)[i].GetSector();
    349349
    350       if (pix.IsLoGainUsed())
     350      if (pix.IsLoGainUsed() && fLoGain)
    351351        {
    352352          const Float_t reltime = pix.GetArrivalTimeLoGain() - reftime;
     
    361361        {
    362362          const Float_t reltime = pix.GetArrivalTimeHiGain() - reftime;
     363
    363364          histhi.FillHistAndArray(reltime) ;
    364365          fSumareahi  [aidx]   += reltime;
     
    374375      histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]);
    375376
    376       MHGausEvents &histlo = GetAverageLoGainArea(j);
    377       histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
     377      if (fLoGain)
     378        {
     379          MHGausEvents &histlo = GetAverageLoGainArea(j);
     380          histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);
     381        }
    378382    }
    379383 
     
    383387      histhi.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]);
    384388
    385       MHGausEvents &histlo = GetAverageLoGainSector(j);
    386       histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
     389      if (fLoGain)
     390        {
     391          MHGausEvents &histlo = GetAverageLoGainSector(j);
     392          histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);
     393        }
    387394    }
    388395
     
    414421        }
    415422      else
    416         (*this)(i).SetExcluded();
    417      
    418     }
    419  
     423        if (fLoGain)
     424          (*this)(i).SetExcluded();
     425     
     426    }
     427
     428
    420429  for (Int_t j=0; j<fAverageHiGainAreas->GetSize(); j++)
    421430    {
     
    429438        }
    430439      else
    431         GetAverageLoGainArea(j).SetExcluded();
     440        if (fLoGain)
     441          GetAverageLoGainArea(j).SetExcluded();
    432442
    433443   }
     
    444454        }
    445455      else
    446         GetAverageHiGainSector(j).SetExcluded();
    447     }
    448 
     456        if (fLoGain)       
     457          GetAverageLoGainSector(j).SetExcluded();
     458    }
    449459
    450460  FitHiGainArrays((*fCam),*fBadPixels,
    451461                  MBadPixelsPix::kRelTimeNotFitted,
    452462                  MBadPixelsPix::kRelTimeOscillating);
    453 
    454   FitLoGainArrays((*fCam),*fBadPixels,
    455                   MBadPixelsPix::kRelTimeNotFitted,
    456                   MBadPixelsPix::kRelTimeOscillating);
     463 
     464  if (fLoGain)       
     465    FitLoGainArrays((*fCam),*fBadPixels,
     466                    MBadPixelsPix::kRelTimeNotFitted,
     467                    MBadPixelsPix::kRelTimeOscillating);
    457468
    458469  return kTRUE;
     
    489500// ==============
    490501//
    491 // 0: Fitted Mean Relative Arrival Time in ns  (MHGausEvents::GetMean()*MHCalibrationRelTimePix::GetFADCSliceWidth())
    492 // 1: Error Mean Relative Arrival Time in ns   (MHGausEvents::GetMeanErr()*MHCalibrationRelTimePix::GetFADCSliceWidth())
    493 // 2: Sigma fitted Relative Arrival Time in ns (MHGausEvents::GetSigma()*MHCalibrationRelTimePix::GetFADCSliceWidth())
    494 // 3: Error Sigma Relative Arrival Time in ns  (MHGausEvents::GetSigmaErr()*MHCalibrationRelTimePix::GetFADCSliceWidth())
     502// 0: Fitted Mean Relative Arrival Time in FADC slices  (MHGausEvents::GetMean()*MHCalibrationRelTimePix::GetFADCSliceWidth())
     503// 1: Error Mean Relative Arrival Time in FADC slices   (MHGausEvents::GetMeanErr()*MHCalibrationRelTimePix::GetFADCSliceWidth())
     504// 2: Sigma fitted Relative Arrival Time in FADC slices (MHGausEvents::GetSigma()*MHCalibrationRelTimePix::GetFADCSliceWidth())
     505// 3: Error Sigma Relative Arrival Time in FADC slices  (MHGausEvents::GetSigmaErr()*MHCalibrationRelTimePix::GetFADCSliceWidth())
    495506//
    496507// Useful variables derived from the fit results:
     
    512523
    513524  const MHCalibrationRelTimePix &pix = (MHCalibrationRelTimePix&)(*this)[idx];
    514   const Float_t fadc2ns              = pix.GetFADCSliceWidth();
    515525
    516526  switch (type)
    517527    {
    518528    case 0:
    519       val = pix.GetMean()*fadc2ns;
     529      val = pix.GetMean();
    520530      break;
    521531    case 1:
    522       val = pix.GetMeanErr()*fadc2ns;
     532      val = pix.GetMeanErr();
    523533      break;
    524534    case 2:
    525       val = pix.GetSigma()*fadc2ns;
     535      val = pix.GetSigma();
    526536      break;
    527537    case 3:
    528       val = pix.GetSigmaErr()*fadc2ns;
     538      val = pix.GetSigmaErr();
    529539      break;
    530540    case 4:
Note: See TracChangeset for help on using the changeset viewer.