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

Last change on this file since 2946 was 2798, checked in by wittek, 21 years ago
*** empty log message ***
File size: 4.3 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 MMcEvt;
20class MSigmabar;
21class MParList;
22class MBlindPixels;
23class MRead;
24class MFilterList;
25
26
27class MPad : public MTask
28{
29private:
30 MGeomCam *fCam;
31 MCerPhotEvt *fEvt;
32 MSigmabar *fSigmabar;
33 MMcEvt *fMcEvt;
34 MPedPhotCam *fPed;
35 MBlindPixels *fBlinds;
36
37 TString fType; // type of data to be padded
38 TFile *fInfile; // input file containing padding histograms
39
40 Int_t fIter;
41
42 Int_t fErrors[9];
43 Int_t fWarnings[2];
44
45 //----------------------------------
46 // plots used for the padding
47 // for all plots it is assumed that the pedestal RMS is given in units of "number of photons"
48 TH2D *fHBlindPixIdTheta; // 2D-histogram (blind pixel Id vs. Theta)
49 TH2D *fHBlindPixIdThetaMC; // 2D-histogram (blind pixel Id vs. Theta)
50 TH2D *fHBlindPixIdThetaON; // 2D-histogram (blind pixel Id vs. Theta)
51 TH2D *fHBlindPixIdThetaOFF; // 2D-histogram (blind pixel Id vs. Theta)
52
53 //---------------------
54 TH2D *fHBlindPixNTheta; // 2D-histogram (no.of blind pixels vs. Theta)
55 TH2D *fHBlindPixNThetaMC; // 2D-histogram (no.of blind pixels vs. Theta)
56 TH2D *fHBlindPixNThetaON; // 2D-histogram (no.of blind pixels vs. Theta)
57 TH2D *fHBlindPixNThetaOFF; // 2D-histogram (no.of blind pixels vs. Theta)
58
59 //---------------------
60 TH2D *fHSigmaTheta; // 2D-histogram (sigmabar vs. Theta)
61 TH2D *fHSigmaThetaMC; // 2D-histogram (sigmabar vs. Theta)
62 TH2D *fHSigmaThetaON; // 2D-histogram (sigmabar vs. Theta)
63 TH2D *fHSigmaThetaOFF; // 2D-histogram (sigmabar vs. Theta)
64
65 //---------------------
66 TH3D *fHDiffPixTheta; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
67 TH3D *fHDiffPixThetaMC; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
68 TH3D *fHDiffPixThetaON; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
69 TH3D *fHDiffPixThetaOFF; // 3D-histogram (Theta, pixel, sigma^2-sigmabar^2)
70
71 //---------------------
72 TH3D *fHSigmaPixTheta; // 3D-histogram (Theta, pixel, sigma)
73 TH3D *fHSigmaPixThetaMC; // 3D-histogram (Theta, pixel, sigma)
74 TH3D *fHSigmaPixThetaON; // 3D-histogram (Theta, pixel, sigma)
75 TH3D *fHSigmaPixThetaOFF; // 3D-histogram (Theta, pixel, sigma)
76
77 //---------------------
78 TH3D *fHgMC; // matrix (Theta, sigbarold, sigbarnew) for MC data
79 TH3D *fHgON; // matrix (Theta, sigbarold, sigbarnew) for ON data
80 TH3D *fHgOFF; // matrix (Theta, sigbarold, sigbarnew) for OFF data
81
82 //-------------------------------
83 // plots for checking the padding
84 TH2D *fHSigmaPedestal; // 2D-histogram : pedestal sigma after
85 // versus before padding
86 TH2D *fHPhotons; // 2D-histogram : no.of photons after
87 // versus before padding
88 TH1D *fHNSB; // 1D-histogram : additional NSB
89
90
91 Bool_t Merge2Distributions(TH1D *hista, TH1D * histb, TH1D * histap,
92 TH2D *fHga, TH2D * fHgb, Int_t nbinssig);
93
94
95public:
96 MPad(const char *name=NULL, const char *title=NULL);
97 ~MPad();
98
99 Bool_t MergeONOFFMC(
100 TH2D *sigthmc, TH3D *diffpixthmc, TH3D *sigmapixthmc,
101 TH2D *blindidthmc, TH2D *blindnthmc,
102 TH2D *sigthon, TH3D *diffpixthon, TH3D *sigmapixthon,
103 TH2D *blindidthon, TH2D *blindnthon,
104 TH2D *sigthoff=NULL, TH3D *diffpixthoff=NULL,TH3D *sigmapixthoff=NULL,
105 TH2D *blindidthoff=NULL, TH2D *blindnthoff=NULL);
106
107 Bool_t MergeONMC(
108 TH2D *sigthmc, TH3D *diffpixthmc, TH3D *sigmapixthmc,
109 TH2D *blindidthmc, TH2D *blindnthmc,
110 TH2D *sigthon, TH3D *diffpixthon, TH3D *sigmapixthon,
111 TH2D *blindidthon, TH2D *blindnthon);
112
113 Bool_t ReadPaddingDist(const char *filein);
114 Bool_t WritePaddingDist(const char *fileout);
115
116 void SetDataType(const char *type); // type of data to be padded
117
118 Int_t PreProcess(MParList *pList);
119 Int_t Process();
120 Int_t PostProcess();
121
122 ClassDef(MPad, 0) // task for the padding
123};
124
125#endif
126
127
128
129
130
131
Note: See TracBrowser for help on using the repository browser.