Changeset 7104 for trunk/MagicSoft/Cosy/tpoint
- Timestamp:
- 05/30/05 10:31:23 (20 years ago)
- Location:
- trunk/MagicSoft/Cosy/tpoint
- Files:
-
- 14 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tpoint/gui.C
r4617 r7104 1 #include <fstream.h> 2 #include <fstream.h> 3 #include <fstream.h> 4 #include <iostream.h> 5 #include <iomanip.h> 1 #include <fstream> 2 #include <iostream> 3 #include <iomanip> 6 4 7 5 #include <TError.h> … … 26 24 #include <TCanvas.h> 27 25 28 #include "coord.h"26 //#include "coord.h" 29 27 30 28 #include "MGList.h" 31 #include "MBending.h" 29 #include "MPointing.h" 30 31 using namespace std; 32 32 33 33 class Set : public TObject … … 126 126 void AdjustAz(Double_t daz) { fStarAz += daz*TMath::DegToRad(); } 127 127 128 void Adjust(const M Bending &bend)128 void Adjust(const MPointing &bend) 129 129 { 130 130 AltAz p = bend(GetStarAltAz()); … … 132 132 fStarAz = p.Az(); 133 133 } 134 void AdjustBack(const M Bending &bend)134 void AdjustBack(const MPointing &bend) 135 135 { 136 136 AltAz p = bend.CorrectBack(GetRawAltAz()); … … 182 182 private: 183 183 enum { 184 kTbFit = 19, //M Bending::GetNumPar(), // FIXME!!!184 kTbFit = 19, //MPointing::GetNumPar(), // FIXME!!! 185 185 kTbLoad, 186 186 kTbSave, … … 196 196 TList fLabel; 197 197 198 M Bending fBending;198 MPointing fBending; 199 199 200 200 FontStruct_t fFont; … … 204 204 f = 0; 205 205 206 M Bending bend;207 bend.SetParameters(par); // Set Parameters [deg] to M Bending206 MPointing bend; 207 bend.SetParameters(par); // Set Parameters [deg] to MPointing 208 208 209 209 for (int i=0; i<fCoordinates.GetSize(); i++) … … 430 430 grmag.SetTitle(" \\Delta vs. Mag "); 431 431 432 TMinuit minuit(M Bending::GetNumPar()); //initialize TMinuit with a maximum of 5 params432 TMinuit minuit(MPointing::GetNumPar()); //initialize TMinuit with a maximum of 5 params 433 433 minuit.SetObjectFit(this); 434 434 minuit.SetPrintLevel(-1); 435 435 minuit.SetFCN(fcn); 436 436 437 fBending.SetMinuitParameters(minuit, M Bending::GetNumPar()); // Init Parameters [deg]438 439 for (int i=0; i<M Bending::GetNumPar(); i++)437 fBending.SetMinuitParameters(minuit, MPointing::GetNumPar()); // Init Parameters [deg] 438 439 for (int i=0; i<MPointing::GetNumPar(); i++) 440 440 { 441 441 TGButton *l = (TGButton*)fList->FindWidget(i); … … 482 482 TArrayD par; 483 483 fBending.GetParameters(par); 484 for (int i=2; i<M Bending::GetNumPar(); i++)484 for (int i=2; i<MPointing::GetNumPar(); i++) 485 485 par[i]=0; 486 486 487 M Bending b2;487 MPointing b2; 488 488 b2.SetParameters(par); 489 489 … … 495 495 Set &set0 = *(Set*)fCoordinates.At(i); 496 496 497 ZdAz za = set0.GetStarZdAz()*kRad2Deg; 497 ZdAz za(set0.GetStarZdAz()); 498 za *=kRad2Deg; 498 499 499 500 // … … 615 616 616 617 c1=new TCanvas("CanvGraphs", "Graphs"); 617 c1->Divide(3,3, 0,0);618 c1->Divide(3,3,1e-10,1e-10); 618 619 619 620 TLine line; … … 755 756 756 757 c1=new TCanvas("CanvResiduals", "Residuals", 800, 800); 757 c1->Divide(2, 2, 0,0);758 c1->Divide(2, 2, 1e-10, 1e-10); 758 759 759 760 c1->cd(2); … … 952 953 TGLabel *l; 953 954 954 for (int i=0; i<M Bending::GetNumPar(); i++)955 for (int i=0; i<MPointing::GetNumPar(); i++) 955 956 { 956 957 l = (TGLabel*)fLabel.At(i); 957 958 l->SetText(Form("%.4f\xb0", par[i])); 958 959 959 l = (TGLabel*)fLabel.At(M Bending::GetNumPar()+i);960 l = (TGLabel*)fLabel.At(MPointing::GetNumPar()+i); 960 961 l->SetText(Form("\xb1 %8.4f\xb0", err[i])); 961 962 } … … 964 965 void DisplayData() 965 966 { 966 TGLabel *l = (TGLabel*)fLabel.At(3*M Bending::GetNumPar());967 TGLabel *l = (TGLabel*)fLabel.At(3*MPointing::GetNumPar()); 967 968 l->SetText(Form("%d data sets loaded.", fOriginal.GetSize())); 968 969 } … … 970 971 void DisplayResult(Double_t before, Double_t after, Double_t backw) 971 972 { 972 TGLabel *l1 = (TGLabel*)fLabel.At(3*M Bending::GetNumPar()+1);973 TGLabel *l1 = (TGLabel*)fLabel.At(3*MPointing::GetNumPar()+1); 973 974 l1->SetText(Form("Before: %.1f +- %.1f SE", before, 0)); 974 975 975 TGLabel *l2 = (TGLabel*)fLabel.At(3*M Bending::GetNumPar()+2);976 TGLabel *l2 = (TGLabel*)fLabel.At(3*MPointing::GetNumPar()+2); 976 977 l2->SetText(Form("After: %.1f +- %.1f SE", after, 0)); 977 978 978 TGLabel *l3 = (TGLabel*)fLabel.At(3*M Bending::GetNumPar()+3);979 TGLabel *l3 = (TGLabel*)fLabel.At(3*MPointing::GetNumPar()+3); 979 980 l3->SetText(Form("Backw: %.1f +- %.1f SE", backw, 0)); 980 981 } … … 1038 1039 fList->Add(vframe); 1039 1040 1040 for (int i=0; i<M Bending::GetNumPar(); i++)1041 AddCheckButton(vframe, fBending.Get Name(i), i);1041 for (int i=0; i<MPointing::GetNumPar(); i++) 1042 AddCheckButton(vframe, fBending.GetVarName(i), i); 1042 1043 1043 1044 vframe = new TGVerticalFrame(comp, 1, 1); … … 1057 1058 vframe->AddFrame(l,h); 1058 1059 1059 for (int i=1; i<M Bending::GetNumPar(); i++)1060 for (int i=1; i<MPointing::GetNumPar(); i++) 1060 1061 AddLabel(vframe, "+000.0000", h)->SetTextJustify(kTextRight); 1061 1062 … … 1064 1065 fList->Add(vframe); 1065 1066 1066 for (int i=0; i<M Bending::GetNumPar(); i++)1067 for (int i=0; i<MPointing::GetNumPar(); i++) 1067 1068 AddLabel(vframe, "\xb1 00.0000\xb0", h)->SetTextJustify(kTextRight); 1068 1069 … … 1071 1072 fList->Add(vframe); 1072 1073 1073 for (int i=0; i<M Bending::GetNumPar(); i++)1074 for (int i=0; i<MPointing::GetNumPar(); i++) 1074 1075 AddLabel(vframe, fBending.GetDescription(i), h); 1075 1076
Note:
See TracChangeset
for help on using the changeset viewer.