source: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.cc@ 3392

Last change on this file since 3392 was 3068, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 5.1 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! 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
35ClassImp(MBadPixelsPix);
36
37using namespace std;
38
39const Char_t MBadPixelsPix::fgRunMask=MBadPixelsPix::kUnsuitableRun;
40
41// ------------------------------------------------------------------------
42//
43// Initialize Pixel to be Ok.
44//
45MBadPixelsPix::MBadPixelsPix(const char* name, const char* title)
46 : fInfo(0)
47{
48 fName = name ? name : "MBadPixelsPix";
49 fTitle = title ? title : "Container storeing bad pixel information for a single pixel";
50}
51
52// ------------------------------------------------------------------------
53//
54// Invalidate all bits which are not run-wise. This will be called for
55// all entries in the parameter list, just before each time the task-list
56// is executed.
57//
58void MBadPixelsPix::Reset()
59{
60 fInfo[0] &= fgRunMask;
61}
62
63// ------------------------------------------------------------------------
64//
65// Invalidate values (set=0 which mean Pixel OK)
66//
67void MBadPixelsPix::Clear(Option_t *o)
68{
69 fInfo.Reset(0);
70}
71
72// ------------------------------------------------------------------------
73//
74// Merge (bitwise or) the information in pix into this pixel.
75//
76void MBadPixelsPix::Merge(const MBadPixelsPix &pix)
77{
78 const Int_t n = pix.fInfo.GetSize();
79 if (n>fInfo.GetSize())
80 fInfo.Set(n);
81
82 for (int i=0; i<n; i++)
83 fInfo[i] |= pix.fInfo[n];
84}
85
86/****************************************************************************
87 This is a collection of possible defects for later use
88 ****************************************************************************/
89
90/*
91 1 PMT defective.
92 2 Preamplifier defective.
93 3 Optical link defective.
94 4 HV cannot be set.
95 7 HV unstable.
96 5 HV readout defective.
97 8 DC unstable.
98 6 DC readout defective.
99 9 Discriminator threshold cannot be set.
100 10 Trigger delay cannot be set.
101 11 Discriminator gives no output.
102 <-? 12 Pixel out of L1T.
103 13 FADC defective.
104 14 FADC board digital information defective.
105 */
106
107/*
108 1 Pixel shows no signal
109 */
110
111/*
112 MCalibrationCalc - valid for the result of a calibration run:
113
114 <- 1 Pedestals not available
115 <- 2 FADC samples not available
116
117 3 Hi-Gain saturated, no LoGain available
118
119 4 Conversion Factor HiGain - LoGain not valid
120
121 5 Cannot be calibrated at all
122 6 Cannot be fitted - calibrated using Histogram Mean and RMS
123
124 7 Mean Charge smaller than PedRMS
125 8 Mean Charge smaller than Mean charge in camera minus 5 sigma
126 9 Mean Charge bigger than Mean charge in camera plus 5 sigma
127
128 10 Sigma Charge smaller than PedRMS
129
130 11 Result of F-Factor method invalid
131 12 Result of Blind Pixel method invalid
132 13 Result of PIN-Diode method invalid
133 14 Methods inconsistency
134
135 15 Gains oscillate
136
137 <- 16 Arrival Time not calculated
138 <- 17 Arrival Time not valid
139
140 18 Sigma Arrival Time bigger than FADC window
141 19 Mean Arrival Time at edge of FADC window
142 */
143
144/*
145
146Hardware 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...
147Preamplifier defective.
148Optical link defective.
149HV cannot be set.
150HV readout defective.
151DC readout defective.
152Discriminator threshold cannot be set.
153Trigger delay cannot be set.
154Discriminator gives no output.
155FADC defective.
156FADC board digital information defective.
157Pixel out of L1T. (this is an important information, but not necessarily a defect, is it?)
158
159In addition here are some cases which I think can be detected by software:
160- no signal
161- wrong signal
162- hv problem
163- dc problem
164- Conversion Factor HiGain - LoGain not valid (what does this mean?)
165- No calibration possible
166- No fit possible - calibrated using Histogram Mean and RMS
167- Mean Charge smaller than PedRMS
168- Sigma Charge smaller than PedRMS
169- Calib.methods inconsistency (there are in pricipal 6 combinations... do we need 6 bits?)
170- Gains oscillate (what does it mean?)
171- Sigma Arrival Time bigger than FADC window (from calib)
172- Mean Arrival Time at edge of FADC window (from calib)
173*/
Note: See TracBrowser for help on using the repository browser.