source: trunk/MagicSoft/Mars/manalysis/MPad.h@ 5285

Last change on this file since 5285 was 4841, checked in by wittek, 20 years ago
*** empty log message ***
File size: 3.7 KB
Line 
1#ifndef MARS_MPad
2#define MARS_MPad
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef MARS_MH
9#include "MH.h"
10#endif
11
12class TH1D;
13class TH2D;
14class TH3D;
15
16class MGeomCam;
17class MCerPhotEvt;
18class MPedPhotCam;
19class MPointingPos;
20class MSigmabar;
21class MParList;
22class MBadPixelsCam;
23class MRead;
24class MFilterList;
25
26
27class MPad : public MTask
28{
29private:
30 MGeomCam *fCam;
31 MCerPhotEvt *fEvt;
32 MSigmabar *fSigmabar;
33 MPointingPos *fPointPos;
34 MPedPhotCam *fPed;
35 MBadPixelsCam *fBad;
36
37 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
38 TString fType; // type of data to be padded
39 TFile *fInfile; // input file containing padding histograms
40
41 Int_t fIter;
42
43 Int_t fErrors[9];
44 Int_t fWarnings[3];
45
46 //----------------------------------
47 // plots used for the padding
48 // for all plots it is assumed that the pedestal RMS is given in units of "number of photons"
49
50 TH2D *fHSigmaTheta; // 2D-histogram (sigmabar vs. Theta)
51 TH2D *fHSigmaThetaMC; // 2D-histogram (sigmabar vs. Theta)
52 TH2D *fHSigmaThetaON; // 2D-histogram (sigmabar vs. Theta)
53 TH2D *fHSigmaThetaOFF; // 2D-histogram (sigmabar vs. Theta)
54
55 //---------------------
56 TH3D *fHDiffPixTheta; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
57 TH3D *fHDiffPixThetaMC; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
58 TH3D *fHDiffPixThetaON; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
59 TH3D *fHDiffPixThetaOFF; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
60
61 //---------------------
62 TH3D *fHSigmaPixTheta; // 3D-histogram (Theta, pixel, sigma)
63 TH3D *fHSigmaPixThetaMC; // 3D-histogram (Theta, pixel, sigma)
64 TH3D *fHSigmaPixThetaON; // 3D-histogram (Theta, pixel, sigma)
65 TH3D *fHSigmaPixThetaOFF; // 3D-histogram (Theta, pixel, sigma)
66
67 //---------------------
68 TH3D *fHgMC; // matrix (Theta, sigbarold, sigbarnew) for MC data
69 TH3D *fHgON; // matrix (Theta, sigbarold, sigbarnew) for ON data
70 TH3D *fHgOFF; // matrix (Theta, sigbarold, sigbarnew) for OFF data
71
72 //-------------------------------
73 // plots for checking the padding
74 TH2D *fHSigmaPedestal; // 2D-histogram : pedestal sigma after
75 // versus before padding
76 TH2D *fHPhotons; // 2D-histogram : no.of photons after
77 // versus before padding
78 TH1D *fHNSB; // 1D-histogram : additional NSB
79
80
81 Bool_t Merge2Distributions(TH1D *hista, TH1D *histb, TH1D *histap,
82 TH2D *fHga, TH2D *fHgb, Int_t nbinssig);
83
84 Bool_t UpdateHg(TH2D *fHga, TH1D *histap, TH2D *fHge, TH3D *fHgA,
85 Int_t nbinssig, Int_t l);
86
87public:
88 MPad(const char *name=NULL, const char *title=NULL);
89 ~MPad();
90
91 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; }
92
93 Bool_t MergeONOFFMC(
94 TH2D& sigthmc, TH3D& diffpixthmc, TH3D& sigmapixthmc,
95 TH2D& sigthon, TH3D& diffpixthon, TH3D& sigmapixthon,
96 TH2D& sigthoff, TH3D& diffpixthoff,TH3D& sigmapixthoff);
97
98 Bool_t MergeONMC(
99 TH2D& sigthmc, TH3D& diffpixthmc, TH3D& sigmapixthmc,
100 TH2D& sigthon, TH3D&diffpixthon, TH3D& sigmapixthon);
101
102 Bool_t ReadPaddingDist(const char *filein);
103 Bool_t WritePaddingDist(const char *fileout);
104
105 void SetDataType(const char *type); // type of data to be padded
106
107 Int_t PreProcess(MParList *pList);
108 Int_t Process();
109 Int_t PostProcess();
110
111 ClassDef(MPad, 0) // task for the padding
112};
113
114#endif
115
116
117
118
119
120
121
Note: See TracBrowser for help on using the repository browser.