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

Last change on this file since 2835 was 2833, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.0 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 if (!fHist)
62 *fLog << warn << dbginf << " Could not create MHCalibrationPINDiode " << endl;
63
64}
65
66MCalibrationPINDiode::~MCalibrationPINDiode()
67{
68 delete fHist;
69}
70
71// ------------------------------------------------------------------------
72//
73// Invalidate values
74//
75void MCalibrationPINDiode::Clear(Option_t *o)
76{
77 fHist->Reset();
78}
79
80Bool_t MCalibrationPINDiode::FitCharge()
81{
82 if(!fHist->FitChargeHiGain())
83 return kFALSE;
84
85 fCharge = fHist->GetChargeMean();
86 fErrCharge = fHist->GetChargeMeanErr();
87 fSigmaCharge = fHist->GetChargeSigma();
88 fErrSigmaCharge = fHist->GetChargeSigmaErr();
89
90 return kTRUE;
91
92}
93
94Bool_t MCalibrationPINDiode::FitTime()
95{
96
97 if(!fHist->FitTimeHiGain())
98 return kFALSE;
99
100 fTime = fHist->GetTime();
101 fErrTime = fHist->GetErrTime();
102
103 return kTRUE;
104
105}
Note: See TracBrowser for help on using the repository browser.