Changeset 4750
- Timestamp:
- 08/27/04 08:30:51 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.cc
r4745 r4750 40 40 // 41 41 ///////////////////////////////////////////////////////////////////////////// 42 #include <TMath.h> 42 43 #include <TList.h> 43 44 #include <TSystem.h> … … 124 125 if (!fStarCam) 125 126 { 126 *fLog << err << "M TelAxisFromStars::PreProcess; container 'MStarCam'not found... aborting." << endl;127 *fLog << err << "MStarCam not found... aborting." << endl; 127 128 return kFALSE; 128 129 } … … 132 133 if (!fSourceCam) 133 134 { 134 *fLog << err << "MTelAxisFromStars::PreProcess; container 'MSourceCam'not found... continue " << endl;135 *fLog << warn << "MSourceCam[MStarCam] not found... continue " << endl; 135 136 } 136 137 … … 139 140 fSrcPos = (MSrcPosCam*)pList->FindCreateObj(AddSerialNumber("MSrcPosCam"), "MSrcPosCam"); 140 141 if (!fSrcPos) 141 {142 *fLog << err << "MTelAxisFromStars::PreProcess; MSrcPosCam not found... aborting" << endl;143 142 return kFALSE; 144 }145 143 146 144 fPntPos = (MSrcPosCam*)pList->FindCreateObj(AddSerialNumber("MSrcPosCam"), "MPntPosCam"); 147 145 if (!fPntPos) 148 {149 *fLog << err << "MTelAxisFromStars::PreProcess; MPntPosCam not found... aborting" << endl;150 146 return kFALSE; 151 }152 147 153 148 fPointPos = (MPointingPos*)pList->FindCreateObj(AddSerialNumber("MPointingPos"), "MPointingPos"); 154 149 if (!fPointPos) 155 {156 *fLog << err << "MTelAxisFromStars::PreProcess; MPointingPos not found... aborting" << endl;157 150 return kFALSE; 158 }159 151 160 152 fSourcePos = (MPointingPos*)pList->FindCreateObj(AddSerialNumber("MPointingPos"), "MSourcePos"); 161 153 if (!fSourcePos) 162 {163 *fLog << err << "MTelAxisFromStars::PreProcess; MSourcePos[MPointingPos] not found... aborting" << endl;164 154 return kFALSE; 165 }166 155 167 156 fSkyCamTrans = (MSkyCamTrans*)pList->FindCreateObj(AddSerialNumber("MSkyCamTrans")); 168 157 if (!fSkyCamTrans) 169 {170 *fLog << err << "MTelAxisFromStars::PreProcess; MSkyCamTrans not found... aborting" << endl;171 158 return kFALSE; 172 } 159 173 160 174 161 //----------------------------------------------------------------- … … 539 526 while ( (starSource = (MStarPos*)setnextSource()) ) 540 527 { 541 Double_t corr = esxy[0][1][ix]/ sqrt( esxy[0][0][ix] * esxy[1][1][ix] ); 528 Double_t corr = esxy[0][1][ix] / 529 TMath::Sqrt( esxy[0][0][ix] * esxy[1][1][ix] ); 542 530 starSource->SetFitValues(100.0, 100.0, bsxy[0][ix], bsxy[1][ix], 543 sqrt(esxy[0][0][ix]), sqrt(esxy[1][1][ix]), corr,531 TMath::Sqrt(esxy[0][0][ix]), TMath::Sqrt(esxy[1][1][ix]), corr, 544 532 esxy[0][0][ix], esxy[0][1][ix], esxy[1][1][ix], 545 533 fChi2, fNdof); … … 726 714 Double_t alfa = 0.0; 727 715 if (fixedrotationangle != -1.0) 728 alfa = fixedrotationangle / kRad2Deg; 729 730 716 alfa = fixedrotationangle / TMath::RadToDeg(); 731 717 732 718 Double_t alfaold = alfa; 733 719 // maximum allowed change of alfa in 1 iteration step (5 degrees) 734 Double_t dalfamax = 5.0 / kRad2Deg;720 Double_t dalfamax = 5.0 / TMath::RadToDeg(); 735 721 Double_t dalfa = 0.0; 736 722 737 Double_t cosal = cos(alfa);738 Double_t sinal = sin(alfa);723 Double_t cosal = TMath::Cos(alfa); 724 Double_t sinal = TMath::Sin(alfa); 739 725 740 726 A[0][0] = cosal; … … 821 807 // or chi2 is less than 'tolchi2' 822 808 Double_t told2 = 0.3*0.3; // [mm*mm]; 1/100 of an inner pixel diameter 823 Double_t toldalfa = 0.01 / kRad2Deg; // 0.01 degrees809 Double_t toldalfa = 0.01 / TMath::RadToDeg(); // 0.01 degrees 824 810 Double_t toldlambda = 0.00006; // uncertainty of 1 mm of distance 825 811 // between camera and reflector … … 991 977 alfa = alfaold + dalfa; 992 978 993 if ( alfa < -5.0/ kRad2Deg)994 alfa = -5.0/ kRad2Deg;995 else if ( alfa > 5.0/ kRad2Deg)996 alfa = 5.0/ kRad2Deg;979 if ( alfa < -5.0/TMath::RadToDeg() ) 980 alfa = -5.0/TMath::RadToDeg(); 981 else if ( alfa > 5.0/TMath::RadToDeg() ) 982 alfa = 5.0/TMath::RadToDeg(); 997 983 998 984 dalfa = alfa - alfaold; … … 1000 986 alfaold = alfa; 1001 987 1002 sinal = sin(alfa);1003 cosal = cos(alfa);988 sinal = TMath::Sin(alfa); 989 cosal = TMath::Cos(alfa); 1004 990 1005 991 A[0][0] = cosal; … … 1068 1054 //------- end of iteration ***************************************** 1069 1055 1070 alfadeg = alfa * kRad2Deg;1056 alfadeg = alfa * TMath::RadToDeg(); 1071 1057 1072 1058 // calculate error matrix of d[2] … … 1253 1239 1254 1240 // -------------------------------------------------------------------------- 1255 // 1256 // 1257 Int_t MTelAxisFromStars::PostProcess() 1258 { 1259 1260 return kTRUE; 1261 } 1262 1263 1264 // -------------------------------------------------------------------------- 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 -
trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.h
r4744 r4750 50 50 Int_t PreProcess(MParList *pList); 51 51 Int_t Process(); 52 Int_t PostProcess();53 52 54 53 public:
Note:
See TracChangeset
for help on using the changeset viewer.