| 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 |
|
|---|
| 37 | ClassImp(MCalibrationPINDiode);
|
|---|
| 38 |
|
|---|
| 39 | using namespace std;
|
|---|
| 40 | // --------------------------------------------------------------------------
|
|---|
| 41 | //
|
|---|
| 42 | // Default Constructor.
|
|---|
| 43 | //
|
|---|
| 44 | MCalibrationPINDiode::MCalibrationPINDiode(const char *name, const char *title)
|
|---|
| 45 | : fHist(NULL)
|
|---|
| 46 | {
|
|---|
| 47 |
|
|---|
| 48 | fName = name ? name : "MCalibrationPINDiode";
|
|---|
| 49 | fTitle = title ? title : "Container of the MHCalibrationPINDiode and the fit results";
|
|---|
| 50 |
|
|---|
| 51 | fHist = new MHCalibrationPINDiode();
|
|---|
| 52 |
|
|---|
| 53 | fQ = fErrQ = 0.;
|
|---|
| 54 | fPed = fPedRms = 0.;
|
|---|
| 55 | fT = fErrT = 0.;
|
|---|
| 56 | fRQ = fErrRQ = 0.;
|
|---|
| 57 | fSigmaQ = fErrSigmaQ = 0.;
|
|---|
| 58 |
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | MCalibrationPINDiode::~MCalibrationPINDiode()
|
|---|
| 62 | {
|
|---|
| 63 | delete fHist;
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | // ------------------------------------------------------------------------
|
|---|
| 67 | //
|
|---|
| 68 | // Invalidate values
|
|---|
| 69 | //
|
|---|
| 70 | void MCalibrationPINDiode::Clear(Option_t *o)
|
|---|
| 71 | {
|
|---|
| 72 | fHist->Reset();
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | Bool_t MCalibrationPINDiode::FitQ()
|
|---|
| 76 | {
|
|---|
| 77 | if(!fHist->FitQ())
|
|---|
| 78 | return kFALSE;
|
|---|
| 79 |
|
|---|
| 80 | fQ = fHist->GetQMean();
|
|---|
| 81 | fErrQ = fHist->GetQMeanErr();
|
|---|
| 82 | fSigmaQ = fHist->GetQSigma();
|
|---|
| 83 | fErrSigmaQ = fHist->GetQSigmaErr();
|
|---|
| 84 |
|
|---|
| 85 | return kTRUE;
|
|---|
| 86 |
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | Bool_t MCalibrationPINDiode::FitT()
|
|---|
| 90 | {
|
|---|
| 91 |
|
|---|
| 92 | if(!fHist->FitT())
|
|---|
| 93 | return kFALSE;
|
|---|
| 94 |
|
|---|
| 95 | fT = fHist->GetT();
|
|---|
| 96 | fErrT = fHist->GetErrT();
|
|---|
| 97 |
|
|---|
| 98 | return kTRUE;
|
|---|
| 99 |
|
|---|
| 100 | }
|
|---|