]>
Commit | Line | Data |
---|---|---|
a9579262 | 1 | #ifndef AliFMDFANCY_H |
2 | #define AliFMDFANCY_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * See cxx source for full Copyright notice | |
7 | */ | |
8 | /** @file AliFMDFancy.h | |
9 | @author Christian Holm Christensen <cholm@nbi.dk> | |
10 | @date Mon Mar 27 12:39:09 2006 | |
11 | @brief FMD Event display (as fancys) | |
12 | */ | |
13 | //___________________________________________________________________ | |
14 | // | |
15 | // The classes defined here, are utility classes for reading in data | |
16 | // for the FMD. They are put in a seperate library to not polute the | |
17 | // normal libraries. The classes are intended to be used as base | |
18 | // classes for customized class that do some sort of analysis on the | |
19 | // various types of data produced by the FMD. | |
20 | // | |
21 | #include "AliFMDDisplay.h" | |
22 | #include <TObjArray.h> | |
23 | #include <TGraph2D.h> | |
24 | #include <TLatex.h> | |
25 | #include <TLine.h> | |
26 | class TCanvas; | |
27 | class TPad; | |
28 | class TH1; | |
29 | class TH2; | |
f95a63c4 | 30 | // class TH3; |
a9579262 | 31 | |
32 | ||
33 | //___________________________________________________________________ | |
34 | /** @class AliFMDFancy | |
35 | @brief Utility class to visualize FMD data in 2D. | |
36 | @ingroup FMD_util | |
37 | */ | |
38 | class AliFMDFancy : public AliFMDDisplay | |
39 | { | |
40 | public: | |
f95a63c4 | 41 | /** Sigh! the code checker thinks that all structs are POD - morron |
42 | */ | |
43 | class AliFancyDetector | |
a9579262 | 44 | { |
f95a63c4 | 45 | public: |
46 | /** CTOR */ | |
47 | AliFancyDetector(UShort_t id); | |
48 | /** DTOR */ | |
49 | ~AliFancyDetector(); | |
50 | /** Initialise */ | |
a9579262 | 51 | void Init(); |
f95a63c4 | 52 | /** Called at the beginning of an event */ |
a9579262 | 53 | void Begin(Int_t event=0); |
f95a63c4 | 54 | /** Clear display */ |
a9579262 | 55 | void Clear(Int_t event=0); |
f95a63c4 | 56 | /** Called that the end of an event */ |
a9579262 | 57 | void End(); |
f95a63c4 | 58 | /** Add a marker */ |
a9579262 | 59 | void AddMarker(Char_t rng, UShort_t sec, UShort_t str, |
60 | Float_t v, Float_t max); | |
09b6c804 | 61 | |
62 | /** | |
63 | * Get Mother frame | |
64 | * | |
65 | * @return Mother frame | |
66 | */ | |
67 | TH1*& GetFrame() { return fFrame; } | |
68 | /** | |
69 | * Set Mother frame | |
70 | * | |
71 | * @param p | |
72 | */ | |
73 | void SetFrame(TH1* p) { fFrame = p; } | |
74 | /** | |
75 | * Get Identifier | |
76 | * | |
77 | * @return Identifier | |
78 | */ | |
79 | Int_t GetId() const { return fId; } | |
80 | /** | |
81 | * Set Identifier | |
82 | * | |
83 | * @param p | |
84 | */ | |
85 | void SetId(Int_t p) { fId = p; } | |
86 | /** | |
87 | * Get Array of shapes | |
88 | * | |
89 | * @return Array of shapes | |
90 | */ | |
91 | TObjArray& GetShapes() { return fShapes; } | |
92 | /** | |
93 | * Get Number of inner hits | |
94 | * | |
95 | * @return Number of inner hits | |
96 | */ | |
97 | Int_t& GetNInnerHits() { return fNInnerHits; } | |
98 | /** | |
99 | * Get Graph of inner hits | |
100 | * | |
101 | * @return Graph of inner hits | |
102 | */ | |
103 | TGraph2D& GetInnerHits() { return fInnerHits; } | |
104 | /** | |
105 | * Get Number of outer hits | |
106 | * | |
107 | * @return Number of outer hits | |
108 | */ | |
109 | Int_t& GetNOuterHits() { return fNOuterHits; } | |
110 | /** | |
111 | * Get Graph of outer hits | |
112 | * | |
113 | * @return Graph of outer hits | |
114 | */ | |
115 | TGraph2D& GetOuterHits() { return fOuterHits; } | |
116 | /** | |
117 | * Get Maximum radius | |
118 | * | |
119 | * @return Maximum radius | |
120 | */ | |
121 | Double_t GetMaxR() const { return fMaxR; } | |
122 | /** | |
123 | * Set Maximum radius | |
124 | * | |
125 | * @param p | |
126 | */ | |
127 | void SetMaxR(Double_t p) { fMaxR = p; } | |
128 | /** | |
129 | * Get Minimum Z | |
130 | * | |
131 | * @return Minimum Z | |
132 | */ | |
133 | Double_t GetMinZ() const { return fMinZ; } | |
134 | /** | |
135 | * Set Minimum Z | |
136 | * | |
137 | * @param p | |
138 | */ | |
139 | void SetMinZ(Double_t p) { fMinZ = p; } | |
140 | /** | |
141 | * Get Maximum Z | |
142 | * | |
143 | * @return Maximum Z | |
144 | */ | |
145 | Double_t GetMaxZ() const { return fMaxZ; } | |
146 | /** | |
147 | * Set Maximum Z | |
148 | * | |
149 | * @param p | |
150 | */ | |
151 | void SetMaxZ(Double_t p) { fMaxZ = p; } | |
152 | protected: | |
f95a63c4 | 153 | /** Mother frame */ |
154 | TH1* fFrame; // Mother frame | |
155 | /** Identifier */ | |
156 | Int_t fId; // Identifier | |
157 | /** Array of shapes */ | |
158 | TObjArray fShapes; // Array of shapes | |
159 | /** Number of inner hits */ | |
160 | Int_t fNInnerHits; // Number of inner hits | |
161 | /** Graph of inner hits */ | |
162 | TGraph2D fInnerHits; // Graph of inner hits | |
163 | /** Number of outer hits */ | |
164 | Int_t fNOuterHits; // Number of outer hits | |
165 | /** Graph of outer hits */ | |
166 | TGraph2D fOuterHits; // Graph of outer hits | |
167 | /** Maximum radius */ | |
168 | Double_t fMaxR; // Maximum radius | |
169 | /** Minimum Z */ | |
170 | Double_t fMinZ; // Minimum Z | |
171 | /** Maximum Z */ | |
172 | Double_t fMaxZ; // Maximum Z | |
a9579262 | 173 | private: |
f95a63c4 | 174 | /** Add a histogram to a 2D graph. For some reason the code |
175 | checker thinks that this function can be made const - well, it | |
176 | cannot, since the graph passed down is a member of this | |
177 | object, and would be const in the this context if the member | |
178 | function is const. Since we modify the graph, we cannot make | |
179 | it a const reference, no matter how much we'd like to. */ | |
180 | void AddHistogram(TGraph2D& g, const char* toopt=""); | |
181 | /** Copy ctor */ | |
182 | AliFancyDetector(const AliFancyDetector& ); | |
183 | /** Assignement operator */ | |
184 | AliFancyDetector& operator=(const AliFancyDetector& ) { return *this; } | |
a9579262 | 185 | }; |
186 | ||
187 | /** Constructor | |
188 | @param gAliceFile galice file*/ | |
189 | AliFMDFancy(const char* gAliceFile="galice.root"); | |
190 | /** DTOR */ | |
191 | virtual ~AliFMDFancy(); | |
192 | ||
193 | /** Initialize | |
194 | @return @c false on error */ | |
195 | virtual Bool_t Init(); | |
196 | /** Called at beginning of an event | |
197 | @param event Event number | |
198 | @return @c false on error */ | |
199 | virtual Bool_t Begin(Int_t event); | |
200 | /** Called at end of an event | |
201 | @return @c false on error */ | |
202 | virtual Bool_t End(); | |
f95a63c4 | 203 | protected: |
204 | /** Copy ctor */ | |
a9579262 | 205 | AliFMDFancy(const AliFMDFancy& ); |
f95a63c4 | 206 | /** Assignement operator */ |
a9579262 | 207 | AliFMDFancy& operator=(const AliFMDFancy& ) { return *this; } |
d98fbfa5 | 208 | virtual void AddMarker(Float_t x, Float_t y, Float_t z, |
209 | TObject* o, Float_t s, Float_t min, Float_t max) | |
210 | { | |
211 | AliFMDDisplay::AddMarker(x, y, z, o, s, min, max); | |
212 | } | |
a9579262 | 213 | /** Add a marker to the display |
214 | @param det Detector | |
215 | @param rng Ring | |
216 | @param sec Sector | |
217 | @param str Strip | |
218 | @param o Object to refer to | |
219 | @param s Signal | |
220 | @param max Maximum of signal */ | |
f95a63c4 | 221 | virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, |
d98fbfa5 | 222 | UShort_t str, TObject* o, Float_t s, |
223 | Float_t min, Float_t max); | |
f95a63c4 | 224 | /** Process a hit |
225 | @param hit hit to process */ | |
a9579262 | 226 | virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*); |
f95a63c4 | 227 | |
a9579262 | 228 | /** FMD1 Pad */ |
f95a63c4 | 229 | TPad* fFMD1Pad; // FMD1 Pad |
230 | /** FMD1 Frame */ | |
231 | AliFancyDetector fFMD1; // FMD1 Frame | |
a9579262 | 232 | /** FMD2 Pad */ |
f95a63c4 | 233 | TPad* fFMD2Pad; // FMD2 Pad |
234 | /** FMD2 Frame */ | |
235 | AliFancyDetector fFMD2; // FMD2 Frame | |
a9579262 | 236 | /** FMD3 Pad */ |
f95a63c4 | 237 | TPad* fFMD3Pad; // FMD3 Pad |
238 | /** FMD3 Frame */ | |
239 | AliFancyDetector fFMD3; // FMD3 Frame | |
a9579262 | 240 | /** Summary pad */ |
f95a63c4 | 241 | TPad* fSummary; // Summary pad |
a9579262 | 242 | /** Text fields */ |
f95a63c4 | 243 | TLatex fEvent; // Text fields |
244 | /** Number of hits in FMD1i */ | |
245 | TLatex fFMD1IHits; // Number of hits in FMD1i | |
246 | /** Number of hits in FMD2i */ | |
247 | TLatex fFMD2IHits; // Number of hits in FMD2i | |
248 | /** Number of hits in FMD2o */ | |
249 | TLatex fFMD2OHits; // Number of hits in FMD2o | |
250 | /** Number of hits in FMD3i */ | |
251 | TLatex fFMD3IHits; // Number of hits in FMD3i | |
252 | /** Number of hits in FMD3o */ | |
253 | TLatex fFMD3OHits; // Number of hits in FMD3o | |
254 | /** Just a line */ | |
255 | TLine fLine; // Just a line | |
256 | /** Number of hits in FMD */ | |
257 | TLatex fTotal; // Number of hits in FMD | |
a9579262 | 258 | |
259 | ClassDef(AliFMDFancy,0) | |
260 | }; | |
261 | ||
262 | ||
263 | #endif | |
264 | //____________________________________________________________________ | |
265 | // | |
266 | // Local Variables: | |
267 | // mode: C++ | |
268 | // End: | |
269 | // | |
270 | // EOF | |
271 | // |