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

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