StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StuDraw3DEvent.h
1 #ifndef STAR_StuDraw3DEvent
2 #define STAR_StuDraw3DEvent
3 
4 // $Id: StuDraw3DEvent.h,v 1.22 2018/06/29 17:21:24 perev Exp $
5 // *-- Author : Valery Fine(fine@bnl.gov) 27/05/2008
6 
7 #include "StDraw3D.h"
8 #include "StThreeVector.hh"
9 #include "StEnumerations.h"
10 
11 
12 class StTrack;
13 class StGlobalTrack;
14 class StMeasuredPoint;
15 class StEvent;
16 class StEventHitIter;
17 class StTpcHitCollection;
18 class StSPtrVecTrackNode;
19 class StEmcRawHit;
20 
23 enum EStuDraw3DEvent {kUnusedHitsOnly=-1
24  ,kUsedHits=0
25  ,kUsedHitsTracks=1
26  ,kTracksOnly=2
27  };
28 
31 
35 class StuDraw3DEvent : public virtual StDraw3D
58 {
59  private:
61  void operator=(const StuDraw3DEvent&){;}
62 
63  public:
64  StuDraw3DEvent(const char *detectorName="TPC",TVirtualPad *pad = 0);
65  virtual ~StuDraw3DEvent();
66  static StuDraw3DEvent *Display();
67  virtual void Tracks(const StEvent* event, StTrackType type=global);
68  virtual void Tracks(const StSPtrVecTrackNode &tracks, StTrackType type=global);
69  virtual TObject *Track(const StTrack &track
70  , Color_t col
71  , Style_t sty= Style_t(-1)
72  , Size_t siz = Size_t (-1));
73  virtual TObject *Track(const StTrack &track, EDraw3DStyle sty=kPrimaryTrack);
74  virtual TObject *Track(const StGlobalTrack &track
75  , Color_t col
76  , Style_t sty= Style_t(-1)
77  , Size_t siz = Size_t (-1));
78  virtual TObject *Track(const StGlobalTrack &track, EDraw3DStyle sty=kPrimaryTrack);
79  virtual TObject *Hit(const StMeasuredPoint &hit
80  , Color_t col
81  , Style_t sty= Style_t(-1)
82  , Size_t siz = Size_t (-1));
83  virtual void Hits(const StEvent* event, EStuDraw3DEvent trackHitsOnly=kUsedHits, StTrackType type=global);
84  virtual void Hits(StEventHitIter &iter);
85  virtual void FtpcHits(const StEvent* event, EStuDraw3DEvent trackHitsOnly=kUsedHits, StTrackType type=global);
86  virtual void Hits(const StTrack &track, EDraw3DStyle sty);
87  virtual void Hits(const StTrack &track);
88  virtual void Hits(const StTrack &track
89  , Color_t col
90  , Style_t sty= Style_t(-1)
91  , Size_t siz = Size_t (-1));
92  virtual TObject *Hit(const StMeasuredPoint &hit, EDraw3DStyle sty=kUsedHit);
93  virtual TObject *Vertex(const StMeasuredPoint &hit
94  , Color_t col
95  , Style_t sty= Style_t(-1)
96  , Size_t siz = Size_t (-1));
97  virtual TObject *Vertex(const StMeasuredPoint &hit, EDraw3DStyle sty=kVtx);
98  virtual TObject *TrackInOut(const StTrack &track, Bool_t in
99  , Color_t col= Color_t(-1)
100  , Style_t sty= Style_t(-1)
101  , Size_t siz = Size_t (-1));
102  virtual TObject *TrackInOut(const StTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE);
103  template <class T> TObject *Vector(const StThreeVector<T> &vector
104  , Color_t col
105  , Style_t sty= Style_t(-1)
106  , Size_t siz = Size_t (-1));
107  virtual void EmcHits(const StEvent* event, const char *det="bemc");
108  virtual TObject *EmcHit(Int_t emcHitsSoftId, Color_t col,Style_t sty,Size_t siz, const char *det="bemc" );
109  virtual TObject *EmcHit(const StEmcRawHit &emcHit, Color_t col,Style_t sty,Size_t siz,const char *det="bemc");
110  static void Wait();
111  template <class T> TObject *Vector(const StThreeVector<T> &vector, EDraw3DStyle sty=kVtx);
112  ClassDef(StuDraw3DEvent,0);
113 };
114 
115 extern StuDraw3DEvent *gEventDisplay;
116 
117 //___________________________________________________
118 template<class T> TObject *StuDraw3DEvent::Vector(const StThreeVector<T> &vector
119  , Color_t col, Style_t sty, Size_t siz)
120 { return Point(vector.x(),vector.y(),vector.z(),col,sty,siz); }
121 
122 //___________________________________________________
123 template <class T> TObject *StuDraw3DEvent::Vector(const StThreeVector<T> &vector, EDraw3DStyle sty)
124 {
125  const StDraw3DStyle &style = Style(sty);
126  return Vector(vector.x(),vector.y(),vector.z(),style.Col(),style.Sty(),style.Siz());
127 }
128 #endif
StEventHitIter is the top level hook, providing hits to the Stv tracking code.
virtual const StDraw3DStyle & Style(EDraw3DStyle type) const
Return the reference to the predefined StDraw3DStyle object.
Definition: StDraw3D.cxx:482
StDraw3DStyle maps &quot;STAR event&quot; EDraw3DStyle onto ROOT (color,style,size) attributes.
Definition: StDraw3D.h:29
virtual ~StuDraw3DEvent()
~StuDraw3DEvent( ) dtor
virtual void Tracks(const StEvent *event, StTrackType type=global)
Add all tracks of the given type from the event to the display list.
virtual TObject * EmcHit(Int_t emcHitsSoftId, Color_t col, Style_t sty, Size_t siz, const char *det="bemc")
Add EMC hit defined emcHitsSoftId to the display list with the col color sty and size if provided...
Class StDraw3D - to draw the 3D primitives like 3D points and 3D lines decorated with the STAR detect...
Definition: StDraw3D.h:165
virtual TObject * Track(const StTrack &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 and size if provided.
virtual TObject * Hit(const StMeasuredPoint &hit, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
Add one hit to the display list with the col color sty and siz size if provided.
virtual TObject * Vertex(const StMeasuredPoint &hit, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
This is an overloaded member function, provided for convenience.
static StuDraw3DEvent * Display()
virtual void EmcHits(const StEvent *event, const char *det="bemc")
Add all emcHits those can pass the internal filter from the given detector detId type from the event ...
virtual TObject * TrackInOut(const StTrack &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 and siz size if provid...
Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with...