source: trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.cc@ 2905

Last change on this file since 2905 was 2833, checked in by gaug, 21 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 11/2003 <mailto:markus@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26// //
27// MCalibrationBlindPix //
28// //
29// This is the storage container to hold informations about the calibration//
30// blind pixel //
31// //
32/////////////////////////////////////////////////////////////////////////////
33#include "MCalibrationBlindPix.h"
34#include "MHCalibrationBlindPixel.h"
35
36#include "MLog.h"
37#include "MLogManip.h"
38
39ClassImp(MCalibrationBlindPix);
40
41using namespace std;
42// --------------------------------------------------------------------------
43//
44// Default Constructor.
45//
46MCalibrationBlindPix::MCalibrationBlindPix(const char *name, const char *title)
47 : fHist(NULL),
48 fLambda(-1.),
49 fMu0 (-1.),
50 fMu1 (-1.),
51 fSigma0(-1.),
52 fSigma1(-1.),
53 fErrLambda(-1.),
54 fErrMu0 (-1.),
55 fErrMu1 (-1.),
56 fErrSigma0(-1.),
57 fErrSigma1(-1.),
58 fTime (-1.),
59 fErrTime (-1.)
60{
61
62 fName = name ? name : "MCalibrationBlindPix";
63 fTitle = title ? title : "Container of the MHCalibrationBlindPixel and the fit results";
64
65 fHist = new MHCalibrationBlindPixel();
66
67 if (!fHist)
68 *fLog << warn << dbginf << " Could not create MHCalibrationBlindPixel " << endl;
69
70}
71
72MCalibrationBlindPix::~MCalibrationBlindPix()
73{
74 delete fHist;
75}
76
77// ------------------------------------------------------------------------
78//
79// Invalidate values
80//
81void MCalibrationBlindPix::Clear(Option_t *o)
82{
83 fHist->Reset();
84}
85
86Bool_t MCalibrationBlindPix::FitCharge()
87{
88
89 if (!fHist->FitSinglePhe())
90 return kFALSE;
91
92 fLambda = fHist->GetLambda();
93 fMu0 = fHist->GetMu0();
94 fMu1 = fHist->GetMu1();
95 fSigma0 = fHist->GetSigma0();
96 fSigma1 = fHist->GetSigma1();
97
98 fErrLambda = fHist->GetLambdaErr();
99 fErrMu0 = fHist->GetMu0Err();
100 fErrMu1 = fHist->GetMu1Err();
101 fErrSigma0 = fHist->GetSigma0Err();
102 fErrSigma1 = fHist->GetSigma1Err();
103
104 return kTRUE;
105}
106
107
108
109Bool_t MCalibrationBlindPix::FitTime()
110{
111
112 if(!fHist->FitTime())
113 return kFALSE;
114
115 fTime = fHist->GetMeanTime();
116 fErrTime = fHist->GetMeanTimeErr();
117
118 return kTRUE;
119
120}
Note: See TracBrowser for help on using the repository browser.