Changeset 7189 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 07/14/05 16:03:32 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
r7095 r7189 81 81 ///////////////////////////////////////////////////////////////////////////// 82 82 #include "MHCalibrationHiLoCam.h" 83 #include "MHCalibrationPix.h"84 85 #include "MLog.h"86 #include "MLogManip.h"87 88 #include "MParList.h"89 90 #include "MCalibrationHiLoCam.h"91 #include "MCalibrationCam.h"92 #include "MCalibrationPix.h"93 94 #include "MExtractedSignalCam.h"95 #include "MExtractedSignalPix.h"96 #include "MArrivalTimeCam.h"97 #include "MArrivalTimePix.h"98 99 #include "MGeomCam.h"100 #include "MGeomPix.h"101 102 #include "MBadPixelsIntensityCam.h"103 #include "MBadPixelsCam.h"104 #include "MBadPixelsPix.h"105 83 106 84 #include <TOrdCollection.h> … … 114 92 #include <TLegend.h> 115 93 #include <TGraph.h> 94 #include <TProfile.h> 95 96 #include "MHCalibrationHiLoPix.h" 97 98 #include "MLog.h" 99 #include "MLogManip.h" 100 101 #include "MParList.h" 102 103 #include "MCalibrationHiLoCam.h" 104 #include "MCalibrationHiLoPix.h" 105 #include "MCalibrationCam.h" 106 #include "MCalibrationIntensityCam.h" 107 #include "MCalibrationPix.h" 108 109 #include "MExtractedSignalCam.h" 110 #include "MExtractedSignalPix.h" 111 #include "MArrivalTimeCam.h" 112 #include "MArrivalTimePix.h" 113 114 #include "MGeomCam.h" 115 #include "MGeomPix.h" 116 117 #include "MBadPixelsIntensityCam.h" 118 #include "MBadPixelsCam.h" 119 #include "MBadPixelsPix.h" 116 120 117 121 ClassImp(MHCalibrationHiLoCam); … … 123 127 const Axis_t MHCalibrationHiLoCam::fgLast = 29.9; 124 128 const Float_t MHCalibrationHiLoCam::fgProbLimit = 0.; 129 const Int_t MHCalibrationHiLoCam::fgHivsLoNbins = 90; 130 const Axis_t MHCalibrationHiLoCam::fgHivsLoFirst = 95.; 131 const Axis_t MHCalibrationHiLoCam::fgHivsLoLast = 995.; 132 const Axis_t MHCalibrationHiLoCam::fgLowerFitLimitProfile = 480.; 133 const Axis_t MHCalibrationHiLoCam::fgUpperFitLimitProfile = 680.; 125 134 const TString MHCalibrationHiLoCam::gsHistName = "HiLo"; 126 135 const TString MHCalibrationHiLoCam::gsHistTitle = "HiGain vs. LoGain"; 127 136 const TString MHCalibrationHiLoCam::gsHistXTitle = "Amplification Ratio [1]"; 128 137 const TString MHCalibrationHiLoCam::gsHistYTitle = "Nr. events"; 138 const TString MHCalibrationHiLoCam::gsHivsLoHistName = "HivsLo"; 139 const TString MHCalibrationHiLoCam::gsHivsLoHistTitle = "High-gain vs. Low-gain Charge"; 140 const TString MHCalibrationHiLoCam::gsHivsLoHistXTitle = "Q High-Gain [FADC counts]"; 141 const TString MHCalibrationHiLoCam::gsHivsLoHistYTitle = "Q Low-Gain [FADC counts]"; 129 142 130 143 // -------------------------------------------------------------------------- … … 146 159 // 147 160 MHCalibrationHiLoCam::MHCalibrationHiLoCam(const char *name, const char *title) 148 : fArrTimes(NULL) 161 : fArrTimes(NULL), fHivsLoResults("Results","Fit Results high-gain vs. low-gain", 162 200,-10.,10.,200,0.,20.), 163 fUsedLoGainSlices(0) 149 164 { 150 165 … … 163 178 SetHistYTitle(gsHistYTitle.Data()); 164 179 180 SetHivsLoNbins(fgHivsLoNbins); 181 SetHivsLoFirst(fgHivsLoFirst); 182 SetHivsLoLast (fgHivsLoLast ); 183 184 SetLowerFitLimitProfile(); 185 SetUpperFitLimitProfile(); 186 187 SetHivsLoHistName (gsHivsLoHistName .Data()); 188 SetHivsLoHistTitle (gsHivsLoHistTitle .Data()); 189 SetHivsLoHistXTitle(gsHivsLoHistXTitle.Data()); 190 SetHivsLoHistYTitle(gsHivsLoHistYTitle.Data()); 191 165 192 SetOscillations(kFALSE); 193 194 fHivsLoResults.GetXaxis()->SetTitle("Offset per FADC slices [FADC cnts]"); 195 fHivsLoResults.GetYaxis()->SetTitle("Gains ratio [1]"); 196 fHivsLoResults.SetDirectory(0); 197 166 198 } 167 199 … … 254 286 } 255 287 288 fUsedLoGainSlices = signal->GetNumUsedLoGainFADCSlices(); 289 256 290 fArrTimes = (MArrivalTimeCam*)pList->FindObject("MArrivalTimeCam"); 257 291 if (!fArrTimes) … … 282 316 return kTRUE; 283 317 } 318 319 // -------------------------------------------------------------------------- 320 // 321 // Retrieve: 322 // - fRunHeader->GetNumSamplesHiGain(); 323 // 324 // Initializes the High Gain Arrays: 325 // 326 // - For every entry in the expanded arrays: 327 // * Initialize an MHCalibrationHiLoPix 328 // * Set Binning from fNbins, fFirst and fLast 329 // * Set Binning of Abs Times histogram from fAbsNbins, fAbsFirst and fAbsLast 330 // * Set Histgram names and titles from fHistName and fHistTitle 331 // * Set Abs Times Histgram names and titles from fAbsHistName and fAbsHistTitle 332 // * Set X-axis and Y-axis titles from fHistXTitle and fHistYTitle 333 // * Set X-axis and Y-axis titles of Abs Times Histogram from fAbsHistXTitle and fAbsHistYTitle 334 // * Call InitHists 335 // 336 // 337 void MHCalibrationHiLoCam::InitHiGainArrays(const Int_t npixels, const Int_t nareas, const Int_t nsectors) 338 { 339 340 TProfile *h; 341 342 if (fHiGainArray->GetSize()==0) 343 { 344 for (Int_t i=0; i<npixels; i++) 345 { 346 fHiGainArray->AddAt(new MHCalibrationHiLoPix(Form("%sHiGainPix%04d",fHistName.Data(),i), 347 Form("%s High Gain Pixel%04d",fHistTitle.Data(),i)),i); 348 349 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)(*this)[i]; 350 351 pix.SetNbins(fNbins); 352 pix.SetFirst(fFirst); 353 pix.SetLast (fLast); 354 355 pix.SetProbLimit(fProbLimit); 356 357 pix.SetHivsLoNbins(fHivsLoNbins); 358 pix.SetHivsLoFirst(fHivsLoFirst); 359 pix.SetHivsLoLast (fHivsLoLast); 360 361 InitHists(pix,(*fBadPixels)[i],i); 362 363 if (fCam) 364 (*fCam)[i].SetPixId(i); 365 366 h = pix.GetHivsLo(); 367 368 h->SetName (Form("H%sHiGainPix%04d",fHivsLoHistName.Data(),i)); 369 h->SetTitle(Form("%s High Gain Pixel %04d",fHivsLoHistTitle.Data(),i)); 370 h->SetXTitle(fHivsLoHistXTitle.Data()); 371 h->SetYTitle(fHivsLoHistYTitle.Data()); 372 h->SetDirectory(0); 373 } 374 } 375 376 377 if (fAverageHiGainAreas->GetSize()==0) 378 { 379 for (Int_t j=0; j<nareas; j++) 380 { 381 fAverageHiGainAreas->AddAt(new MHCalibrationHiLoPix(Form("%sHiGainArea%d",fHistName.Data(),j), 382 Form("%s High Gain Area Idx %d",fHistTitle.Data(),j)),j); 383 384 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)GetAverageHiGainArea(j); 385 386 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 387 pix.SetFirst(fFirst); 388 pix.SetLast (fLast); 389 390 pix.SetHivsLoNbins(fHivsLoNbins); 391 pix.SetHivsLoFirst(fHivsLoFirst); 392 pix.SetHivsLoLast (fHivsLoLast); 393 394 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j); 395 396 if (fCam) 397 fCam->GetAverageArea(j).SetPixId(j); 398 399 h = pix.GetHivsLo(); 400 401 h->SetName (Form("H%sHiGainArea%d",fHivsLoHistName.Data(),j)); 402 h->SetTitle(Form("%s averaged on event-by-event basis High Gain Area Idx %d", 403 fHivsLoHistTitle.Data(), j)); 404 h->SetXTitle(fHivsLoHistXTitle.Data()); 405 h->SetYTitle(fHivsLoHistYTitle.Data()); 406 h->SetDirectory(0); 407 } 408 } 409 410 if (fAverageHiGainSectors->GetSize()==0) 411 { 412 for (Int_t j=0; j<nsectors; j++) 413 { 414 fAverageHiGainSectors->AddAt(new MHCalibrationHiLoPix(Form("%sHiGainSector%02d",fHistName.Data(),j), 415 Form("%s High Gain Sector %02d",fHistTitle.Data(),j)),j); 416 417 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)GetAverageHiGainSector(j); 418 419 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 420 pix.SetFirst(fFirst); 421 pix.SetLast (fLast); 422 423 pix.SetHivsLoNbins(fHivsLoNbins); 424 pix.SetHivsLoFirst(fHivsLoFirst); 425 pix.SetHivsLoLast (fHivsLoLast); 426 427 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); 428 429 if (fCam) 430 fCam->GetAverageSector(j).SetPixId(j); 431 432 h = pix.GetHivsLo(); 433 434 h->SetName (Form("H%sHiGainSector%02d",fHivsLoHistName.Data(),j)); 435 h->SetTitle(Form("%s averaged on event-by-event basis High Gain Area Sector %02d", 436 fHivsLoHistTitle.Data(),j)); 437 h->SetXTitle(fHivsLoHistXTitle.Data()); 438 h->SetYTitle(fHivsLoHistYTitle.Data()); 439 h->SetDirectory(0); 440 } 441 } 442 } 443 444 //-------------------------------------------------------------------------------------- 445 // 446 // Return, if IsLoGain() is kFALSE 447 // 448 // Retrieve: 449 // - fRunHeader->GetNumSamplesHiGain(); 450 // 451 // Initializes the Low Gain Arrays: 452 // 453 // - For every entry in the expanded arrays: 454 // * Initialize an MHCalibrationHiLoPix 455 // * Set Binning from fNbins, fFirst and fLast 456 // * Set Binning of HivsLo Times histogram from fHivsLoNbins, fHivsLoFirst and fHivsLoLast 457 // * Set Histgram names and titles from fHistName and fHistTitle 458 // * Set HivsLo Times Histgram names and titles from fHivsLoHistName and fHivsLoHistTitle 459 // * Set X-axis and Y-axis titles from fHistXTitle and fHistYTitle 460 // * Set X-axis and Y-axis titles of HivsLo Times Histogram from fHivsLoHistXTitle and fHivsLoHistYTitle 461 // * Call InitHists 462 // 463 void MHCalibrationHiLoCam::InitLoGainArrays(const Int_t npixels, const Int_t nareas, const Int_t nsectors) 464 { 465 if (!IsLoGain()) 466 return; 467 468 TProfile *h; 469 470 if (fLoGainArray->GetSize()==0 ) 471 { 472 for (Int_t i=0; i<npixels; i++) 473 { 474 fLoGainArray->AddAt(new MHCalibrationHiLoPix(Form("%sLoGainPix%04d",fHistName.Data(),i), 475 Form("%s Low Gain Pixel %04d",fHistTitle.Data(),i)),i); 476 477 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)(*this)(i); 478 479 pix.SetNbins(fNbins); 480 pix.SetFirst(fFirst); 481 pix.SetLast (fLast); 482 483 pix.SetProbLimit(fProbLimit); 484 485 pix.SetHivsLoNbins(fHivsLoNbins); 486 pix.SetHivsLoFirst(fHivsLoFirst); 487 pix.SetHivsLoLast (fHivsLoLast ); 488 489 InitHists(pix,(*fBadPixels)[i],i); 490 491 h = pix.GetHivsLo(); 492 493 h->SetName (Form("H%sLoGainPix%04d",fHivsLoHistName.Data(),i)); 494 h->SetTitle(Form("%s Low Gain Pixel %04d",fHivsLoHistTitle.Data(),i)); 495 h->SetXTitle(fHivsLoHistXTitle.Data()); 496 h->SetYTitle(fHivsLoHistYTitle.Data()); 497 h->SetDirectory(0); 498 } 499 } 500 501 if (fAverageLoGainAreas->GetSize()==0) 502 { 503 for (Int_t j=0; j<nareas; j++) 504 { 505 fAverageLoGainAreas->AddAt(new MHCalibrationHiLoPix(Form("%sLoGainArea%d",fHistName.Data(),j), 506 Form("%s Low Gain Area Idx %d",fHistTitle.Data(),j)),j); 507 508 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)GetAverageLoGainArea(j); 509 510 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 511 pix.SetFirst(fFirst); 512 pix.SetLast (fLast); 513 514 pix.SetHivsLoNbins(fHivsLoNbins); 515 pix.SetHivsLoFirst(fHivsLoFirst); 516 pix.SetHivsLoLast (fHivsLoLast ); 517 518 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j); 519 520 h = pix.GetHivsLo(); 521 522 h->SetName (Form("H%sLoGainArea%02d",fHivsLoHistName.Data(),j)); 523 h->SetTitle(Form("%s%s%02d",fHivsLoHistTitle.Data(), 524 " averaged on event-by-event basis Low Gain Area Idx ",j)); 525 h->SetXTitle(fHivsLoHistXTitle.Data()); 526 h->SetYTitle(fHivsLoHistYTitle.Data()); 527 h->SetDirectory(0); 528 } 529 } 530 531 532 if (fAverageLoGainSectors->GetSize()==0 && IsLoGain()) 533 { 534 for (Int_t j=0; j<nsectors; j++) 535 { 536 fAverageLoGainSectors->AddAt(new MHCalibrationHiLoPix(Form("%sLoGainSector%02d",fHistName.Data(),j), 537 Form("%s Low Gain Sector %02d",fHistTitle.Data(),j)),j); 538 539 MHCalibrationHiLoPix &pix = (MHCalibrationHiLoPix&)GetAverageLoGainSector(j); 540 541 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 542 pix.SetFirst(fFirst); 543 pix.SetLast (fLast); 544 545 pix.SetHivsLoNbins(fHivsLoNbins); 546 pix.SetHivsLoFirst(fHivsLoFirst); 547 pix.SetHivsLoLast (fHivsLoLast); 548 549 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); 550 551 h = pix.GetHivsLo(); 552 553 h->SetName (Form("H%sLoGainSector%02d",fHivsLoHistName.Data(),j)); 554 h->SetTitle(Form("%s%s%02d",fHivsLoHistTitle.Data(), 555 " averaged on event-by-event basis Low Gain Area Sector ",j)); 556 h->SetXTitle(fHivsLoHistXTitle.Data()); 557 h->SetYTitle(fHivsLoHistYTitle.Data()); 558 h->SetDirectory(0); 559 } 560 } 561 } 562 563 284 564 285 565 // ------------------------------------------------------------------------------- … … 341 621 342 622 const Float_t sighi = pix.GetExtractedSignalHiGain(); 623 624 // *fLog << err << sighi << " " << siglo << endl; 343 625 const Float_t ratio = sighi / siglo; 344 626 345 MHCalibration Pix &histhi =(*this)[i];627 MHCalibrationHiLoPix &histhi = (MHCalibrationHiLoPix&)(*this)[i]; 346 628 347 629 histhi.FillHist(ratio); 630 histhi.FillHivsLo(sighi,siglo); 631 632 if (IsAverageing()) 633 { 634 MHCalibrationHiLoPix &histhi = (MHCalibrationHiLoPix&)GetAverageHiGainArea(aidx); 635 histhi.FillHivsLo(sighi,siglo); 636 } 637 348 638 fSumareahi [aidx] += ratio; 349 639 fNumareahi [aidx] ++; … … 371 661 for (Int_t j=0; j<nareas; j++) 372 662 { 373 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 663 664 MHCalibrationHiLoPix &histhi = (MHCalibrationHiLoPix&)GetAverageHiGainArea(j); 665 374 666 if (IsOscillations()) 375 667 histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); … … 390 682 { 391 683 MHCalibrationPix &hist = GetAverageHiGainSector(j); 684 392 685 if (IsOscillations()) 393 686 hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); … … 397 690 if (IsLoGain()) 398 691 { 692 399 693 MHCalibrationPix &histlo = GetAverageLoGainSector(j); 694 400 695 if (IsOscillations()) 401 696 histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]); … … 425 720 426 721 const Int_t nareas = fAverageHiGainAreas->GetSize(); 427 const Int_t nsectors = fAverageHiGainSectors->GetSize();428 722 429 723 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 430 724 { 431 725 432 MHCalibration Pix &hist =(*this)[i];726 MHCalibrationHiLoPix &hist = (MHCalibrationHiLoPix&)(*this)[i]; 433 727 434 728 if (hist.IsExcluded()) … … 436 730 437 731 CheckOverflow(hist); 732 733 TProfile *h = hist.GetHivsLo(); 734 h->Fit("pol1","RQ","",fLowerFitLimitProfile,fUpperFitLimitProfile); 735 736 TF1 *fit = h->GetFunction("pol1"); 737 738 const Float_t gainr = fit->GetParameter(1) > 0.001 739 ? 1./fit->GetParameter(1) 740 : 0.; 741 const Float_t offset = fit->GetParameter(0)/fUsedLoGainSlices; 742 743 fHivsLoResults.Fill(offset,gainr); 744 745 MCalibrationHiLoPix &pix = (MCalibrationHiLoPix&)(*fCam)[i]; 746 pix.SetOffsetPerSlice(offset); 747 pix.SetGainRatio (gainr ); 748 438 749 } 439 750 … … 472 783 { 473 784 for (Int_t j=0; j<nareas; j++) 474 CheckOverflow(GetAverageLoGainArea(j)); 475 476 for (Int_t j=0; j<nsectors; j++) 477 CheckOverflow(GetAverageLoGainSector(j)); 785 { 786 787 MHCalibrationHiLoPix &hist = (MHCalibrationHiLoPix&)GetAverageHiGainArea(j); 788 // 789 // Check histogram overflow 790 // 791 CheckOverflow(hist); 792 793 TProfile *h = hist.GetHivsLo(); 794 h->Fit("pol1","RQ","",fLowerFitLimitProfile,fUpperFitLimitProfile); 795 796 TF1 *fit = h->GetFunction("pol1"); 797 798 const Float_t gainr = fit->GetParameter(1) > 0.001 799 ? 1./fit->GetParameter(1) 800 : 0.; 801 const Float_t offset = fit->GetParameter(0)/fUsedLoGainSlices; 802 803 MCalibrationHiLoPix &pix = (MCalibrationHiLoPix&)fCam->GetAverageArea(0); 804 pix.SetOffsetPerSlice(offset); 805 pix.SetGainRatio (gainr ); 806 807 } 808 809 for (Int_t j=0; j<fAverageHiGainSectors->GetSize(); j++) 810 { 811 812 MHCalibrationHiLoPix &hist = (MHCalibrationHiLoPix&)GetAverageHiGainSector(j); 813 // 814 // Check histogram overflow 815 // 816 CheckOverflow(hist); 817 818 TProfile *h = hist.GetHivsLo(); 819 h->Fit("pol1","RQ","",fLowerFitLimitProfile,fUpperFitLimitProfile); 820 821 TF1 *fit = h->GetFunction("pol1"); 822 823 const Float_t gainr = fit->GetParameter(1) > 0.001 824 ? 1./fit->GetParameter(1) 825 : 0.; 826 const Float_t offset = fit->GetParameter(0)/fUsedLoGainSlices; 827 828 MCalibrationHiLoPix &pix = (MCalibrationHiLoPix&)fCam->GetAverageSector(0); 829 pix.SetOffsetPerSlice(offset); 830 pix.SetGainRatio (gainr ); 831 832 } 478 833 } 479 834 … … 680 1035 } 681 1036 1037 Int_t MHCalibrationHiLoCam::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 1038 { 1039 1040 Bool_t rc = kFALSE; 1041 1042 if (MHCalibrationCam::ReadEnv(env,prefix,print)) 1043 rc = kTRUE; 1044 1045 if (IsEnvDefined(env, prefix, "LowerFitLimitProfile", print)) 1046 { 1047 SetLowerFitLimitProfile(GetEnvValue(env, prefix, "LowerFitLimitProfile", fLowerFitLimitProfile)); 1048 rc = kTRUE; 1049 } 1050 1051 if (IsEnvDefined(env, prefix, "UpperFitLimitProfile", print)) 1052 { 1053 SetUpperFitLimitProfile(GetEnvValue(env, prefix, "UpperFitLimitProfile", fUpperFitLimitProfile)); 1054 rc = kTRUE; 1055 } 1056 1057 if (IsEnvDefined(env, prefix, "HivsLoNbins", print)) 1058 { 1059 SetHivsLoNbins(GetEnvValue(env, prefix, "HivsLoNbins", fHivsLoNbins)); 1060 rc = kTRUE; 1061 } 1062 1063 if (IsEnvDefined(env, prefix, "HivsLoFirst", print)) 1064 { 1065 SetHivsLoFirst(GetEnvValue(env, prefix, "HivsLoFirst", fHivsLoFirst)); 1066 rc = kTRUE; 1067 } 1068 1069 if (IsEnvDefined(env, prefix, "HivsLoLast", print)) 1070 { 1071 SetHivsLoLast(GetEnvValue(env, prefix, "HivsLoLast", fHivsLoLast)); 1072 rc = kTRUE; 1073 } 1074 1075 return rc; 1076 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h
r7095 r7189 14 14 #endif 15 15 16 class TH1F; 16 #ifndef ROOT_TH2F 17 #include <TH2F.h> 18 #endif 17 19 18 20 class MGeomCam; 19 21 class MArrivalTimeCam; 22 class MHCalibrationHiLoPix; 20 23 21 24 class MHCalibrationHiLoCam : public MHCalibrationCam 22 25 { 23 26 private: 24 static const Int_t fgNbins; //! Default number of bins (now set to: 900 ) 25 static const Axis_t fgFirst; //! Default lower histogram limit (now set to: -13.5 ) 26 static const Axis_t fgLast; //! Default upper histogram limit (now set to: 13.5 ) 27 static const Float_t fgProbLimit; //! The default for fProbLimit (now set to: 0.0) 28 29 static const TString gsHistName; //! Default Histogram names 30 static const TString gsHistTitle; //! Default Histogram titles 31 static const TString gsHistXTitle; //! Default Histogram x-axis titles 32 static const TString gsHistYTitle; //! Default Histogram y-axis titles 27 static const Int_t fgNbins; //! Default number of bins (now set to: 900 ) 28 static const Axis_t fgFirst; //! Default lower histogram limit (now set to: -13.5 ) 29 static const Axis_t fgLast; //! Default upper histogram limit (now set to: 13.5 ) 30 static const Float_t fgProbLimit; //! The default for fProbLimit (now set to: 0.0) 33 31 34 MArrayD fSumareahi ; // 35 MArrayD fSumsectorhi; // 36 MArrayI fNumareahi ; // 37 MArrayI fNumsectorhi; // 38 MArrayD fSumarealo ; // 39 MArrayD fSumsectorlo; // 40 MArrayI fNumarealo ; // 41 MArrayI fNumsectorlo; // 32 static const Int_t fgHivsLoNbins; //! Default number of bins (now set to: 900 ) 33 static const Axis_t fgHivsLoFirst; //! Default lower histogram limit (now set to: -13.5 ) 34 static const Axis_t fgHivsLoLast; //! Default upper histogram limit (now set to: 13.5 ) 42 35 43 MArrivalTimeCam *fArrTimes; //! Pointer to arrival times 36 static const Axis_t fgLowerFitLimitProfile; //! Default for fLowerFitLimitProfile (now set to: 480. ) 37 static const Axis_t fgUpperFitLimitProfile; //! Default for fUpperFitLimitProfile (now set to: 680. ) 44 38 45 Bool_t ReInitHists(MParList *pList);46 Bool_t FillHists(const MParContainer *par, const Stat_t w=1);47 Bool_t FinalizeHists();48 void FinalizeBadPixels();39 static const TString gsHistName; //! Default Histogram names 40 static const TString gsHistTitle; //! Default Histogram titles 41 static const TString gsHistXTitle; //! Default Histogram x-axis titles 42 static const TString gsHistYTitle; //! Default Histogram y-axis titles 49 43 50 void CheckOverflow( MHCalibrationPix &pix); 44 static const TString gsHivsLoHistName; //! Default names hi vs. lo profile 45 static const TString gsHivsLoHistTitle; //! Default titles hi vs. lo profile 46 static const TString gsHivsLoHistXTitle; //! Default x-axis titles hi vs. lo profile 47 static const TString gsHivsLoHistYTitle; //! Default y-axis titles hi vs. lo profile 48 49 TString fHivsLoHistName; // names hi vs. lo profile 50 TString fHivsLoHistTitle; // titles hi vs. lo profile 51 TString fHivsLoHistXTitle; // x-axis titles hi vs. lo profile 52 TString fHivsLoHistYTitle; // y-axis titles hi vs. lo profile 53 54 Int_t fHivsLoNbins; // Number of HivsLo bins 55 Axis_t fHivsLoFirst; // Lower histogram limit low gain 56 Axis_t fHivsLoLast; // Upper histogram limit low gain 57 58 Axis_t fLowerFitLimitProfile; // Lower limit for hi-vs. logain fit 59 Axis_t fUpperFitLimitProfile; // Upper limit for hi-vs. logain fit 60 61 MArrayD fSumareahi ; // 62 MArrayD fSumsectorhi; // 63 MArrayI fNumareahi ; // 64 MArrayI fNumsectorhi; // 65 MArrayD fSumarealo ; // 66 MArrayD fSumsectorlo; // 67 MArrayI fNumarealo ; // 68 MArrayI fNumsectorlo; // 69 70 MArrivalTimeCam *fArrTimes; //! Pointer to arrival times 71 72 TH2F fHivsLoResults; // Results from pol1-fit 73 74 Float_t fUsedLoGainSlices; // Used low-gain FADC slices 75 Bool_t ReInitHists(MParList *pList); 76 Bool_t FillHists(const MParContainer *par, const Stat_t w=1); 77 Bool_t FinalizeHists(); 78 void FinalizeBadPixels(); 79 80 void InitHiGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors ); 81 void InitLoGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors ); 82 83 void FinalizeHivsLo (MHCalibrationHiLoPix &hist); 84 85 void CheckOverflow( MHCalibrationPix &pix); 86 87 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 51 88 52 89 public: … … 55 92 // Clone 56 93 TObject *Clone(const char *name="") const; 94 95 TH2F &GetHivsLoResults() { return fHivsLoResults; } 96 97 void SetHivsLoHistName ( const char *name ) { fHivsLoHistName = name; } 98 void SetHivsLoHistTitle ( const char *name ) { fHivsLoHistTitle = name; } 99 void SetHivsLoHistXTitle ( const char *name ) { fHivsLoHistXTitle = name; } 100 void SetHivsLoHistYTitle ( const char *name ) { fHivsLoHistYTitle = name; } 101 102 void SetHivsLoNbins ( const Int_t i=fgHivsLoNbins ) { fHivsLoNbins = i; } 103 void SetHivsLoFirst ( const Axis_t f=fgHivsLoFirst ) { fHivsLoFirst = f; } 104 void SetHivsLoLast ( const Axis_t f=fgHivsLoLast ) { fHivsLoLast = f; } 105 106 void SetLowerFitLimitProfile( const Axis_t f=fgLowerFitLimitProfile ) { fLowerFitLimitProfile = f; } 107 void SetUpperFitLimitProfile( const Axis_t f=fgUpperFitLimitProfile ) { fUpperFitLimitProfile = f; } 57 108 58 109 // Draw -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r7028 r7189 464 464 465 465 if (npix > fNumPixelsRequired) 466 GetAverageHiGainArea(j).FillHist(fSumhiarea[j]/npix); 466 { 467 if (IsOscillations()) 468 GetAverageHiGainArea(j).FillHistAndArray(fSumhiarea[j]/npix); 469 else 470 GetAverageHiGainArea(j).FillHist(fSumhiarea[j]/npix); 471 472 } 467 473 } 468 474 … … 473 479 474 480 if (npix > 0) 475 GetAverageHiGainSector(j).FillHist(fSumhisector [j]/npix); 481 { 482 if (IsOscillations()) 483 GetAverageHiGainSector(j).FillHistAndArray(fSumhisector [j]/npix); 484 else 485 GetAverageHiGainSector(j).FillHist(fSumhisector [j]/npix); 486 } 476 487 } 477 488 … … 560 571 { 561 572 *fLog << dbginf << GetDescriptor() << ": ID " << GetName() 573 << " "<<pix.GetPixId() 562 574 << " Mean: " << hist.GetMean () 563 575 << " MeanErr: " << hist.GetMeanErr () -
trunk/MagicSoft/Mars/mhcalib/MHGausEvents.h
r7188 r7189 169 169 void SimulateGausEvents(const Float_t mean, const Float_t sigma, const Int_t nevts=4096); // *MENU* 170 170 171 ClassDef(MHGausEvents, 3) // Base class for events with Gaussian distributed values171 ClassDef(MHGausEvents, 4) // Base class for events with Gaussian distributed values 172 172 }; 173 173
Note:
See TracChangeset
for help on using the changeset viewer.