source: trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.cc@ 2804

Last change on this file since 2804 was 2734, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.9 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 fCharge(-1.),
47 fErrCharge(-1.),
48 fPed(-1.),
49 fPedRms(-1.),
50 fSigmaCharge(-1.),
51 fErrSigmaCharge(-1.),
52 fTime(-1.),
53 fErrTime(-1.)
54{
55
56 fName = name ? name : "MCalibrationPINDiode";
57 fTitle = title ? title : "Container of the MHCalibrationPINDiode and the fit results";
58
59 fHist = new MHCalibrationPINDiode();
60
61}
62
63MCalibrationPINDiode::~MCalibrationPINDiode()
64{
65 delete fHist;
66}
67
68// ------------------------------------------------------------------------
69//
70// Invalidate values
71//
72void MCalibrationPINDiode::Clear(Option_t *o)
73{
74 fHist->Reset();
75}
76
77Bool_t MCalibrationPINDiode::FitCharge()
78{
79 if(!fHist->FitChargeHiGain())
80 return kFALSE;
81
82 fCharge = fHist->GetChargeMean();
83 fErrCharge = fHist->GetChargeMeanErr();
84 fSigmaCharge = fHist->GetChargeSigma();
85 fErrSigmaCharge = fHist->GetChargeSigmaErr();
86
87 return kTRUE;
88
89}
90
91Bool_t MCalibrationPINDiode::FitTime()
92{
93
94 if(!fHist->FitTimeHiGain())
95 return kFALSE;
96
97 fTime = fHist->GetTime();
98 fErrTime = fHist->GetErrTime();
99
100 return kTRUE;
101
102}
Note: See TracBrowser for help on using the repository browser.