Changeset 8990 for trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
- Timestamp:
- 07/01/08 17:07:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r8986 r8990 19 19 ! Author(s): Markus Gaug, 4/2004 <mailto:markus@ifae.es> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 721 ! Copyright: MAGIC Software Development, 2000-2008 22 22 ! 23 23 ! … … 89 89 #include "MPedestalSubtract.h" 90 90 91 // Display helpers 92 #include "MJCalibration.h" 93 91 94 ClassImp(MJPedestal); 92 95 … … 393 396 gPad->SetBorderMode(0); 394 397 gPad->SetTicks(); 395 TH1D *obj2 = (TH1D*)obj1->Projection( obj1->GetName());398 TH1D *obj2 = (TH1D*)obj1->Projection(); 396 399 obj2->Draw(); 397 400 obj2->SetBit(kCanDelete); … … 431 434 432 435 if (geomcam.InheritsFrom("MGeomCamMagic")) 433 { 434 TArrayI inner(1); 435 inner[0] = 0; 436 437 TArrayI outer(1); 438 outer[0] = 1; 439 440 TArrayI s0(6); 441 s0[0] = 6; 442 s0[1] = 1; 443 s0[2] = 2; 444 s0[3] = 3; 445 s0[4] = 4; 446 s0[5] = 5; 447 448 TArrayI s1(3); 449 s1[0] = 6; 450 s1[1] = 1; 451 s1[2] = 2; 452 453 TArrayI s2(3); 454 s2[0] = 3; 455 s2[1] = 4; 456 s2[2] = 5; 457 458 TVirtualPad *pad = gPad; 459 pad->Divide(2,1); 460 461 TH1D *inout[2]; 462 inout[0] = disp1.ProjectionS(s0, inner, "Inner"); 463 inout[1] = disp1.ProjectionS(s0, outer, "Outer"); 464 FixDataCheckHist(inout[0]); 465 FixDataCheckHist(inout[1]); 466 467 inout[0]->SetTitle(Form("%s %s",disp1.GetTitle(),"Inner")); 468 inout[1]->SetTitle(Form("%s %s",disp1.GetTitle(),"Outer")); 469 470 471 for (int i=0; i<2; i++) 472 { 473 pad->cd(i+1); 474 gPad->SetBorderMode(0); 475 gPad->SetTicks(); 476 477 inout[i]->SetDirectory(NULL); 478 inout[i]->SetLineColor(kRed+i); 479 inout[i]->SetBit(kCanDelete); 480 inout[i]->Draw(); 481 inout[i]->Fit("gaus", "Q"); 482 483 TLegend *leg2 = new TLegend(0.6,0.2,0.9,0.55); 484 leg2->SetHeader(inout[i]->GetName()); 485 leg2->AddEntry(inout[i], inout[i]->GetName(), "l"); 486 487 // 488 // Display the outliers as dead and noisy pixels 489 // 490 DisplayOutliers(inout[i]); 491 492 // 493 // Display the two half of the camera separately 494 // 495 TH1D *half[2]; 496 half[0] = disp1.ProjectionS(s1, i==0 ? inner : outer , "Sector 6-1-2"); 497 half[1] = disp1.ProjectionS(s2, i==0 ? inner : outer , "Sector 3-4-5"); 498 499 for (int j=0; j<2; j++) 500 { 501 half[j]->SetLineColor(kRed+i+2*j+1); 502 half[j]->SetDirectory(NULL); 503 half[j]->SetBit(kCanDelete); 504 half[j]->Draw("same"); 505 leg2->AddEntry(half[j], half[j]->GetName(), "l"); 506 } 507 leg2->Draw(); 508 delete leg2; 509 } 436 { 437 MJCalibration::DisplayDoubleProject(disp1); 510 438 return; 511 439 } 512 440 } 513 441 … … 578 506 line.DrawLine(398, fRefPedRmsGalacticOuter, 579 507 x2, fRefPedRmsGalacticOuter); 580 508 581 509 line.SetLineColor(kYellow); 582 510 line.DrawLine(398, fRefPedRmsExtraGalacticOuter, 583 511 x2, fRefPedRmsExtraGalacticOuter); 584 512 585 513 line.SetLineColor(kMagenta); 586 514 line.DrawLine(398, fRefPedRmsClosedLidsOuter, … … 595 523 } 596 524 525 /* 597 526 void MJPedestal::DisplayOutliers(TH1D *hist) const 598 527 { … … 611 540 noisytex.DrawLatex(0.1,hist->GetBinContent(hist->GetMaximumBin())/1.2,Form("%3i noisy pixels",(Int_t)noisy)); 612 541 } 542 */ 613 543 614 544 void MJPedestal::FixDataCheckHist(TH1D *hist) const
Note:
See TracChangeset
for help on using the changeset viewer.