Changeset 5609
- Timestamp:
- 12/16/04 17:32:32 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5606 r5609 28 28 * msignal/MExtractTimeAndChargeSpline.cc 29 29 - another bugfix for the low-gain extraction 30 31 * mhcalib/MHCalibrationRelTimeCam.[h,cc] 32 - fixed bug in display of the averaged cams. 30 33 31 34 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r5482 r5609 699 699 for (Int_t i=0; i<npixels; i++) 700 700 { 701 fHiGainArray->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"HiGainPix"),702 Form("%s %s",fHistTitle.Data()," High Gain Pixel")),i);701 fHiGainArray->AddAt(new MHCalibrationPix(Form("%sHiGainArea%04d",fHistName.Data(),i), 702 Form("%s High Gain Pixel %4d",fHistTitle.Data(),i)),i); 703 703 704 704 MHCalibrationPix &pix = (*this)[i]; … … 719 719 for (Int_t j=0; j<nareas; j++) 720 720 { 721 fAverageHiGainAreas->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"HiGainArea"),722 Form("%s %s",fHistTitle.Data()," High Gain Area Idx ")),j);721 fAverageHiGainAreas->AddAt(new MHCalibrationPix(Form("%sHiGainArea%d",fHistName.Data(),j), 722 Form("%s High Gain Area Idx %d",fHistTitle.Data(),j)),j); 723 723 724 724 MHCalibrationPix &pix = GetAverageHiGainArea(j); … … 742 742 for (Int_t j=0; j<nsectors; j++) 743 743 { 744 fAverageHiGainSectors->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"HiGainSector"),745 Form("%s %s",fHistTitle.Data()," High Gain Sector ")),j);744 fAverageHiGainSectors->AddAt(new MHCalibrationPix(Form("%sHiGainSector%02d",fHistName.Data(),j), 745 Form("%s High Gain Sector %02d",fHistTitle.Data(),j)),j); 746 746 MHCalibrationPix &pix = GetAverageHiGainSector(j); 747 747 … … 778 778 for (Int_t i=0; i<npixels; i++) 779 779 { 780 fLoGainArray->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"LoGainPix"),781 Form("%s %s",fHistTitle.Data()," Low Gain Pixel")),i);780 fLoGainArray->AddAt(new MHCalibrationPix(Form("%sLoGainPix%04d",fHistName.Data(),i), 781 Form("%s Low Gain Pixel%$04d",fHistTitle.Data(),i)),i); 782 782 783 783 MHCalibrationPix &pix = (*this)(i); … … 798 798 for (Int_t j=0; j<nareas; j++) 799 799 { 800 fAverageLoGainAreas->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"LoGainArea"),801 Form("%s %s",fHistTitle.Data()," Low Gain Area Idx ")),j);800 fAverageLoGainAreas->AddAt(new MHCalibrationPix(Form("%sLoGainArea%d",fHistName.Data(),j), 801 Form("%s Low Gain Area Idx %d",fHistTitle.Data(),j)),j); 802 802 803 803 MHCalibrationPix &pix = GetAverageLoGainArea(j); … … 821 821 for (Int_t j=0; j<nsectors; j++) 822 822 { 823 fAverageLoGainSectors->AddAt(new MHCalibrationPix(Form("%s %s",fHistName.Data(),"LoGainSector"),824 Form("%s %s",fHistTitle.Data()," Low Gain Sector ")),j);823 fAverageLoGainSectors->AddAt(new MHCalibrationPix(Form("%sLoGainSector%02d",fHistName.Data(),j), 824 Form("%s Low Gain Sector %02d",fHistTitle.Data(),j)),j); 825 825 MHCalibrationPix &pix = GetAverageLoGainSector(j); 826 826 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r5371 r5609 413 413 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 414 414 415 const Int_t nareas = fAverageHiGainAreas->GetSize(); 416 const Int_t nsectors = fAverageHiGainSectors->GetSize(); 417 418 TArrayI satarea(nareas); 419 TArrayI satsect(nsectors); 420 fNumareahi .Reset(); 421 fNumsectorhi.Reset(); 422 415 423 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 416 424 { 417 425 418 426 MHCalibrationPix &histhi = (*this)[i]; 419 427 420 428 if (histhi.IsExcluded()) 421 429 continue; 422 430 431 const Int_t aidx = (*fGeom)[i].GetAidx(); 432 const Int_t sector = (*fGeom)[i].GetSector(); 433 423 434 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i] ; 424 435 436 fNumareahi[aidx]++; 437 fNumsectorhi[sector]++; 438 // 439 // Check saturation 440 // 425 441 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 442 { 443 pix.SetHiGainSaturation(); 444 histhi.SetExcluded(); 445 satarea[aidx]++; 446 satsect[sector]++; 447 } 448 else 449 if (IsLoGain()) 450 (*this)(i).SetExcluded(); 451 452 // 453 // Check histogram overflow 454 // 455 CheckOverflow(histhi); 456 if (IsLoGain()) 457 CheckOverflow((*this)(i)); 458 459 } 460 461 for (Int_t j=0; j<nareas; j++) 462 { 463 464 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 465 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)relcam->GetAverageArea(j); 466 467 if (satarea[j] > 0.5*fNumareahi[j]) 426 468 { 427 469 pix.SetHiGainSaturation(); … … 430 472 else 431 473 if (IsLoGain()) 432 (*this)(i).SetExcluded();433 434 Stat_t overflow = histhi.GetHGausHist()->GetBinContent(histhi.GetHGausHist()->GetNbinsX()+1);435 if (overflow > 0.1)436 {437 *fLog << warn << "HiGain Hist-overflow occurred " << overflow438 << " times in pix: " << i << " (w/o saturation!) " << endl;439 // bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow );440 }441 442 overflow = histhi.GetHGausHist()->GetBinContent(0);443 if (overflow > 0.1)444 {445 *fLog << warn << "HiGain Hist-underflow occurred " << overflow446 << " times in pix: " << i << " (w/o saturation!) " << endl;447 // bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow );448 }449 }450 451 for (Int_t j=0; j<fAverageHiGainAreas->GetSize(); j++)452 {453 454 MHCalibrationPix &histhi = GetAverageHiGainArea(j);455 456 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())457 {458 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)relcam->GetAverageArea(j);459 pix.SetHiGainSaturation();460 histhi.SetExcluded();461 }462 else463 if (IsLoGain())464 474 GetAverageLoGainArea(j).SetExcluded(); 465 475 476 // 477 // Check histogram overflow 478 // 479 CheckOverflow(histhi); 480 if (IsLoGain()) 481 CheckOverflow(GetAverageLoGainArea(j)); 466 482 } 467 483 … … 472 488 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)relcam->GetAverageSector(j) ; 473 489 474 if ( histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries())490 if (satsect[j] > 0.5*fNumsectorhi[j]) 475 491 { 476 492 pix.SetHiGainSaturation(); … … 480 496 if (IsLoGain()) 481 497 GetAverageLoGainSector(j).SetExcluded(); 498 499 // 500 // Check histogram overflow 501 // 502 CheckOverflow(histhi); 503 if (IsLoGain()) 504 CheckOverflow(GetAverageLoGainSector(j)); 482 505 } 483 506 … … 632 655 // Ask for Hi-Gain saturation 633 656 // 634 if (hipix. GetSaturated() > fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries() && IsLoGain())635 657 if (hipix.IsExcluded() && IsLoGain()) 658 { 636 659 MHCalibrationPix &lopix = GetAverageLoGainArea(i); 637 660 DrawDataCheckPixel(lopix,0.); … … 641 664 } 642 665 } 666 667 void MHCalibrationRelTimeCam::CheckOverflow( MHCalibrationPix &pix ) 668 { 669 670 if (pix.IsExcluded()) 671 return; 672 673 TH1F *hist = pix.GetHGausHist(); 674 675 Stat_t overflow = hist->GetBinContent(hist->GetNbinsX()+1); 676 if (overflow > 0.0005*hist->GetEntries()) 677 { 678 *fLog << warn << "HiGain Hist-overflow occurred " << overflow 679 << " times in " << pix.GetName() << " (w/o saturation!) " << endl; 680 } 681 682 overflow = hist->GetBinContent(0); 683 if (overflow > 0.0005*hist->GetEntries()) 684 { 685 *fLog << warn << "HiGain Hist-underflow occurred " << overflow 686 << " times in " << pix.GetName() << " (w/o saturation!) " << endl; 687 } 688 } 689 643 690 644 691 // ----------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.h
r5201 r5609 48 48 void FinalizeBadPixels(); 49 49 50 void CheckOverflow( MHCalibrationPix &pix); 50 51 void DrawDataCheckPixel(MHCalibrationPix &pix, const Float_t refline); 51 52
Note:
See TracChangeset
for help on using the changeset viewer.