]>
Commit | Line | Data |
---|---|---|
1 | #ifndef AliFMDPATTERN_H | |
2 | #define AliFMDPATTERN_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 AliFMDPattern.h | |
9 | @author Christian Holm Christensen <cholm@nbi.dk> | |
10 | @date Mon Mar 27 12:39:09 2006 | |
11 | @brief FMD Event display (as patterns) | |
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 <TArrayI.h> | |
23 | #include <TObjArray.h> | |
24 | // #include <TGraph.h> | |
25 | #include <TLatex.h> | |
26 | #include <TLine.h> | |
27 | class TCanvas; | |
28 | class TPad; | |
29 | class TH2; | |
30 | ||
31 | ||
32 | //___________________________________________________________________ | |
33 | /** @class AliFMDPattern | |
34 | @brief Utility class to visualize FMD data in 2D. | |
35 | @ingroup FMD_util | |
36 | */ | |
37 | class AliFMDPattern : public AliFMDDisplay | |
38 | { | |
39 | public: | |
40 | /** @class AliFMDPatternDetector | |
41 | @brief Utility for the pattern display. | |
42 | The name is this long, because the code-checker even cares about | |
43 | nested names, even though it seems a bit nit-picking and | |
44 | retareded. It's a class rather than a structure, because the | |
45 | code checker thinks that structs are only for POD - sigh! */ | |
46 | class AliFMDPatternDetector | |
47 | { | |
48 | public: | |
49 | /** Constructor */ | |
50 | AliFMDPatternDetector(UShort_t id); | |
51 | /** Destructor */ | |
52 | ~AliFMDPatternDetector(); | |
53 | /** Clear this detector */ | |
54 | void Clear(); | |
55 | /** Get the total number of hits */ | |
56 | Int_t Total() const { return Int_t(fCounts.GetSum()); } | |
57 | /** Called at the end of things */ | |
58 | void End(); | |
59 | /** Initiate. | |
60 | @param nlvl Number of levels. | |
61 | @param r Radius | |
62 | @param inners Array of inner shapes | |
63 | @param outers Array of outer shapes */ | |
64 | void Begin(Int_t nlvl, Double_t r, TObjArray& inners, | |
65 | TObjArray& outers); | |
66 | /** Draw everything | |
67 | @param a Array of shapes to draw */ | |
68 | void DrawShape(TObjArray& a); | |
69 | /** Add a marker at specified coordinates | |
70 | @param X X coordinate | |
71 | @param Y Y coordinate | |
72 | @param Z Z coordinate | |
73 | @param max The maximum value to scale to */ | |
74 | void AddMarker(Double_t x, Double_t y, Float_t s, Float_t max); | |
75 | Int_t fId; // Identifier # | |
76 | TArrayI fCounts; // Number of counts at each level | |
77 | TObjArray fGraphs; // Array of graphs - one for each level | |
78 | TH2* fFrame; // The mother frame | |
79 | private: | |
80 | /** Copy constructor | |
81 | - Not implemented. */ | |
82 | AliFMDPatternDetector(const AliFMDPatternDetector&); | |
83 | /** Assignement operator | |
84 | -- Not implemented */ | |
85 | AliFMDPatternDetector& operator=(const AliFMDPatternDetector&); | |
86 | ||
87 | }; | |
88 | ||
89 | ||
90 | /** Constructor | |
91 | @param gAliceFile galice file*/ | |
92 | AliFMDPattern(const char* gAliceFile="galice.root"); | |
93 | /** DTOR */ | |
94 | virtual ~AliFMDPattern(); | |
95 | ||
96 | /** Initialize | |
97 | @return @c false on error */ | |
98 | virtual Bool_t Init(); | |
99 | /** Called at beginning of an event | |
100 | @param event Event number | |
101 | @return @c false on error */ | |
102 | virtual Bool_t Begin(Int_t event); | |
103 | protected: | |
104 | /** Copy constructor | |
105 | - Not implemented. */ | |
106 | AliFMDPattern(const AliFMDPattern&); | |
107 | /** Assignement operator | |
108 | -- Not implemented */ | |
109 | AliFMDPattern& operator=(const AliFMDPattern&); | |
110 | /** Add a marker to the display | |
111 | @param det Detector | |
112 | @param rng Ring | |
113 | @param sec Sector | |
114 | @param str Strip | |
115 | @param o Object to refer to | |
116 | @param s Signal | |
117 | @param max Maximum of signal */ | |
118 | virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, | |
119 | UShort_t str, TObject* o, Float_t s, Float_t max); | |
120 | /** @param hit Hit to process */ | |
121 | virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*); | |
122 | /** Re-draw the patterns */ | |
123 | virtual void Redisplay(); | |
124 | /** Called at the end. */ | |
125 | virtual void AtEnd(); | |
126 | /** Graph to show shape of inner sensor */ | |
127 | TObjArray fInners; // Graph to show shape of inner sensor | |
128 | /** Graph to show shape of outer sensor */ | |
129 | TObjArray fOuters; // Graph to show shape of outer sensor | |
130 | /** Max inner radius */ | |
131 | Float_t fInnerMax; // Max inner radius | |
132 | /** Max outer radius */ | |
133 | Float_t fOuterMax; // Max outer radius | |
134 | /** FMD1 Pad */ | |
135 | TPad* fFMD1Pad; // FMD1 Pad | |
136 | /** FMD1 Frame */ | |
137 | AliFMDPatternDetector fFMD1; // FMD1 Frame | |
138 | /** FMD2 Pad */ | |
139 | TPad* fFMD2Pad; // FMD2 Pad | |
140 | /** FMD2 Frame */ | |
141 | AliFMDPatternDetector fFMD2; // FMD2 Frame | |
142 | /** FMD3 Pad */ | |
143 | TPad* fFMD3Pad; // FMD3 Pad | |
144 | /** FMD3 Frame */ | |
145 | AliFMDPatternDetector fFMD3; // FMD3 Frame | |
146 | /** Summary pad */ | |
147 | TPad* fSummary; // Summary pad | |
148 | /** Text fields */ | |
149 | TLatex fEvent; // Text fields | |
150 | TLatex fFMD1Sum; // Total in FMD1 | |
151 | TLatex fFMD2Sum; // Total in FMD1 | |
152 | TLatex fFMD3Sum; // Total in FMD1 | |
153 | TLine fLine; // Just a line | |
154 | TLatex fTotal; // Total in FMD | |
155 | ||
156 | ClassDef(AliFMDPattern,0) // Display FMD data as hit-patterns. | |
157 | }; | |
158 | ||
159 | ||
160 | #endif | |
161 | //____________________________________________________________________ | |
162 | // | |
163 | // Local Variables: | |
164 | // mode: C++ | |
165 | // End: | |
166 | // | |
167 | // EOF | |
168 | // |