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

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