Correct raw data reconstruction in case of trigger
[u/mrichter/AliRoot.git] / FMD / AliFMDDisplay.h
CommitLineData
bf000c32 1#ifndef AliFMDDISPLAY_H
2#define AliFMDDISPLAY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
c2fc1258 8/** @file AliFMDDisplay.h
9 @author Christian Holm Christensen <cholm@nbi.dk>
10 @date Mon Mar 27 12:39:09 2006
11 @brief FMD Event display
12*/
bf000c32 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 "AliFMDInput.h"
22class TObjArray;
23class TCanvas;
24class TPad;
25class TButton;
26
27//___________________________________________________________________
9f662337 28/** @class AliFMDDisplay
29 @brief Utility class to visualize FMD data in geometry.
30 @ingroup FMD_util
31 */
bf000c32 32class AliFMDDisplay : public AliFMDInput
33{
34public:
9f662337 35 /** Constructor
36 @param gAliceFile galice file*/
bf000c32 37 AliFMDDisplay(const char* gAliceFile="galice.root");
9f662337 38 /** DTOR */
bf000c32 39 virtual ~AliFMDDisplay() {}
9f662337 40 /** Singleton access function
41 @return Singleton object. */
bf000c32 42 static AliFMDDisplay* Instance();
43
9f662337 44 /** Continue to next event */
bf000c32 45 void Continue() { fWait = kFALSE; }
9f662337 46 /** Zoom mode */
bf000c32 47 void Zoom() { fZoomMode = kTRUE; }
9f662337 48 /** Pick mode */
bf000c32 49 void Pick() { fZoomMode = kFALSE; }
9f662337 50 /** Called when a mouse or similar event happens in the display.
51 @param event Event type
52 @param px where the event happened in pixels along X
53 @param py where the event happened in pixels along Y */
bf000c32 54 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
9f662337 55 /** Calculate distance from point @f$ (p_x,p_y)@f$ to this object.
56 @param px Pixel X coordinate
57 @param py Pixel Y coordinate
58 @return distance. */
1e8f773e 59 Int_t DistancetoPrimitive(Int_t px, Int_t py);
9f662337 60 /** Paint into canvas
61 @param option Not used */
1e8f773e 62 void Paint(Option_t* option="") { (void)option; }
bf000c32 63
9f662337 64 /** Initialize
65 @return @c false on error */
bf000c32 66 virtual Bool_t Init();
9f662337 67 /** Called at beginning of an event
68 @param event Event number
69 @return @c false on error */
bf000c32 70 virtual Bool_t Begin(Int_t event);
9f662337 71 /** Called at end of an event
72 @return @c false on error */
bf000c32 73 virtual Bool_t End();
9f662337 74 /** Visualize a hit
75 @param hit Hit
76 @param p Track
77 @return @c false on error */
bf000c32 78 virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle* p);
9f662337 79 /** Visualize a digit
80 @param digit Digit to draw
81 @return @c false on error */
bf000c32 82 virtual Bool_t ProcessDigit(AliFMDDigit* digit);
9f662337 83 /** Visualize a raw digit
84 @param digit Raw digit.
85 @return @c false on error */
d760ea03 86 virtual Bool_t ProcessRaw(AliFMDDigit* digit);
9f662337 87 /** Visualize a reconstructed point.
88 @param recpoint Reconstructed point
89 @return @c false on error */
bf000c32 90 virtual Bool_t ProcessRecPoint(AliFMDRecPoint* recpoint);
9f662337 91 /** Look up a color index, based on the value @a x and the maximum
92 value of @a x
93 @param x Value
94 @param max Maximum (for example 1023 for digits)
95 @return @c false on error */
bf000c32 96 virtual Int_t LookupColor(Float_t x, Float_t max) const;
97protected:
98 static AliFMDDisplay* fgInstance; // Static instance
99 Bool_t fWait; // Wait until user presses `Continue'
100 TObjArray* fMarkers; // Cache of markers
101 TObjArray* fHits; // Cache of `hits'
102 TCanvas* fCanvas; // Canvas to draw in
103 TPad* fPad; // View pad.
104 TButton* fButton; // Continue button
105 TButton* fZoom; // Zoom button
106 TButton* fPick; // Pick button
107 Bool_t fZoomMode; // Whether we're in Zoom mode
108 Float_t fX0; // X at lower left corner or range
109 Float_t fY0; // Y at lower left corner or range
110 Float_t fX1; // X at upper right corner or range
111 Float_t fY1; // Y at upper right corner or range
112 Int_t fXPixel; // X pixel of mark
113 Int_t fYPixel; // Y pixel of mark
114 Int_t fOldXPixel; // Old x pixel of mark
115 Int_t fOldYPixel; // Old y pixel of mark
116 Bool_t fLineDrawn; // Whether we're drawing a box
117 ClassDef(AliFMDDisplay,0) // FMD specialised event display
118};
119
120#endif
121//____________________________________________________________________
122//
123// Local Variables:
124// mode: C++
125// End:
126//
127// EOF
128//