]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDFancy.h
New features, summary plots etc. The DA's now write out calibration parameters in...
[u/mrichter/AliRoot.git] / FMD / AliFMDFancy.h
CommitLineData
a9579262 1#ifndef AliFMDFANCY_H
2#define AliFMDFANCY_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 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)
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 <TGraph2D.h>
24#include <TLatex.h>
25#include <TLine.h>
26class TCanvas;
27class TPad;
28class TH1;
29class TH2;
f95a63c4 30// class TH3;
a9579262 31
32
33//___________________________________________________________________
34/** @class AliFMDFancy
35 @brief Utility class to visualize FMD data in 2D.
36 @ingroup FMD_util
37 */
38class AliFMDFancy : public AliFMDDisplay
39{
40public:
f95a63c4 41 /** Sigh! the code checker thinks that all structs are POD - morron
42 */
43 class AliFancyDetector
a9579262 44 {
f95a63c4 45 public:
46 /** CTOR */
47 AliFancyDetector(UShort_t id);
48 /** DTOR */
49 ~AliFancyDetector();
50 /** Initialise */
a9579262 51 void Init();
f95a63c4 52 /** Called at the beginning of an event */
a9579262 53 void Begin(Int_t event=0);
f95a63c4 54 /** Clear display */
a9579262 55 void Clear(Int_t event=0);
f95a63c4 56 /** Called that the end of an event */
a9579262 57 void End();
f95a63c4 58 /** Add a marker */
a9579262 59 void AddMarker(Char_t rng, UShort_t sec, UShort_t str,
60 Float_t v, Float_t max);
f95a63c4 61 /** Mother frame */
62 TH1* fFrame; // Mother frame
63 /** Identifier */
64 Int_t fId; // Identifier
65 /** Array of shapes */
66 TObjArray fShapes; // Array of shapes
67 /** Number of inner hits */
68 Int_t fNInnerHits; // Number of inner hits
69 /** Graph of inner hits */
70 TGraph2D fInnerHits; // Graph of inner hits
71 /** Number of outer hits */
72 Int_t fNOuterHits; // Number of outer hits
73 /** Graph of outer hits */
74 TGraph2D fOuterHits; // Graph of outer hits
75 /** Maximum radius */
76 Double_t fMaxR; // Maximum radius
77 /** Minimum Z */
78 Double_t fMinZ; // Minimum Z
79 /** Maximum Z */
80 Double_t fMaxZ; // Maximum Z
a9579262 81 private:
f95a63c4 82 /** Add a histogram to a 2D graph. For some reason the code
83 checker thinks that this function can be made const - well, it
84 cannot, since the graph passed down is a member of this
85 object, and would be const in the this context if the member
86 function is const. Since we modify the graph, we cannot make
87 it a const reference, no matter how much we'd like to. */
88 void AddHistogram(TGraph2D& g, const char* toopt="");
89 /** Copy ctor */
90 AliFancyDetector(const AliFancyDetector& );
91 /** Assignement operator */
92 AliFancyDetector& operator=(const AliFancyDetector& ) { return *this; }
a9579262 93 };
94
95 /** Constructor
96 @param gAliceFile galice file*/
97 AliFMDFancy(const char* gAliceFile="galice.root");
98 /** DTOR */
99 virtual ~AliFMDFancy();
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 /** Called at end of an event
109 @return @c false on error */
110 virtual Bool_t End();
f95a63c4 111protected:
112 /** Copy ctor */
a9579262 113 AliFMDFancy(const AliFMDFancy& );
f95a63c4 114 /** Assignement operator */
a9579262 115 AliFMDFancy& operator=(const AliFMDFancy& ) { return *this; }
d98fbfa5 116 virtual void AddMarker(Float_t x, Float_t y, Float_t z,
117 TObject* o, Float_t s, Float_t min, Float_t max)
118 {
119 AliFMDDisplay::AddMarker(x, y, z, o, s, min, max);
120 }
a9579262 121 /** Add a marker to the display
122 @param det Detector
123 @param rng Ring
124 @param sec Sector
125 @param str Strip
126 @param o Object to refer to
127 @param s Signal
128 @param max Maximum of signal */
f95a63c4 129 virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec,
d98fbfa5 130 UShort_t str, TObject* o, Float_t s,
131 Float_t min, Float_t max);
f95a63c4 132 /** Process a hit
133 @param hit hit to process */
a9579262 134 virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle*);
f95a63c4 135
a9579262 136 /** FMD1 Pad */
f95a63c4 137 TPad* fFMD1Pad; // FMD1 Pad
138 /** FMD1 Frame */
139 AliFancyDetector fFMD1; // FMD1 Frame
a9579262 140 /** FMD2 Pad */
f95a63c4 141 TPad* fFMD2Pad; // FMD2 Pad
142 /** FMD2 Frame */
143 AliFancyDetector fFMD2; // FMD2 Frame
a9579262 144 /** FMD3 Pad */
f95a63c4 145 TPad* fFMD3Pad; // FMD3 Pad
146 /** FMD3 Frame */
147 AliFancyDetector fFMD3; // FMD3 Frame
a9579262 148 /** Summary pad */
f95a63c4 149 TPad* fSummary; // Summary pad
a9579262 150 /** Text fields */
f95a63c4 151 TLatex fEvent; // Text fields
152 /** Number of hits in FMD1i */
153 TLatex fFMD1IHits; // Number of hits in FMD1i
154 /** Number of hits in FMD2i */
155 TLatex fFMD2IHits; // Number of hits in FMD2i
156 /** Number of hits in FMD2o */
157 TLatex fFMD2OHits; // Number of hits in FMD2o
158 /** Number of hits in FMD3i */
159 TLatex fFMD3IHits; // Number of hits in FMD3i
160 /** Number of hits in FMD3o */
161 TLatex fFMD3OHits; // Number of hits in FMD3o
162 /** Just a line */
163 TLine fLine; // Just a line
164 /** Number of hits in FMD */
165 TLatex fTotal; // Number of hits in FMD
a9579262 166
167 ClassDef(AliFMDFancy,0)
168};
169
170
171#endif
172//____________________________________________________________________
173//
174// Local Variables:
175// mode: C++
176// End:
177//
178// EOF
179//