source: trunk/MagicSoft/Mars/manalysis/MCalibrationPINDiode.cc@ 2553

Last change on this file since 2553 was 2525, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.8 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 11/2003 <mailto:markus@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26// //
27// MCalibrationPINDiode //
28// //
29// This is the storage container to hold informations about the pedestal //
30// (offset) value of one Pixel (PMT). //
31// //
32/////////////////////////////////////////////////////////////////////////////
33#include "MCalibrationPINDiode.h"
34
35#include "MLog.h"
36
37ClassImp(MCalibrationPINDiode);
38
39using namespace std;
40// --------------------------------------------------------------------------
41//
42// Default Constructor.
43//
44MCalibrationPINDiode::MCalibrationPINDiode(const char *name, const char *title)
45 : fHist(NULL)
46{
47
48 fName = name ? name : "MCalibrationPINDiode";
49 fTitle = title ? title : "Container of the MHCalibrationPINDiode and the fit results";
50
51 fHist = new MHCalibrationPINDiode();
52
53 fQ = fErrQ = 0.;
54 fPed = fPedRms = 0.;
55 fT = fErrT = 0.;
56 fRQ = fErrRQ = 0.;
57 fSigmaQ = fErrSigmaQ = 0.;
58
59}
60
61MCalibrationPINDiode::~MCalibrationPINDiode()
62{
63 delete fHist;
64}
65
66// ------------------------------------------------------------------------
67//
68// Invalidate values
69//
70void MCalibrationPINDiode::Clear(Option_t *o)
71{
72 fHist->Reset();
73}
74
75Bool_t MCalibrationPINDiode::FitQ()
76{
77 if(!fHist->FitQ())
78 return kFALSE;
79
80 fQ = fHist->GetQMean();
81 fErrQ = fHist->GetQMeanErr();
82 fSigmaQ = fHist->GetQSigma();
83 fErrSigmaQ = fHist->GetQSigmaErr();
84
85 return kTRUE;
86
87}
88
89Bool_t MCalibrationPINDiode::FitT()
90{
91
92 if(!fHist->FitT())
93 return kFALSE;
94
95 fT = fHist->GetT();
96 fErrT = fHist->GetErrT();
97
98 return kTRUE;
99
100}
Note: See TracBrowser for help on using the repository browser.