Changeset 8766 for trunk/MagicSoft/Cosy/tpoint/gui.C
- Timestamp:
- 10/28/07 19:16:25 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/tpoint/gui.C
r8715 r8766 29 29 //#include "coord.h" 30 30 31 #include "MAstro.h" 31 32 #include "MGList.h" 32 33 #include "MPointing.h" … … 60 61 Double_t GetResidual(Double_t *err=0) const 61 62 { 62 /*63 TVector3 v1, v2;64 v1.SetMagThetaPhi(1, TMath::Pi()/2-fRawEl, fRawAz);65 v2.SetMagThetaPhi(1, TMath::Pi()/2-fStarEl, fStarAz);66 67 return v1.Angle(v2)*TMath::RadToDeg();68 */69 70 63 const Double_t del = fRawEl-fStarEl; 71 64 const Double_t daz = fRawAz-fStarAz; 72 65 73 /*74 const Double_t dphi2 = daz/2.;75 const Double_t cos2 = cos(dphi2)*cos(dphi2);76 const Double_t sin2 = sin(dphi2)*sin(dphi2);77 const Double_t d = cos(del)*cos2 - cos(fRawEl+fStarEl)*sin2;78 */79 66 const Double_t d = cos(del) - cos(fRawEl)*cos(fStarEl)*(1.-cos(daz)); 80 67 … … 100 87 } 101 88 102 const Double_t dist = acos(d); 103 return dist * TMath::RadToDeg(); 89 //const Double_t dist = acos(d); 90 //return dist * TMath::RadToDeg(); 91 92 return MAstro::GetDevAbs(90-fStarEl*TMath::RadToDeg(), 93 del*TMath::RadToDeg(), 94 -daz*TMath::RadToDeg()); 104 95 } 105 96 … … 569 560 570 561 Set &set0 = *(Set*)fCoordinates.At(i); 571 562 572 563 ZdAz za(set0.GetStarZdAz()); 573 564 za *=kRad2Deg; 574 565 575 566 // 576 567 // Correct for offsets only … … 578 569 Set set1(set0); 579 570 set1.Adjust(b2); 580 571 581 572 hres1.Fill(set1.GetResidual()); 582 573 583 574 set0.Adjust(fBending); 584 575 hres2.Fill(set0.GetResidual()); 585 576 586 577 Double_t dz = fmod(set0.GetDAz()+720, 360); 587 578 if (dz>180) … … 590 581 Double_t err; 591 582 Double_t resi = set0.GetResidual(&err); 592 583 593 584 gdzd.SetPoint(i, za.Az(), set0.GetDZd()); 594 585 gdaz.SetPoint(i, za.Zd(), dz); … … 603 594 { 604 595 fout << Form("%6.3f", resi) << ": " << (resi>maxres?"*":" "); 596 fout << " " << orig << endl; 597 } 598 599 if (fabs(set0.GetDZd())>0.05) 600 { 601 fout << "-> " <<Form("%6.3f", resi) << ": " << (resi>maxres?"*":" "); 605 602 fout << " " << orig << endl; 606 603 } … … 622 619 623 620 cout << "Residuals (>0.13deg) written to residuals.txt." << endl; 624 621 625 622 // 626 623 // Check for overflows … … 629 626 if (ov>0) 630 627 cout << "WARNING: " << ov << " overflows (>" << maxres << ") in residuals." << endl; 631 632 633 628 629 630 634 631 cout << dec << endl; 635 632 cout << " Number of calls to FCN: " << minuit.fNfcn << endl; … … 638 635 cout << " Chi^2/NDF: " << minuit.fAmin/(fOriginal.GetSize()-minuit.GetNumFreePars()) << endl; 639 636 //cout << "Prob(?): " << TMath::Prob(fChisquare,ndf); 640 641 642 637 638 639 643 640 // 644 641 // Print all data sets for which the backward correction is … … 652 649 Set set0(*(Set*)list.At(i)); 653 650 Set &set1 = *(Set*)list.At(i); 654 651 655 652 set0.AdjustBack(fBending); 656 653 set1.Adjust(fBending); 657 654 658 655 const Double_t res0 = set0.GetResidual(); 659 656 const Double_t res1 = set1.GetResidual(); 660 657 const Double_t diff = TMath::Abs(res0-res1); 661 658 662 659 hres3.Fill(res0); 663 660 664 661 if (diff<hres2.GetMean()*0.66) 665 662 continue; 666 663 667 664 cout << "DBack: " << setw(6) << set0.GetStarZd() << " " << setw(7) << set0.GetStarAz() << ": "; 668 665 cout << "ResB="<< setw(7) << res0*60 << " ResF=" << setw(7) << res1*60 << " |ResB-ResF|=" << setw(7) << diff*60 << " arcmin" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.