source: trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.cc@ 2644

Last change on this file since 2644 was 2642, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.2 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{
49
50 fName = name ? name : "MCalibrationBlindPix";
51 fTitle = title ? title : "Container of the MHCalibrationBlindPixel and the fit results";
52
53 fHist = new MHCalibrationBlindPixel();
54
55 if (!fHist)
56 *fLog << err << dbginf << "Could not create MHCalibrationBlindPixel " << endl;
57
58 fLambda = fMu0 = fMu1 = fSigma0 = fSigma1 = 0;
59 fErrLambda = fErrMu0 = fErrMu1 = fErrSigma0 = fErrSigma1 = 0;
60
61 fTime = fErrTime = 0;
62}
63
64MCalibrationBlindPix::~MCalibrationBlindPix()
65{
66 delete fHist;
67}
68
69// ------------------------------------------------------------------------
70//
71// Invalidate values
72//
73void MCalibrationBlindPix::Clear(Option_t *o)
74{
75 fHist->Reset();
76}
77
78Bool_t MCalibrationBlindPix::FitCharge()
79{
80
81 if (!fHist->FitSinglePhe())
82 return kFALSE;
83
84 fLambda = fHist->GetLambda();
85 fMu0 = fHist->GetMu0();
86 fMu1 = fHist->GetMu1();
87 fSigma0 = fHist->GetSigma0();
88 fSigma1 = fHist->GetSigma1();
89
90 fErrLambda = fHist->GetLambdaErr();
91 fErrMu0 = fHist->GetMu0Err();
92 fErrMu1 = fHist->GetMu1Err();
93 fErrSigma0 = fHist->GetSigma0Err();
94 fErrSigma1 = fHist->GetSigma1Err();
95
96 return kTRUE;
97}
98
99
100
101Bool_t MCalibrationBlindPix::FitTime()
102{
103
104 if(!fHist->FitTime())
105 return kFALSE;
106
107 fTime = fHist->GetMeanTime();
108 fErrTime = fHist->GetMeanTimeErr();
109
110 return kTRUE;
111
112}
Note: See TracBrowser for help on using the repository browser.