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

Last change on this file since 8113 was 5432, checked in by wittek, 20 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 MPointingPos;
20class MParList;
21class MBadPixelsCam;
22class MRead;
23class MFilterList;
24
25
26class MPad : public MTask
27{
28private:
29 MGeomCam *fCam;
30 MCerPhotEvt *fEvt;
31 MPointingPos *fPointPos;
32 MPedPhotCam *fPed;
33 MBadPixelsCam *fBad;
34
35 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
36 TString fType; // type of data to be padded
37 TFile *fInfile; // input file containing padding histograms
38
39 Int_t fIter;
40
41 Int_t fInf[9];
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
49 // original distributions
50 TH2D *fHSigmaThetaMC; // 2D-histogram (sigmabar_inner vs. Theta)
51 TH2D *fHSigmaThetaON; // 2D-histogram (sigmabar_inner vs. Theta)
52 TH2D *fHSigmaThetaOFF; // 2D-histogram (sigmabar_inner vs. Theta)
53
54 TH2D *fHSigmaThetaOuterMC; // 2D-histogram (sigmabar_outer vs. Theta)
55 TH2D *fHSigmaThetaOuterON; // 2D-histogram (sigmabar_outer vs. Theta)
56 TH2D *fHSigmaThetaOuterOFF; // 2D-histogram (sigmabar_outer vs. Theta)
57
58 TH3D *fHDiffPixThetaMC; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
59 TH3D *fHDiffPixThetaON; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
60 TH3D *fHDiffPixThetaOFF; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
61
62 //---------------------
63 // target distributions
64 TH2D *fHSigmaTheta; // 2D-histogram (sigmabar_inner vs. Theta)
65 TH2D *fHSigmaThetaOuter; // 2D-histogram (sigmabar_outer vs. Theta)
66
67 TH3D *fHDiffPixThetaTargetMC; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
68 TH3D *fHDiffPixThetaTargetON; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
69 TH3D *fHDiffPixThetaTargetOFF; // 3D-histogram (Theta, pixel, (sigma^2-sigmabar^2)/area )
70
71 //---------------------
72 // matrices according to which the padding is performed
73 TH3D *fHgMC; // matrix (Theta, sigbarold, sigbarnew) for MC data
74 TH3D *fHgON; // matrix (Theta, sigbarold, sigbarnew) for ON data
75 TH3D *fHgOFF; // matrix (Theta, sigbarold, sigbarnew) for OFF data
76
77 TH3D *fHgOuterMC; // matrix (Theta, sigbarold, sigbarnew) for MC data
78 TH3D *fHgOuterON; // matrix (Theta, sigbarold, sigbarnew) for ON data
79 TH3D *fHgOuterOFF; // matrix (Theta, sigbarold, sigbarnew) for OFF data
80
81 //-------------------------------
82 // plots for checking the padding
83 TH2D *fHSigmaPedestal; // 2D-histogram : pedestal sigma after
84 // versus before padding
85 TH2D *fHPhotons; // 2D-histogram : no.of photons/area after
86 // versus before padding
87 TH1D *fHNSB; // 1D-histogram : additional NSB/area
88
89 //-------------------------------
90 Bool_t MergeABC(TString tA, TString tB, TString tC,
91 TH2D *hA, TH2D *hB, TH2D *hC, TH2D *hM,
92 TH3D *hgA, TH3D *hgB, TH3D *hgC, TString canv);
93
94 Bool_t Merge2Distributions(TH1D *hista, TH1D *histb, TH1D *histap,
95 TH2D *fHga, TH2D *fHgb, Int_t nbinssig,
96 TString canv);
97
98 Bool_t UpdateHg(TH2D *fHga, TH1D *histap, TH2D *fHge, TH3D *fHgA,
99 Int_t nbinssig, Int_t l);
100
101public:
102 MPad(const char *name=NULL, const char *title=NULL);
103 ~MPad();
104
105 void SetDataType(const char *type); // type of data to be padded
106 void SetNamePedPhotCam(const char *name); // name of MPedPhotCam container
107
108 Bool_t ReadPadHistograms(TString type, TString filein);
109
110 Bool_t MergeONOFFMC(TString nameon="", TString nameoff="",
111 TString namemc="", TString fileout="");
112
113 Bool_t WritePaddingDist(TString fileout);
114 Bool_t ReadPaddingDist(TString filein);
115
116 Int_t PreProcess(MParList *pList);
117 Int_t Process();
118 Int_t PostProcess();
119
120 ClassDef(MPad, 0) // task for the padding
121};
122
123#endif
124
125
126
127
128
129
130
131
Note: See TracBrowser for help on using the repository browser.