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

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