StRoot
1
|
Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with the STAR detector geometry. More...
#include <StuDraw3DEvent.h>
Public Member Functions | |
StuDraw3DEvent (const char *detectorName="TPC", TVirtualPad *pad=0) | |
StuDraw3DEvent( const char *detectorName,TVirtualPad *pad) ctor. More... | |
virtual | ~StuDraw3DEvent () |
~StuDraw3DEvent( ) dtor More... | |
virtual void | Tracks (const StEvent *event, StTrackType type=global) |
Add all tracks of the given type from the event to the display list. More... | |
virtual void | Tracks (const StSPtrVecTrackNode &tracks, StTrackType type=global) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
virtual TObject * | Track (const StTrack &track, EDraw3DStyle sty=kPrimaryTrack) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Track (const StGlobalTrack &track, Color_t col, Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
virtual TObject * | Track (const StGlobalTrack &track, EDraw3DStyle sty=kPrimaryTrack) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
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. More... | |
virtual void | Hits (const StTrack &track) |
Add all good hits for the given track to the display. More... | |
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. More... | |
virtual TObject * | Hit (const StMeasuredPoint &hit, EDraw3DStyle sty=kUsedHit) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
virtual TObject * | Vertex (const StMeasuredPoint &hit, EDraw3DStyle sty=kVtx) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
virtual TObject * | TrackInOut (const StTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
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. More... | |
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. More... | |
template<class T > | |
TObject * | Vector (const StThreeVector< T > &vector, EDraw3DStyle sty=kVtx) |
ClassDef (StuDraw3DEvent, 0) | |
Public Member Functions inherited from StDraw3D | |
StDraw3D (const char *detectorName="TPC", TVirtualPad *pad=0) | |
StDraw3D( const char *detectorName,TVirtualPad *pad) ctor. More... | |
StDraw3D (TVirtualViewer3D *viewer, TVirtualPad *pad) | |
This is an overloaded member function, provided for convenience. More... | |
virtual const StDraw3DStyle & | AddStyle (EDraw3DStyle type, Color_t col, Style_t sty, Size_t siz) |
Map the predefined style type to the ROOT graphical attributes col color sty style siz size. More... | |
TVirtualPad * | Pad () const |
TVirtualViewer3D * | Viewer () const |
virtual void | Clear (Option_t *opt="update") |
Remove all objects from the list and update the screen if opt is "update". | |
virtual TObject * | Draw (TObject *o, const char *option="") |
virtual const TString & | DetectorNames () const |
virtual void | SetDetectors (const char *nameDetectors) |
Set the list of the detector names to be used as the event "background". More... | |
virtual void | AddDetectors (const char *nameDetectors) |
Append the detector names to the list of the event "background" shapes. More... | |
virtual void | Draw (Option_t *option="") |
virtual const StDraw3DStyle & | Style (EDraw3DStyle type) const |
Return the reference to the predefined StDraw3DStyle object. More... | |
virtual StDraw3DStyle & | Style (EDraw3DStyle type) |
virtual void | SetBkColor (Color_t newBkColor) |
Set the ROOT color as the widget background. More... | |
virtual TObject * | Draw3D (int n, const float *xyz) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Draw3D (int n, const double *xyz) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (int n, const float *xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (int n, const double *xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (int n, const float *xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
Add n 3D coordinates from the xyz array to the display list with the col color, sty style, and siz size if provided. More... | |
virtual TObject * | Points (int n, const double *xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (const std::vector< float > &xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (const std::vector< double > &xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (const std::vector< float > &xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Points (const std::vector< double > &xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Point (float x, float y, float z, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
virtual TObject * | Point (float x, float y, float z, EDraw3DStyle sty) |
virtual TObject * | Line (int n, const double *xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (float x0, float y0, float z0, float x1, float y1, float z1, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (int n, const float *xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
Add n connected points defined by the "xyz" array of the 3D coordinates to the display list with the col color, sty style, and siz size if provided. More... | |
virtual TObject * | Line (const std::vector< float > &xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (const std::vector< double > &xyz, Color_t col=Color_t(-1), Style_t sty=Style_t(-1), Size_t siz=Size_t(-1)) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (int n, const float *xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (int n, const double *xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (const std::vector< float > &xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Line (const std::vector< double > &xyz, EDraw3DStyle sty) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Tower (float radius, float lambda, float lambda1, float lambda2, float phi, float dphi, Color_t col, Style_t sty, Size_t siz) |
This is an overloaded member function, provided for convenience. More... | |
virtual TObject * | Tower (float radius, float lambda, float phi, float dlambda, float dphi, Color_t col, Style_t sty, Size_t siz) |
Draw the TTRAP object suitable to represent the calorimeter data. More... | |
virtual TObject * | Tower (float radius, const StarRoot::StEta &eta, float phi, float dphi, Color_t col, Style_t sty, Size_t siz) |
This is an overloaded member function, provided for convenience. More... | |
virtual void | Joint (StDraw3D *dsp) |
virtual void | SetModel (TObject *model) |
virtual void | SetComment (const char *cmnt) |
virtual void | AddComment (const char *cmnt) |
virtual void | Print (const char *filename) const |
Save the current 3D scene using "wrl" file format. More... | |
virtual void | Print (const char *filename, const char *type) const |
This is an overloaded member function, provided for convenience. More... | |
virtual void | Save (const char *filename, const char *type="png") const |
This is an overloaded member function, provided for convenience. More... | |
virtual void | Update (bool asap=false) |
Render all items from the current display list onto the screen and refesh the screen immiately if asap is defined. More... | |
virtual void | Modified () |
virtual void | UpdateModified () |
virtual void | SetDrawOption (Option_t *option="") |
Set the varous drawing option. The method passes the input options to TQtCoinWidget::SetDrawOption method. More... | |
virtual void | SetFooter (const char *footer) |
Set the footer (caption) defined by the input footer text string. More... | |
virtual void | Animate () |
Animate the viewer from the gdb session. More... | |
void | Draw3DTest () |
The built-in quick test to check the application environment and test the basic methods. More... | |
Static Public Member Functions | |
static StuDraw3DEvent * | Display () |
static void | Wait () |
Static Public Member Functions inherited from StDraw3D | |
static void | ShowTest () |
static void | ShowDetectorTest (const char *detectorName="StarDetectorUnfolding") |
Additional Inherited Members | |
Protected Member Functions inherited from StDraw3D | |
virtual void | UpdateViewer (TVirtualPad *pad=0) |
Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with the STAR detector geometry.
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:
to get the test picture below:
Definition at line 57 of file StuDraw3DEvent.h.
StuDraw3DEvent::StuDraw3DEvent | ( | const char * | detectorName = "TPC" , |
TVirtualPad * | pad = 0 |
||
) |
StuDraw3DEvent( const char *detectorName,TVirtualPad *pad) ctor.
\param detectorName (default = "TPC") - the names of the STAR detectors to be used as the "event primitives" background. The detectorName is a comma separated list of the OpenInventor files with no extension\n For all names on the list one should provide the iv file with the "iv" extension:\n
detectorName | = 0 - no detector geometry is to be rendered | ||||
pad | (default = 0) - The ROOT TPad to be used to render the event wired view
|
Definition at line 63 of file StuDraw3DEvent.cxx.
|
virtual |
~StuDraw3DEvent( ) dtor
Reset the global gEventDisplay
pointer to the current display if the current display is this
Definition at line 77 of file StuDraw3DEvent.cxx.
|
static |
Definition at line 605 of file StuDraw3DEvent.cxx.
|
virtual |
Add EMC hit defined emcHitsSoftId to the display list with the col color sty and size if provided.
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) ( |
Definition at line 92 of file StuDraw3DEvent.cxx.
References StDraw3D::Tower().
|
virtual |
Add emcHit to the display list with the col color sty and size if provided.
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) ( |
Definition at line 126 of file StuDraw3DEvent.cxx.
References EmcHit().
|
virtual |
Add all emcHits those can pass the internal filter from the given detector detId type from the event to the display list.
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 |
Definition at line 154 of file StuDraw3DEvent.cxx.
References EmcHit().
Referenced by rd().
|
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
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 ) |
Definition at line 261 of file StuDraw3DEvent.cxx.
|
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 276 of file StuDraw3DEvent.cxx.
References Hit(), and StDraw3D::Style().
|
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 402 of file StuDraw3DEvent.cxx.
References StDraw3D::Style().
|
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
Definition at line 322 of file StuDraw3DEvent.cxx.
References StDraw3DStyle::Pt2Color(), and StDraw3D::Style().
|
virtual |
Add all hits of the given track to the display list with the col color sty and siz size if provided.
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 344 of file StuDraw3DEvent.cxx.
References StDraw3D::Points().
|
virtual |
Add track to the display list with the col color sty and size if provided.
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 ) |
Definition at line 210 of file StuDraw3DEvent.cxx.
References StHelixHelper::GetPoints(), and StDraw3D::Line().
|
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 224 of file StuDraw3DEvent.cxx.
References StDraw3D::Style(), and Track().
|
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 244 of file StuDraw3DEvent.cxx.
References StDraw3D::Style(), and Track().
|
virtual |
Add the in point of the given track to the display list with the col color sty and siz size if provided.
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 ) |
Definition at line 422 of file StuDraw3DEvent.cxx.
References StDraw3D::Points().
Referenced by TrackInOut().
|
virtual |
This is an overloaded member function, provided for convenience.
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. |
Definition at line 439 of file StuDraw3DEvent.cxx.
References StDraw3D::Style(), and TrackInOut().
|
virtual |
Add all tracks of the given type from the event to the display list.
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
Definition at line 457 of file StuDraw3DEvent.cxx.
Referenced by rd().
|
virtual |
This is an overloaded member function, provided for convenience.
Add all tracks of the given type from the theNodes to the display list.
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
Definition at line 473 of file StuDraw3DEvent.cxx.
References StDraw3DStyle::Pt2Color(), and Track().
|
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
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 ) |
Definition at line 293 of file StuDraw3DEvent.cxx.
References Hit().
Referenced by Vertex().
|
virtual |
This is an overloaded member function, provided for convenience.
Add vtx to the display list with the sty style if provided
vtx | - The reference to StMeasuredPoint STAR object one wants to be present as ROOT TMarker3D |
sty | - EDraw3DStyle EventDisplay pre-defined style |
Definition at line 308 of file StuDraw3DEvent.cxx.
References StDraw3D::Style(), and Vertex().