source: trunk/Mars/msignal/MExtractedSignalPix.cc@ 19875

Last change on this file since 19875 was 7876, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 3.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! Author(s): Markus Gaug 12/2003 <mailto:markus@ifae.es>
19! Author(s): Thomas Bretz 12/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
20!
21! Copyright: MAGIC Software Development, 2000-2004
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MExtractedSignalPix
29//
30// This is the storage container to hold informations about the pedestal
31// (offset) value of one Pixel (PMT).
32//
33// Class Version 3:
34// ----------------
35// - fIsLoGainUsed
36// - fChisquare
37//
38/////////////////////////////////////////////////////////////////////////////
39#include "MExtractedSignalPix.h"
40
41#include "MLog.h"
42#include "MLogManip.h"
43
44ClassImp(MExtractedSignalPix);
45
46using namespace std;
47
48static const Float_t gkSignalInitializer = -99999.9;
49
50// ------------------------------------------------------------------------
51//
52// MExtractedSignalPix holds the extracted signal (HiGain and LoGain)
53// of the FADC slices and its error.
54//
55// Additionally, the number of saturated HiGain and LoGain Slices are stored.
56//
57// Default values for the extracted signals are: 99999.9
58//
59MExtractedSignalPix::MExtractedSignalPix(const char* name, const char* title)
60{
61 fName = name ? name : "MExtractedSignalPix";
62 fTitle = title ? title : "Container of the Extracted Signals";
63
64 Clear();
65}
66
67
68// ------------------------------------------------------------------------
69//
70// Invalidate values
71//
72void MExtractedSignalPix::Clear(Option_t *o)
73{
74 fExtractedSignalHiGain = gkSignalInitializer;
75 fExtractedSignalHiGainError = -1;
76 fExtractedSignalLoGain = gkSignalInitializer;
77 fExtractedSignalLoGainError = -1;
78
79 fNumHiGainSaturated = 0;
80 fNumLoGainSaturated = 0;
81}
82
83void MExtractedSignalPix::SetExtractedSignal(Float_t sig, Float_t sigerr)
84{
85 fExtractedSignalHiGain = sig;
86 fExtractedSignalHiGainError = sigerr;
87}
88
89void MExtractedSignalPix::SetExtractedSignal(Float_t sighi, Float_t sighierr,
90 Float_t siglo, Float_t sigloerr)
91{
92 fExtractedSignalHiGain = sighi;
93 fExtractedSignalHiGainError = sighierr;
94 fExtractedSignalLoGain = siglo;
95 fExtractedSignalLoGainError = sigloerr;
96}
97
98void MExtractedSignalPix::SetGainSaturation(Byte_t higain, Byte_t logain)
99{
100 fNumHiGainSaturated = higain;
101 fNumLoGainSaturated = logain;
102}
103
104void MExtractedSignalPix::Print(Option_t *o) const
105{
106 *fLog << " Signal: " << fExtractedSignalHiGain
107 << " +- " << fExtractedSignalHiGainError
108 << " Nr. Sat. Hi Gain: " << fNumHiGainSaturated
109 << " Nr. Sat. Lo Gain: " << fNumLoGainSaturated
110 << endl;
111}
Note: See TracBrowser for help on using the repository browser.