source: trunk/MagicSoft/Mars/mtemp/mifae/library/MHDisp.h@ 6977

Last change on this file since 6977 was 5904, checked in by domingo, 20 years ago
*** empty log message ***
File size: 3.9 KB
Line 
1#ifndef MARS_MHDisp
2#define MARS_MHDisp
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12class TH1F;
13class TH2F;
14class TProfile;
15class MImageParDisp;
16class MSrcPosCam;
17class MHillas;
18class MHillasExt;
19class MNewImagePar;
20class MMcEvt;
21class MPointingPos;
22class MHMatrix;
23class MParameterD;
24
25class MHDisp : public MH
26{
27private:
28
29 MImageParDisp *fImageParDisp; // container with the estimated Disp
30 MSrcPosCam *fSrcPos;
31 MHillas *fHil;
32 MHillasExt *fHilExt;
33 MNewImagePar *fNewPar;
34 MMcEvt *fMcEvt;
35 MPointingPos *fPointing;
36
37 TString fImageParDispName;
38
39 Int_t fSelectedPos; // flag to select which of the two Disp source position
40 // solutions we want to fill the histograms (see Set function)
41
42 TH1F *fHistEnergy; // Energy distribution of events
43 TH1F *fHistSize; // Size distribution of events
44 TH1F *fHistcosZA; // cosinus Zenith angle distribution of events
45 TH2F *fSkymapXY; // 2D histogram for Disp estimated source positions
46 TH1F *fHistMinPar; // Histogram of the event Minimization Parameter (= d^2 =
47 // = distance^2 between Disp estimated and true source position)
48 TH2F *fHistDuDv; // Distribution of longitudinal (Du) and transversal
49 // (Dv) distances between Disp and true source position
50 TH2F *fHistMinParEnergy; // Minimization Parameter (= d^2) vs. Energy
51 TH2F *fHistMinParSize; // Minimization Parameter (= d^2) vs. Size
52 TH2F *fHistDuEnergy; // Du vs. Energy
53 TH2F *fHistDuSize; // Du vs. Size
54 TH2F *fHistDvEnergy; // Dv vs. Energy
55 TH2F *fHistDvSize; // Dv vs. Size
56 TProfile *fEvCorrAssign; // % events with source position well assign vs. Size
57
58
59 Double_t fMm2Deg; // conversion factor from mm to deg
60
61 MHMatrix *fMatrix; // matrix storing variables needed for the Disp optimization
62 TArrayI fMap; // array storing the matrix mapping column numbers corresponding
63 // to each variable added to fMatrix
64
65 Double_t GetVal(Int_t i) const;
66
67 Int_t fNumEv; // total number of events
68 Double_t fSumMinPar; // current sum of the minimization parameter
69 MParameterD *fMinPar; // final minimization parameters of the Disp optimization
70
71public:
72
73 MHDisp(const char *imagepardispname = "MImageParDisp",
74 const char *name=NULL, const char *title=NULL);
75 ~MHDisp();
76
77 Bool_t SetupFill(const MParList *plist);
78 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
79 Bool_t Finalize();
80
81 void SetSelectedPos(Int_t iflag);
82
83 void SetMatrixMap(MHMatrix *matrix, TArrayI &map);
84 void GetMatrixMap(MHMatrix* &matrix, TArrayI &map); // get matrix and its mapping array
85
86 void InitMapping(MHMatrix *mat); // define the matrix of variables
87 // needed for the Disp optimization
88
89 TH1F *GetHistEnergy() { return fHistEnergy; }
90 TH1F *GetHistSize() { return fHistSize; }
91 TH1F *GetHistcosZA() { return fHistcosZA; }
92 TH2F *GetSkymapXY() { return fSkymapXY; }
93 TH1F *GetHistMinPar() { return fHistMinPar; }
94 TH2F *GetHistDuDv() { return fHistDuDv; }
95 TH2F *GetHistMinParEnergy() { return fHistMinParEnergy; }
96 TH2F *GetHistMinParSize() { return fHistMinParSize; }
97 TH2F *GetHistDuEnergy() { return fHistDuEnergy; }
98 TH2F *GetHistDuSize() { return fHistDuSize; }
99 TH2F *GetHistDvEnergy() { return fHistDvEnergy; }
100 TH2F *GetHistDvSize() { return fHistDvSize; }
101 TProfile *GetEvCorrAssign() { return fEvCorrAssign; }
102
103 void Draw(Option_t *opt="");
104
105 ClassDef(MHDisp, 1) // Container holding the Histograms for Disp and
106 // the parameter to minimize in the Disp optimization
107};
108
109#endif
110
111
Note: See TracBrowser for help on using the repository browser.