StuDraw3DEvent Class Reference

Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with the STAR detector geometry. More...

#include <StuDraw3DEvent.h>

Inheritance diagram for StuDraw3DEvent:

StDraw3D

List of all members.

Public Member Functions

 StuDraw3DEvent (const char *detectorName="TPC", TVirtualPad *pad=0)
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 void Tracks (const StSPtrVecTrackNode &tracks, StTrackType type=global)
 This is an overloaded member function, provided for convenience.
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 * Track (const StTrack &track, EDraw3DStyle sty=kPrimaryTrack)
 This is an overloaded member function, provided for convenience.
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 void Hits (const StEvent *event, EStuDraw3DEvent trackHitsOnly=kUsedHits, StTrackType type=global)
virtual void Hits (StEventHitIter &iter)
virtual void FtpcHits (const StEvent *event, EStuDraw3DEvent trackHitsOnly=kUsedHits, StTrackType type=global)
virtual void Hits (const StTrack &track, EDraw3DStyle sty)
 This is an overloaded member function, provided for convenience.
virtual void Hits (const StTrack &track)
 Add all good hits for the given track to the display.
virtual void Hits (const StTrack &track, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
 Add all hits of the given track to the display list with the col color sty and siz size if provided.
virtual TObject * Hit (const StMeasuredPoint &hit, EDraw3DStyle sty=kUsedHit)
 This is an overloaded member function, provided for convenience.
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.
virtual TObject * Vertex (const StMeasuredPoint &hit, EDraw3DStyle sty=kVtx)
 This is an overloaded member function, provided for convenience.
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 provided.
virtual TObject * TrackInOut (const StTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE)
 This is an overloaded member function, provided for convenience.
template<class T >
TObject * Vector (const StThreeVector< T > &vector, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1))
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 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.
virtual TObject * EmcHit (const StEmcRawHit &emcHit, Color_t col, Style_t sty, Size_t siz, const char *det="bemc")
 Add emcHit to the display list with the col color sty and size if provided.
template<class T >
TObject * Vector (const StThreeVector< T > &vector, EDraw3DStyle sty=kVtx)
 ClassDef (StuDraw3DEvent, 0)

Static Public Member Functions

static StuDraw3DEventDisplay ()
static void Wait ()


Detailed Description

Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with the STAR detector geometry.

Author:
Valery Fine(fine@bnl.gov)
Date:
27/04/2008
Author:
Valery Fine (fine@bnl.gov)
Date:
27/04/2008
See also:
Ed.C
Class StuDraw3DEvent provides the simple way to visualize the event primitives in 3D quickly against of the STAR detector geometry. One instance of the class is instantiated as soon as the class shared library is loaded. This allows to use the class object (invoke class methods) with one C++ statement. This is to allow creating the 3D views "on fly", for example, from the GNU debugger (gdb) command prompt
Try:
  > ln -s  $STAR/StRoot/macros/.rootrc
  > root.exe Draw3D.C
to get the test picture below:
Draw3DClass.png
Draw3DClass.png

Example of the STAR reconstructed event rendering

Definition at line 56 of file StuDraw3DEvent.h.


Constructor & Destructor Documentation

StuDraw3DEvent::~StuDraw3DEvent (  )  [virtual]

~StuDraw3DEvent( ) dtor

Reset the global gEventDisplay pointer to the current display if the current display is this

Definition at line 76 of file StuDraw3DEvent.cxx.


Member Function Documentation

StuDraw3DEvent * StuDraw3DEvent::Display (  )  [static]

Returns:
The pointer to the current instance of the StuDraw3DEvent class to visualize StEvent components

Definition at line 582 of file StuDraw3DEvent.cxx.

TObject * StuDraw3DEvent::EmcHit ( const StEmcRawHit emcHit,
Color_t  col,
Style_t  sty,
Size_t  siz,
const char *  detId = "bemc" 
) [virtual]

Add emcHit to the display list with the col color sty and size if provided.

Parameters:
emcHit - StEmcRawHit reference one wants to be present as the ROOT TTRAP object with ROOT visual attributes col sty siz
col - Tower color ( see: http://root.cern.ch/root/html/TAttFill.html )
sty - Tower style ( see: http://root.cern.ch/root/html/TAttFill.html )
siz - Tower size (cm) (
See also:
StDraw3D::Tower( float radius, const StarRoot::StEta &eta,float phi,float dphi, Color_t col,Style_t sty, Size_t siz) )
Returns:
- a pointer to the ROOT "view" TObject of emcHit model

Definition at line 125 of file StuDraw3DEvent.cxx.

References EmcHit().

TObject * StuDraw3DEvent::EmcHit ( Int_t  emcHitsSoftId,
Color_t  col,
Style_t  sty,
Size_t  siz,
const char *  detId = "bemc" 
) [virtual]

Add EMC hit defined emcHitsSoftId to the display list with the col color sty and size if provided.

Parameters:
emcHitsSoftId - StEmcRawHit soft ID that one wants to be present as the ROOT TTRAP object with ROOT visual attributes col sty siz
col - Tower color ( see: http://root.cern.ch/root/html/TAttFill.html )
sty - Tower style ( see: http://root.cern.ch/root/html/TAttFill.html )
siz - Tower size (cm) (
See also:
StDraw3D::Tower( float radius, const StarRoot::StEta &eta,float phi,float dphi, Color_t col,Style_t sty, Size_t siz) )
Returns:
- a pointer to the ROOT "view" TObject of emcHit model

Definition at line 91 of file StuDraw3DEvent.cxx.

References StDraw3D::Tower().

Referenced by EmcHit(), and EmcHits().

void StuDraw3DEvent::EmcHits ( const StEvent event,
const char *  detId = "bemc" 
) [virtual]

Add all emcHits those can pass the internal filter from the given detector detId type from the event to the display list.

Parameters:
event - The pointer to the instance of the StEvent class
detId - The Emc detector name as defined by StEmcGeom::getDetNumFromName(const Char_t *cdet) method
Run.dAu.2008.9025036.666030.BEMC.hits.png

Event 666030 from Run 9025036 produced by Ed.C macros

Note:
You normally do not need to use this method directly. It is just a pattern you can follow to customize the macro Ed.C to use your own coloring schema and selection criteria.

Definition at line 153 of file StuDraw3DEvent.cxx.

References EmcHit().

Referenced by rd().

TObject * StuDraw3DEvent::Hit ( const StMeasuredPoint hit,
EDraw3DStyle  sty = kUsedHit 
) [virtual]

This is an overloaded member function, provided for convenience.

Add hit to the display list with the sty pre-defined style if provided

Definition at line 253 of file StuDraw3DEvent.cxx.

References Hit(), and StDraw3D::Style().

TObject * StuDraw3DEvent::Hit ( const StMeasuredPoint hit,
Color_t  col,
Style_t  sty = Style_t(-1),
Size_t  siz = Size_t (-1) 
) [virtual]

Add one hit to the display list with the col color sty and siz size if provided.

Draw the StMeasuredPoint, StHit, StVertex with the graphical attribute provided

Parameters:
hit - The reference to StMeasuredPoint STAR object one wants to be present as ROOT TMarker3D
col - ROOT marker color (see: http://root.cern.ch/root/html/TAttMarker.html )
sty - ROOT marker style (see: http://root.cern.ch/root/html/TAttMarker.html )
siz - ROOT marker size (see: http://root.cern.ch/root/html/TAttMarker.html )
Returns:
- a pointer to the ROOT "view" TObject of hit model

Definition at line 238 of file StuDraw3DEvent.cxx.

Referenced by Hit(), and Vertex().

void StuDraw3DEvent::Hits ( const StTrack track,
Color_t  col,
Style_t  sty = Style_t(-1),
Size_t  siz = Size_t (-1) 
) [virtual]

Add all hits of the given track to the display list with the col color sty and siz size if provided.

Parameters:
track - StTrack reference one wants its "used" hits to be present as the ROOT TPolyMarker3D object with ROOT visual attributes col sty size
col - ROOT line color ( see: http://root.cern.ch/root/html/TAttLine.html )
sty - ROOT line style ( see: http://root.cern.ch/root/html/TAttLine.html )
siz - ROOT line width ( see: http://root.cern.ch/root/html/TAttLine.html )

Definition at line 321 of file StuDraw3DEvent.cxx.

References StDraw3D::Points().

void StuDraw3DEvent::Hits ( const StTrack track  )  [virtual]

Add all good hits for the given track to the display.

the style and size vizual attributes are defined by the kUsedHit style the color is defined by the track pt

 double pt = track.geometry()->momentum().perp(); 
Returns:
- a pointer to the ROOT "view" TObject of vtx model

Definition at line 299 of file StuDraw3DEvent.cxx.

References StDraw3DStyle::Pt2Color(), and StDraw3D::Style().

void StuDraw3DEvent::Hits ( const StTrack track,
EDraw3DStyle  sty 
) [virtual]

This is an overloaded member function, provided for convenience.

Add all hits fof the given track to the display list with the sty pre-defined style if provided

Definition at line 379 of file StuDraw3DEvent.cxx.

References StDraw3D::Style().

TObject * StuDraw3DEvent::Track ( const StTrack track,
EDraw3DStyle  sty = kPrimaryTrack 
) [virtual]

This is an overloaded member function, provided for convenience.

Add track to the display list with the sty pre-defined style

Definition at line 221 of file StuDraw3DEvent.cxx.

References StDraw3D::Style(), and Track().

TObject * StuDraw3DEvent::Track ( const StTrack track,
Color_t  col,
Style_t  sty = Style_t(-1),
Size_t  siz = Size_t (-1) 
) [virtual]

Add track to the display list with the col color sty and size if provided.

Parameters:
track - StTrack reference one wants to be present as the ROOT TPolyLine3D object with ROOT visual attributes col sty siz
col - ROOT line color ( see: http://root.cern.ch/root/html/TAttLine.html )
sty - ROOT line style ( see: http://root.cern.ch/root/html/TAttLine.html )
siz - ROOT line width ( see: http://root.cern.ch/root/html/TAttLine.html )
Returns:
- a pointer to the ROOT "view" TObject of track model

Definition at line 207 of file StuDraw3DEvent.cxx.

References StDraw3D::Line().

Referenced by Track(), and Tracks().

TObject * StuDraw3DEvent::TrackInOut ( const StTrack track,
EDraw3DStyle  sty = kUsedHit,
Bool_t  in = kTRUE 
) [virtual]

This is an overloaded member function, provided for convenience.

Parameters:
track - reference to the StTrack object from StEvent data structure
in - flag true (default) is to be set to ad the track in point
false is to be set to add the track out point to the list
sty - EDraw3DStyle pre-defined visual style of this object.
Returns:
- a pointer to the ROOT "view" TObject of star/end point of track model

Definition at line 416 of file StuDraw3DEvent.cxx.

References StDraw3D::Style(), and TrackInOut().

TObject * StuDraw3DEvent::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) 
) [virtual]

Add the in point of the given track to the display list with the col color sty and siz size if provided.

Parameters:
track - reference to the StTrack object from StEvent data structure
in flag true (default) is to be set to add the track in point
false is to be set to add the track out point to the list
col - ROOT marker color (see: http://root.cern.ch/root/html/TAttMarker.html )
sty - ROOT marker style (see: http://root.cern.ch/root/html/TAttMarker.html )
siz - ROOT marker size (see: http://root.cern.ch/root/html/TAttMarker.html )
Returns:
- a pointer to the ROOT "view" TObject of star/end point of track model

Definition at line 399 of file StuDraw3DEvent.cxx.

References StDraw3D::Points().

Referenced by TrackInOut().

void StuDraw3DEvent::Tracks ( const StSPtrVecTrackNode &  theNodes,
StTrackType  type = global 
) [virtual]

This is an overloaded member function, provided for convenience.

Add all tracks of the given type from the theNodes to the display list.

Parameters:
theNodes - The reference to the StSPtrVecTrackNode track container from the StEvent object
type - The StTrack type as defined by StTrackType class
The style and size of the visual attributes are defined by the StTrackType global style the color is defined by the track pt
 double pt = track.geometry()->momentum().perp(); 

Definition at line 450 of file StuDraw3DEvent.cxx.

References StDraw3DStyle::Pt2Color(), and Track().

void StuDraw3DEvent::Tracks ( const StEvent event,
StTrackType  type = global 
) [virtual]

Add all tracks of the given type from the event to the display list.

Parameters:
event - The pointer to the instance of the StEvent class
type - The StTrack type as defined by StTrackType class
The style and size of the visual attributes are defined by the StTrackType global style the color is defined by the track pt
 double pt = track.geometry()->momentum().perp(); 

Definition at line 434 of file StuDraw3DEvent.cxx.

Referenced by rd().

TObject * StuDraw3DEvent::Vertex ( const StMeasuredPoint vtx,
EDraw3DStyle  sty = kVtx 
) [virtual]

This is an overloaded member function, provided for convenience.

Add vtx to the display list with the sty style if provided

Parameters:
vtx - The reference to StMeasuredPoint STAR object one wants to be present as ROOT TMarker3D
sty - EDraw3DStyle EventDisplay pre-defined style
Returns:
- pointer to the ROOT "view" TObject of vertex model

Definition at line 285 of file StuDraw3DEvent.cxx.

References StDraw3D::Style(), and Vertex().

TObject * StuDraw3DEvent::Vertex ( const StMeasuredPoint vertex,
Color_t  col,
Style_t  sty = Style_t(-1),
Size_t  siz = Size_t (-1) 
) [virtual]

This is an overloaded member function, provided for convenience.

Add vertex to the display list with the col color sty and siz size if provided

Parameters:
vertex - The reference to StMeasuredPoint STAR object one wants to be present as ROOT TMarker3D
col - ROOT marker color (see: http://root.cern.ch/root/html/TAttMarker.html )
sty - ROOT marker style (see: http://root.cern.ch/root/html/TAttMarker.html )
siz - ROOT marker size (see: http://root.cern.ch/root/html/TAttMarker.html )
Returns:
- a pointer to the ROOT "view" TObject of vertex model

Definition at line 270 of file StuDraw3DEvent.cxx.

References Hit().

Referenced by Vertex().


The documentation for this class was generated from the following files:

Generated on Fri Feb 10 04:28:18 2012 for StRoot by  doxygen 1.5.9