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

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