Changeset 3892 for trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc
- Timestamp:
- 04/29/04 16:44:48 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc
r2206 r3892 17 17 ! 18 18 ! Author(s): Wolfgang Wittek 03/2003 <mailto:wittek@mppmu.mpg.de> 19 ! 19 ! Nadia Tonello 05/2003 <mailto:tonello@mppmu.mpg.de> 20 20 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! … … 27 27 // MCT1PointingCorrCalc // 28 28 // // 29 // This is a task to do the CT1 pointing correction // 30 // // 29 // This is a task to do the CT1 pointing correction. // 30 // // 31 // NT: You can correct the Mkn421 data (default setting), or the 1ES1959 // 32 // data. // 33 // To change to the correction needed for 1ES1959, you have to call // 34 // the member funcion: SetPointedSource // 35 // // 36 // Example: // 37 // MCT1PointingCorrCalc correct; // 38 // correct.SetPointedSource(MCT1PointingCorrectionCalc::K1959) // 39 // // 31 40 ///////////////////////////////////////////////////////////////////////////// 32 41 … … 45 54 46 55 using namespace std; 47 48 56 // -------------------------------------------------------------------------- 49 57 // … … 52 60 MCT1PointingCorrCalc::MCT1PointingCorrCalc(const char *srcname, 53 61 const char *name, const char *title) 54 : fSrcName(srcname)62 : fSrcName(srcname), fPoiSource(k421) 55 63 { 56 64 fName = name ? name : "MCT1PointingCorrCalc"; … … 70 78 } 71 79 72 80 fHourAngle = (MParameterD*)pList->FindObject("HourAngle", "MParameterD"); 73 81 if (!fHourAngle) 74 82 { … … 89 97 } 90 98 99 100 // -------------------------------------------------------------------------- 101 // 102 //Implemented Daniel Kranich's pointing correction for Mkn421 (2001 data) 103 // 104 105 void MCT1PointingCorrCalc::PointCorr421() 106 { 107 //*fLog << "MCT1PointingCorrCalc::Process; fhourangle = " 108 // << fhourangle << endl; 109 110 Float_t fhourangle = fHourAngle->GetVal(); 111 112 Float_t cx = -0.05132 - 0.001064 * fhourangle 113 - 3.530e-6 * fhourangle * fhourangle; 114 cx /= fMm2Deg; 115 116 Float_t cy = -0.04883 - 0.0003175* fhourangle 117 - 2.165e-5 * fhourangle * fhourangle; 118 cy /= fMm2Deg; 119 120 fSrcPos->SetXY(cx, cy); 121 122 //*fLog << "MCT1PointingCorrCal::Process; fhourangle, cx, cy, fMm2Deg = " 123 // << fhourangle << ", " << cx << ", " << cy << ", " 124 // << fMm2Deg << endl; 125 126 fSrcPos->SetReadyToSave(); 127 return; 128 } 129 130 131 // -------------------------------------------------------------------------- 132 // 133 // NT :Implemente Daniel Kranich's pointing correction for 1ES1959 (2002 data) 134 135 void MCT1PointingCorrCalc::PointCorr1959() 136 { 137 //*fLog << "MCT1PointingCorrCalc::Process; fhourangle = " 138 // << fhourangle << endl; 139 140 Float_t fhourangle = fHourAngle->GetVal(); 141 142 Float_t cx = -0.086 - 0.00091 * fhourangle ; 143 cx /= fMm2Deg; 144 145 Float_t cy = -0.083 - 0.001 * fhourangle ; 146 cy /= fMm2Deg; 147 148 fSrcPos->SetXY(cx, cy); 149 150 //*fLog << "MCT1PointingCorrCal::Process; fhourangle, cx, cy, fMm2Deg = " 151 // << fhourangle << ", " << cx << ", " << cy << ", " 152 // << fMm2Deg << endl; 153 154 fSrcPos->SetReadyToSave(); 155 return; 156 157 } 91 158 // -------------------------------------------------------------------------- 92 159 // 93 160 // Do the pointing correction 94 161 // 95 // the parametrization is for Mkn421 2001 data (Daniel Kranich)96 //97 162 Int_t MCT1PointingCorrCalc::Process() 98 163 { … … 100 165 // (cx, cy) is the source position in the camera [mm] 101 166 // 102 Float_t fhourangle = fHourAngle->GetVal(); 103 104 //*fLog << "MCT1PointingCorrCalc::Process; fhourangle = " 105 // << fhourangle << endl; 106 107 Float_t cx = -0.05132 - 0.001064 * fhourangle 108 - 3.530e-6 * fhourangle * fhourangle; 109 cx /= fMm2Deg; 110 111 Float_t cy = -0.04883 - 0.0003175* fhourangle 112 - 2.165e-5 * fhourangle * fhourangle; 113 cy /= fMm2Deg; 114 115 fSrcPos->SetXY(cx, cy); 116 117 //*fLog << "MCT1PointingCorrCal::Process; fhourangle, cx, cy, fMm2Deg = " 118 // << fhourangle << ", " << cx << ", " << cy << ", " 119 // << fMm2Deg << endl; 120 121 fSrcPos->SetReadyToSave(); 122 167 switch (fPoiSource) 168 { 169 case k421: 170 PointCorr421(); 171 case k1959: 172 PointCorr1959(); 173 } 123 174 return kTRUE; 124 175 } … … 126 177 127 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
Note:
See TracChangeset
for help on using the changeset viewer.