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

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