StRoot
1
|
Class StuDraw3DMuEvent - to draw the StMuDst primitives like StMuTrack as 3D points and 3D lines decorated with the STAR detector geometry. More...
#include <StuDraw3DMuEvent.h>
Public Member Functions | |
StuDraw3DMuEvent (const char *detectorName="TPC", TVirtualPad *pad=0) | |
StuDraw3DMuEvent( const char *detectorName,TVirtualPad *pad) ctor. More... | |
virtual | ~StuDraw3DMuEvent () |
~StuDraw3DMuEvent( ) dtor More... | |
virtual void | Tracks (StTrackType type=global) |
Add all tracks of the given type from the current event to the display list. More... | |
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. More... | |
virtual TObject * | Track (const StMuTrack &track, EDraw3DStyle sty=kPrimaryTrack) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
virtual TObject * | TrackInOut (const StMuTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE) |
This is an overloaded member function, provided for convenience. More... | |
virtual void | Endcaps (Style_t sty=0) |
Add the endcap towers to the list to display. More... | |
virtual void | Endcaps (const StMuEmcCollection &e, Style_t sty=0) |
This is an overloaded member function, provided for convenience. More... | |
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. More... | |
virtual TObject * | EmcHit (Int_t emcHitsSoftId, float energy, const char *detIdt="bemc") |
template<class Predicate > | |
TObject * | EmcHit (Int_t emcHitsSoftId, const Predicate &sty, const char *detIdt="bemc") |
ClassDef (StuDraw3DMuEvent, 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 StuDraw3DMuEvent * | Display () |
Static Public Member Functions inherited from StDraw3D | |
static void | ShowTest () |
static void | ShowDetectorTest (const char *detectorName="StarDetectorUnfolding") |
Protected Member Functions | |
EEmcGeomSimple * | EndcapGeom () |
Protected Member Functions inherited from StDraw3D | |
virtual void | UpdateViewer (TVirtualPad *pad=0) |
Class StuDraw3DMuEvent - to draw the StMuDst primitives like StMuTrack as 3D points and 3D lines decorated with the STAR detector geometry.
\author Valery Fine (fine@bnl.gov) \date 01/08/2009 \sa EdMu.C Class StuDraw3DMuEvent provides the simple way to visualize the StMuDst event primitivies 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 the 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 \n Try:
to read some MuDst ROOT file and get the pictire below: ///
You need to install the Adobe Reader version 9 or higher /// /// to be able to "click and see" the interactive ( zoom, pan, select / highlight the pieces, etc ) 3D image also ///
///
Definition at line 72 of file StuDraw3DMuEvent.h.
StuDraw3DMuEvent::StuDraw3DMuEvent | ( | const char * | detectorName = "TPC" , |
TVirtualPad * | pad = 0 |
||
) |
StuDraw3DMuEvent( 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 wireframe view
|
Definition at line 40 of file StuDraw3DMuEvent.cxx.
|
virtual |
~StuDraw3DMuEvent( ) dtor
Reset the global gMuEventDisplay
pointer to the current display if the current display is this
Definition at line 54 of file StuDraw3DMuEvent.cxx.
|
static |
Definition at line 323 of file StuDraw3DMuEvent.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 288 of file StuDraw3DMuEvent.cxx.
References StDraw3D::Tower().
Referenced by addEmcHits().
|
virtual |
Add the endcap towers to the list to display.
sty | - is the ROOT TAttFill style: =0 - solid view, =4001 - "wireframe" view, =4002-4100 - solid semitransparent view |
Definition at line 194 of file StuDraw3DMuEvent.cxx.
References StMuDst::muEmcCollection().
Referenced by addEmcHits().
|
virtual |
This is an overloaded member function, provided for convenience.
emc | - the reference to the collection (singletone) of the emc properties. | ||||||||||||
sty | - is the ROOT TAttFill style: =0 - solid view, =4001 - "wireframe" view, =4002-4100 - solid semitransparent view
|
Definition at line 234 of file StuDraw3DMuEvent.cxx.
References EEmcGeomSimple::getEtaHalfWidth(), EEmcGeomSimple::getEtaMean(), EEmcGeomSimple::getPhiHalfWidth(), EEmcGeomSimple::getPhiMean(), and StDraw3D::Tower().
|
virtual |
Add track to the display list with the col color, sty style, and siz size if provided.
track | - reference to the StMuTrack object from StMuDst data structure |
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 111 of file StuDraw3DMuEvent.cxx.
References StMuTrack::helix(), StMuTrack::length(), StDraw3D::Line(), and StMuTrack::outerHelix().
Referenced by addTracks(), Track(), and Tracks().
|
virtual |
This is an overloaded member function, provided for convenience.
Add track to the display list with the sty pre-defined style if provided
Definition at line 126 of file StuDraw3DMuEvent.cxx.
References StMuTrack::globalTrack(), StMuTrack::primaryTrack(), StDraw3D::Style(), and Track().
|
virtual |
Add the in point of the given track to the display list with the col color, sty style, and siz size if provided.
track | - reference to the StMuTrack object from StMuDst 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 152 of file StuDraw3DMuEvent.cxx.
References StMuTrack::firstPoint(), and StMuTrack::lastPoint().
Referenced by TrackInOut().
|
virtual |
This is an overloaded member function, provided for convenience.
track | - reference to the StMuTrack object from StMuDst 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 |
sty | - EDraw3DStyle pre-defined visual style of this object. |
Definition at line 170 of file StuDraw3DMuEvent.cxx.
References StDraw3D::Style(), and TrackInOut().
|
virtual |
Add all tracks of the given type from the current event to the display list.
the style
and size
vizual attributes are defined by the StTrackType global
/ primary
styles.
The color
is defined by the track pt
Definition at line 67 of file StuDraw3DMuEvent.cxx.
References StMuDst::globalTracks(), StMuDst::primaryTracks(), StMuTrack::pt(), StDraw3DStyle::Pt2Color(), StDraw3D::Style(), and Track().