]>
Commit | Line | Data |
---|---|---|
a9579262 | 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" | |
a1e17193 | 22 | #include <TArrayI.h> |
a9579262 | 23 | #include <TObjArray.h> |
f95a63c4 | 24 | // #include <TGraph.h> |
a9579262 | 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: | |
f95a63c4 | 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 | |
a9579262 | 47 | { |
f95a63c4 | 48 | public: |
49 | /** Constructor */ | |
50 | AliFMDPatternDetector(UShort_t id); | |
51 | /** Destructor */ | |
52 | ~AliFMDPatternDetector(); | |
53 | /** Clear this detector */ | |
a9579262 | 54 | void Clear(); |
f95a63c4 | 55 | /** Get the total number of hits */ |
a9579262 | 56 | Int_t Total() const { return Int_t(fCounts.GetSum()); } |
f95a63c4 | 57 | /** Called at the end of things */ |
a9579262 | 58 | void End(); |
f95a63c4 | 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 */ | |
a9579262 | 68 | void DrawShape(TObjArray& a); |
f95a63c4 | 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 */ | |
a9579262 | 74 | void AddMarker(Double_t x, Double_t y, Float_t s, Float_t max); |
f95a63c4 | 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. */ | |
2b893216 | 82 | AliFMDPatternDetector(const AliFMDPatternDetector&); |
f95a63c4 | 83 | /** Assignement operator |
84 | -- Not implemented */ | |
85 | AliFMDPatternDetector& operator=(const AliFMDPatternDetector&); | |
f38b1653 | 86 | void CopyShapes(TObjArray& input, TObjArray& own, |
87 | Double_t ang=0, Double_t fx=1, Double_t fy=1); | |
88 | /** Our own cache of shapes */ | |
89 | TObjArray fInners; | |
90 | /** Our own cache of shapes */ | |
91 | TObjArray fOuters; | |
a9579262 | 92 | }; |
93 | ||
94 | ||
95 | /** Constructor | |
96 | @param gAliceFile galice file*/ | |
97 | AliFMDPattern(const char* gAliceFile="galice.root"); | |
98 | /** DTOR */ | |
99 | virtual ~AliFMDPattern(); | |
100 | ||
101 | /** Initialize | |
102 | @return @c false on error */ | |
103 | virtual Bool_t Init(); | |
104 | /** Called at beginning of an event | |
105 | @param event Event number | |
106 | @return @c false on error */ | |
107 | virtual Bool_t Begin(Int_t event); | |
108 | protected: | |
f95a63c4 | 109 | /** Copy constructor |
110 | - Not implemented. */ | |
111 | AliFMDPattern(const AliFMDPattern&); | |
112 | /** Assignement operator | |
113 | -- Not implemented */ | |
114 | AliFMDPattern& operator=(const AliFMDPattern&); | |
d98fbfa5 | 115 | virtual void AddMarker(Float_t x, Float_t y, Float_t z, |
116 | TObject* o, Float_t s, Float_t min, Float_t max) | |
117 | { | |
118 | AliFMDDisplay::AddMarker(x, y, z, o, s, min, max); | |
119 | } | |
a9579262 | 120 | /** Add a marker to the display |
121 | @param det Detector | |
122 | @param rng Ring | |
123 | @param sec Sector | |
124 | @param str Strip | |
125 | @param o Object to refer to | |
126 | @param s Signal | |
127 | @param max Maximum of signal */ | |
f95a63c4 | 128 | virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, |
d98fbfa5 | 129 | UShort_t str, TObject* o, Float_t s, |
130 | Float_t min, Float_t max); | |
f95a63c4 | 131 | /** @param hit Hit to process */ |
a9579262 | 132 | virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*); |
f95a63c4 | 133 | /** Re-draw the patterns */ |
a9579262 | 134 | virtual void Redisplay(); |
f95a63c4 | 135 | /** Called at the end. */ |
a9579262 | 136 | virtual void AtEnd(); |
137 | /** Graph to show shape of inner sensor */ | |
f95a63c4 | 138 | TObjArray fInners; // Graph to show shape of inner sensor |
a9579262 | 139 | /** Graph to show shape of outer sensor */ |
f95a63c4 | 140 | TObjArray fOuters; // Graph to show shape of outer sensor |
a9579262 | 141 | /** Max inner radius */ |
f95a63c4 | 142 | Float_t fInnerMax; // Max inner radius |
a9579262 | 143 | /** Max outer radius */ |
f95a63c4 | 144 | Float_t fOuterMax; // Max outer radius |
a9579262 | 145 | /** FMD1 Pad */ |
f95a63c4 | 146 | TPad* fFMD1Pad; // FMD1 Pad |
147 | /** FMD1 Frame */ | |
148 | AliFMDPatternDetector fFMD1; // FMD1 Frame | |
a9579262 | 149 | /** FMD2 Pad */ |
f95a63c4 | 150 | TPad* fFMD2Pad; // FMD2 Pad |
151 | /** FMD2 Frame */ | |
152 | AliFMDPatternDetector fFMD2; // FMD2 Frame | |
a9579262 | 153 | /** FMD3 Pad */ |
f95a63c4 | 154 | TPad* fFMD3Pad; // FMD3 Pad |
155 | /** FMD3 Frame */ | |
156 | AliFMDPatternDetector fFMD3; // FMD3 Frame | |
a9579262 | 157 | /** Summary pad */ |
f95a63c4 | 158 | TPad* fSummary; // Summary pad |
a9579262 | 159 | /** Text fields */ |
f95a63c4 | 160 | TLatex fEvent; // Text fields |
161 | TLatex fFMD1Sum; // Total in FMD1 | |
162 | TLatex fFMD2Sum; // Total in FMD1 | |
163 | TLatex fFMD3Sum; // Total in FMD1 | |
164 | TLine fLine; // Just a line | |
165 | TLatex fTotal; // Total in FMD | |
a9579262 | 166 | |
e064ab4a | 167 | Double_t fFMD1Area; // |
168 | Double_t fFMD2Area; // | |
169 | Double_t fFMD3Area; // | |
170 | ||
f95a63c4 | 171 | ClassDef(AliFMDPattern,0) // Display FMD data as hit-patterns. |
a9579262 | 172 | }; |
173 | ||
174 | ||
175 | #endif | |
176 | //____________________________________________________________________ | |
177 | // | |
178 | // Local Variables: | |
179 | // mode: C++ | |
180 | // End: | |
181 | // | |
182 | // EOF | |
183 | // |