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

Last change on this file since 4678 was 4584, checked in by wittek, 20 years ago
*** empty log message ***
File size: 4.4 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 MBlindPixels;
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 MBlindPixels *fBlindPix;
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[3];
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 Bool_t UpdateHg(TH2D *fHga, TH1D *histap, TH2D *fHge, TH3D *fHgA,
95 Int_t nbinssig, Int_t l);
96
97public:
98 MPad(const char *name=NULL, const char *title=NULL);
99 ~MPad();
100
101 Bool_t MergeONOFFMC(
102 TH2D& sigthmc, TH3D& diffpixthmc, TH3D& sigmapixthmc,
103 TH2D& blindidthmc, TH2D& blindnthmc,
104 TH2D& sigthon, TH3D& diffpixthon, TH3D& sigmapixthon,
105 TH2D& blindidthon, TH2D& blindnthon,
106 TH2D& sigthoff, TH3D& diffpixthoff,TH3D& sigmapixthoff,
107 TH2D& blindidthoff, TH2D& blindnthoff);
108
109 Bool_t MergeONMC(
110 TH2D& sigthmc, TH3D& diffpixthmc, TH3D& sigmapixthmc,
111 TH2D& blindidthmc, TH2D& blindnthmc,
112 TH2D& sigthon, TH3D&diffpixthon, TH3D& sigmapixthon,
113 TH2D& blindidthon, TH2D& blindnthon);
114
115 Bool_t ReadPaddingDist(const char *filein);
116 Bool_t WritePaddingDist(const char *fileout);
117
118 void SetDataType(const char *type); // type of data to be padded
119
120 Int_t PreProcess(MParList *pList);
121 Int_t Process();
122 Int_t PostProcess();
123
124 ClassDef(MPad, 0) // task for the padding
125};
126
127#endif
128
129
130
131
132
133
Note: See TracBrowser for help on using the repository browser.