3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
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)
13 //___________________________________________________________________
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.
21 #include "AliFMDDisplay.h"
22 #include <TObjArray.h>
33 //___________________________________________________________________
34 /** @class AliFMDFancy
35 @brief Utility class to visualize FMD data in 2D.
38 class AliFMDFancy : public AliFMDDisplay
41 /** Sigh! the code checker thinks that all structs are POD - morron
43 class AliFancyDetector
47 AliFancyDetector(UShort_t id);
52 /** Called at the beginning of an event */
53 void Begin(Int_t event=0);
55 void Clear(Int_t event=0);
56 /** Called that the end of an event */
59 void AddMarker(Char_t rng, UShort_t sec, UShort_t str,
60 Float_t v, Float_t max);
65 * @return Mother frame
67 TH1*& GetFrame() { return fFrame; }
73 void SetFrame(TH1* p) { fFrame = p; }
79 Int_t GetId() const { return fId; }
85 void SetId(Int_t p) { fId = p; }
89 * @return Array of shapes
91 TObjArray& GetShapes() { return fShapes; }
93 * Get Number of inner hits
95 * @return Number of inner hits
97 Int_t& GetNInnerHits() { return fNInnerHits; }
99 * Get Graph of inner hits
101 * @return Graph of inner hits
103 TGraph2D& GetInnerHits() { return fInnerHits; }
105 * Get Number of outer hits
107 * @return Number of outer hits
109 Int_t& GetNOuterHits() { return fNOuterHits; }
111 * Get Graph of outer hits
113 * @return Graph of outer hits
115 TGraph2D& GetOuterHits() { return fOuterHits; }
119 * @return Maximum radius
121 Double_t GetMaxR() const { return fMaxR; }
127 void SetMaxR(Double_t p) { fMaxR = p; }
133 Double_t GetMinZ() const { return fMinZ; }
139 void SetMinZ(Double_t p) { fMinZ = p; }
145 Double_t GetMaxZ() const { return fMaxZ; }
151 void SetMaxZ(Double_t p) { fMaxZ = p; }
154 TH1* fFrame; // Mother frame
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
170 Double_t fMinZ; // Minimum Z
172 Double_t fMaxZ; // Maximum Z
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="");
182 AliFancyDetector(const AliFancyDetector& );
183 /** Assignement operator */
184 AliFancyDetector& operator=(const AliFancyDetector& ) { return *this; }
188 @param gAliceFile galice file*/
189 AliFMDFancy(const char* gAliceFile="galice.root");
191 virtual ~AliFMDFancy();
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();
205 AliFMDFancy(const AliFMDFancy& );
206 /** Assignement operator */
207 AliFMDFancy& operator=(const AliFMDFancy& ) { return *this; }
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)
211 AliFMDDisplay::AddMarker(x, y, z, o, s, min, max);
213 /** Add a marker to the display
218 @param o Object to refer to
220 @param max Maximum of signal */
221 virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec,
222 UShort_t str, TObject* o, Float_t s,
223 Float_t min, Float_t max);
225 @param hit hit to process */
226 virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*);
229 TPad* fFMD1Pad; // FMD1 Pad
231 AliFancyDetector fFMD1; // FMD1 Frame
233 TPad* fFMD2Pad; // FMD2 Pad
235 AliFancyDetector fFMD2; // FMD2 Frame
237 TPad* fFMD3Pad; // FMD3 Pad
239 AliFancyDetector fFMD3; // FMD3 Frame
241 TPad* fSummary; // Summary pad
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
255 TLine fLine; // Just a line
256 /** Number of hits in FMD */
257 TLatex fTotal; // Number of hits in FMD
259 ClassDef(AliFMDFancy,0)
264 //____________________________________________________________________