#include <StDraw3D.h>

Public Member Functions | |
| StDraw3D (const char *detectorName="TPC", TVirtualPad *pad=0) | |
| StDraw3D( const char *detectorName,TVirtualPad *pad) ctor. | |
| StDraw3D (TVirtualViewer3D *viewer, TVirtualPad *pad) | |
| This is an overloaded member function, provided for convenience. | |
| 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. | |
| 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". | |
| virtual void | AddDetectors (const char *nameDetectors) |
| Append the detector names to the list of the event "background" shapes. | |
| virtual void | Draw (Option_t *option="") |
| virtual const StDraw3DStyle & | Style (EDraw3DStyle type) const |
| Return the reference to the predefined StDraw3DStyle object. | |
| virtual StDraw3DStyle & | Style (EDraw3DStyle type) |
| virtual void | SetBkColor (Color_t newBkColor) |
| Set the ROOT color as the widget background. | |
| virtual TObject * | Draw3D (int n, const float *xyz) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Draw3D (int n, const double *xyz) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Points (int n, const float *xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Points (int n, const double *xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| 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. | |
| 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. | |
| virtual TObject * | Points (const std::vector< float > &xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Points (const std::vector< double > &xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| virtual TObject * | Line (int n, const float *xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Line (int n, const double *xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Line (const std::vector< float > &xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| virtual TObject * | Line (const std::vector< double > &xyz, EDraw3DStyle sty) |
| This is an overloaded member function, provided for convenience. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| virtual void | Print (const char *filename, const char *type) const |
| This is an overloaded member function, provided for convenience. | |
| virtual void | Save (const char *filename, const char *type="png") const |
| This is an overloaded member function, provided for convenience. | |
| 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. | |
| 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. | |
| virtual void | SetFooter (const char *footer) |
| Set the footer (caption) defined by the input footer text string. | |
| virtual void | Animate () |
| Animate the viewer from the gdb session. | |
| void | Draw3DTest () |
| The built-in quick test to check the application environment and test the basic methods. | |
Static Public Member Functions | |
| static void | ShowTest () |
| static void | ShowDetectorTest (const char *detectorName="StarDetectorUnfolding") |
Protected Member Functions | |
| virtual void | UpdateViewer (TVirtualPad *pad=0) |
Try:
> ln -s $STAR/StRoot/macros/.rootrc
> root.exe Draw3D.C
Test image is to show several tpc points , tpc track, barrel and endcap towers
TObject::Inspect() to inspect the model data-member values; TObject::GetObjectInfo to label the view with the current model information; TVirtualPadEditor to set the model attributes. Definition at line 165 of file StDraw3D.h.
| StDraw3D::StDraw3D | ( | const char * | detectorName = "TPC", |
|
| TVirtualPad * | pad = 0 | |||
| ) |
StDraw3D( const char *detectorName,TVirtualPad *pad) ctor.
| 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 For all names on the list one should provide the iv file with the "iv" extension: <name>.iv | |||||
| detectorName | = 0 - no detector geometry is to be rendered | |||||
| pad | (default = 0) - The ROOT TPad to be used to render the event wireframe view
|
StDraw class ctor defines the set of the pre-defines styles:
| Style | Color | Style | Size | comment |
|---|---|---|---|---|
| kVtx | kYellow | 5 | 3.5 | 3D marker - vertex |
| kPrimaryTrack | kRed | 1 | 2.00 | 3D polyline - track |
| kGlobalTrack | kRed | 1 | 2.00 | 3D polyline - track |
| kTrackBegin | kYellow | 5 | 3.5 | 3D marker - vertex |
| kTrackEnd | kYellow | 5 | 3.5 | 3D marker - vertex |
| kUsedHit | kBlue | 4 | 0.35 | 3D marker - track start point |
| kUnusedHit | kGreen | 1 | 1.00 | 3D marker - track end point |
Definition at line 247 of file StDraw3D.cxx.
| StDraw3D::StDraw3D | ( | TVirtualViewer3D * | viewer, | |
| TVirtualPad * | pad | |||
| ) |
This is an overloaded member function, provided for convenience.
Create a EventDisplay using the external TVirtualViewer3D viewer and TVirtualPad pad
Definition at line 275 of file StDraw3D.cxx.
| void StDraw3D::AddDetectors | ( | const char * | nameDetectors | ) | [virtual] |
Append the detector names to the list of the event "background" shapes.
| nameDetectors | - a comma separated list of the OpenInventor files with no extension For all names on the list one should provide the iv file with the "iv" extension: <name>.iv |
Definition at line 381 of file StDraw3D.cxx.
| const StDraw3DStyle & StDraw3D::AddStyle | ( | EDraw3DStyle | type, | |
| Color_t | col, | |||
| Style_t | sty, | |||
| Size_t | siz | |||
| ) | [virtual] |
Map the predefined style type to the ROOT graphical attributes col color sty style siz size.
Normally one does not need to call this method. All pre-defined styles are to be filled by StDraw3D class ctor
| type | - The pre-define type we want to define | |
| col | - ROOT color attribute (See: http://root.cern.ch/root/html/TColor.html) | |
| sty | - ROOT style attribute. It can be either line http://root.cern.ch/root/html/TAttLine.html or marker http://root.cern.ch/root/html/TAttMarker.html | |
| siz | - ROOT graphical attribute size . It can be either line http://root.cern.ch/root/html/TAttLine.html or marker http://root.cern.ch/root/html/TAttMarker.html |
Definition at line 468 of file StDraw3D.cxx.
References Style().
| void StDraw3D::Animate | ( | ) | [virtual] |
Animate the viewer from the gdb session.
For example, use
gdb> p gEventDisplay->Point(0,0,0,1,1,1)
gdb> p gEventDisplay->Animate();
Definition at line 1623 of file StDraw3D.cxx.
| const TString & StDraw3D::DetectorNames | ( | ) | const [virtual] |
| TObject * StDraw3D::Draw3D | ( | int | n, | |
| const double * | xyz | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the pre-defined kVtx style It is designed to be used from the interactive "gdb" session because it needs 2 parameters only it
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating point values ( the array should be 3*n long at least ) |
Definition at line 706 of file StDraw3D.cxx.
References Points().
| TObject * StDraw3D::Draw3D | ( | int | n, | |
| const float * | xyz | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the pre-defined kVtx style It is designed to be used from the interactive "gdb" session because it needs 2 parameters only it
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating point values ( the array should be 3*n long at least ) |
Definition at line 685 of file StDraw3D.cxx.
References Points().
Referenced by Draw3DTest().
| void StDraw3D::Draw3DTest | ( | ) |
The built-in quick test to check the application environment and test the basic methods.
Try:
> ln -s $STAR/StRoot/macros/.rootrc > root.exe Draw3D.C
Test image is to show several tpc points , tpc track, barrel and endcap towers
Animated version of the test image
Definition at line 1177 of file StDraw3D.cxx.
References Draw3D(), Line(), Pad(), Tower(), and Update().
Referenced by Draw3D().
| TObject * StDraw3D::Line | ( | const std::vector< double > & | xyz, | |
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add the connected points defined by the vector of 3D coordinates to the display list with the sty pre-defined style if provided
| xyz | - the vector of the floating ount values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 889 of file StDraw3D.cxx.
| TObject * StDraw3D::Line | ( | const std::vector< float > & | xyz, | |
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add the connected points defined by the vector of 3D coordinates to the display list with the sty pre-defined style if provided
| xyz | - the vector of the floating ount values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 868 of file StDraw3D.cxx.
| TObject * StDraw3D::Line | ( | int | n, | |
| const double * | xyz, | |||
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n connected points defined by the array of 3D coordinates to the display list with the sty pre-defined style if provided
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 933 of file StDraw3D.cxx.
| TObject * StDraw3D::Line | ( | int | n, | |
| const float * | xyz, | |||
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n connected points defined by the array of 3D coordinates to the display list with the sty pre-defined style if provided
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 911 of file StDraw3D.cxx.
| TObject * StDraw3D::Line | ( | const std::vector< double > & | xyz, | |
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
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
| xyz | - the vector of the floating ount values ( the array should be 3*n long at least ) | |
| 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 850 of file StDraw3D.cxx.
References Line().
| TObject * StDraw3D::Line | ( | const std::vector< float > & | xyz, | |
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
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
| xyz | - the vector of the floating ount values ( the array should be 3*n long at least ) | |
| 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 830 of file StDraw3D.cxx.
References Line().
| TObject * StDraw3D::Line | ( | int | n, | |
| const float * | xyz, | |||
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
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.
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| 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 754 of file StDraw3D.cxx.
| TObject * StDraw3D::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) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add a line sigment connecting 2 points defined by the ("x0","y0" "z0") and ("x1","y1" "z1") to the display list with the col color, sty style, and siz size if provided
| x0,y0,z0 | - the 3D coordinates of the first point | |
| x1,y1,z1 | - the 3D coordinates of the second point | |
| 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 780 of file StDraw3D.cxx.
References Line().
| TObject * StDraw3D::Line | ( | int | n, | |
| const double * | xyz, | |||
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
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
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| 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 806 of file StDraw3D.cxx.
Referenced by Draw3DTest(), Line(), StuDraw3DMuEvent::Track(), and StuDraw3DEvent::Track().
| TVirtualPad * StDraw3D::Pad | ( | ) | const |
Definition at line 340 of file StDraw3D.cxx.
References Pad().
Referenced by Animate(), Clear(), Draw3DTest(), Pad(), Save(), SetBkColor(), and Update().
| TObject * StDraw3D::Points | ( | const std::vector< double > & | xyz, | |
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the col color, sty style, and siz size if provided
| xyz | - the vector of the floating ount values ( the container should be 3*n long at least ) | |
| 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 576 of file StDraw3D.cxx.
References Points().
| TObject * StDraw3D::Points | ( | const std::vector< float > & | xyz, | |
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the col color, sty style, and siz size if provided
| xyz | - the vector of the floating ount values ( the container should be 3*n long at least ) | |
| 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 556 of file StDraw3D.cxx.
References Points().
| TObject * StDraw3D::Points | ( | const std::vector< double > & | xyz, | |
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add 3D coordinates from the xyz vector to the display list with the sty pre-defined style if provided
| xyz | - the vector of the floating point values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 662 of file StDraw3D.cxx.
| TObject * StDraw3D::Points | ( | const std::vector< float > & | xyz, | |
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add 3D coordinates from the xyz vector to the display list with the sty pre-defined style if provided
| xyz | - the vector of the floating point values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 640 of file StDraw3D.cxx.
| TObject * StDraw3D::Points | ( | int | n, | |
| const double * | xyz, | |||
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array of double values to the display list with the col color, sty style, and siz size if provided
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| 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 530 of file StDraw3D.cxx.
| TObject * StDraw3D::Points | ( | int | n, | |
| const float * | xyz, | |||
| Color_t | col = Color_t(-1), |
|||
| Style_t | sty = Style_t(-1), |
|||
| Size_t | siz = Size_t (-1) | |||
| ) | [virtual] |
Add n 3D coordinates from the xyz array to the display list with the col color, sty style, and siz size if provided.
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating ount values ( the array should be 3*n long at least ) | |
| 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 503 of file StDraw3D.cxx.
| TObject * StDraw3D::Points | ( | int | n, | |
| const double * | xyz, | |||
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the sty pre-defined style if provided
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating point values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 618 of file StDraw3D.cxx.
| TObject * StDraw3D::Points | ( | int | n, | |
| const float * | xyz, | |||
| EDraw3DStyle | sty | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
Add n 3D coordinates from the xyz array to the display list with the sty pre-defined style if provided
| n | - the number of the 3D coordinates | |
| xyz | - the pointer to the array of the floating point values ( the array should be 3*n long at least ) | |
| sty | - EDraw3DStyle value selecting some predefined style |
Definition at line 595 of file StDraw3D.cxx.
References Style().
Referenced by Draw3D(), StuDraw3DEvent::Hits(), Points(), and StuDraw3DEvent::TrackInOut().
| void StDraw3D::Print | ( | const char * | filename, | |
| const char * | type | |||
| ) | const [virtual] |
This is an overloaded member function, provided for convenience.
Save the current 3D scene using the type file format
| filename | - the file name to save the 3d scene | |
| type | - the pre-defined file format. It can be 3D scene format like "wrl"/"iv" or the well-known pixmap formats like "pnd", "jpg" etc |
Definition at line 1044 of file StDraw3D.cxx.
References Save().
| void StDraw3D::Print | ( | const char * | filename | ) | const [virtual] |
Save the current 3D scene using "wrl" file format.
| filename | - the file name to save the 3d scene |
See examples:
You need to install the Adobe Reader version 9 or higherto be able to "click and see" the interactive ( zoom, pan, select / highlight the pieces, etc ) 3D image also
Definition at line 1031 of file StDraw3D.cxx.
References Save().
Referenced by Draw3D().
| void StDraw3D::Save | ( | const char * | filename, | |
| const char * | type = "png" | |||
| ) | const [virtual] |
This is an overloaded member function, provided for convenience.
Save the current 3D scene using the 3D "wrl" format if possible otherwise use the type file format
| filename | - the file name to save the 3d scene | |
| type | - the pre-defined file format. It can be 3D scene format like "wrl"/"iv" or the well-known pixmap formats like "pnd", "jpg" etc |
Definition at line 1058 of file StDraw3D.cxx.
References Pad(), and Viewer().
Referenced by Print().
| void StDraw3D::SetBkColor | ( | Color_t | newBkColor | ) | [virtual] |
Set the ROOT color as the widget background.
| newBkColor | - ROOT index of the color to paint the widget backgorund ( |
Definition at line 446 of file StDraw3D.cxx.
References Pad().
| void StDraw3D::SetDetectors | ( | const char * | nameDetectors | ) | [virtual] |
Set the list of the detector names to be used as the event "background".
| nameDetectors | - a comma separated list of the OpenInventor files with no extension For all names on the list one should provide the iv file with the "iv" extension: <name>.iv |
Definition at line 361 of file StDraw3D.cxx.
| void StDraw3D::SetDrawOption | ( | Option_t * | options = "" |
) | [virtual] |
Set the varous drawing option. The method passes the input options to TQtCoinWidget::SetDrawOption method.
| options | - [ <shape1> [, shape2 [, . . . shape-n] - a comma separated list of the OpenInventor files with no extension | { parameter : value } - enclosed into the curly brackets a pair "parameter : value" | |
| - | { file : file.iv } - the iv file defining the top level OpenInventor node. For example, it can be useful to customize the entire screen rotation / animation ) | |
| - | { footer: text } - define the image footer (caption) | |
| - | { record : true | false } - toogle the "record scene" option | |
| - | { save : filename } - save the current image into file | |
| - | { screen : full } - turn the "fullscreen view" option | |
| - | { view : all } - zoom the image in/out to make sure it fits the entire screen |
void Draw3D() { gROOT->Macro("Load.C"); //< Load STAR framework shared libraries gEventDisplay->Draw3DTest(); //< Invoke the built-in rendering test gEventDisplay->SetDrawOption("{file:rotation.iv}");//< Add rotation to the scene gEventDisplay->SetFooter("STAR Event Display Example"); gEventDisplay->Print("Draw3DTest.wrl"); //< Save the 3D scene into the file gEventDisplay->SetDrawOption("{view:all}"); // zoom the scene in/out to fit the entire screen }
Animated version of the test image
Definition at line 1096 of file StDraw3D.cxx.
References Viewer().
Referenced by Draw3D(), EdMu(), mae(), and SetFooter().
| void StDraw3D::SetFooter | ( | const char * | footer | ) | [virtual] |
Set the footer (caption) defined by the input footer text string.
| footer | - the text string to be drawn onto the bottom of the 3D scene image. The string may contain sevral lines separated by \n end-of-line symbol |
Definition at line 1602 of file StDraw3D.cxx.
References SetDrawOption().
Referenced by Draw3D().
| const StDraw3DStyle & StDraw3D::Style | ( | EDraw3DStyle | type | ) | const [virtual] |
Return the reference to the predefined StDraw3DStyle object.
| type | - The pre-defined type we want to get the reference to |
Definition at line 481 of file StDraw3D.cxx.
Referenced by AddStyle(), addTracks(), StuDraw3DEvent::Hit(), StuDraw3DEvent::Hits(), Line(), Points(), StuDraw3DMuEvent::Track(), StuDraw3DEvent::Track(), StuDraw3DMuEvent::TrackInOut(), StuDraw3DEvent::TrackInOut(), StuDraw3DMuEvent::Tracks(), and StuDraw3DEvent::Vertex().
| TObject * StDraw3D::Tower | ( | float | radius, | |
| const StarRoot::StEta & | eta, | |||
| float | phi, | |||
| float | dphi, | |||
| Color_t | col, | |||
| Style_t | sty, | |||
| Size_t | siz | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
The method creates one "tower" object (see: http://root.cern.ch/root/html/TTRAP.html#TTRAP:description )
| radius | - the distance between the base of the tower and the "origin". It can be either the distance from the Z-axis for the kBarrelStyle or the distance from the xy plane for Endcap towers (default), for example. | |
| eta | (eta,dEta) - the tower direction eta and width dEta (in eta units). (See: http://en.wikipedia.org/wiki/Pseudorapidity ) | |
| phi | - the angle (in rads) in XY plane against of the Ox | |
| dphi | - the non-negative angle "length" of the tower | |
| col | - ROOT fill color ( see: http://root.cern.ch/root/html/TAttFill.html ) | |
| sty | - ROOT fill style ( see: http://root.cern.ch/root/html/TAttFill.html ) one can add kBarrelStyle constant to ROOT style to get the "barrel" style tower = 0 - solid color, 4001 - wireframe view, 4001 ... 4100 - solid translucent color from 99% transparent to 100% opaque | |
| siz | - the height of the tower. It can be used to visualize the energy deposit or for any other reason. |
| Explanation of the StDraw::Tower(...) method parameters ("barrel" style ) | |
|---|---|
| XZ plane view | XY plane view |
![]() | ![]() |
| Explanation of the StDraw::Tower(...) method parameters (default "endcap" style ) | |
| XZ plane view | XY plane view |
![]() | ![]() |
Definition at line 1579 of file StDraw3D.cxx.
References Tower().
| TObject * StDraw3D::Tower | ( | float | radius, | |
| float | lambda, | |||
| float | phi, | |||
| float | dlambda, | |||
| float | dphi, | |||
| Color_t | col, | |||
| Style_t | sty, | |||
| Size_t | siz | |||
| ) | [virtual] |
Draw the TTRAP object suitable to represent the calorimeter data.
The method creates one "tower" object (see: http://root.cern.ch/root/html/TTRAP.html#TTRAP:description )
| radius | - the distance between the base of the tower and the "origin". It can be either the distance from the Z-axis for the kBarrelStyle or the distance from the xy plane for EndCap tower (default) style, for example. | |
| lambda | - the tower direction (in rads). It is the angle in respect of the Y-axis for kBarrelStyle tower or Z-axis. | |
| phi | - the angle (in rads) in XY plane against of the Ox | |
| dlambda | - the non-negative angle "width" of the tower. | |
| dphi | - the non-negative angle "length" of the tower | |
| col | - ROOT fill color ( see: http://root.cern.ch/root/html/TAttFill.html ) | |
| sty | - ROOT fill style ( see: http://root.cern.ch/root/html/TAttFIll.html ) The default style is "Endcap". One can add kBarrelStyle constant to ROOT style to get the "barrel" style tower= 0 - solid color, 4001 - wireframe view, 4001 ... 4100 - solid translucent color from 99% transparent to 100% opaque | |
| siz | - the height of the tower. It can be used to visualize the energy deposit or for any other reason. |
| Explanation of the StDraw::Tower(...) method parameters ("barrel" style ) | |
|---|---|
| XZ plane view | XY plane view |
![]() | ![]() |
| Explanation of the StDraw::Tower(...) method parameters (default "endcap" style ) | |
| XZ plane view | XY plane view |
![]() | ![]() |
Definition at line 1373 of file StDraw3D.cxx.
References Tower().
| TObject * StDraw3D::Tower | ( | float | radius, | |
| float | lambda, | |||
| float | lambda1, | |||
| float | lambda2, | |||
| float | phi, | |||
| float | dphi, | |||
| Color_t | col, | |||
| Style_t | sty, | |||
| Size_t | siz | |||
| ) | [virtual] |
This is an overloaded member function, provided for convenience.
The method creates one "tower" object (see: http://root.cern.ch/root/html/TTRAP.html#TTRAP:description )
| radius | - the distance between the base of the tower and the "origin". It can be either the distance from the Z-axis for the kBarrelStyle or the distance from the xy plane for EndCap tower (default) style, for example. | |
| lambda | - the tower direction (in rads). It is the angle in respect of the Y-axis for kBarrelStyle tower or Z-axis. | |
| lambda1 | - the tower near edge (in rads) | |
| lambda2 | - the tower far edge (in rads) | |
| phi | - the angle (in rads) in XY plane against of the Ox | |
| dphi | - the non-negative angle "length" of the tower | |
| col | - ROOT fill color ( see: http://root.cern.ch/root/html/TAttFill.html ) | |
| sty | - ROOT fill style ( see: http://root.cern.ch/root/html/TAttFIll.html ) The default style is "Endcap". One can add kBarrelStyle constant to ROOT style to get the "barrel" style tower = 0 - solid color, 4001 - wireframe view, 4001 ... 4100 - solid translucent color from 99% transparent to 100% opaque | |
| siz | - the height of the tower. It can be used to visualize the energy deposit or for any other reason. |
| Explanation of the StDraw::Tower(...) method parameters ("barrel" style ) | |
|---|---|
| XZ plane view | XY plane view |
![]() | ![]() |
| Explanation of the StDraw::Tower(...) method parameters (default "endcap" style ) | |
| XZ plane view | XY plane view |
![]() | ![]() |
Definition at line 1424 of file StDraw3D.cxx.
Referenced by Draw3DTest(), StuDraw3DMuEvent::EmcHit(), StuDraw3DEvent::EmcHit(), StuDraw3DMuEvent::Endcaps(), and Tower().
| void StDraw3D::Update | ( | bool | asap = false |
) | [virtual] |
Render all items from the current display list onto the screen and refesh the screen immiately if asap is defined.
| asap | = (defaul:false) force the sysysten to refresh the screen woith the fresh image. This option can significantly slow dowbn the rednereing if abused. |
Definition at line 1108 of file StDraw3D.cxx.
References Pad().
Referenced by Animate(), Clear(), and Draw3DTest().
| TVirtualViewer3D * StDraw3D::Viewer | ( | ) | const |
Definition at line 348 of file StDraw3D.cxx.
References Viewer().
Referenced by Clear(), Save(), SetDrawOption(), and Viewer().
1.5.9