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