Changeset 3639 for trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
- Timestamp:
- 04/04/04 14:28:25 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
r3636 r3639 23 23 \* ======================================================================== */ 24 24 ///////////////////////////////////////////////////////////////////////////// 25 // //26 // MHCalibrationRelTimeCam //27 // //25 // 26 // MHCalibrationRelTimeCam 27 // 28 28 // Fills the extracted relative arrival times of MArrivalTimeCam into 29 29 // the MHGausEvents-classes MHCalibrationRelTimePix for every: 30 30 // 31 // - pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 32 // 33 // - average pixel per area index (e.g. inner and outer for the MAGIC camera), 34 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas 35 // 36 // - average pixel per camera sector (e.g. sectors 1-6 for the MAGIC camera), 31 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 32 // or MHCalibrationCam::fHiGainArray, respectively, depending if 33 // MArrivalTimePix::IsLoGainUsed() is set. 34 // 35 // - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera), 36 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and 37 // MHCalibrationCam::fAverageHiGainAreas 38 // 39 // - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera), 37 40 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors 38 // 39 // Every time is filled into a histogram and an array, in order to perform 41 // and MHCalibrationCam::fAverageHiGainSectors 42 // 43 // Every relative time is calculated as the difference between the individual 44 // pixel arrival time and the one of pixel 1 (hardware number: 2). 45 // The relative times are filled into a histogram and an array, in order to perform 40 46 // a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an 41 47 // event-by-event basis and written into the corresponding average pixels. … … 43 49 // The histograms are fitted to a Gaussian, mean and sigma with its errors 44 50 // and the fit probability are extracted. If none of these values are NaN's and 45 // if the probability is bigger than fProbLimit (default: 0.5%), the fit is valid. 46 // Otherwise, the fit is repeated within ranges of the previous mean +- 5 sigma. 51 // if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%), 52 // the fit is declared valid. 53 // Otherwise, the fit is repeated within ranges of the previous mean 54 // +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit()) 47 55 // In case this does not make the fit valid, the histogram means and RMS's are 48 // taken directly and the following flags are set:56 // taken directly (see MHGausEvents::BypassFit()) and the following flags are set: 49 57 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeNotFitted ) and 50 58 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) 51 59 // 52 // Outliers of more than MH CalibrationChargePix::fPickupLimit (default: 5) sigmas53 // from the mean are counted as Pick Up events (stored in MHCalibrationRelTimePix::fPickup)60 // Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas 61 // from the mean are counted as Pickup events (stored in MHGausEvents::fPickup) 54 62 // 55 63 // The class also fills arrays with the signal vs. event number, creates a fourier 56 // spectrum and investigates if the projected fourier components follow an exponential 57 // distribution. In case that the probability of the exponential fit is less than 58 // fProbLimit (default: 0.5%), the following flags are set: 64 // spectrum (see MHGausEvents::CreateFourierSpectrum()) and investigates if the 65 // projected fourier components follow an exponential distribution. 66 // In case that the probability of the exponential fit is less than 67 // MHGausEvents::fProbLimit (default: 0.5%), the following flags are set: 59 68 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeOscillating ) and 60 69 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) … … 119 128 // - MArrivalTimeCam 120 129 // 121 // Initializes, if empty to M ArrivalTimeCam::GetSize() for:130 // Initializes, if empty to MGeomCam::GetNumPixels(): 122 131 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 123 132 // … … 128 137 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 129 138 // 130 // Calls InitializeHists() for every entry in:131 // - MHCalibrationCam::fHiGainArray 132 // - MHCalibrationCam::fAverageHiGainAreas 133 // - MHCalibrationCam::fAverageHiGainSectors 139 // Calls MHCalibrationCam::InitHists() for every entry in: 140 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 141 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas 142 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 134 143 // 135 144 // Sets Titles and Names for the Histograms … … 249 258 250 259 251 // --------------------------------------------------------------------------------260 // ------------------------------------------------------------------------------- 252 261 // 253 262 // Retrieves pointer to MArrivalTimeCam: … … 258 267 // - number of sectors 259 268 // 260 // Fill RelTimes histograms (MHGausEvents::FillHistAndArray()) with: 269 // Fills HiGain or LoGain histograms (MHGausEvents::FillHistAndArray()), respectively 270 // depending on MArrivalTimePix::IsLoGainUsed(), with: 261 271 // - MArrivalTimePix::GetArrivalTime(pixid) - MArrivalTimePix::GetArrivalTime(1); 262 // (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) 272 // (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) ) 263 273 // 264 274 Bool_t MHCalibrationRelTimeCam::FillHists(const MParContainer *par, const Stat_t w) … … 405 415 // ============== 406 416 // 407 // 0: Fitted Mean Relative Arrival Time 408 // 1: Error of fitted Mean Relative Arrival Time 409 // 2: Sigma of fitted Relative Arrival Time 410 // 3: Error of Sigma of fitted Relative Arrival Time 417 // 0: Fitted Mean Relative Arrival Time (calls: MHGausEvents::GetMean()) 418 // 1: Error of fitted Mean Relative Arrival Time (calls: MHGausEvents::GetMeanErr()) 419 // 2: Sigma of fitted Relative Arrival Time (calls: MHGausEvents::GetSigma()) 420 // 3: Error of Sigma of fitted Relative Arrival Time (calls: MHGausEvents::GetSigmaErr()) 411 421 // 412 422 // … … 414 424 // ============================================= 415 425 // 416 // 4: Returned probability of Gauss fit to RelTime distribution426 // 4: Returned probability of Gauss fit (calls: MHGausEvents::GetProb()) 417 427 // 418 428 // Localized defects: 419 429 // ================== 420 430 // 421 // 5: Gaus fit not OK 422 // 6: Fourier spectrum not OK 431 // 5: Gaus fit not OK (calls: MHGausEvents::IsGausFitOK()) 432 // 6: Fourier spectrum not OK (calls: MHGausEvents::IsFourierSpectrumOK()) 423 433 // 424 434 Bool_t MHCalibrationRelTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 428 438 return kFALSE; 429 439 430 MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx];431 432 440 switch (type) 433 441 { 434 442 case 0: 435 val = hist.GetMean();443 val = (*this)[idx].GetMean(); 436 444 break; 437 445 case 1: 438 val = hist.GetMeanErr();446 val = (*this)[idx].GetMeanErr(); 439 447 break; 440 448 case 2: 441 val = hist.GetSigma();449 val = (*this)[idx].GetSigma(); 442 450 break; 443 451 case 3: 444 val = hist.GetSigmaErr();452 val = (*this)[idx].GetSigmaErr(); 445 453 break; 446 454 case 4: 447 val = hist.GetProb();455 val = (*this)[idx].GetProb(); 448 456 break; 449 457 case 5: 450 if (! hist.IsGausFitOK())458 if (!(*this)[idx].IsGausFitOK()) 451 459 val = 1.; 452 460 break; 453 461 case 6: 454 if (! hist.IsFourierSpectrumOK())462 if (!(*this)[idx].IsFourierSpectrumOK()) 455 463 val = 1.; 456 464 break; … … 461 469 } 462 470 471 // -------------------------------------------------------------------------- 472 // 473 // Calls MHGausEvents::DrawClone() for pixel idx 474 // 463 475 void MHCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const 464 476 { 465 const MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx]; 466 hist.DrawClone(); 467 } 477 (*this)[idx].DrawClone(); 478 }
Note:
See TracChangeset
for help on using the changeset viewer.