1 | // $Id: EFocalSurface3DPainter.hh 2846 2010-04-18 06:09:05Z fenu $ |
---|
2 | // Author: Alessandro Thea 2005/07/13 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: EFocalSurface3DPainter * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __EFOCALSURFACE3DPAINTER_HH__ |
---|
14 | #define __EFOCALSURFACE3DPAINTER_HH__ |
---|
15 | |
---|
16 | #include <TObject.h> |
---|
17 | #include <Gtypes.h> |
---|
18 | #include <TLatex.h> |
---|
19 | |
---|
20 | class EEvent; |
---|
21 | class EDetector; |
---|
22 | class ERunParameters; |
---|
23 | class TAxis3D; |
---|
24 | class TGaxis; |
---|
25 | |
---|
26 | |
---|
27 | //////////////////////////////////////////////////////////////////////////////// |
---|
28 | // // |
---|
29 | // EFocalSurface3DPainter // |
---|
30 | // // |
---|
31 | // <brief class description> // |
---|
32 | // // |
---|
33 | //////////////////////////////////////////////////////////////////////////////// |
---|
34 | |
---|
35 | class EFocalSurface3DPainter:public TObject |
---|
36 | { |
---|
37 | public: |
---|
38 | EFocalSurface3DPainter (); |
---|
39 | EFocalSurface3DPainter (EEvent *); |
---|
40 | EFocalSurface3DPainter (EDetector *, ERunParameters *); |
---|
41 | virtual ~ EFocalSurface3DPainter (); |
---|
42 | |
---|
43 | |
---|
44 | virtual void Load (EEvent *); |
---|
45 | virtual void Load (EDetector *, ERunParameters *); |
---|
46 | virtual void Clear (Option_t * = ""); |
---|
47 | virtual void Paint (Option_t * = ""); |
---|
48 | virtual Int_t DistancetoPrimitive (Int_t px, Int_t py); |
---|
49 | virtual void Draw (Option_t * = ""); |
---|
50 | |
---|
51 | virtual Double_t GetAlpha () const |
---|
52 | { |
---|
53 | return fAlpha; |
---|
54 | }; |
---|
55 | virtual Style_t GetMarkerStyle () const |
---|
56 | { |
---|
57 | return fMarkerStyle; |
---|
58 | } |
---|
59 | virtual Float_t GetMaxMarkerSize () const |
---|
60 | { |
---|
61 | return fMaxMarkerSize; |
---|
62 | } |
---|
63 | virtual Color_t GetMinMarkerColor () const |
---|
64 | { |
---|
65 | return fMinMarkerColor; |
---|
66 | } |
---|
67 | virtual Float_t GetMinMarkerSize () const |
---|
68 | { |
---|
69 | return fMinMarkerSize; |
---|
70 | } |
---|
71 | virtual Int_t GetNumMarkerColors () const |
---|
72 | { |
---|
73 | return fNumMarkerColors; |
---|
74 | } |
---|
75 | virtual Color_t GetBackgroundColor () const |
---|
76 | { |
---|
77 | return fBackgroundColor; |
---|
78 | } |
---|
79 | virtual Color_t GetLabelColor () const |
---|
80 | { |
---|
81 | return fLabelColor; |
---|
82 | } |
---|
83 | virtual Color_t GetPixelColor () const |
---|
84 | { |
---|
85 | return fPixelColor; |
---|
86 | } |
---|
87 | virtual Int_t GetDrawCode () const |
---|
88 | { |
---|
89 | return fDrawCode; |
---|
90 | } |
---|
91 | |
---|
92 | virtual void SetAlpha (Double_t alpha) |
---|
93 | { |
---|
94 | fAlpha = alpha; |
---|
95 | Modified (); |
---|
96 | } // *MENU* |
---|
97 | virtual void SetLabelColor (Color_t color) |
---|
98 | { |
---|
99 | fLabelColor = color; |
---|
100 | } // *MENU* |
---|
101 | virtual void SetPixelColor (Color_t color) |
---|
102 | { |
---|
103 | fPixelColor = color; |
---|
104 | } // *MENU* |
---|
105 | virtual void SetBackgroundColor (Color_t color) |
---|
106 | { |
---|
107 | fBackgroundColor = color; |
---|
108 | } // *MENU* |
---|
109 | virtual void SetMarkerStyle (Style_t mstyle) |
---|
110 | { |
---|
111 | fMarkerStyle = mstyle; |
---|
112 | } // *MENU* |
---|
113 | virtual void SetMinMarkerColor (Color_t color) |
---|
114 | { |
---|
115 | fMinMarkerColor = color; |
---|
116 | Modified (); |
---|
117 | } // *MENU* |
---|
118 | virtual void SetMaxMarkerSize (Float_t max) |
---|
119 | { |
---|
120 | fMaxMarkerSize = max; |
---|
121 | Modified (); |
---|
122 | } // *MENU* |
---|
123 | virtual void SetMinMarkerSize (Float_t min) |
---|
124 | { |
---|
125 | fMinMarkerSize = min; |
---|
126 | Modified (); |
---|
127 | } // *MENU* |
---|
128 | virtual void SetNumMarkerColors (Int_t n) |
---|
129 | { |
---|
130 | fNumMarkerColors = n; |
---|
131 | Modified (); |
---|
132 | } // *MENU* |
---|
133 | virtual void SetDrawCode (Int_t code) |
---|
134 | { |
---|
135 | fDrawCode = code; |
---|
136 | Modified (); |
---|
137 | } // *MENU* |
---|
138 | |
---|
139 | virtual Bool_t IsModified () |
---|
140 | { |
---|
141 | return fModified; |
---|
142 | } |
---|
143 | virtual void Modified (Bool_t mod = kTRUE) |
---|
144 | { |
---|
145 | fModified = mod; |
---|
146 | } |
---|
147 | virtual void Update (); |
---|
148 | |
---|
149 | private: |
---|
150 | |
---|
151 | enum |
---|
152 | { kCodeHits = 0, kCodeSigs = 1 }; |
---|
153 | void Constructor (); |
---|
154 | |
---|
155 | EDetector *fDetector; |
---|
156 | ERunParameters *fRunPars; |
---|
157 | |
---|
158 | Double_t fAlpha; |
---|
159 | Double_t fMeanThres; |
---|
160 | |
---|
161 | Style_t fMarkerStyle; |
---|
162 | Float_t fMaxMarkerSize; |
---|
163 | Float_t fMinMarkerSize; |
---|
164 | Color_t fMinMarkerColor; |
---|
165 | Int_t fNumMarkerColors; |
---|
166 | Color_t fBackgroundColor; |
---|
167 | Color_t fLabelColor; |
---|
168 | Color_t fPixelColor; |
---|
169 | |
---|
170 | TLatex *fLabel; |
---|
171 | TGaxis *fAxis; |
---|
172 | Int_t fDrawCode; |
---|
173 | |
---|
174 | TObjArray *fHits; |
---|
175 | Int_t fNumMarkers; |
---|
176 | |
---|
177 | TObjArray *fSignals; |
---|
178 | Int_t fNumSignals; |
---|
179 | |
---|
180 | TObjArray *fPixels; |
---|
181 | Int_t fNumPixels; |
---|
182 | |
---|
183 | TAxis3D *fAxis3D; |
---|
184 | |
---|
185 | Double_t fXmin; |
---|
186 | Double_t fXmax; |
---|
187 | Double_t fYmin; |
---|
188 | Double_t fYmax; |
---|
189 | Double_t fTmin; |
---|
190 | Double_t fTmax; |
---|
191 | Double_t fGTU; |
---|
192 | Int_t fCmin; |
---|
193 | Int_t fCmax; |
---|
194 | Bool_t fModified; |
---|
195 | |
---|
196 | ClassDef (EFocalSurface3DPainter, 1)}; |
---|
197 | |
---|
198 | #endif /* __EFOCALSURFACE3DPAINTER_HH__ */ |
---|