source: trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc@ 4693

Last change on this file since 4693 was 4205, checked in by gaug, 20 years ago
*** empty log message ***
File size: 25.9 KB
Line 
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!
19! Author(s): Markus Gaug 02/2004 <mailto:markus@ifae.es>
20!
21! Copyright: MAGIC Software Development, 2000-2004
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MCalibrationQECam
29//
30// Storage container for the calibrated Quantum Efficiency of the whole camera.
31//
32// For a complete description of the quantum efficiency calibration process,
33// see MCalibrationQEPix.
34//
35// Individual pixels have to be cast when retrieved e.g.:
36// MCalibrationQEPix &avpix = (MCalibrationQEPix&)(*fQECam)[i]
37//
38// Averaged values over one whole area index (e.g. inner or outer pixels for
39// the MAGIC camera), can be retrieved via:
40// MCalibrationQEPix &avpix = (MCalibrationQEPix&)fQECam->GetAverageArea(i)
41//
42// Averaged values over one whole camera sector can be retrieved via:
43// MCalibrationQEPix &avpix = (MCalibrationQEPix&)fQECam->GetAverageSector(i)
44//
45// The following "calibration" constants are used for the calibration of each pixel:
46//
47// - MCalibrationQEPix::GetQECascadesBlindPixel(): The mean quantum efficiency folded
48// into a cascades spectrum obtained with the Blind Pixel Method.
49// - MCalibrationQEPix::GetQECascadesFFactor(): The mean quantum efficiency folded
50// into a cascades spectrum obtained with the F-Factor Method
51// - MCalibrationQEPix::GetQECascadesPINDiode(): The mean quantum efficiency folded
52// into a cascades spectrum obtained with the PIN Diode Method
53// - MCalibrationQEPix::GetQECascadesCombined(): The mean quantum efficiency folded
54// into a cascades spectrum obtained with the combination of the three methods
55//
56// The following "calibration" constants have been measured to obtain the above values:
57//
58// - MCalibrationQEPix::GetQEBlindPixel( MCalibrationCam::PulserColor_t color ):
59// The mean quantum efficiency obtained with the calibration pulser color
60// (e.g. kGREEN, kBLUE, kUV, kCT1) after the Blind Pixel Method
61// - MCalibrationQEPix::GetQEFFactor( MCalibrationCam::PulserColor_t color ):
62// The mean quantum efficiency obtained with the calibration pulser color
63// (e.g. kGREEN, kBLUE, kUV, kCT1) after the F-Factor Method
64// - MCalibrationQEPix::GetQEPINDiode( MCalibrationCam::PulserColor_t color ):
65// The mean quantum efficiency obtained with the calibration pulser color
66// (e.g. kGREEN, kBLUE, kUV, kCT1) after the PIN Diode Method
67// - MCalibrationQEPix::GetQECombined( MCalibrationCam::PulserColor_t color ):
68// The mean quantum efficiency obtained with the calibration pulser color
69// (e.g. kGREEN, kBLUE, kUV, kCT1) after the combination of the three methods
70//
71// See also: MCalibrationQEPix, MCalibrationChargeCam, MCalibrationChargeCalc
72// MCalibrationChargeBlindPix, MCalibrationChargePINDiode, MCalibrationChargePix
73//
74/////////////////////////////////////////////////////////////////////////////
75#include "MCalibrationQECam.h"
76#include "MCalibrationCam.h"
77
78#include <TClonesArray.h>
79
80#include "MLog.h"
81#include "MLogManip.h"
82
83#include "MCalibrationQEPix.h"
84
85ClassImp(MCalibrationQECam);
86
87using namespace std;
88
89const Float_t MCalibrationQECam::gkPlexiglassQE = 0.96;
90const Float_t MCalibrationQECam::gkPlexiglassQEErr = 0.01;
91// --------------------------------------------------------------------------
92//
93// Default constructor.
94//
95// Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
96// to hold one container per pixel. Later, a call to MCalibrationQECam::InitSize()
97// has to be performed (in MGeomApply).
98//
99// Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
100// to hold one container per pixel AREA. Later, a call to MCalibrationQECam::InitAreas()
101// has to be performed (in MGeomApply).
102//
103// Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
104// to hold one container per camera SECTOR. Later, a call to MCalibrationQECam::InitSectors()
105// has to be performed (in MGeomApply).
106//
107MCalibrationQECam::MCalibrationQECam(const char *name, const char *title)
108{
109 fName = name ? name : "MCalibrationQECam";
110 fTitle = title ? title : "Storage container for the calibrated Quantrum Efficiency of the camera";
111
112 fPixels = new TClonesArray("MCalibrationQEPix",1);
113 fAverageAreas = new TClonesArray("MCalibrationQEPix",1);
114 fAverageSectors = new TClonesArray("MCalibrationQEPix",1);
115
116 fFlags.Set(MCalibrationCam::gkNumPulserColors);
117
118 Clear();
119}
120
121// ------------------------------------------------------------------------
122//
123// Sets all bits to kFALSE
124//
125// Calls:
126// - MCalibrationCam::Clear()
127//
128void MCalibrationQECam::Clear(Option_t *o)
129{
130
131 SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kGREEN);
132 SetFFactorMethodValid ( kFALSE, MCalibrationCam::kGREEN);
133 SetCombinedMethodValid ( kFALSE, MCalibrationCam::kGREEN);
134 SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kGREEN);
135 SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kBLUE);
136 SetFFactorMethodValid ( kFALSE, MCalibrationCam::kBLUE);
137 SetCombinedMethodValid ( kFALSE, MCalibrationCam::kBLUE);
138 SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kBLUE);
139 SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kUV);
140 SetFFactorMethodValid ( kFALSE, MCalibrationCam::kUV);
141 SetCombinedMethodValid ( kFALSE, MCalibrationCam::kUV);
142 SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kUV);
143 SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kCT1);
144 SetFFactorMethodValid ( kFALSE, MCalibrationCam::kCT1);
145 SetCombinedMethodValid ( kFALSE, MCalibrationCam::kCT1);
146 SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kCT1);
147
148 MCalibrationCam::Clear();
149}
150
151
152// --------------------------------------------------------------------------
153//
154// Not yet implemented
155//
156void MCalibrationQECam::DrawPixelContent(Int_t idx) const
157{
158 return;
159}
160
161// --------------------------------------------------------------------
162//
163// Types used by MCalibrate and MCalibrateData:
164// ============================================
165//
166// 0: Mean Quantum Efficiency for cascades, obtained with the F-Factor method
167// 1: Error of the Mean QE for cascades, obtained with the F-Factor method
168// 2: Mean Quantum Efficiency for cascades, obtained with the Blind Pixel method
169// 3: Error of the Mean QE for cascades, obtained with the Blind Pixel method
170// 4: Mean Quantum Efficiency for cascades, obtained with the PIN Diode method
171// 5: Error of the Mean QE for cascades, obtained with the PIN Diode method
172// 6: Mean Quantum Efficiency for cascades, obtained with combination of the 3 methods
173// 7: Error of the Mean QE for cascades, obtained with combination of the 3 methods
174// 8: Availabiliy of Quantum Efficiency for cascades, F-Factor method
175// 9: Availabiliy of Quantum Efficiency for cascades, F-Factor method
176// 10: Availabiliy of Quantum Efficiency for cascades, F-Factor method
177// 11: Availabiliy of Quantum Efficiency for cascades, F-Factor method
178//
179// Types filled by MCalibrationChargeCalc in combination of MCalibrationChargePix:
180// ===============================================================================
181//
182// 12: Mean Quantum Efficiency obtained with F-Factor Method ( color: kCT1)
183// 13: Error of the Mean QE obtained with F-Factor Method ( color: kCT1)
184// 14: Mean Quantum Efficiency obtained with F-Factor Method ( color: kGREEN)
185// 15: Error of the Mean QE obtained with F-Factor Method ( color: kGREEN)
186// 16: Mean Quantum Efficiency obtained with F-Factor Method ( color: kBLUE)
187// 17: Error of the Mean QE obtained with F-Factor Method ( color: kBLUE)
188// 18: Mean Quantum Efficiency obtained with F-Factor Method ( color: kUV)
189// 19: Error of the Mean QE obtained with F-Factor Method ( color: kUV)
190//
191// Types filled by MCalibrationChargeCalc in combination of MCalibrationChargeBlindPix:
192// ====================================================================================
193//
194// 20: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kCT1)
195// 21: Error of the Mean QE obtained with Blind Pixel Method ( color: kCT1)
196// 22: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kGREEN)
197// 23: Error of the Mean QE obtained with Blind Pixel Method ( color: kGREEN)
198// 24: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kBLUE)
199// 25: Error of the Mean QE obtained with Blind Pixel Method ( color: kBLUE)
200// 26: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kUV)
201// 27: Error of the Mean QE obtained with Blind Pixel Method ( color: kUV)
202//
203// Types filled by MCalibrationChargeCalc in combination of MCalibrationChargePINDiode:
204// ====================================================================================
205//
206// 28: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kCT1)
207// 29: Error of the Mean QE obtained with PIN Diode Method ( color: kCT1)
208// 30: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kGREEN)
209// 31: Error of the Mean QE obtained with PIN Diode Method ( color: kGREEN)
210// 32: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kBLUE)
211// 33: Error of the Mean QE obtained with PIN Diode Method ( color: kBLUE)
212// 34: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kUV)
213// 35: Error of the Mean QE obtained with PIN Diode Method ( color: kUV)
214//
215// Types filled by MCalibrationChargeCalc in combination of MCalibrationQEPix:
216// ===========================================================================
217//
218// 36: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kCT1)
219// 37: Error of the Mean QE obtained with combination of 3 methods ( color: kCT1)
220// 38: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kGREEN)
221// 39: Error of the Mean QE obtained with combination of 3 methods ( color: kGREEN)
222// 40: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kBLUE)
223// 41: Error of the Mean QE obtained with combination of 3 methods ( color: kBLUE)
224// 42: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kUV)
225// 43: Error of the Mean QE obtained with combination of 3 methods ( color: kUV)
226//
227Bool_t MCalibrationQECam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
228{
229
230 if (idx > GetSize())
231 return kFALSE;
232
233 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[idx];
234
235 if (pix.IsExcluded())
236 return kFALSE;
237
238 switch (type)
239 {
240 case 0:
241 if (!pix.IsAverageQEFFactorAvailable())
242 return kFALSE;
243 val = pix.GetQECascadesFFactor();
244 break;
245 case 1:
246 if (!pix.IsAverageQEFFactorAvailable())
247 return kFALSE;
248 val = pix.GetQECascadesFFactorErr();
249 break;
250 case 2:
251 if (!pix.IsAverageQEBlindPixelAvailable())
252 return kFALSE;
253 val = pix.GetQECascadesBlindPixel();
254 break;
255 case 3:
256 if (!pix.IsAverageQEBlindPixelAvailable())
257 return kFALSE;
258 val = pix.GetQECascadesBlindPixelErr();
259 break;
260 case 4:
261 if (!pix.IsAverageQEPINDiodeAvailable())
262 return kFALSE;
263 val = pix.GetQECascadesPINDiode();
264 break;
265 case 5:
266 if (!pix.IsAverageQEPINDiodeAvailable())
267 return kFALSE;
268 val = pix.GetQECascadesPINDiodeErr();
269 break;
270 case 6:
271 if (!pix.IsAverageQECombinedAvailable())
272 return kFALSE;
273 val = pix.GetQECascadesCombined();
274 break;
275 case 7:
276 if (!pix.IsAverageQECombinedAvailable())
277 return kFALSE;
278 val = pix.GetQECascadesCombinedErr();
279 break;
280 case 8:
281 if (pix.IsAverageQEFFactorAvailable())
282 val = 1;
283 else
284 return kFALSE;
285 break;
286 case 9:
287 if (pix.IsAverageQEBlindPixelAvailable())
288 val = 1;
289 else
290 return kFALSE;
291 break;
292 case 10:
293 if (pix.IsAverageQEPINDiodeAvailable())
294 val = 1;
295 else
296 return kFALSE;
297 break;
298 case 11:
299 if (pix.IsAverageQECombinedAvailable())
300 val = 1;
301 else
302 return kFALSE;
303 break;
304 case 12:
305 val = pix.GetQEFFactor(kCT1);
306 break;
307 case 13:
308 val = pix.GetQEFFactorErr(kCT1);
309 break;
310 case 14:
311 val = pix.GetQEFFactor(kGREEN);
312 break;
313 case 15:
314 val = pix.GetQEFFactorErr(kGREEN);
315 break;
316 case 16:
317 val = pix.GetQEFFactor(kBLUE);
318 break;
319 case 17:
320 val = pix.GetQEFFactorErr(kBLUE);
321 break;
322 case 18:
323 val = pix.GetQEFFactor(kUV);
324 break;
325 case 19:
326 val = pix.GetQEFFactorErr(kUV);
327 break;
328 case 20:
329 val = pix.GetQEBlindPixel(kCT1);
330 break;
331 case 21:
332 val = pix.GetQEBlindPixelErr(kCT1);
333 break;
334 case 22:
335 val = pix.GetQEBlindPixel(kGREEN);
336 break;
337 case 23:
338 val = pix.GetQEBlindPixelErr(kGREEN);
339 break;
340 case 24:
341 val = pix.GetQEBlindPixel(kBLUE);
342 break;
343 case 25:
344 val = pix.GetQEBlindPixelErr(kBLUE);
345 break;
346 case 26:
347 val = pix.GetQEBlindPixel(kUV);
348 break;
349 case 27:
350 val = pix.GetQEBlindPixelErr(kUV);
351 break;
352 case 28:
353 val = pix.GetQEPINDiode(kCT1);
354 break;
355 case 29:
356 val = pix.GetQEPINDiodeErr(kCT1);
357 break;
358 case 30:
359 val = pix.GetQEPINDiode(kGREEN);
360 break;
361 case 31:
362 val = pix.GetQEPINDiodeErr(kGREEN);
363 break;
364 case 32:
365 val = pix.GetQEPINDiode(kBLUE);
366 break;
367 case 33:
368 val = pix.GetQEPINDiodeErr(kBLUE);
369 break;
370 case 34:
371 val = pix.GetQEPINDiode(kUV);
372 break;
373 case 35:
374 val = pix.GetQEPINDiodeErr(kUV);
375 break;
376 case 36:
377 val = pix.GetQECombined(kCT1);
378 break;
379 case 37:
380 val = pix.GetQECombinedErr(kCT1);
381 break;
382 case 38:
383 val = pix.GetQECombined(kGREEN);
384 break;
385 case 39:
386 val = pix.GetQECombinedErr(kGREEN);
387 break;
388 case 40:
389 val = pix.GetQECombined(kBLUE);
390 break;
391 case 41:
392 val = pix.GetQECombinedErr(kBLUE);
393 break;
394 case 42:
395 val = pix.GetQECombined(kUV);
396 break;
397 case 43:
398 val = pix.GetQECombinedErr(kUV);
399 break;
400 default:
401 return kFALSE;
402 }
403 return val!=-1.;
404}
405
406// --------------------------------------------------------------------------
407//
408// Return -1 if gkPlexiglassQEErr is smaller than 0.
409// Return -1 if gkPlexiglassQE is 0.
410// Return gkPlexiglassQEErr^2 / gkPlexiglassQE^2
411//
412Float_t MCalibrationQECam::GetPlexiglassQERelVar() const
413{
414 if (gkPlexiglassQEErr < 0.)
415 return -1.;
416
417 if (gkPlexiglassQE == 0.)
418 return -1.;
419
420 return gkPlexiglassQEErr * gkPlexiglassQEErr / gkPlexiglassQE / gkPlexiglassQE ;
421}
422
423
424// --------------------------------------------------------------------------------
425//
426// Returns kTRUE if ANY of the four colours have the bit kBlindPixelMethodValid set,
427// otherwise kFALSE
428//
429Bool_t MCalibrationQECam::IsBlindPixelMethodValid () const
430{
431 if (IsBlindPixelMethodValid (MCalibrationCam::kGREEN))
432 return kTRUE;
433 if (IsBlindPixelMethodValid (MCalibrationCam::kBLUE ))
434 return kTRUE;
435 if (IsBlindPixelMethodValid (MCalibrationCam::kUV ))
436 return kTRUE;
437 if (IsBlindPixelMethodValid (MCalibrationCam::kCT1 ))
438 return kTRUE;
439
440 return kFALSE;
441}
442
443// --------------------------------------------------------------------------------
444//
445// Returns kTRUE if ANY of the four colours have the bit kCombinedMethodValid set,
446// otherwise kFALSE
447//
448Bool_t MCalibrationQECam::IsCombinedMethodValid () const
449{
450 if (IsCombinedMethodValid (MCalibrationCam::kGREEN))
451 return kTRUE;
452 if (IsCombinedMethodValid (MCalibrationCam::kBLUE ))
453 return kTRUE;
454 if (IsCombinedMethodValid (MCalibrationCam::kUV ))
455 return kTRUE;
456 if (IsCombinedMethodValid (MCalibrationCam::kCT1 ))
457 return kTRUE;
458
459 return kFALSE;
460}
461
462// --------------------------------------------------------------------------------
463//
464// Returns kTRUE if ANY of the four colours have the bit kFFactorMethodValid set,
465// otherwise kFALSE
466//
467Bool_t MCalibrationQECam::IsFFactorMethodValid () const
468{
469 if (IsFFactorMethodValid (MCalibrationCam::kGREEN))
470 return kTRUE;
471 if (IsFFactorMethodValid (MCalibrationCam::kBLUE ))
472 return kTRUE;
473 if (IsFFactorMethodValid (MCalibrationCam::kUV ))
474 return kTRUE;
475 if (IsFFactorMethodValid (MCalibrationCam::kCT1 ))
476 return kTRUE;
477
478 return kFALSE;
479}
480
481
482// --------------------------------------------------------------------------------
483//
484// Returns kTRUE if ANY of the four colours have the bit kPINDiodeMethodValid set,
485// otherwise kFALSE
486//
487Bool_t MCalibrationQECam::IsPINDiodeMethodValid () const
488{
489 if (IsPINDiodeMethodValid (MCalibrationCam::kGREEN))
490 return kTRUE;
491 if (IsPINDiodeMethodValid (MCalibrationCam::kBLUE ))
492 return kTRUE;
493 if (IsPINDiodeMethodValid (MCalibrationCam::kUV ))
494 return kTRUE;
495 if (IsPINDiodeMethodValid (MCalibrationCam::kCT1 ))
496 return kTRUE;
497
498 return kFALSE;
499}
500
501// --------------------------------------------------------------------------------
502//
503// Returns kTRUE if ANY of the bit kBlindPixelMethodValid is set for colour "col"
504// otherwise kFALSE
505//
506Bool_t MCalibrationQECam::IsBlindPixelMethodValid (MCalibrationCam::PulserColor_t col) const
507{
508 return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
509}
510
511// --------------------------------------------------------------------------------
512//
513// Returns kTRUE if ANY of the bit kCombinedMethodValid is set for colour "col"
514// otherwise kFALSE
515//
516Bool_t MCalibrationQECam::IsCombinedMethodValid (MCalibrationCam::PulserColor_t col) const
517{
518 return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
519}
520
521// --------------------------------------------------------------------------------
522//
523// Returns kTRUE if ANY of the bit kFFactorMethodValid is set for colour "col"
524// otherwise kFALSE
525//
526Bool_t MCalibrationQECam::IsFFactorMethodValid (MCalibrationCam::PulserColor_t col) const
527{
528 return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
529}
530
531// --------------------------------------------------------------------------------
532//
533// Returns kTRUE if ANY of the bit kPINDiodeMethodValid is set for colour "col"
534// otherwise kFALSE
535//
536Bool_t MCalibrationQECam::IsPINDiodeMethodValid (MCalibrationCam::PulserColor_t col) const
537{
538 return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
539}
540
541// --------------------------------------------------------------------------
542//
543// Print the
544// - MCalibrationQEPix::GetQECascadesFFactor()
545// - MCalibrationQEPix::GetQECascadesBlindPixel()
546// - MCalibrationQEPix::GetQECascadesPINDiode()
547// - MCalibrationQEPix::GetQECascadesCombined()
548// for all pixels
549//
550void MCalibrationQECam::Print(Option_t *o) const
551{
552
553 *fLog << all << GetDescriptor() << ":" << endl;
554 int id = 0;
555
556 *fLog << all << endl;
557 *fLog << all << "Quantum Efficiencies averaged over cascades spectra, measured with F-Factor method:" << endl;
558 *fLog << all << endl;
559
560 TIter Next(fPixels);
561 MCalibrationQEPix *pix;
562 while ((pix=(MCalibrationQEPix*)Next()))
563 {
564
565 if (!pix->IsExcluded() && pix->IsAverageQEFFactorAvailable())
566 {
567 *fLog << all
568 << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
569 ": QE: ",pix->GetQECascadesFFactor()," +- ",pix->GetQECascadesFFactorErr())
570 << endl;
571 id++;
572 }
573 }
574
575 *fLog << all << id << " succesful pixels :-))" << endl;
576 id = 0;
577
578 *fLog << all << endl;
579 *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
580 << "measured with Blind Pixel method:" << endl;
581 *fLog << all << endl;
582
583 TIter Next2(fPixels);
584 while ((pix=(MCalibrationQEPix*)Next2()))
585 {
586
587 if (!pix->IsExcluded() && pix->IsAverageQEBlindPixelAvailable())
588 {
589 *fLog << all
590 << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
591 ": QE: ",pix->GetQECascadesBlindPixel()," +- ",pix->GetQECascadesBlindPixelErr())
592 << endl;
593 id++;
594 }
595 }
596
597 *fLog << all << id << " succesful pixels :-))" << endl;
598 id = 0;
599
600 *fLog << all << endl;
601 *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
602 << "measured with PIN Diode method:" << endl;
603 *fLog << all << endl;
604
605 TIter Next3(fPixels);
606 while ((pix=(MCalibrationQEPix*)Next3()))
607 {
608
609 if (!pix->IsExcluded() && pix->IsAverageQEPINDiodeAvailable())
610 {
611 *fLog << all
612 << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
613 ": QE: ",pix->GetQECascadesPINDiode()," +- ",pix->GetQECascadesPINDiodeErr())
614 << endl;
615 id++;
616 }
617 }
618
619 *fLog << all << id << " succesful pixels :-))" << endl;
620 id = 0;
621
622
623 *fLog << all << endl;
624 *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
625 << "measured with combination of the 3 methods:" << endl;
626 *fLog << all << endl;
627
628 TIter Next4(fPixels);
629 while ((pix=(MCalibrationQEPix*)Next4()))
630 {
631
632 if (!pix->IsExcluded() && pix->IsAverageQECombinedAvailable())
633 {
634 *fLog << all
635 << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
636 ": QE: ",pix->GetQECascadesCombined()," +- ",pix->GetQECascadesCombinedErr())
637 << endl;
638 id++;
639 }
640 }
641
642 *fLog << all << id << " succesful pixels :-))" << endl;
643 id = 0;
644
645 *fLog << all << endl;
646 *fLog << all << "Excluded pixels:" << endl;
647 *fLog << all << endl;
648
649 TIter Next5(fPixels);
650 while ((pix=(MCalibrationQEPix*)Next5()))
651 {
652 if (pix->IsExcluded())
653 {
654 *fLog << all << pix->GetPixId() << endl;
655 id++;
656 }
657 }
658 *fLog << all << id << " Excluded pixels " << endl;
659}
660
661
662// --------------------------------------------------------------------------
663//
664// Sets the validity flag (according to b) for the Blind Pixel Method,
665// for all colours (kGREEN, kBLUE, kUV, kCT1)
666//
667void MCalibrationQECam::SetBlindPixelMethodValid ( const Bool_t b )
668{
669 SetBlindPixelMethodValid ( b, MCalibrationCam::kGREEN);
670 SetBlindPixelMethodValid ( b, MCalibrationCam::kBLUE );
671 SetBlindPixelMethodValid ( b, MCalibrationCam::kUV );
672 SetBlindPixelMethodValid ( b, MCalibrationCam::kCT1 );
673}
674
675// ----------------------------------------------------------------------------
676//
677// Sets the validity flag (according to b) for the combination of the 3 methods
678// for all colours (kGREEN, kBLUE, kUV, kCT1)
679//
680void MCalibrationQECam::SetCombinedMethodValid ( const Bool_t b )
681{
682 SetCombinedMethodValid ( b, MCalibrationCam::kGREEN);
683 SetCombinedMethodValid ( b, MCalibrationCam::kBLUE );
684 SetCombinedMethodValid ( b, MCalibrationCam::kUV );
685 SetCombinedMethodValid ( b, MCalibrationCam::kCT1 );
686}
687
688// --------------------------------------------------------------------------
689//
690// Sets the validity flag (according to b) for the F-Factor Method
691// for all colours (kGREEN, kBLUE, kUV, kCT1)
692//
693void MCalibrationQECam::SetFFactorMethodValid ( const Bool_t b )
694{
695 SetFFactorMethodValid ( b, MCalibrationCam::kGREEN);
696 SetFFactorMethodValid ( b, MCalibrationCam::kBLUE );
697 SetFFactorMethodValid ( b, MCalibrationCam::kUV );
698 SetFFactorMethodValid ( b, MCalibrationCam::kCT1 );
699}
700
701// --------------------------------------------------------------------------
702//
703// Sets the validity flag (according to b) for the PIN Diode Method,
704// for all colours (kGREEN, kBLUE, kUV, kCT1)
705//
706void MCalibrationQECam::SetPINDiodeMethodValid ( const Bool_t b )
707{
708 SetPINDiodeMethodValid ( b, MCalibrationCam::kGREEN);
709 SetPINDiodeMethodValid ( b, MCalibrationCam::kBLUE );
710 SetPINDiodeMethodValid ( b, MCalibrationCam::kUV );
711 SetPINDiodeMethodValid ( b, MCalibrationCam::kCT1 );
712}
713
714// --------------------------------------------------------------------------
715//
716// Sets the validity flag (according to b) for the Blind Pixel Method,
717// for colour "col"
718//
719void MCalibrationQECam::SetBlindPixelMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
720{
721 if (b)
722 SETBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
723 else
724 CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
725}
726
727// --------------------------------------------------------------------------
728//
729// Sets the validity flag (according to b) for the combination of 3 methods
730// for colour "col"
731//
732void MCalibrationQECam::SetCombinedMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
733{
734 if (b)
735 SETBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
736 else
737 CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
738}
739
740// --------------------------------------------------------------------------
741//
742// Sets the validity flag (according to b) for the F-Factor Method,
743// for colour "col"
744//
745void MCalibrationQECam::SetFFactorMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
746{
747 if (b)
748 SETBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
749 else
750 CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
751}
752
753// --------------------------------------------------------------------------
754//
755// Sets the validity flag (according to b) for the PIN Diode Method,
756// for colour "col"
757//
758void MCalibrationQECam::SetPINDiodeMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
759{
760 if (b)
761 SETBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
762 else
763 CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
764}
765
766
767
768
769
770
771
772
Note: See TracBrowser for help on using the repository browser.