Changeset 5687 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 12/22/04 22:37:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r5415 r5687 161 161 const Axis_t MHCalibrationChargeCam::fgChargeLoGainFirst = -350.5; 162 162 const Axis_t MHCalibrationChargeCam::fgChargeLoGainLast = 2049.5; 163 const Float_t MHCalibrationChargeCam::fgProbLimit = 0.00001; 163 164 const TString MHCalibrationChargeCam::gsHistName = "Charge"; 164 165 const TString MHCalibrationChargeCam::gsHistTitle = "Signals"; … … 225 226 SetLast (fgChargeHiGainLast ); 226 227 228 SetProbLimit(fgProbLimit); 229 227 230 SetLoGainNbins(fgChargeLoGainNbins); 228 231 SetLoGainFirst(fgChargeLoGainFirst); … … 464 467 for (Int_t i=0; i<npixels; i++) 465 468 { 466 fHiGainArray->AddAt(new MHCalibrationChargePix(Form("%s %s%4i",fHistName.Data(),"HiGainPix",i),467 Form("%s %s%4i",fHistTitle.Data()," High Gain Pixel",i)),i);469 fHiGainArray->AddAt(new MHCalibrationChargePix(Form("%sHiGainPix%04d",fHistName.Data(),i), 470 Form("%s High Gain Pixel%04d",fHistTitle.Data(),i)),i); 468 471 469 472 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)[i]; … … 473 476 pix.SetLast (fLast); 474 477 478 pix.SetProbLimit(fProbLimit); 479 475 480 pix.SetAbsTimeNbins(higainsamples); 476 481 pix.SetAbsTimeFirst(-0.5); 477 482 pix.SetAbsTimeLast(higainsamples-0.5); 478 483 484 InitHists(pix,fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i],i); 485 479 486 h = pix.GetHAbsTime(); 480 487 481 h->SetName (Form(" %s%s%s%4i","H",fAbsHistName.Data(),"HiGainPix",i));482 h->SetTitle(Form("%s %s%4i",fAbsHistTitle.Data()," High Gain Pixel ",i));488 h->SetName (Form("H%sHiGainPix%04d",fAbsHistName.Data(),i)); 489 h->SetTitle(Form("%s High Gain Pixel %04d",fAbsHistTitle.Data(),i)); 483 490 h->SetXTitle(fAbsHistXTitle.Data()); 484 491 h->SetYTitle(fAbsHistYTitle.Data()); 485 486 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];487 InitHists((*this)[i],bad,i);488 492 } 489 493 } … … 494 498 for (Int_t j=0; j<nareas; j++) 495 499 { 496 fAverageHiGainAreas->AddAt(new MHCalibrationChargePix(Form("%s %s%d",fHistName.Data(),"HiGainArea",j),497 Form("%s %s%d",fHistTitle.Data()," High Gain Area Idx ",j)),j);500 fAverageHiGainAreas->AddAt(new MHCalibrationChargePix(Form("%sHiGainArea%d",fHistName.Data(),j), 501 Form("%s High Gain Area Idx %d",fHistTitle.Data(),j)),j); 498 502 499 503 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainArea(j); … … 511 515 h = pix.GetHAbsTime(); 512 516 513 h->SetName (Form(" %s%s%s%d","H",fAbsHistName.Data(),"HiGainArea",j));517 h->SetName (Form("H%sHiGainArea%d",fAbsHistName.Data(),j)); 514 518 h->SetTitle(Form("%s%s%d",fAbsHistTitle.Data(), 515 519 " averaged on event-by-event basis High Gain Area Idx ",j)); … … 523 527 for (Int_t j=0; j<nsectors; j++) 524 528 { 525 fAverageHiGainSectors->AddAt(new MHCalibrationChargePix(Form("%s %s%2i",fHistName.Data(),"HiGainSector",j),526 Form("%s %s%2i",fHistTitle.Data()," High Gain Sector ",j)),j);529 fAverageHiGainSectors->AddAt(new MHCalibrationChargePix(Form("%sHiGainSector%02d",fHistName.Data(),j), 530 Form("%s High Gain Sector %02d",fHistTitle.Data(),j)),j); 527 531 528 532 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainSector(j); … … 536 540 pix.SetAbsTimeLast(higainsamples-0.5); 537 541 542 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); 543 538 544 h = pix.GetHAbsTime(); 539 545 540 h->SetName (Form(" %s%s%s%2i","H",fAbsHistName.Data(),"HiGainSector",j));541 h->SetTitle(Form("%s%s% 2i",fAbsHistTitle.Data(),546 h->SetName (Form("H%sHiGainSector%02d",fAbsHistName.Data(),j)); 547 h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(), 542 548 " averaged on event-by-event basis High Gain Area Sector ",j)); 543 549 h->SetXTitle(fAbsHistXTitle.Data()); 544 550 h->SetYTitle(fAbsHistYTitle.Data()); 545 546 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);547 551 } 548 552 } … … 582 586 for (Int_t i=0; i<npixels; i++) 583 587 { 584 fLoGainArray->AddAt(new MHCalibrationChargePix(Form("%s %s%4i",fHistName.Data(),"LoGainPix",i),585 Form("%s %s%4i",fHistTitle.Data()," Low Gain Pixel",i)),i);588 fLoGainArray->AddAt(new MHCalibrationChargePix(Form("%sLoGainPix%04d",fHistName.Data(),i), 589 Form("%s Low Gain Pixel %04d",fHistTitle.Data(),i)),i); 586 590 587 591 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)(i); … … 591 595 pix.SetLast (fLoGainLast); 592 596 597 pix.SetProbLimit(fProbLimit); 598 593 599 pix.SetAbsTimeNbins(logainsamples); 594 600 pix.SetAbsTimeFirst(-0.5); 595 601 pix.SetAbsTimeLast(logainsamples-0.5); 596 602 603 InitHists(pix,fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i],i); 604 597 605 h = pix.GetHAbsTime(); 598 606 599 h->SetName (Form(" %s%s%s%4i","H",fAbsHistName.Data(),"HiGainPix",i));600 h->SetTitle(Form("%s %s%4i",fAbsHistTitle.Data()," High Gain Pixel ",i));607 h->SetName (Form("H%sLoGainPix%04d",fAbsHistName.Data(),i)); 608 h->SetTitle(Form("%s Low Gain Pixel %04d",fAbsHistTitle.Data(),i)); 601 609 h->SetXTitle(fAbsHistXTitle.Data()); 602 610 h->SetYTitle(fAbsHistYTitle.Data()); 603 604 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];605 InitHists(pix,bad,i);606 611 } 607 612 } … … 611 616 for (Int_t j=0; j<nareas; j++) 612 617 { 613 fAverageLoGainAreas->AddAt(new MHCalibrationChargePix(Form("%s %s%d",fHistName.Data(),"LoGainArea",j),614 Form("%s %s%d",fHistTitle.Data()," Low Gain Area Idx ",j)),j);618 fAverageLoGainAreas->AddAt(new MHCalibrationChargePix(Form("%sLoGainArea%d",fHistName.Data(),j), 619 Form("%s Low Gain Area Idx %d",fHistTitle.Data(),j)),j); 615 620 616 621 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainArea(j); … … 624 629 pix.SetAbsTimeLast(logainsamples-0.5); 625 630 631 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j); 632 626 633 h = pix.GetHAbsTime(); 627 634 628 h->SetName (Form(" %s%s%s%2i","H",fAbsHistName.Data(),"LoGainArea",j));629 h->SetTitle(Form("%s%s% 2i",fAbsHistTitle.Data(),635 h->SetName (Form("H%sLoGainArea%02d",fAbsHistName.Data(),j)); 636 h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(), 630 637 " averaged on event-by-event basis Low Gain Area Idx ",j)); 631 638 h->SetXTitle(fAbsHistXTitle.Data()); 632 639 h->SetYTitle(fAbsHistYTitle.Data()); 633 634 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);635 640 } 636 641 } … … 641 646 for (Int_t j=0; j<nsectors; j++) 642 647 { 643 fAverageLoGainSectors->AddAt(new MHCalibrationChargePix(Form("%s %s%2i",fHistName.Data(),"LoGainSector",j),644 Form("%s %s%2i",fHistTitle.Data()," Low Gain Sector ",j)),j);648 fAverageLoGainSectors->AddAt(new MHCalibrationChargePix(Form("%sLoGainSector%02d",fHistName.Data(),j), 649 Form("%s Low Gain Sector %02d",fHistTitle.Data(),j)),j); 645 650 646 651 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainSector(j); … … 654 659 pix.SetAbsTimeLast(logainsamples-0.5); 655 660 661 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); 662 656 663 h = pix.GetHAbsTime(); 657 664 658 h->SetName (Form(" %s%s%s%2i","H",fAbsHistName.Data(),"LoGainSector",j));659 h->SetTitle(Form("%s%s% 2i",fAbsHistTitle.Data(),665 h->SetName (Form("H%sLoGainSector%02d",fAbsHistName.Data(),j)); 666 h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(), 660 667 " averaged on event-by-event basis Low Gain Area Sector ",j)); 661 668 h->SetXTitle(fAbsHistXTitle.Data()); 662 669 h->SetYTitle(fAbsHistYTitle.Data()); 663 664 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);665 670 } 666 671 } … … 897 902 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 898 903 899 900 904 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 901 905 { … … 1110 1114 { 1111 1115 *fLog << warn 1112 << Form(" %s%3.1f%s%2.1f%s%2.0f%s%s","Mean ArrivalTime: ",mean," < ",fTimeLowerLimit,1113 " slices from lower edge: ",lowerlimit," in pixel ",hist.GetName()) << endl;1116 << Form("Mean ArrivalTime: %3.1f < %2.1f slices from lower edge: %2i in pixel %s", 1117 mean,fTimeLowerLimit,(Int_t)first,hist.GetName()) << endl; 1114 1118 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin ); 1115 1119 } … … 1118 1122 { 1119 1123 *fLog << warn 1120 << Form(" %s%3.1f%s%2.1f%s%2.0f%s%s","Mean ArrivalTime: ",mean," > ",fTimeUpperLimit,1121 " slices from upper edge: ",upperlimit," in pixel ",hist.GetName()) << endl;1124 << Form("Mean ArrivalTime: %3.1f > %2.1f slices from upper edge: %2i in pixel %s", 1125 mean,fTimeUpperLimit,(Int_t)last,hist.GetName()) << endl; 1122 1126 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins ); 1123 1127 } … … 1226 1230 // Ask for Hi-Gain saturation 1227 1231 // 1228 *fLog << err << hipix.GetSaturated() << " " << fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries() << endl;1229 1232 if (hipix.GetSaturated() > fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries() && IsLoGain()) 1230 1233 {
Note:
See TracChangeset
for help on using the changeset viewer.