Changeset 4904 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/09/04 17:39:17 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestTimeCam.cc
r4808 r4904 49 49 // the fit is declared valid. 50 50 // Otherwise, the fit is repeated within ranges of the previous mean 51 // +- MH GausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit())51 // +- MHCalibrationPix::fPickupLimit (default: 5) sigma (see MHCalibrationPix::RepeatFit()) 52 52 // In case this does not make the fit valid, the histogram means and RMS's are 53 // taken directly (see MH GausEvents::BypassFit()) and the following flags are set:53 // taken directly (see MHCalibrationPix::BypassFit()) and the following flags are set: 54 54 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainNotFitted ) and 55 55 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) 56 56 // 57 // Outliers of more than MH GausEvents::fPickupLimit (default: 5) sigmas58 // from the mean are counted as Pickup events (stored in MH GausEvents::fPickup)57 // Outliers of more than MHCalibrationPix::fPickupLimit (default: 5) sigmas 58 // from the mean are counted as Pickup events (stored in MHCalibrationPix::fPickup) 59 59 // 60 60 // The class also fills arrays with the signal vs. event number, creates a fourier … … 85 85 #include "MHCalibrationTestTimePix.h" 86 86 87 #include "MHCalibrationPix.h" 88 87 89 #include "MLog.h" 88 90 #include "MLogManip.h" … … 125 127 // 126 128 // Initializes, if empty to MGeomCam::GetNumAreas() for: 127 // - MHCalibrationCam::fAverageHiGainAreas , MHCalibrationCam::fAverageLoGainAreas129 // - MHCalibrationCam::fAverageHiGainAreas 128 130 // 129 131 // Initializes, if empty to MGeomCam::GetNumSectors() for: 130 // - MHCalibrationCam::fAverageHiGainSectors , MHCalibrationCam::fAverageLoGainSectors132 // - MHCalibrationCam::fAverageHiGainSectors 131 133 // 132 134 // Calls MHCalibrationCam::InitHists() for every entry in: … … 168 170 } 169 171 170 if (fLoGainArray->GetEntries()==0)171 {172 fLoGainArray->Expand(npixels);173 for (Int_t i=0; i<npixels; i++)174 {175 (*fLoGainArray)[i] = new MHCalibrationTestTimePix("Calibrated Events Time",176 "TestTime Calibration Pixel");177 InitHists((*this)(i),(*fBadPixels)[i],i);178 }179 }180 181 182 172 if (fAverageHiGainAreas->GetEntries()==0) 183 173 { … … 203 193 } 204 194 205 if (fAverageLoGainAreas->GetEntries()==0)206 {207 fAverageLoGainAreas->Expand(nareas);208 209 for (Int_t j=0; j<nareas; j++)210 {211 (*fAverageLoGainAreas)[j] =212 new MHCalibrationTestTimePix("MHCalibrationTestTimeAverageArea",213 "Average TestTime Calibrations Area Idx ");214 215 GetAverageLoGainArea(j).GetHGausHist()->SetTitle("TestTime Calibrations Area Idx ");216 GetAverageLoGainArea(j).SetNbins(fAverageNbins);217 GetAverageLoGainArea(j).InitBins();218 GetAverageLoGainArea(j).ChangeHistId(j);219 GetAverageLoGainArea(j).SetEventFrequency(fPulserFrequency);220 221 }222 }223 224 195 225 196 if (fAverageHiGainSectors->GetEntries()==0) … … 245 216 } 246 217 247 248 if (fAverageLoGainSectors->GetEntries()==0) 249 { 250 fAverageLoGainSectors->Expand(nsectors); 251 252 for (Int_t j=0; j<nsectors; j++) 253 { 254 (*fAverageLoGainSectors)[j] = 255 new MHCalibrationTestTimePix("MHCalibrationTestTimeAverageSector", 256 "Average TestTime Calibrations Sector "); 257 258 GetAverageLoGainSector(j).GetHGausHist()->SetTitle("TestTime Calibrations Sector "); 259 GetAverageLoGainSector(j).SetNbins(fAverageNbins); 260 GetAverageLoGainSector(j).InitBins(); 261 GetAverageLoGainSector(j).ChangeHistId(j); 262 GetAverageLoGainSector(j).SetEventFrequency(fPulserFrequency); 263 } 264 } 265 218 fLoGain = kFALSE; 266 219 267 220 return kTRUE; … … 278 231 // - number of sectors 279 232 // 280 // Fills HiGain or LoGain histograms (MHGausEvents::FillHistAndArray()), respectively281 // depending on MCerPhotPix::IsLoGainUsed(),with:282 // - M CerPhotPix::GetArrivalTime(pixid) - MCerPhotPix::GetArrivalTime(1);233 // Fills HiGain histograms (MHGausEvents::FillHistAndArray()) 234 // with: 235 // - MArrivalTime::GetArrivalTime(pixid) - MArrivalTime::GetArrivalTime(1); 283 236 // (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) ) 284 237 // … … 305 258 { 306 259 307 MH GausEvents&histhi = (*this)[i];260 MHCalibrationPix &histhi = (*this)[i]; 308 261 309 262 if (histhi.IsExcluded()) … … 323 276 for (Int_t j=0; j<nareas; j++) 324 277 { 325 MH GausEvents&histhi = GetAverageHiGainArea(j);278 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 326 279 histhi.FillHistAndArray(numareahi[j] == 0 ? 0. : sumareahi[j]/numareahi[j]); 327 280 … … 330 283 for (Int_t j=0; j<nsectors; j++) 331 284 { 332 MH GausEvents&histhi = GetAverageHiGainSector(j);285 MHCalibrationPix &histhi = GetAverageHiGainSector(j); 333 286 histhi.FillHistAndArray(numsectorhi[j] == 0 ? 0. : sumsectorhi[j]/numsectorhi[j]); 334 287 … … 347 300 { 348 301 349 MH GausEvents&hist = (*this)[i];302 MHCalibrationPix &hist = (*this)[i]; 350 303 351 304 if (hist.IsExcluded()) … … 368 321 { 369 322 370 MH GausEvents&hist = GetAverageHiGainArea(j);323 MHCalibrationPix &hist = GetAverageHiGainArea(j); 371 324 if (hist.IsEmpty()) 372 325 continue; … … 386 339 { 387 340 388 MH GausEvents&hist = GetAverageHiGainSector(j);341 MHCalibrationPix &hist = GetAverageHiGainSector(j); 389 342 if (hist.IsEmpty()) 390 343 continue; … … 439 392 return kFALSE; 440 393 441 const MH GausEvents&pix = (*this)[idx];394 const MHCalibrationPix &pix = (*this)[idx]; 442 395 443 396 if (pix.IsExcluded()) … … 477 430 // -------------------------------------------------------------------------- 478 431 // 479 // Calls MH GausEvents::DrawClone() for pixel idx432 // Calls MHCalibrationPix::DrawClone() for pixel idx 480 433 // 481 434 void MHCalibrationTestTimeCam::DrawPixelContent(Int_t idx) const … … 496 449 { 497 450 498 MH GausEvents&hist = GetAverageHiGainArea(j);451 MHCalibrationPix &hist = GetAverageHiGainArea(j); 499 452 500 453 const Float_t numsqr = TMath::Sqrt((Float_t)fAverageAreaNum[j]);
Note:
See TracChangeset
for help on using the changeset viewer.