1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Thomas Bretz, 1/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MBadPixelsPix
|
---|
28 | //
|
---|
29 | /////////////////////////////////////////////////////////////////////////////
|
---|
30 | #include "MBadPixelsPix.h"
|
---|
31 |
|
---|
32 | #include "MLog.h"
|
---|
33 | #include "MLogManip.h"
|
---|
34 |
|
---|
35 | ClassImp(MBadPixelsPix);
|
---|
36 |
|
---|
37 | using namespace std;
|
---|
38 |
|
---|
39 | const Char_t MBadPixelsPix::fgRunMask=MBadPixelsPix::kUnsuitableRun;
|
---|
40 | // ------------------------------------------------------------------------
|
---|
41 | //
|
---|
42 | // Initialize Pixel to be Ok.
|
---|
43 | //
|
---|
44 | MBadPixelsPix::MBadPixelsPix(const char* name, const char* title)
|
---|
45 | : fInfo(2)
|
---|
46 | {
|
---|
47 | fName = name ? name : "MBadPixelsPix";
|
---|
48 | fTitle = title ? title : "Container storeing bad pixel information for a single pixel";
|
---|
49 |
|
---|
50 | fInfo[1] = 0;
|
---|
51 | }
|
---|
52 |
|
---|
53 | // ------------------------------------------------------------------------
|
---|
54 | //
|
---|
55 | // Invalidate all bits which are not run-wise. This will be called for
|
---|
56 | // all entries in the parameter list, just before each time the task-list
|
---|
57 | // is executed.
|
---|
58 | //
|
---|
59 | void MBadPixelsPix::Reset()
|
---|
60 | {
|
---|
61 | fInfo[0] &= fgRunMask;
|
---|
62 |
|
---|
63 | }
|
---|
64 |
|
---|
65 | // ------------------------------------------------------------------------
|
---|
66 | //
|
---|
67 | // Invalidate values (set=0 which mean Pixel OK)
|
---|
68 | //
|
---|
69 | void MBadPixelsPix::Clear(Option_t *o)
|
---|
70 | {
|
---|
71 | fInfo.Reset(0);
|
---|
72 | }
|
---|
73 |
|
---|
74 | // ------------------------------------------------------------------------
|
---|
75 | //
|
---|
76 | // Merge (bitwise or) the information in pix into this pixel.
|
---|
77 | //
|
---|
78 | void MBadPixelsPix::Merge(const MBadPixelsPix &pix)
|
---|
79 | {
|
---|
80 | const Int_t n = pix.fInfo.GetSize();
|
---|
81 | if (n>fInfo.GetSize())
|
---|
82 | fInfo.Set(n);
|
---|
83 |
|
---|
84 | for (int i=0; i<n; i++)
|
---|
85 | fInfo[i] |= pix.fInfo[i];
|
---|
86 | }
|
---|
87 |
|
---|
88 | /****************************************************************************
|
---|
89 | This is a collection of possible defects for later use
|
---|
90 | ****************************************************************************/
|
---|
91 |
|
---|
92 | /*
|
---|
93 | 1 PMT defective.
|
---|
94 | 2 Preamplifier defective.
|
---|
95 | 3 Optical link defective.
|
---|
96 | 4 HV cannot be set.
|
---|
97 | 7 HV unstable.
|
---|
98 | 5 HV readout defective.
|
---|
99 | 8 DC unstable.
|
---|
100 | 6 DC readout defective.
|
---|
101 | 9 Discriminator threshold cannot be set.
|
---|
102 | 10 Trigger delay cannot be set.
|
---|
103 | 11 Discriminator gives no output.
|
---|
104 | <-? 12 Pixel out of L1T.
|
---|
105 | 13 FADC defective.
|
---|
106 | 14 FADC board digital information defective.
|
---|
107 | */
|
---|
108 |
|
---|
109 | /*
|
---|
110 | 1 Pixel shows no signal
|
---|
111 | */
|
---|
112 |
|
---|
113 | /*
|
---|
114 | MCalibrationCalc - valid for the result of a calibration run:
|
---|
115 |
|
---|
116 | 3 Hi-Gain saturated, no LoGain available
|
---|
117 |
|
---|
118 | 4 Conversion Factor HiGain - LoGain not valid
|
---|
119 |
|
---|
120 | 5 Cannot be calibrated at all
|
---|
121 | 6 Cannot be fitted - calibrated using Histogram Mean and RMS
|
---|
122 |
|
---|
123 | */
|
---|
124 |
|
---|
125 | /*
|
---|
126 |
|
---|
127 | Hardware defects which cannot be detected automatically by software. This might be stored at least in the data-base. I think we should wait until we implement these things...
|
---|
128 | Preamplifier defective.
|
---|
129 | Optical link defective.
|
---|
130 | HV cannot be set.
|
---|
131 | HV readout defective.
|
---|
132 | DC readout defective.
|
---|
133 | Discriminator threshold cannot be set.
|
---|
134 | Trigger delay cannot be set.
|
---|
135 | Discriminator gives no output.
|
---|
136 | FADC defective.
|
---|
137 | FADC board digital information defective.
|
---|
138 | Pixel out of L1T. (this is an important information, but not necessarily a defect, is it?)
|
---|
139 |
|
---|
140 | In addition here are some cases which I think can be detected by software:
|
---|
141 | - no signal
|
---|
142 | - wrong signal
|
---|
143 | - hv problem
|
---|
144 | - dc problem
|
---|
145 | - Conversion Factor HiGain - LoGain not valid (what does this mean?)
|
---|
146 | - No calibration possible
|
---|
147 | - No fit possible - calibrated using Histogram Mean and RMS
|
---|
148 | - Mean Charge smaller than PedRMS
|
---|
149 | - Sigma Charge smaller than PedRMS
|
---|
150 | - Calib.methods inconsistency (there are in pricipal 6 combinations... do we need 6 bits?)
|
---|
151 | - Gains oscillate (what does it mean?)
|
---|
152 | - Sigma Arrival Time bigger than FADC window (from calib)
|
---|
153 | - Mean Arrival Time at edge of FADC window (from calib)
|
---|
154 | */
|
---|