StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StuDraw3DMuEvent.h
1 #ifndef STAR_StuDraw3DMuEvent
2 #define STAR_StuDraw3DMuEvent
3 
4 // $Id: StuDraw3DMuEvent.h,v 1.13 2010/01/28 05:27:06 fine Exp $
5 // *-- Author : Valery Fine(fine@bnl.gov) 01/09/2009
6 
7 #include "StDraw3D.h"
8 #include "StEnumerations.h"
9 
10 
11 class StMuTrack;
12 class StMuDst;
13 class EEmcGeomSimple;
14 class StMuEmcCollection;
15 
18 enum EStuDraw3DMuEvent {
19  kUnusedHitsOnly=-1
20  ,kUsedHits=0
21  ,kUsedHitsTracks=1
22  ,kTracksOnly=2
23  };
24 
26  private:
27  StDraw3DStyle fStyle;
29  //StEmcTowerColor(const StEmcTowerColor&);
30  //void operator=(const StEmcTowerColor&);
31  public:
32  StEmcTowerColor(float energy);
33  virtual ~StEmcTowerColor() {}
34  virtual const StDraw3DStyle& operator()() const { return fStyle;}
35 };
36 
37 
40 
43 class StuDraw3DMuEvent : public virtual StDraw3D
73 {
74  private:
75  EEmcGeomSimple *fEndcapGeom; // tower geomtry
76 
78  void operator=(const StuDraw3DMuEvent&){;}
79 
80  static StuDraw3DMuEvent *gMuEventDisplay;
81  protected:
82  EEmcGeomSimple *EndcapGeom();
83 
84  public:
85  StuDraw3DMuEvent(const char *detectorName="TPC",TVirtualPad *pad = 0);
86  virtual ~StuDraw3DMuEvent();
87  static StuDraw3DMuEvent *Display();
88  virtual void Tracks(StTrackType type=global);
89  virtual TObject *Track(const StMuTrack &track
90  , Color_t col
91  , Style_t sty= Style_t(-1)
92  , Size_t siz = Size_t (-1));
93  virtual TObject *Track(const StMuTrack &track, EDraw3DStyle sty=kPrimaryTrack);
94  virtual TObject *TrackInOut(const StMuTrack &track, Bool_t in
95  , Color_t col= Color_t(-1)
96  , Style_t sty= Style_t(-1)
97  , Size_t siz = Size_t (-1));
98  virtual TObject *TrackInOut(const StMuTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE);
99  virtual void Endcaps(Style_t sty=0);
100  virtual void Endcaps(const StMuEmcCollection &e, Style_t sty=0);
101  virtual TObject *EmcHit(Int_t emcHitsSoftId, Color_t col,Style_t sty,Size_t siz, const char *detIdt="bemc");
102  virtual TObject *EmcHit(Int_t emcHitsSoftId, float energy, const char *detIdt="bemc");
103  template <class Predicate>
104  TObject *EmcHit(Int_t emcHitsSoftId, const Predicate &sty, const char *detIdt="bemc");
105  ClassDef(StuDraw3DMuEvent,0);
106 };
107 
108 //_________________________________________________________________________________________________
109 template <class Predicate>
110 TObject *StuDraw3DMuEvent::EmcHit(Int_t emcHitsSoftId, const Predicate &sty, const char *detIdt)
111 {
112  return EmcHit(emcHitsSoftId, sty().Col(),sty().Sty(), sty().Siz(), detIdt);
113 }
114 
115 
116 #endif
virtual ~StuDraw3DMuEvent()
~StuDraw3DMuEvent( ) dtor
StDraw3DStyle maps &quot;STAR event&quot; EDraw3DStyle onto ROOT (color,style,size) attributes.
Definition: StDraw3D.h:29
Class StuDraw3DMuEvent - to draw the StMuDst primitives like StMuTrack as 3D points and 3D lines deco...
Class StDraw3D - to draw the 3D primitives like 3D points and 3D lines decorated with the STAR detect...
Definition: StDraw3D.h:165
virtual TObject * TrackInOut(const StMuTrack &track, Bool_t in, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
Add the in point of the given track to the display list with the col color, sty style, and siz size if provided.
virtual TObject * Track(const StMuTrack &track, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
Add track to the display list with the col color, sty style, and siz size if provided.
virtual void Tracks(StTrackType type=global)
Add all tracks of the given type from the current event to the display list.
EEMC simple geometry.
virtual TObject * EmcHit(Int_t emcHitsSoftId, Color_t col, Style_t sty, Size_t siz, const char *detIdt="bemc")
Add EMC hit defined emcHitsSoftId to the display list with the col color sty and size if provided...
static StuDraw3DMuEvent * Display()
virtual void Endcaps(Style_t sty=0)
Add the endcap towers to the list to display.