| 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 | //
|
|---|
| 27 | // MHCalibrationChargeLoGainPix
|
|---|
| 28 | //
|
|---|
| 29 | // Performs all the necessary fits to extract the mean number of summed FADC slices
|
|---|
| 30 | //
|
|---|
| 31 | //////////////////////////////////////////////////////////////////////////////
|
|---|
| 32 | #include "MHCalibrationChargeLoGainPix.h"
|
|---|
| 33 |
|
|---|
| 34 | #include <TH1.h>
|
|---|
| 35 | #include <TPad.h>
|
|---|
| 36 | #include <TVirtualPad.h>
|
|---|
| 37 | #include <TCanvas.h>
|
|---|
| 38 |
|
|---|
| 39 | #include "MLog.h"
|
|---|
| 40 | #include "MLogManip.h"
|
|---|
| 41 |
|
|---|
| 42 | #include "MParList.h"
|
|---|
| 43 |
|
|---|
| 44 | #include "MExtractedSignalCam.h"
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 | ClassImp(MHCalibrationChargeLoGainPix);
|
|---|
| 48 |
|
|---|
| 49 | using namespace std;
|
|---|
| 50 |
|
|---|
| 51 | const Int_t MHCalibrationChargeLoGainPix::fgChargeNbins = 200;
|
|---|
| 52 | const Axis_t MHCalibrationChargeLoGainPix::fgChargeFirst = -0.5;
|
|---|
| 53 | const Axis_t MHCalibrationChargeLoGainPix::fgChargeLast = 199.5;
|
|---|
| 54 | const Int_t MHCalibrationChargeLoGainPix::fgAbsTimeNbins = 15;
|
|---|
| 55 | const Axis_t MHCalibrationChargeLoGainPix::fgAbsTimeFirst = -0.5;
|
|---|
| 56 | const Axis_t MHCalibrationChargeLoGainPix::fgAbsTimeLast = 14.5;
|
|---|
| 57 | // --------------------------------------------------------------------------
|
|---|
| 58 | //
|
|---|
| 59 | // Default Constructor.
|
|---|
| 60 | //
|
|---|
| 61 | MHCalibrationChargeLoGainPix::MHCalibrationChargeLoGainPix(const char *name, const char *title)
|
|---|
| 62 | {
|
|---|
| 63 | fName = name ? name : "MHCalibrationChargeLoGainPix";
|
|---|
| 64 | fTitle = title ? title : "Fill the FADC sums of the Low Gain events and perform the fits Pixel ";
|
|---|
| 65 |
|
|---|
| 66 | SetChargeNbins();
|
|---|
| 67 | SetChargeFirst();
|
|---|
| 68 | SetChargeLast();
|
|---|
| 69 |
|
|---|
| 70 | SetAbsTimeNbins();
|
|---|
| 71 | SetAbsTimeFirst();
|
|---|
| 72 | SetAbsTimeLast();
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 | void MHCalibrationChargeLoGainPix::Init()
|
|---|
| 77 | {
|
|---|
| 78 |
|
|---|
| 79 | fHGausHist.SetName("HCalibrationChargeLoGainPix");
|
|---|
| 80 | fHGausHist.SetTitle("Distribution of Summed Hi Gain FADC slices Pixel ");
|
|---|
| 81 | fHGausHist.SetXTitle("Sum FADC Slices");
|
|---|
| 82 | fHGausHist.SetYTitle("Nr. of events");
|
|---|
| 83 | fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);
|
|---|
| 84 | // fHGausHist.Sumw2();
|
|---|
| 85 |
|
|---|
| 86 | fHAbsTime.SetName("HAbsTimeLoGainPix");
|
|---|
| 87 | fHAbsTime.SetTitle("Distribution of Absolute Arrival Times Hi Gain Pixel ");
|
|---|
| 88 | fHAbsTime.SetXTitle("Absolute Arrival Time [FADC slice nr]");
|
|---|
| 89 | fHAbsTime.SetYTitle("Nr. of events");
|
|---|
| 90 | fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast);
|
|---|
| 91 |
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 | void MHCalibrationChargeLoGainPix::ChangeHistId(Int_t id)
|
|---|
| 98 | {
|
|---|
| 99 |
|
|---|
| 100 | fPixId = id;
|
|---|
| 101 |
|
|---|
| 102 | fHGausHist.SetName(Form("%s%d", fHGausHist.GetName(), id));
|
|---|
| 103 | fHGausHist.SetTitle(Form("%s%d", fHGausHist.GetTitle(), id));
|
|---|
| 104 |
|
|---|
| 105 | fHAbsTime.SetName(Form("%s%d", fHAbsTime.GetName(), id));
|
|---|
| 106 | fHAbsTime.SetTitle(Form("%s%d", fHAbsTime.GetTitle(), id));
|
|---|
| 107 |
|
|---|
| 108 | fName = Form("%s%d", fName.Data(), id);
|
|---|
| 109 | fTitle = Form("%s%d", fTitle.Data(), id);
|
|---|
| 110 | }
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
|
|---|