Changeset 2627 for trunk/MagicSoft/Mars/macros/calibration.C
- Timestamp:
- 12/09/03 18:25:21 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2603 r2627 23 23 \* ======================================================================== */ 24 24 25 void calibration(TString pedname=" ../../Mars-0.8.2/20031102_02399_P_Unavailable_E.root",26 TString calname=" ../../Mars-0.8.2/20031102_02400_D_Flip500Hz_E.root")25 void calibration(TString pedname="/data/MAGIC/rootdata/2003_12_01/20031130_03340_P_CrabNebula_E.root", 26 TString calname="/data/MAGIC/rootdata/2003_12_01/20031130_03341_C_CrabNebula_E.root") 27 27 { 28 28 … … 62 62 tlist.AddToList(&fill); 63 63 64 //MStatusDisplay *d1 = new MStatusDisplay;64 MStatusDisplay *d1 = new MStatusDisplay; 65 65 66 66 // Set update time to 3s 67 //d1->SetUpdateTime(3000);67 d1->SetUpdateTime(3000); 68 68 69 69 // … … 72 72 MEvtLoop evtloop; 73 73 evtloop.SetParList(&plist); 74 //evtloop.SetDisplay(d1);74 evtloop.SetDisplay(d1); 75 75 76 76 // … … 114 114 // we have to set the color of the pulser LED by hand 115 115 // 116 calcalc.SetPulserColor(MCalibrationCalc::kE Blue);116 calcalc.SetPulserColor(MCalibrationCalc::kECT1); 117 117 118 118 tlist2.AddToList(&read2); … … 145 145 cam.Print(); 146 146 147 Int_t pixnr;148 149 while (1)150 {151 152 cout << "Which pixel number do you want to display? (Press 0 to exit)" << endl;153 cin >> pixnr;154 if (pixnr == 0)155 break;156 157 if (pixnr >= 577)158 break;159 160 MCalibrationPix *pix = cam->GetCalibrationPix(pixnr);161 pix->Draw();162 163 }164 165 147 // 166 148 // Here we are confronted to a serious bug in ROOT: … … 174 156 MHCamera &disp0 = *h.GetHistByName(); 175 157 MHCamera disp1 (geomcam, "MCalibrationCam;q", "Fitted Mean Charges"); 176 MHCamera disp2 (geomcam, "MCalibrationCam;errq", "Error of Fitted Mean Charges");158 // MHCamera disp2 (geomcam, "MCalibrationCam;errq", "Error of Fitted Mean Charges"); 177 159 MHCamera disp3 (geomcam, "MCalibrationCam;sigmaq", "Sigma of Fitted Mean Charges"); 178 MHCamera disp4 (geomcam, "MCalibrationCam;errsigmaq", "Error of Sigma of Fitted Mean Charges");160 // MHCamera disp4 (geomcam, "MCalibrationCam;errsigmaq", "Error of Sigma of Fitted Mean Charges"); 179 161 MHCamera disp5 (geomcam, "MCalibrationCam;probq", "Probability of Fit"); 180 162 MHCamera disp6 (geomcam, "MCalibrationCam;t", "Arrival Times"); … … 183 165 MHCamera disp9 (geomcam, "MCalibrationCam;ped", "Pedestals"); 184 166 MHCamera disp10 (geomcam, "MCalibrationCam;pedrms", "Pedestal RMS"); 185 MHCamera disp11 (geomcam, "MCalibrationCam;rq", "Reduced Charges"); 186 MHCamera disp12 (geomcam, "MCalibrationCam;rsigma", "Reduced Sigmas"); 187 MHCamera disp13 (geomcam, "MCalibrationCam;phe", "Nr. of Phe's (F-Factor Method)"); 188 MHCamera disp14 (geomcam, "MCalibrationCam;convphe", "Conversion Factor (F-Factor Method)"); 189 MHCamera disp15 (geomcam, "MCalibrationCam;photons", "Nr. of Photons (Blind Pixel Method)"); 190 MHCamera disp16 (geomcam, "MCalibrationCam;convphot", "Conversion Factor (Blind Pixel Method)"); 167 MHCamera disp11 (geomcam, "MCalibrationCam;rsigma", "Reduced Sigmas"); 168 MHCamera disp12 (geomcam, "MCalibrationCam;phe", "Nr. of Phe's (F-Factor Method)"); 169 MHCamera disp13 (geomcam, "MCalibrationCam;convphe", "Conversion Factor (F-Factor Method)"); 170 MHCamera disp14 (geomcam, "MCalibrationCam;photons", "Nr. of Photons (Blind Pixel Method)"); 171 MHCamera disp15 (geomcam, "MCalibrationCam;convphot", "Conversion Factor (Blind Pixel Method)"); 191 172 192 173 disp1.SetCamContent(*cam, 0); 193 disp2.SetCamContent(*cam, 1); 174 disp1.SetCamError(*cam,1); 175 // disp2.SetCamContent(*cam, 1); 176 194 177 disp3.SetCamContent(*cam, 2); 195 disp4.SetCamContent(*cam, 3); 178 disp3.SetCamError(*cam,3); 179 // disp4.SetCamContent(*cam, 3); 196 180 disp5.SetCamContent(*cam, 4); 181 197 182 disp6.SetCamContent(*cam, 5); 183 disp6.SetCamError(*cam,6); 198 184 disp7.SetCamContent(*cam, 6); 199 185 disp8.SetCamContent(*cam, 7); 186 200 187 disp9.SetCamContent(*cam, 8); 188 disp9.SetCamError(*cam,9); 201 189 disp10.SetCamContent(*cam, 9); 190 202 191 disp11.SetCamContent(*cam, 10); 192 203 193 disp12.SetCamContent(*cam, 11); 204 194 disp13.SetCamContent(*cam, 12); 205 195 disp14.SetCamContent(*cam, 13); 206 196 disp15.SetCamContent(*cam, 14); 207 disp16.SetCamContent(*cam, 15);197 // disp16.SetCamError(*cam, 16); 208 198 209 199 210 200 disp1.SetYTitle("Q [FADC counts]"); 211 disp2.SetYTitle("\\Delta Q [FADC counts]");201 // disp2.SetYTitle("\\Delta Q [FADC counts]"); 212 202 disp3.SetYTitle("\\sigma_{Q} [FADC counts]"); 213 disp4.SetYTitle("\\Delta {\\sigma_{Q}} [FADC counts]");203 // disp4.SetYTitle("\\Delta {\\sigma_{Q}} [FADC counts]"); 214 204 disp5.SetYTitle("P [au]"); 215 205 disp6.SetYTitle("T [FADC slices]"); … … 218 208 disp9.SetYTitle("P [FADC counts/ slice ]"); 219 209 disp10.SetYTitle("RMS_{P} [FADC counts / slice ]"); 220 disp11.SetYTitle("Q [FADC counts]"); 221 disp12.SetYTitle("\\sigma^2_{Q} - RMS^2_{P} [FADC counts^2]"); 222 disp13.SetYTitle("Nr Phe's"); 223 disp14.SetYTitle("Conversion Factor [Phe/FADC count]"); 224 disp15.SetYTitle("Nr Photons"); 225 disp16.SetYTitle("Conversion Factor [Ph/FADC count]"); 210 disp11.SetYTitle("\\sigma^2_{Q} - RMS^2_{P} [FADC counts^2]"); 211 disp12.SetYTitle("Nr Phe's"); 212 disp13.SetYTitle("Conversion Factor [Phe/FADC count]"); 213 disp14.SetYTitle("Nr Photons"); 214 disp15.SetYTitle("Conversion Factor [Ph/FADC count]"); 226 215 227 216 MStatusDisplay *d2 = new MStatusDisplay; … … 230 219 d2->SetUpdateTime(1000); 231 220 232 TCanvas *c1 = &d2->AddTab(" Charges Mean");221 TCanvas *c1 = &d2->AddTab("Fitted Charges"); 233 222 c1->Divide(2, 2); 234 223 … … 238 227 gStyle->SetOptStat(1111); 239 228 obj=disp1.DrawCopy("hist"); 229 ((MHCamera*)obj)->AddNotify(*cam); 240 230 241 231 c1->cd(3); … … 245 235 c1->cd(2); 246 236 gStyle->SetOptStat(1101); 247 obj=disp2.DrawCopy("hist"); 237 obj=disp3.DrawCopy("hist"); 238 ((MHCamera*)obj)->AddNotify(*cam); 248 239 249 240 c1->cd(4); … … 251 242 obj->Draw(); 252 243 253 TCanvas *c11 = &d2->AddTab("Charges Sigma");254 c11->Divide(2, 2);255 256 c11->cd(1);257 gStyle->SetOptStat(1101);258 obj=disp3.DrawCopy("hist");259 260 c11->cd(3);261 gPad->SetBorderMode(0);262 obj->Draw();263 264 c11->cd(2);265 gStyle->SetOptStat(1101);266 obj=disp4.DrawCopy("hist");267 268 c11->cd(4);269 gPad->SetBorderMode(0);270 obj->Draw();271 272 244 273 245 TCanvas *c12 = &d2->AddTab("Fit Prob."); … … 277 249 gStyle->SetOptStat(1101); 278 250 obj=disp5.DrawCopy("hist"); 251 ((MHCamera*)obj)->AddNotify(*cam); 279 252 280 253 c12->cd(2); … … 288 261 gStyle->SetOptStat(1111); 289 262 obj=disp6.DrawCopy("hist"); 263 ((MHCamera*)obj)->AddNotify(*cam); 290 264 291 265 c2->cd(4); … … 295 269 gStyle->SetOptStat(1101); 296 270 obj=disp7.DrawCopy("hist"); 271 ((MHCamera*)obj)->AddNotify(*cam); 297 272 298 273 c2->cd(5); … … 302 277 gStyle->SetOptStat(1101); 303 278 obj=disp8.DrawCopy("hist"); 279 ((MHCamera*)obj)->AddNotify(*cam); 304 280 305 281 c2->cd(6); … … 312 288 gStyle->SetOptStat(1111); 313 289 obj=disp9.DrawCopy("hist"); 290 ((MHCamera*)obj)->AddNotify(*cam); 314 291 315 292 c3->cd(3); … … 319 296 gStyle->SetOptStat(1111); 320 297 obj=disp10.DrawCopy("hist"); 298 ((MHCamera*)obj)->AddNotify(*cam); 321 299 322 300 c3->cd(4); … … 324 302 325 303 TCanvas *c4 = &d2->AddTab("Reduced Charges"); 326 c4->Divide(2, 2);304 c4->Divide(2,1); 327 305 328 306 c4->cd(1); 329 307 gStyle->SetOptStat(1111); 330 308 obj=disp11.DrawCopy("hist"); 309 ((MHCamera*)obj)->AddNotify(*cam); 331 310 332 311 c4->cd(3); 333 obj->Draw();334 335 c4->cd(2);336 gStyle->SetOptStat(1101);337 obj=disp12.DrawCopy("hist");338 339 c4->cd(4);340 312 obj->Draw(); 341 313 … … 345 317 c5->cd(1); 346 318 gStyle->SetOptStat(1111); 319 obj=disp12.DrawCopy("hist"); 320 ((MHCamera*)obj)->AddNotify(*cam); 321 322 c5->cd(3); 323 obj->Draw(); 324 325 c5->cd(2); 326 gStyle->SetOptStat(1101); 347 327 obj=disp13.DrawCopy("hist"); 348 349 c5->cd(3); 350 obj->Draw(); 351 352 c5->cd(2); 353 gStyle->SetOptStat(1101); 354 obj=disp14.DrawCopy("hist"); 328 ((MHCamera*)obj)->AddNotify(*cam); 355 329 356 330 c5->cd(4); … … 362 336 c6->cd(1); 363 337 gStyle->SetOptStat(1111); 338 obj=disp14.DrawCopy("hist"); 339 ((MHCamera*)obj)->AddNotify(*cam); 340 341 c6->cd(3); 342 obj->Draw(); 343 344 c6->cd(2); 345 gStyle->SetOptStat(1101); 364 346 obj=disp15.DrawCopy("hist"); 365 366 c6->cd(3); 367 obj->Draw(); 368 369 c6->cd(2); 370 gStyle->SetOptStat(1101); 371 obj=disp16.DrawCopy("hist"); 347 ((MHCamera*)obj)->AddNotify(*cam); 372 348 373 349 c6->cd(4); 374 350 obj->Draw(); 375 351 376 377 #endif378 379 352 } 380 353
Note:
See TracChangeset
for help on using the changeset viewer.