Changeset 4793 for trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
- Timestamp:
- 08/29/04 17:04:39 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4658 r4793 154 154 using namespace std; 155 155 156 const Int_t MHCalibrationChargeCam::fgAverageNbinsHiGain = 3300; 157 const Int_t MHCalibrationChargeCam::fgAverageNbinsLoGain = 1950; 156 158 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.01; 157 159 const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005; … … 175 177 // - fTimeLowerLimit to fgTimeLowerLimit 176 178 // - fTimeUpperLimit to fgTimeUpperLimit 179 // - fAverageNbins to fgAverageNbinsHiGain 177 180 // 178 181 MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title) 179 182 : fRawEvt(NULL) 180 183 { 184 181 185 fName = name ? name : "MHCalibrationChargeCam"; 182 186 fTitle = title ? title : "Class to fill the calibration histograms "; … … 187 191 SetTimeUpperLimit(); 188 192 189 193 SetAverageNbins(fgAverageNbinsHiGain); 190 194 } 191 195 … … 220 224 // Initializes, if empty to MGeomCam::GetNumPixels(): 221 225 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 226 // - MHCalibrationCam::fHiGainOverflow, MHCalibrationCam::fLoGainOverflow 222 227 // 223 228 // Initializes, if empty to MGeomCam::GetNumAreas() for: … … 243 248 { 244 249 245 MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 250 MExtractedSignalCam *signal = 251 (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 246 252 if (!signal) 247 253 { … … 301 307 InitHists((*this)[i],(*fBadPixels)[i],i); 302 308 } 309 fHiGainOverFlow.Set(npixels); 303 310 } 304 311 … … 310 317 { 311 318 (*fLoGainArray)[i] = new MHCalibrationChargeLoGainPix; 312 InitHists((*this)(i),(*fBadPixels)[i],i); 319 MHGausEvents &lopix = (*this)(i); 320 // 321 // Adapt the range for the case, the intense blue is used: 322 // FIXME: this is a nasty workaround, but for the moment necessary 323 // in order to avoid default memory space. 324 // 325 if (fGeom->InheritsFrom("MGeomCamMagic")) 326 { 327 if ( fColor == MCalibrationCam::kBLUE) 328 { 329 lopix.SetLast(999.5); 330 lopix.SetNbins(1150); 331 } 332 } 333 InitHists(lopix,(*fBadPixels)[i],i); 313 334 } 314 335 fLoGainOverFlow.Set(npixels); 315 336 } 316 337 … … 357 378 358 379 MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageLoGainArea(j); 359 360 hist.SetNbins(fAverageNbins); 380 hist.SetNbins(fgAverageNbinsLoGain); 381 382 // 383 // Adapt the range for the case, the intense blue is used: 384 // FIXME: this is a nasty workaround, but for the moment necessary 385 // in order to avoid default memory space. 386 // 387 if (fGeom->InheritsFrom("MGeomCamMagic")) 388 { 389 if ( fColor == MCalibrationCam::kBLUE) 390 { 391 hist.SetFirst(-10.5); 392 hist.SetLast(999.5); 393 hist.SetNbins(3030); 394 } 395 } 396 361 397 hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Area Idx "); 362 398 … … 410 446 411 447 hist.GetHGausHist()->SetTitle("Summed FADC slices average LoGain Sector "); 412 hist.SetNbins(fAverageNbins); 448 hist.SetNbins(fgAverageNbinsLoGain); 449 450 // 451 // Adapt the range for the case, the intense blue is used: 452 // FIXME: this is a nasty workaround, but for the moment necessary 453 // in order to avoid default memory space. 454 // 455 if (fGeom->InheritsFrom("MGeomCamMagic")) 456 { 457 if ( fColor == MCalibrationCam::kBLUE) 458 { 459 hist.SetFirst(-10.5); 460 hist.SetLast(999.5); 461 hist.SetNbins(3030); 462 } 463 } 464 413 465 hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Sector "); 414 466 415 467 InitHists(hist,fCam->GetAverageBadSector(j),j); 416 417 468 } 418 469 } … … 494 545 495 546 if (!histhi.FillHistAndArray(sumhi)) 496 fHiGainOverFlow++; 547 fHiGainOverFlow[i]++; 548 497 549 if (!histlo.FillHistAndArray(sumlo)) 498 fLoGainOverFlow ++;499 550 fLoGainOverFlow[i]++; 551 500 552 const Int_t sathi = (Int_t)pix.GetNumHiGainSaturated(); 501 553 const Int_t satlo = (Int_t)pix.GetNumLoGainSaturated(); … … 615 667 *fLog << endl; 616 668 617 if (fHiGainOverFlow)618 *fLog << warn << GetDescriptor()619 << ": Histogram Overflow has occurred " << fHiGainOverFlow << " in the High-Gain! " << endl;620 if (fLoGainOverFlow)621 *fLog << warn << GetDescriptor()622 << ": Histogram Overflow has occurred " << fLoGainOverFlow << " in the Low-Gain! " << endl;623 624 669 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 625 670 { … … 639 684 } 640 685 686 if (fHiGainOverFlow[i]) 687 { 688 *fLog << warn << GetDescriptor() 689 << ": Hi-Gain Histogram Overflow occurred " << fHiGainOverFlow[i] 690 << " times in pixel: " << i << " (without saturation!) " << endl; 691 bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow ); 692 } 693 641 694 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain); 642 695 } … … 659 712 } 660 713 714 if (fLoGainOverFlow[i]) 715 { 716 *fLog << warn << GetDescriptor() 717 << ": Lo-Gain Histogram Overflow occurred " << fLoGainOverFlow[i] 718 << " times in pixel: " << i << " (without saturation!) " << endl; 719 bad.SetUncalibrated( MBadPixelsPix::kLoGainOverFlow ); 720 } 721 661 722 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 662 723
Note:
See TracChangeset
for help on using the changeset viewer.