AliRoot Core  edcc906 (edcc906)
AliFMDDisplay.h
Go to the documentation of this file.
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  */
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"
22 #include <TObjArray.h>
23 #include <TTimer.h>
24 class TCanvas;
25 class TPad;
26 class TButton;
27 class TSlider;
28 class TH1;
29 
30 //___________________________________________________________________
35 class AliFMDDisplay : public AliFMDInput
36 {
37 public:
44  AliFMDDisplay(Bool_t onlyFMD=kTRUE, const char* gAliceFile="galice.root");
48  virtual ~AliFMDDisplay();
54  static AliFMDDisplay* Instance();
55 
59  void Continue() { fWait = kFALSE; }
63  void Start() { fContinous = kTRUE; fWait = kFALSE; }
67  void Pause() { fContinous = kFALSE; fWait = kTRUE; }
71  void Zoom() { fZoomMode = kTRUE; }
75  void Pick() { fZoomMode = kFALSE; }
79  virtual void Redisplay(); // *MENU*
83  virtual void Break();
87  virtual void Render();
88 
92  virtual void ChangeCut();
96  virtual void ChangeFactor();
104  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
110  virtual void Paint(Option_t* option="") { (void)option; }
111 
117  virtual Bool_t Init();
124  virtual Bool_t Begin(Int_t event);
130  virtual Bool_t End();
138  virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle* p);
145  virtual Bool_t ProcessDigit(AliFMDDigit* digit);
152  virtual Bool_t ProcessSDigit(AliFMDSDigit* sdigit);
159  virtual Bool_t ProcessRawDigit(AliFMDDigit* digit);
166  virtual Bool_t ProcessRawCalibDigit(AliFMDDigit* digit);
173  virtual Bool_t ProcessRecPoint(AliFMDRecPoint* recpoint);
187  virtual Bool_t ProcessESD(UShort_t d, Char_t r, UShort_t s, UShort_t t,
188  Float_t eta, Float_t mult);
197  virtual Int_t LookupColor(Float_t x, Float_t min, Float_t max) const;
198 
202  virtual void SetCut(Float_t l=0., Float_t h=1.); //*MENU*
208  virtual void SetFactor(Float_t f=1);
209 protected:
216  : AliFMDInput(o),
217  fWait(kFALSE),
218  fMarkers(0),
219  fHits(0),
220  fCanvas(0),
221  fPad(0),
222  fButtons(0),
223  fSlider(0),
224  fFactor(0),
225  fZoomMode(0),
226  fX0(0),
227  fY0(0),
228  fX1(0),
229  fY1(0),
230  fXPixel(0),
231  fYPixel(0),
232  fOldXPixel(0),
233  fOldYPixel(0),
234  fLineDrawn(0),
235  fOnlyFMD(kTRUE),
236  fSpec(0),
237  fSpecCut(0),
238  fAux(0),
239  fReturn(kFALSE),
240  fContinous(kFALSE),
241  fTimeout(),
242  fInitialMin(0),
243  fInitialMax(1),
244  fInitialFactor(3./10)
245  { }
251  AliFMDDisplay& operator=(const AliFMDDisplay&) { return *this; }
262  virtual void AddMarker(Float_t x, Float_t y, Float_t z,
263  TObject* o, Float_t s, Float_t min, Float_t max);
275  virtual void AddMarker(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
276  TObject* o, Float_t s, Float_t min, Float_t max);
277 
281  void ShowOnlyFMD();
285  virtual void MakeCanvas(const char** which);
290  virtual void MakeAux();
295  virtual void DrawAux();
300  virtual void Idle();
305  virtual void AtEnd();
315  virtual Bool_t InsideCut(Float_t v, const Float_t& min,
316  const Float_t& max) const;
327  virtual Double_t GetADCThreshold(UShort_t d, Char_t r,
328  UShort_t s, UShort_t t) const;
329 
330  static AliFMDDisplay* fgInstance; // Static instance
331  Bool_t fWait; // Wait until user presses `Continue'
332  TObjArray* fMarkers; // Cache of markers
333  TObjArray* fHits; // Cache of `hits'
334  TCanvas* fCanvas; // Canvas to draw in
335  TPad* fPad; // View pad.
336  TObjArray fButtons; // Continue button
337  TSlider* fSlider; // Cut slider
338  TSlider* fFactor; // Factor slider
339  Bool_t fZoomMode; // Whether we're in Zoom mode
340  Float_t fX0; // X at lower left corner or range
341  Float_t fY0; // Y at lower left corner or range
342  Float_t fX1; // X at upper right corner or range
343  Float_t fY1; // Y at upper right corner or range
344  Int_t fXPixel; // X pixel of mark
345  Int_t fYPixel; // Y pixel of mark
346  Int_t fOldXPixel; // Old x pixel of mark
347  Int_t fOldYPixel; // Old y pixel of mark
348  Bool_t fLineDrawn; // Whether we're drawing a box
349  Bool_t fOnlyFMD; // Whether to only do FMD
350  TH1* fSpec; // Spectra
351  TH1* fSpecCut; // Cut spectra
352  TCanvas* fAux; // Aux canvas.
353  Bool_t fReturn; // Stop
354  Bool_t fContinous; // Run continuous - do not stop
355  TTimer fTimeout; // Timeout
356  Float_t fInitialMin;// Initial minimum
357  Float_t fInitialMax;// Initial maximum
358  Float_t fInitialFactor;//Initial factor
359 
360  struct Range_t {
361  UInt_t fNbins; // Number of bins
362  Float_t fLow; // Low cut
363  Float_t fHigh; // High cut
364  };
365  static const Range_t fgkEdepRange; // Energy loss range
366  static const Range_t fgkAdcRange; // ADC counts range
367  static const Range_t fgkMultRange; // Multiplicity range
368 
369  ClassDef(AliFMDDisplay,0) // FMD specialised event display
370 };
371 
372 #endif
373 //____________________________________________________________________
374 //
375 // Local Variables:
376 // mode: C++
377 // End:
378 //
379 // EOF
380 //
class for digits
Definition: AliFMDDigit.h:28
Reconstructed FMD points. It contains the pseudo-inclusive multiplicity.
AliFMDDisplay(Bool_t onlyFMD=kTRUE, const char *gAliceFile="galice.root")
TObjArray * fHits
virtual Int_t LookupColor(Float_t x, Float_t min, Float_t max) const
virtual void Break()
virtual Double_t GetADCThreshold(UShort_t d, Char_t r, UShort_t s, UShort_t t) const
virtual Bool_t End()
virtual Bool_t Begin(Int_t event)
#define TObjArray
FMD utility classes for reading FMD data.
static const Range_t fgkMultRange
virtual void Paint(Option_t *option="")
virtual Bool_t ProcessDigit(AliFMDDigit *digit)
Float_t p[]
Definition: kNNTest.C:133
virtual Bool_t ProcessRawCalibDigit(AliFMDDigit *digit)
virtual Bool_t ProcessRecPoint(AliFMDRecPoint *recpoint)
virtual void SetFactor(Float_t f=1)
virtual void ChangeCut()
virtual void AddMarker(Float_t x, Float_t y, Float_t z, TObject *o, Float_t s, Float_t min, Float_t max)
Float_t fInitialMax
TObjArray * fMarkers
static AliFMDDisplay * Instance()
virtual void ChangeFactor()
virtual Bool_t InsideCut(Float_t v, const Float_t &min, const Float_t &max) const
virtual Bool_t Init()
static AliFMDDisplay * fgInstance
virtual void DrawAux()
virtual void Idle()
AliFMDDisplay(const AliFMDDisplay &o)
virtual Bool_t ProcessSDigit(AliFMDSDigit *sdigit)
virtual void MakeCanvas(const char **which)
virtual Bool_t ProcessRawDigit(AliFMDDigit *digit)
Float_t fInitialFactor
virtual void AtEnd()
Float_t fInitialMin
TCanvas * fAux
TF1 * f
Definition: interpolTest.C:21
static const Range_t fgkAdcRange
virtual Bool_t ProcessESD(UShort_t d, Char_t r, UShort_t s, UShort_t t, Float_t eta, Float_t mult)
virtual ~AliFMDDisplay()
Base class for reading in various FMD data. The class loops over all found events. For each event the specified data is read in. The class then loops over all elements of the read data, and process these with user defined code.
Definition: AliFMDInput.h:106
TSlider * fSlider
class for summable digits
Definition: AliFMDSDigit.h:27
TObjArray fButtons
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Utility class to visualize FMD data in geometry.
Definition: AliFMDDisplay.h:35
AliFMDhit is the hit class for the FMD. Hits are the information that comes from a Monte Carlo at eac...
Definition: AliFMDHit.h:30
virtual void MakeAux()
AliFMDDisplay & operator=(const AliFMDDisplay &)
virtual void SetCut(Float_t l=0., Float_t h=1.)
virtual void Redisplay()
TSlider * fFactor
static const Range_t fgkEdepRange
TCanvas * fCanvas
virtual void Render()
virtual Bool_t ProcessHit(AliFMDHit *hit, TParticle *p)