source: trunk/Mars/mhcalib/MHCalibrationTestPix.cc@ 12105

Last change on this file since 12105 was 4929, checked in by gaug, 20 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 02/2004 <mailto:markus@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24//////////////////////////////////////////////////////////////////////////////
25//
26// MHCalibrationTestPix
27//
28// Histogram class for the charge calibration.
29// Stores and fits the charges and stores the location of the maximum FADC
30// slice. Tests are taken from MExtractedSignalPix.
31//
32//////////////////////////////////////////////////////////////////////////////
33#include "MHCalibrationTestPix.h"
34
35#include <TH1.h>
36#include <TF1.h>
37
38#include <TVirtualPad.h>
39#include <TCanvas.h>
40#include <TPad.h>
41#include <TGraph.h>
42
43#include "MH.h"
44
45#include "MLog.h"
46#include "MLogManip.h"
47
48ClassImp(MHCalibrationTestPix);
49
50using namespace std;
51
52const Int_t MHCalibrationTestPix::fgChargeNbins = 4000;
53const Axis_t MHCalibrationTestPix::fgChargeFirst = -0.5;
54const Axis_t MHCalibrationTestPix::fgChargeLast = 39999.5;
55// --------------------------------------------------------------------------
56//
57// Default Constructor.
58//
59// Sets:
60// - the default number for fNbins (fgChargeNbins)
61// - the default number for fFirst (fgChargeFirst)
62// - the default number for fLast (fgChargeLast)
63//
64// - the default name of the fHGausHist ("HCalibrationTest")
65// - the default title of the fHGausHist ("Distribution of calibrated FADC slices Pixel ")
66// - the default x-axis title for fHGausHist ("Sum FADC Slices")
67// - the default y-axis title for fHGausHist ("Nr. of events")
68//
69// Calls:
70// - Clear();
71//
72MHCalibrationTestPix::MHCalibrationTestPix(const char *name, const char *title)
73{
74
75 fName = name ? name : "MHCalibrationTestPix";
76 fTitle = title ? title : "Statistics of the calibrated FADC sums of calibration events";
77
78 SetNbins ( fgChargeNbins );
79 SetFirst ( fgChargeFirst );
80 SetLast ( fgChargeLast );
81
82 fHGausHist.SetName("HCalibrationTest");
83 fHGausHist.SetTitle("Distribution of calibrated Photons Pixel ");
84 fHGausHist.SetXTitle("Nr. Photons");
85 fHGausHist.SetYTitle("Nr. of events");
86
87}
88
89
90// --------------------------------------------------------------------------
91//
92// returns fHGausHist.Integral("width")
93//
94const Float_t MHCalibrationTestPix::GetIntegral() const
95{
96 return fHGausHist.Integral("width");
97}
98
Note: See TracBrowser for help on using the repository browser.