AliRoot Core  edcc906 (edcc906)
AliFMDSpectraDisplay.h
Go to the documentation of this file.
1 #ifndef AliFMDSPECTRADISPLAY_H
2 #define AliFMDSPECTRADISPLAY_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 "AliFMDPattern.h"
22 #include <TGFrame.h>
23 #include <TGListTree.h>
24 #include <TObjArray.h>
25 #include <TQObject.h>
26 #include <RQ_OBJECT.h>
27 
28 class TGPicture;
29 class TH1;
30 class TAxis;
31 
32 //____________________________________________________________________
38 {
39 public:
45 
46  //__________________________________________________________________
51  class AliFMDSpectraDisplayElement : public TNamed
52  {
53  public:
67  virtual void Show(Option_t* option, Double_t l, Double_t h);
73  virtual AliFMDSpectraDisplayTop& GetTop() = 0;
79  virtual void MakeHistograms(const TAxis* axis);
87  virtual Int_t Compare(const TObject* o) const;
88  protected:
95  AliFMDSpectraDisplayElement(const char* name, const char* title)
96  : TNamed(name, title), fFull(0), fCut(0)
97  {}
99  : TNamed(o),
100  fFull(o.fFull),
101  fCut(o.fCut)
102  {}
104  operator=(const AliFMDSpectraDisplayElement&) { return *this; }
110  void DoFill(Double_t v);
111  TH1* fFull; // Full spectra
112  TH1* fCut; // Spectra after cut
113  ClassDef(AliFMDSpectraDisplayElement,0); // Element in FMD spectra display
114  };
115 
116  //__________________________________________________________________
122  public TQObject
123  {
124  public:
131  AliFMDSpectraDisplayTop(TGCompositeFrame& frame, TCanvas* canvas);
137  TGListTree& GetList() { return fList; }
145  AliFMDSpectraDisplayDetector& GetOrAdd(UShort_t id);
155  void Fill(UShort_t d, Char_t ring,
156  UShort_t sec, UShort_t str, Double_t v);
162  TAxis* GetAxis() const { return fAxis; }
168  void SetAxis(TAxis* a);
174  AliFMDSpectraDisplayTop& GetTop() { return *this; }
175 
182  virtual void HandleEntry(TGListTreeItem* e, Int_t id);
189  virtual void HandleKey(TGListTreeItem* f, UInt_t keysym, UInt_t mask);
194  virtual void HandleReturn(TGListTreeItem* f);
198  virtual void ClearList();
202  virtual void ClearCanvas();
206  virtual void UpdateCanvas();
210  virtual void UpdateList();
214  TGListTreeItem* CurrentEntry() const { return fCurrentEntry; }
218  TObject* Current() const;
222  void SelectionChanged() { Emit("SelectionChanged()"); }//*SIGNAL*
226  const TGPicture* GetH1Pic() const { return fkHist1DIcon; }
230  const TGPicture* GetH2Pic() const { return fkHist2DIcon; }
234  const TGPicture* GetH3Pic() const { return fkHist3DIcon; }
238  const TGPicture* GetGPic() const { return fkGraphIcon; }
244  TGListTreeItem& GetEntry() const { return fEntry; }
252  virtual Int_t Compare(const TObject* o) const;
253  protected:
256  TQObject(),
257  fHints(o.fHints),
258  fContainer(), // o.fContainer),
259  fList(), // o.fList),
260  fChildren(o.fChildren),
261  fCurrentEntry(o.fCurrentEntry),
262  fCanvas(o.fCanvas),
263  fkHist1DIcon(o.fkHist1DIcon),
264  fkHist2DIcon(o.fkHist2DIcon),
265  fkHist3DIcon(o.fkHist3DIcon),
266  fkGraphIcon(o.fkGraphIcon),
267  fAxis(o.fAxis),
268  fEntry(o.fEntry)
269  {}
270 
272  {
273  return *this;
274  }
275  TGLayoutHints fHints; // Layout hints
276  TGCanvas fContainer; // Container
277  TGListTree fList; // List
278  TObjArray fChildren; // Children
279  TGListTreeItem* fCurrentEntry; // Current entry
280  TCanvas* fCanvas; // Canvas
281  const TGPicture* fkHist1DIcon; // 1D Histogram Icon
282  const TGPicture* fkHist2DIcon; // 2D Histogram Icon
283  const TGPicture* fkHist3DIcon; // 3D Histogram Icon
284  const TGPicture* fkGraphIcon; // Graph Icon
285  TAxis* fAxis; // The axis to use
286  TGListTreeItem& fEntry; // Entry
287 
288  ClassDef(AliFMDSpectraDisplayTop,0);
289  };
290 
291  //__________________________________________________________________
297  {
298  public:
311  UShort_t Id() const { return fId; }
317  AliFMDSpectraDisplayTop& GetTop() { return fParent; }
323  AliFMDSpectraDisplayTop& GetParent() const { return fParent; }
331  AliFMDSpectraDisplayRing& GetOrAdd(Char_t id);
340  void Fill(Char_t ring, UShort_t sec, UShort_t str, Double_t v);
347  TGListTreeItem& GetEntry() const { return fEntry; }
355  virtual Int_t Compare(const TObject* o) const;
356  protected:
357  UShort_t fId; // Identifier
359  TObjArray fChildren; // Children
360  TGListTreeItem& fEntry; // The entry
361  ClassDef(AliFMDSpectraDisplayDetector,0); // Detector element in FMD spectra
362  };
363 
364  //__________________________________________________________________
370  {
371  public:
384  Char_t Id() const { return fId; }
390  UShort_t DetectorId() const { return fParent.Id(); }
396  AliFMDSpectraDisplayTop& GetTop() { return fParent.GetTop(); }
402  AliFMDSpectraDisplayDetector& GetDetector() const { return GetParent(); }
408  AliFMDSpectraDisplayDetector& GetParent() const { return fParent; }
416  AliFMDSpectraDisplaySector& GetOrAdd(UShort_t id);
424  void Fill(UShort_t sec, UShort_t str, Double_t v);
430  TGListTreeItem& GetEntry() const { return fEntry; }
438  virtual Int_t Compare(const TObject* o) const;
439  protected:
441  Char_t fId; // Identifier
442  TObjArray fChildren; // Children
443  TGListTreeItem& fEntry; // Entry
444  ClassDef(AliFMDSpectraDisplayRing,0); // Ring element in FMD spectra
445  };
446 
447  //__________________________________________________________________
453  {
454  public:
467  UShort_t Id() const { return fId; }
473  UShort_t DetectorId() const { return fParent.DetectorId(); }
479  Char_t RingId() const { return fParent.Id(); }
485  AliFMDSpectraDisplayTop& GetTop() { return fParent.GetTop(); }
491  AliFMDSpectraDisplayDetector& GetDetector() { return fParent.GetDetector(); }
497  AliFMDSpectraDisplayRing& GetRing() { return fParent; }
503  AliFMDSpectraDisplayRing& GetParent() { return fParent; }
511  AliFMDSpectraDisplayStrip& GetOrAdd(UShort_t id);
518  void Fill(UShort_t str, Double_t v);
524  TGListTreeItem& GetEntry() const { return fEntry; }
532  virtual Int_t Compare(const TObject* o) const;
533  protected:
535  UShort_t fId; // Identifier
536  TObjArray fChildren;// Children
537  TGListTreeItem& fEntry; // Entry
538  ClassDef(AliFMDSpectraDisplaySector,0); // Sector element in FMD spectra
539  };
540 
541  //__________________________________________________________________
547  {
548  public:
561  UShort_t Id() const { return fId; }
567  UShort_t DetectorId() const { return fParent.DetectorId(); }
573  Char_t RingId() const { return fParent.RingId(); }
579  UShort_t SectorId() const { return fParent.Id(); }
585  AliFMDSpectraDisplayTop& GetTop() { return fParent.GetTop(); }
591  AliFMDSpectraDisplayDetector& GetDetector() { return fParent.GetDetector(); }
597  AliFMDSpectraDisplayRing& GetRing() { return fParent.GetRing(); }
603  AliFMDSpectraDisplaySector& GetSector() { return fParent; }
609  AliFMDSpectraDisplaySector& GetParent() { return fParent; }
615  void Fill(Double_t v);
621  TGListTreeItem& GetEntry() const { return fEntry; }
629  virtual Int_t Compare(const TObject* o) const;
630  protected:
632  UShort_t fId; // Identifier
633  TGListTreeItem& fEntry; // Entry
634  ClassDef(AliFMDSpectraDisplayStrip,0);
635  };
636 
647  Bool_t HandleDraw();
652  void MakeAux();
657  void DrawAux();
666  Bool_t ProcessHit(AliFMDHit* hit, TParticle* p);
674  Bool_t ProcessDigit(AliFMDDigit* digit);
682  Bool_t ProcessSDigit(AliFMDSDigit* sdigit);
690  Bool_t ProcessRawDigit(AliFMDDigit* digit);
698  Bool_t ProcessRecPoint(AliFMDRecPoint* recpoint);
711  Bool_t ProcessESD(UShort_t det, Char_t rng, UShort_t sec, UShort_t str,
712  Float_t x, Float_t mult);
713 protected:
714  TGMainFrame fSelector; // GUI to select spectra
715  AliFMDSpectraDisplayTop fTop; // Top of hierarcy
716  ClassDef(AliFMDSpectraDisplay,0); // FMD event and spectra display
717 }
718  ;
719 
720 #endif
721 //____________________________________________________________________
722 //
723 // Local Variables:
724 // mode: C++
725 // End:
726 //
727 // EOF
728 //
729 
class for digits
Definition: AliFMDDigit.h:28
Reconstructed FMD points. It contains the pseudo-inclusive multiplicity.
AliFMDSpectraDisplayDetector & GetParent() const
virtual Int_t Compare(const TObject *o) const
AliFMDSpectraDisplayTop fTop
#define TObjArray
AliFMDSpectraDisplayTop & operator=(const AliFMDSpectraDisplayTop &)
Float_t p[]
Definition: kNNTest.C:133
virtual void Show(Option_t *option, Double_t l, Double_t h)
Bool_t ProcessDigit(AliFMDDigit *digit)
AliFMDSpectraDisplayElement & operator=(const AliFMDSpectraDisplayElement &)
AliFMDSpectraDisplayTop(const AliFMDSpectraDisplayTop &o)
Bool_t ProcessSDigit(AliFMDSDigit *sdigit)
Bool_t ProcessRawDigit(AliFMDDigit *digit)
AliFMDSpectraDisplayElement(const char *name, const char *title)
virtual AliFMDSpectraDisplayTop & GetTop()=0
FMD Event display (as patterns)
Bool_t ProcessRecPoint(AliFMDRecPoint *recpoint)
TF1 * f
Definition: interpolTest.C:21
Bool_t ProcessHit(AliFMDHit *hit, TParticle *p)
class for summable digits
Definition: AliFMDSDigit.h:27
AliFMDhit is the hit class for the FMD. Hits are the information that comes from a Monte Carlo at eac...
Definition: AliFMDHit.h:30
Bool_t ProcessESD(UShort_t det, Char_t rng, UShort_t sec, UShort_t str, Float_t x, Float_t mult)
AliFMDSpectraDisplayDetector & GetDetector() const
Utility class to visualize FMD data in 2D.
Definition: AliFMDPattern.h:38
TCanvas * fCanvas
AliFMDSpectraDisplayElement(const AliFMDSpectraDisplayElement &o)