Changeset 4256 for trunk/MagicSoft/Cosy/tpoint
- Timestamp:
- 06/01/04 16:52:40 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tpoint/gui.C
r4107 r4256 14 14 #include <TH1.h> 15 15 #include <TH2.h> 16 #include <TGraph .h>16 #include <TGraphErrors.h> 17 17 18 18 #include <TList.h> … … 496 496 gaz.SetPoint( i, za.Az(), dz); 497 497 gzd.SetPoint( i, za.Zd(), set0.GetDZd()); 498 499 498 } 500 499 … … 556 555 557 556 557 const Double_t max1 = TMath::Max(gaz.GetHistogram()->GetMaximum(), gdaz.GetHistogram()->GetMaximum()); 558 const Double_t max2 = TMath::Max(gzd.GetHistogram()->GetMaximum(), gdzd.GetHistogram()->GetMaximum()); 559 const Double_t max3 = TMath::Max(grzd.GetHistogram()->GetMaximum(), graz.GetHistogram()->GetMaximum()); 560 561 const Double_t min1 = TMath::Min(gaz.GetHistogram()->GetMinimum(), gdaz.GetHistogram()->GetMinimum()); 562 const Double_t min2 = TMath::Min(gzd.GetHistogram()->GetMinimum(), gdzd.GetHistogram()->GetMinimum()); 563 const Double_t min3 = TMath::Min(grzd.GetHistogram()->GetMinimum(), graz.GetHistogram()->GetMinimum()); 564 565 const Double_t absmax1 = TMath::Max(max1, TMath::Abs(min1)); 566 const Double_t absmax2 = TMath::Max(max2, TMath::Abs(min2)); 567 const Double_t absmax3 = TMath::Max(max3, TMath::Abs(min3)); 568 569 gaz.SetMaximum(absmax1); 570 gzd.SetMaximum(absmax2); 571 gdaz.SetMaximum(absmax1); 572 gdzd.SetMaximum(absmax2); 573 graz.SetMaximum(absmax3); 574 grzd.SetMaximum(absmax3); 575 gaz.SetMinimum(-absmax1); 576 gzd.SetMinimum(-absmax2); 577 gdaz.SetMinimum(-absmax1); 578 gdzd.SetMinimum(-absmax2); 558 579 559 580 c1=new TCanvas("CanvGraphs", "Graphs"); 560 581 c1->Divide(2,3,0,0); 561 582 583 TLine line; 584 line.SetLineColor(kGreen); 585 562 586 c1->cd(1); 563 587 gPad->SetBorderMode(0); 588 gPad->SetGridx(); 589 gPad->SetGridy(); 564 590 TGraph *g=(TGraph*)gaz.DrawClone("A*"); 565 591 g->SetBit(kCanDelete); 566 592 g->GetHistogram()->SetXTitle("Az [\\circ]"); 567 593 g->GetHistogram()->SetYTitle("\\Delta Az [\\circ]"); 568 594 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 595 line.DrawLine(g->GetXaxis()->GetXmin(), -360./16384, g->GetXaxis()->GetXmax(), -360./16384); 596 569 597 c1->cd(2); 570 598 gPad->SetBorderMode(0); 599 gPad->SetGridx(); 600 gPad->SetGridy(); 571 601 g=(TGraph*)gdaz.DrawClone("A*"); 572 602 g->SetBit(kCanDelete); 573 603 g->GetHistogram()->SetXTitle("Zd [\\circ]"); 574 604 g->GetHistogram()->SetYTitle("\\Delta Az [\\circ]"); 605 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 606 line.DrawLine(g->GetXaxis()->GetXmin(), -360./16384, g->GetXaxis()->GetXmax(), -360./16384); 575 607 cout << "Mean dAz: " << g->GetMean(2) << " \xb1 " << g->GetRMS(2) << endl; 576 608 577 609 c1->cd(3); 578 610 gPad->SetBorderMode(0); 611 gPad->SetGridx(); 612 gPad->SetGridy(); 579 613 g=(TGraph*)gdzd.DrawClone("A*"); 580 614 g->SetBit(kCanDelete); 581 615 g->GetHistogram()->SetXTitle("Az [\\circ]"); 582 616 g->GetHistogram()->SetYTitle("\\Delta Zd [\\circ]"); 617 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 618 line.DrawLine(g->GetXaxis()->GetXmin(), -360./16384, g->GetXaxis()->GetXmax(), -360./16384); 583 619 cout << "Mean dZd: " << g->GetMean(2) << " \xb1 " << g->GetRMS(2) << endl; 584 620 cout << endl; … … 586 622 c1->cd(4); 587 623 gPad->SetBorderMode(0); 624 gPad->SetGridx(); 625 gPad->SetGridy(); 588 626 g=(TGraph*)gzd.DrawClone("A*"); 589 627 g->SetBit(kCanDelete); 590 628 g->GetHistogram()->SetXTitle("Zd [\\circ]"); 591 629 g->GetHistogram()->SetYTitle("\\Delta Zd [\\circ]"); 630 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 631 line.DrawLine(g->GetXaxis()->GetXmin(), -360./16384, g->GetXaxis()->GetXmax(), -360./16384); 592 632 593 633 c1->cd(5); 594 634 gPad->SetBorderMode(0); 635 gPad->SetGridx(); 636 gPad->SetGridy(); 595 637 g=(TGraph*)graz.DrawClone("A*"); 596 638 g->SetBit(kCanDelete); 597 639 g->GetHistogram()->SetXTitle("Az [\\circ]"); 598 640 g->GetHistogram()->SetYTitle("\\Delta [\\circ]"); 641 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 599 642 600 643 c1->cd(6); 601 644 gPad->SetBorderMode(0); 645 gPad->SetGridx(); 646 gPad->SetGridy(); 602 647 g=(TGraph*)grzd.DrawClone("A*"); 603 648 g->SetBit(kCanDelete); 604 649 g->GetHistogram()->SetXTitle("Zd [\\circ]"); 605 650 g->GetHistogram()->SetYTitle("\\Delta [\\circ]"); 651 line.DrawLine(g->GetXaxis()->GetXmin(), 360./16384, g->GetXaxis()->GetXmax(), 360./16384); 606 652 607 653 … … 644 690 hres1.SetLineColor(kRed); 645 691 hres1.DrawCopy(); 692 693 line.DrawLine(360./16384, 0, 360./16384, hres1.GetMaximum()); 646 694 647 695 c1->cd(4); … … 656 704 f.SetParameter(2, h->GetRMS()); 657 705 h->Fit("mygaus", "QR"); 658 hres3.SetLineColor(k Green);706 hres3.SetLineColor(kCyan); 659 707 hres3.SetLineStyle(kDashed); 660 708 hres3.DrawCopy("same"); … … 662 710 cout << "Fit-Probability: " << f.GetProb()*100 << "%" << endl; 663 711 cout << " Chi^2/NDF: " << f.GetChisquare() << "/" << f.GetNDF() << " = " << f.GetChisquare()/f.GetNDF() << endl; 712 line.DrawLine(360./16384, 0, 360./16384, h->GetMaximum()); 664 713 665 714 c1->cd(1); … … 683 732 gPad->Modified(); 684 733 gPad->Update(); 685 for (int i=0; i<fCoordinates.GetSize(); i++)686 DrawSet(gPad, *(Set*)fCoordinates.At(i), 10./hres2.GetMean(), par[0]);734 // for (int i=0; i<fCoordinates.GetSize(); i++) 735 // DrawSet(gPad, *(Set*)fCoordinates.At(i), 10./hres2.GetMean(), par[0]); 687 736 688 737 RaiseWindow(); … … 976 1025 gErrorIgnoreLevel = kError; 977 1026 new MFit; 1027 // TF1 f1("f1", "[0]/cos((90-x)*3.1415/180)", 0, 90) 978 1028 }
Note:
See TracChangeset
for help on using the changeset viewer.