1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Markus Gaug 04/2004 <mailto:markus@ifae.es>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // calibClasses
|
---|
28 | //
|
---|
29 | // This macro draws the scheme found in htmldoc/images/CalibClasses.gif
|
---|
30 | //
|
---|
31 | /////////////////////////////////////////////////////////////////////////////
|
---|
32 |
|
---|
33 | void calibClasses()
|
---|
34 | {
|
---|
35 |
|
---|
36 | const Float_t ell1x1 = 0.3;
|
---|
37 | const Float_t ell2x1 = 0.575;
|
---|
38 | const Float_t ell3x1 = 0.85;
|
---|
39 |
|
---|
40 | const Float_t ellr1 = 0.12;
|
---|
41 | const Float_t ellr2 = 0.035;
|
---|
42 |
|
---|
43 | const Float_t tex1x1 = 0.19;
|
---|
44 | const Float_t tex2x1 = 0.465;
|
---|
45 | const Float_t tex3x1 = 0.74;
|
---|
46 |
|
---|
47 |
|
---|
48 | const Float_t texsize = 0.0257913;
|
---|
49 | const Float_t texsize2 = 0.015;
|
---|
50 |
|
---|
51 | const Float_t arr1x1 = 0.3;
|
---|
52 | const Float_t arr2x1 = 0.575;
|
---|
53 | const Float_t arr3x1 = 0.85;
|
---|
54 |
|
---|
55 | const Float_t arrsize = 0.02;
|
---|
56 |
|
---|
57 | const Float_t pt1x1 = 0.175;
|
---|
58 | const Float_t pt2x1 = 0.45;
|
---|
59 | const Float_t pt3x1 = 0.725;
|
---|
60 |
|
---|
61 | const Float_t pt1x2 = 0.425;
|
---|
62 | const Float_t pt2x2 = 0.7;
|
---|
63 | const Float_t pt3x2 = 0.975;
|
---|
64 |
|
---|
65 |
|
---|
66 | Float_t arry1 = 0.;
|
---|
67 | Float_t arry2 = 0.;
|
---|
68 | Float_t elly1 = 0.;
|
---|
69 | Float_t pty1 = 0.;
|
---|
70 | Float_t pty2 = 0.;
|
---|
71 | Float_t texy1 = 0.;
|
---|
72 |
|
---|
73 | TCanvas *CalibClasses = new TCanvas("CalibClasses", "Calibration Classes",89,96,758,1051);
|
---|
74 | CalibClasses->Range(0,0,1,1);
|
---|
75 | CalibClasses->SetBorderSize(2);
|
---|
76 | CalibClasses->SetFrameFillColor(0);
|
---|
77 |
|
---|
78 | // First line:
|
---|
79 | TPaveText *pt = new TPaveText(0.375,0.895,0.785,0.95,"br");
|
---|
80 | pt->SetFillColor(18);
|
---|
81 | TText *text = pt->AddText("MRawEvtData");
|
---|
82 | pt->Draw();
|
---|
83 | tex = new TLatex(0.55,0.955,"C");
|
---|
84 | tex->SetTextSize(0.05);
|
---|
85 | tex->SetLineWidth(2);
|
---|
86 | tex->Draw();
|
---|
87 | tex = new TLatex(0.12,0.955,"P");
|
---|
88 | tex->SetTextSize(0.05);
|
---|
89 | tex->SetLineWidth(2);
|
---|
90 | tex->Draw();
|
---|
91 |
|
---|
92 | pt = new TPaveText(0.015,0.875,0.25,0.95,"br");
|
---|
93 | pt->SetFillColor(18);
|
---|
94 | text = pt->AddText("MPedestalCam:");
|
---|
95 | text = pt->AddText("ped, RMS, #Deltaped, #DeltaRMS");
|
---|
96 | pt->Draw();
|
---|
97 |
|
---|
98 |
|
---|
99 | // Second line:
|
---|
100 | elly1 = 0.805;
|
---|
101 |
|
---|
102 | TEllipse *ellipse = new TEllipse(ell1x1,elly1,ellr1,ellr2,0,360,0);
|
---|
103 | ellipse->Draw();
|
---|
104 |
|
---|
105 | ellipse = new TEllipse(ell2x1,elly1,ellr1,ellr2,0,360,0);
|
---|
106 | ellipse->Draw();
|
---|
107 |
|
---|
108 | ellipse = new TEllipse(ell3x1,elly1,ellr1,ellr2,0,360,0);
|
---|
109 | ellipse->Draw();
|
---|
110 |
|
---|
111 | texy1 = 0.805;
|
---|
112 |
|
---|
113 | tex = new TLatex(tex1x1,texy1,"MExtractSignal:");
|
---|
114 | tex->SetTextSize(texsize);
|
---|
115 | tex->SetLineWidth(2);
|
---|
116 | tex->Draw();
|
---|
117 |
|
---|
118 | tex = new TLatex(tex2x1,texy1,"MExtractBlindPixel:");
|
---|
119 | tex->SetTextSize(texsize);
|
---|
120 | tex->SetLineWidth(2);
|
---|
121 | tex->Draw();
|
---|
122 | tex = new TLatex(tex3x1,texy1,"MExtractPINDiode:");
|
---|
123 | tex->SetTextSize(texsize);
|
---|
124 | tex->SetLineWidth(2);
|
---|
125 | tex->Draw();
|
---|
126 |
|
---|
127 | texy1 = 0.79;
|
---|
128 |
|
---|
129 | tex = new TLatex(tex1x1+0.02,texy1,"sum FADC slices, error??");
|
---|
130 | tex->SetTextSize(texsize2);
|
---|
131 | tex->SetTextColor(kRed);
|
---|
132 | tex->SetLineWidth(1);
|
---|
133 | tex->Draw();
|
---|
134 |
|
---|
135 | tex = new TLatex(tex2x1+0.02,texy1,"sum FADC slices");
|
---|
136 | tex->SetTextSize(texsize2);
|
---|
137 | tex->SetTextColor(kRed);
|
---|
138 | tex->SetLineWidth(1);
|
---|
139 | tex->Draw();
|
---|
140 | tex = new TLatex(tex3x1+0.02,texy1,"sum FADC slices");
|
---|
141 | tex->SetTextSize(texsize2);
|
---|
142 | tex->SetTextColor(kRed);
|
---|
143 | tex->SetLineWidth(1);
|
---|
144 | tex->Draw();
|
---|
145 |
|
---|
146 |
|
---|
147 | arry1 = 0.89;
|
---|
148 | arry2 = 0.84;
|
---|
149 |
|
---|
150 | TArrow *arrow = new TArrow(0.45, arry1,arr1x1,arry2,arrsize,"|>");
|
---|
151 | arrow->SetFillColor(1);
|
---|
152 | arrow->SetFillStyle(1001);
|
---|
153 | arrow->Draw();
|
---|
154 |
|
---|
155 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
156 | arrow->SetFillColor(1);
|
---|
157 | arrow->SetFillStyle(1001);
|
---|
158 | arrow->Draw();
|
---|
159 |
|
---|
160 | arrow = new TArrow(0.715, arry1,arr3x1,arry2,arrsize,"|>");
|
---|
161 | arrow->SetFillColor(1);
|
---|
162 | arrow->SetFillStyle(1001);
|
---|
163 | arrow->Draw();
|
---|
164 |
|
---|
165 | // Third line:
|
---|
166 | pty1 = 0.67;
|
---|
167 | pty2 = 0.73;
|
---|
168 |
|
---|
169 | pt = new TPaveText(pt1x1,pty1,pt1x2,pty2,"br");
|
---|
170 | pt->SetFillColor(18);
|
---|
171 | text = pt->AddText("MExtractedSignalCam");
|
---|
172 | pt->Draw();
|
---|
173 |
|
---|
174 | pt = new TPaveText(pt2x1,pty1,pt2x2,pty2,"br");
|
---|
175 | pt->SetFillColor(18);
|
---|
176 | text = pt->AddText("MExtractedSignalBlindPixel");
|
---|
177 | pt->Draw();
|
---|
178 |
|
---|
179 | pt = new TPaveText(pt3x1,pty1,pt3x2,pty2,"br");
|
---|
180 | pt->SetFillColor(18);
|
---|
181 | text = pt->AddText("MExtractedSignalPINDiode");
|
---|
182 | pt->Draw();
|
---|
183 |
|
---|
184 | arry1 = 0.77;
|
---|
185 | arry2 = 0.73;
|
---|
186 |
|
---|
187 | arrow = new TArrow(arr1x1,arry1,arr1x1,arry2,arrsize,"|>");
|
---|
188 | arrow->SetFillColor(1);
|
---|
189 | arrow->SetFillStyle(1001);
|
---|
190 | arrow->Draw();
|
---|
191 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
192 | arrow->SetFillColor(1);
|
---|
193 | arrow->SetFillStyle(1001);
|
---|
194 | arrow->Draw();
|
---|
195 | arrow = new TArrow(arr3x1,arry1,arr3x1,arry2,arrsize,"|>");
|
---|
196 | arrow->SetFillColor(1);
|
---|
197 | arrow->SetFillStyle(1001);
|
---|
198 | arrow->Draw();
|
---|
199 |
|
---|
200 |
|
---|
201 | // Fourth line:
|
---|
202 | elly1 = 0.6;
|
---|
203 |
|
---|
204 | TEllipse *ellipse = new TEllipse(ell1x1,elly1,ellr1,ellr2,0,360,0);
|
---|
205 | ellipse->Draw();
|
---|
206 |
|
---|
207 | ellipse = new TEllipse(ell2x1,elly1,ellr1,ellr2,0,360,0);
|
---|
208 | ellipse->Draw();
|
---|
209 |
|
---|
210 | ellipse = new TEllipse(ell3x1,elly1,ellr1,ellr2,0,360,0);
|
---|
211 | ellipse->Draw();
|
---|
212 |
|
---|
213 | texy1 = 0.6;
|
---|
214 |
|
---|
215 | tex = new TLatex(tex1x1,texy1,"MHCalibrationChargeCam:");
|
---|
216 | tex->SetTextSize(texsize2);
|
---|
217 | tex->SetLineWidth(2);
|
---|
218 | tex->Draw();
|
---|
219 | tex = new TLatex(tex2x1,texy1,"MHCalibrationChargeBlindPix:");
|
---|
220 | tex->SetTextSize(texsize2);
|
---|
221 | tex->SetLineWidth(2);
|
---|
222 | tex->Draw();
|
---|
223 | tex = new TLatex(tex3x1,texy1,"MHCalibrationChargePINDiode:");
|
---|
224 | tex->SetTextSize(texsize2);
|
---|
225 | tex->SetLineWidth(2);
|
---|
226 | tex->Draw();
|
---|
227 |
|
---|
228 | texy1 = 0.585;
|
---|
229 |
|
---|
230 | tex = new TLatex(tex1x1+0.01,texy1,"Fit High-, Low-Gain, each pixel");
|
---|
231 | tex->SetTextSize(texsize2);
|
---|
232 | tex->SetTextColor(kRed);
|
---|
233 | tex->SetLineWidth(1);
|
---|
234 | tex->Draw();
|
---|
235 |
|
---|
236 | tex = new TLatex(tex2x1+0.01,texy1,"Fit Single-Phe spectrum");
|
---|
237 | tex->SetTextSize(texsize2);
|
---|
238 | tex->SetTextColor(kRed);
|
---|
239 | tex->SetLineWidth(1);
|
---|
240 | tex->Draw();
|
---|
241 | tex = new TLatex(tex3x1+0.01,texy1,"Fit Charge distribution");
|
---|
242 | tex->SetTextSize(texsize2);
|
---|
243 | tex->SetTextColor(kRed);
|
---|
244 | tex->SetLineWidth(1);
|
---|
245 | tex->Draw();
|
---|
246 |
|
---|
247 |
|
---|
248 |
|
---|
249 |
|
---|
250 | arry1 = 0.67;
|
---|
251 | arry2 = 0.63;
|
---|
252 |
|
---|
253 | arrow = new TArrow(arr1x1,arry1,arr1x1,arry2,arrsize,"|>");
|
---|
254 | arrow->SetFillColor(1);
|
---|
255 | arrow->SetFillStyle(1001);
|
---|
256 | arrow->Draw();
|
---|
257 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
258 | arrow->SetFillColor(1);
|
---|
259 | arrow->SetFillStyle(1001);
|
---|
260 | arrow->Draw();
|
---|
261 | arrow = new TArrow(arr3x1,arry1,arr3x1,arry2,arrsize,"|>");
|
---|
262 | arrow->SetFillColor(1);
|
---|
263 | arrow->SetFillStyle(1001);
|
---|
264 | arrow->Draw();
|
---|
265 |
|
---|
266 | // Fifth line:
|
---|
267 | pty1 = 0.465;
|
---|
268 | pty2 = 0.525;
|
---|
269 |
|
---|
270 | pt = new TPaveText(pt1x1,pty1-0.03,pt1x2,pty2,"br");
|
---|
271 | pt->SetFillColor(18);
|
---|
272 | text = pt->AddText("MCalibrationChargeCam:");
|
---|
273 | pt->Draw();
|
---|
274 | text = pt->AddText("Conv. FADC to Phe's, error");
|
---|
275 | text->SetTextColor(kBlue);
|
---|
276 | pt->Draw();
|
---|
277 | text = pt->AddText("Total F-Factor to Photons");
|
---|
278 | text->SetTextColor(kBlue);
|
---|
279 | pt->Draw();
|
---|
280 |
|
---|
281 | pt = new TPaveText(pt2x1,pty1,pt2x2,pty2,"br");
|
---|
282 | pt->SetFillColor(18);
|
---|
283 | text = pt->AddText("MCalibrationChargeBlindPix");
|
---|
284 | pt->Draw();
|
---|
285 |
|
---|
286 | pt = new TPaveText(pt3x1,pty1,pt3x2,pty2,"br");
|
---|
287 | pt->SetFillColor(18);
|
---|
288 | text = pt->AddText("MCalibrationChargePINDiode");
|
---|
289 | pt->Draw();
|
---|
290 |
|
---|
291 |
|
---|
292 | arry1 = 0.565;
|
---|
293 | arry2 = 0.525;
|
---|
294 |
|
---|
295 | arrow = new TArrow(arr1x1,arry1,arr1x1,arry2,arrsize,"|>");
|
---|
296 | arrow->SetFillColor(1);
|
---|
297 | arrow->SetFillStyle(1001);
|
---|
298 | arrow->Draw();
|
---|
299 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
300 | arrow->SetFillColor(1);
|
---|
301 | arrow->SetFillStyle(1001);
|
---|
302 | arrow->Draw();
|
---|
303 | arrow = new TArrow(arr3x1,arry1,arr3x1,arry2,arrsize,"|>");
|
---|
304 | arrow->SetFillColor(1);
|
---|
305 | arrow->SetFillStyle(1001);
|
---|
306 | arrow->Draw();
|
---|
307 |
|
---|
308 |
|
---|
309 | // Sixth line:
|
---|
310 | Float_t nellx1 = 0.39;
|
---|
311 | elly1 = 0.38;
|
---|
312 |
|
---|
313 | ellipse = new TEllipse(0.57,elly1,0.235,0.04,0,360,0);
|
---|
314 | ellipse->Draw();
|
---|
315 |
|
---|
316 | tex = new TLatex(nellx1,0.38,"MCalibrationChargeCalc:");
|
---|
317 | tex->SetTextSize(0.0328253);
|
---|
318 | tex->SetLineWidth(2);
|
---|
319 | tex->Draw();
|
---|
320 |
|
---|
321 | tex = new TLatex(nellx1+0.02,0.365,"Low Gain Ped., Red. #sigma's, Nr. Phe's, total F-Factor");
|
---|
322 | tex->SetTextSize(texsize2);
|
---|
323 | tex->SetTextColor(kRed);
|
---|
324 | tex->SetLineWidth(1);
|
---|
325 | tex->Draw();
|
---|
326 |
|
---|
327 | tex = new TLatex(nellx1+0.02,0.355,"#gamma-fluxes: F-Factor, BlindPixel, PIN Diode Method");
|
---|
328 | tex->SetTextSize(texsize2);
|
---|
329 | tex->SetTextColor(kRed);
|
---|
330 | tex->SetLineWidth(1);
|
---|
331 | tex->Draw();
|
---|
332 |
|
---|
333 |
|
---|
334 | arry1 = 0.46;
|
---|
335 | arry2 = 0.42;
|
---|
336 |
|
---|
337 | arrow = new TArrow(arr1x1,0.435,arr1x1+0.1,arry2-0.01,arrsize,"|>");
|
---|
338 | arrow->SetFillColor(1);
|
---|
339 | arrow->SetFillStyle(1001);
|
---|
340 | arrow->Draw();
|
---|
341 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
342 | arrow->SetFillColor(1);
|
---|
343 | arrow->SetFillStyle(1001);
|
---|
344 | arrow->Draw();
|
---|
345 | arrow = new TArrow(arr3x1,arry1,arr3x1-0.1,arry2-0.01,arrsize,"|>");
|
---|
346 | arrow->SetFillColor(1);
|
---|
347 | arrow->SetFillStyle(1001);
|
---|
348 | arrow->Draw();
|
---|
349 |
|
---|
350 | Float_t linex1 = 0.135;
|
---|
351 | Float_t liney1 = 0.38;
|
---|
352 |
|
---|
353 | TLine *line = new TLine(linex1,0.87,linex1,liney1);
|
---|
354 | line->Draw();
|
---|
355 |
|
---|
356 | arrow = new TArrow(linex1,liney1,0.335544,liney1,arrsize,"|>");
|
---|
357 | arrow->SetFillColor(1);
|
---|
358 | arrow->SetFillStyle(1001);
|
---|
359 | arrow->Draw();
|
---|
360 |
|
---|
361 | arrow = new TArrow(0.35,0.395,0.24,0.433,arrsize,"|>");
|
---|
362 | arrow->SetFillColor(1);
|
---|
363 | arrow->SetFillStyle(1001);
|
---|
364 | arrow->Draw();
|
---|
365 |
|
---|
366 | // seventh line
|
---|
367 | pt = new TPaveText(0.3,0.215,0.85,0.29,"br");
|
---|
368 | pt->SetFillColor(18);
|
---|
369 | text = pt->AddText("MCalibrationQECam:");
|
---|
370 | pt->Draw();
|
---|
371 | text = pt->AddText("QE: Green, Blue, UV, CT1, av. Cascades(cos#theta), error");
|
---|
372 | text->SetTextColor(kBlue);
|
---|
373 | pt->Draw();
|
---|
374 | text = pt->AddText("QE: F-Factor, Blind Pixel, PIN Diode, Combined Method");
|
---|
375 | text->SetTextColor(kBlue);
|
---|
376 | pt->Draw();
|
---|
377 |
|
---|
378 |
|
---|
379 | arry1 = 0.34;
|
---|
380 | arry2 = 0.3;
|
---|
381 |
|
---|
382 | arrow = new TArrow(arr1x1+0.1,arry1+0.01,arr1x1+0.1,arry2-0.01,arrsize,"|>");
|
---|
383 | arrow->SetFillColor(1);
|
---|
384 | arrow->SetFillStyle(1001);
|
---|
385 | arrow->Draw();
|
---|
386 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2-0.01,arrsize,"|>");
|
---|
387 | arrow->SetFillColor(1);
|
---|
388 | arrow->SetFillStyle(1001);
|
---|
389 | arrow->Draw();
|
---|
390 | arrow = new TArrow(arr3x1-0.1,arry1+0.01,arr3x1-0.1,arry2-0.01,arrsize,"|>");
|
---|
391 | arrow->SetFillColor(1);
|
---|
392 | arrow->SetFillStyle(1001);
|
---|
393 | arrow->Draw();
|
---|
394 |
|
---|
395 | // eightth line:
|
---|
396 |
|
---|
397 | Float_t nellx1 = 0.39;
|
---|
398 | elly1 = 0.13;
|
---|
399 |
|
---|
400 | ellipse = new TEllipse(0.57,elly1,0.235,0.04,0,360,0);
|
---|
401 | ellipse->Draw();
|
---|
402 |
|
---|
403 | tex = new TLatex(nellx1,elly1,"MCalibrate:");
|
---|
404 | tex->SetTextSize(0.0328253);
|
---|
405 | tex->SetLineWidth(2);
|
---|
406 | tex->Draw();
|
---|
407 |
|
---|
408 | tex = new TLatex(nellx1+0.02,elly1-0.01,"Sum FADC slices to Phe's");
|
---|
409 | tex->SetTextSize(texsize2);
|
---|
410 | tex->SetTextColor(kRed);
|
---|
411 | tex->SetLineWidth(1);
|
---|
412 | tex->Draw();
|
---|
413 |
|
---|
414 | tex = new TLatex(nellx1+0.02,elly1-0.02,"Phe's to photons (cos#theta), #Delta(photons)");
|
---|
415 | tex->SetTextSize(texsize2);
|
---|
416 | tex->SetTextColor(kRed);
|
---|
417 | tex->SetLineWidth(1);
|
---|
418 | tex->Draw();
|
---|
419 |
|
---|
420 | arry1 = 0.21;
|
---|
421 | arry2 = 0.17;
|
---|
422 |
|
---|
423 | arrow = new TArrow(arr2x1,arry1,arr2x1,arry2,arrsize,"|>");
|
---|
424 | arrow->SetFillColor(1);
|
---|
425 | arrow->SetFillStyle(1001);
|
---|
426 | arrow->Draw();
|
---|
427 |
|
---|
428 | Float_t linex1 = 0.215;
|
---|
429 | Float_t liney1 = 0.13;
|
---|
430 |
|
---|
431 | TLine *line = new TLine(linex1,0.435,linex1,liney1);
|
---|
432 | line->Draw();
|
---|
433 |
|
---|
434 | arrow = new TArrow(linex1,liney1,0.335544,liney1,arrsize,"|>");
|
---|
435 | arrow->SetFillColor(1);
|
---|
436 | arrow->SetFillStyle(1001);
|
---|
437 | arrow->Draw();
|
---|
438 |
|
---|
439 | CalibClasses->Modified();
|
---|
440 | CalibClasses->cd();
|
---|
441 |
|
---|
442 | CalibClasses->SaveAs("CalibClasses.gif");
|
---|
443 | }
|
---|