]>
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" | |
22 | #include <TObjArray.h> | |
23 | #include <TGraph.h> | |
24 | #include <TLatex.h> | |
25 | #include <TLine.h> | |
26 | class TCanvas; | |
27 | class TPad; | |
28 | class TH2; | |
29 | ||
30 | ||
31 | //___________________________________________________________________ | |
32 | /** @class AliFMDPattern | |
33 | @brief Utility class to visualize FMD data in 2D. | |
34 | @ingroup FMD_util | |
35 | */ | |
36 | class AliFMDPattern : public AliFMDDisplay | |
37 | { | |
38 | public: | |
39 | struct Detector | |
40 | { | |
41 | Detector(UShort_t id); | |
42 | ~Detector(); | |
43 | void Clear(); | |
44 | Int_t Total() const { return Int_t(fCounts.GetSum()); } | |
45 | void End(); | |
46 | void Begin(Int_t nlvl, Double_t r, TObjArray& inners, TObjArray& outers); | |
47 | void DrawShape(TObjArray& a); | |
48 | void AddMarker(Double_t x, Double_t y, Float_t s, Float_t max); | |
49 | Int_t fId; | |
50 | TArrayI fCounts; | |
51 | TObjArray fGraphs; | |
52 | TH2* fFrame; | |
53 | }; | |
54 | ||
55 | ||
56 | /** Constructor | |
57 | @param gAliceFile galice file*/ | |
58 | AliFMDPattern(const char* gAliceFile="galice.root"); | |
59 | /** DTOR */ | |
60 | virtual ~AliFMDPattern(); | |
61 | ||
62 | /** Initialize | |
63 | @return @c false on error */ | |
64 | virtual Bool_t Init(); | |
65 | /** Called at beginning of an event | |
66 | @param event Event number | |
67 | @return @c false on error */ | |
68 | virtual Bool_t Begin(Int_t event); | |
69 | protected: | |
70 | /** Add a marker to the display | |
71 | @param det Detector | |
72 | @param rng Ring | |
73 | @param sec Sector | |
74 | @param str Strip | |
75 | @param o Object to refer to | |
76 | @param s Signal | |
77 | @param max Maximum of signal */ | |
78 | virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str, | |
79 | TObject* o, Float_t s, Float_t max); | |
80 | virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*); | |
81 | virtual void Redisplay(); | |
82 | virtual void AtEnd(); | |
83 | /** Graph to show shape of inner sensor */ | |
84 | TObjArray fInners; | |
85 | /** Graph to show shape of outer sensor */ | |
86 | TObjArray fOuters; | |
87 | /** Max inner radius */ | |
88 | Float_t fInnerMax; | |
89 | /** Max outer radius */ | |
90 | Float_t fOuterMax; | |
91 | /** FMD1 Pad */ | |
92 | TPad* fFMD1Pad; | |
93 | /** FMD1 Frame */ | |
94 | Detector fFMD1; | |
95 | /** FMD2 Pad */ | |
96 | TPad* fFMD2Pad; | |
97 | /** FMD2 Frame */ | |
98 | Detector fFMD2; | |
99 | /** FMD3 Pad */ | |
100 | TPad* fFMD3Pad; | |
101 | /** FMD3 Frame */ | |
102 | Detector fFMD3; | |
103 | /** Summary pad */ | |
104 | TPad* fSummary; | |
105 | /** Text fields */ | |
106 | TLatex fEvent; | |
107 | TLatex fFMD1Sum; | |
108 | TLatex fFMD2Sum; | |
109 | TLatex fFMD3Sum; | |
110 | TLine fLine; | |
111 | TLatex fTotal; | |
112 | ||
113 | ClassDef(AliFMDPattern,0) | |
114 | }; | |
115 | ||
116 | ||
117 | #endif | |
118 | //____________________________________________________________________ | |
119 | // | |
120 | // Local Variables: | |
121 | // mode: C++ | |
122 | // End: | |
123 | // | |
124 | // EOF | |
125 | // |