StuDraw3DMuEvent Class Reference

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>

Inheritance diagram for StuDraw3DMuEvent:

StDraw3D

List of all members.

Public Member Functions

 StuDraw3DMuEvent (const char *detectorName="TPC", TVirtualPad *pad=0)
 StuDraw3DMuEvent( const char *detectorName,TVirtualPad *pad) ctor.
virtual ~StuDraw3DMuEvent ()
 ~StuDraw3DMuEvent( ) dtor
virtual void Tracks (StTrackType type=global)
 Add all tracks of the given type from the current event to the display list.
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.
virtual TObject * Track (const StMuTrack &track, EDraw3DStyle sty=kPrimaryTrack)
 This is an overloaded member function, provided for convenience.
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.
virtual TObject * TrackInOut (const StMuTrack &track, EDraw3DStyle sty=kUsedHit, Bool_t in=kTRUE)
 This is an overloaded member function, provided for convenience.
virtual void Endcaps (Style_t sty=0)
 Add the endcap towers to the list to display.
virtual void Endcaps (const StMuEmcCollection &e, Style_t sty=0)
 This is an overloaded member function, provided for convenience.
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.
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)

Static Public Member Functions

static StuDraw3DMuEventDisplay ()

Protected Member Functions

EEmcGeomSimpleEndcapGeom ()


Detailed Description

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
See also:
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
Try:
  > ln -s  $STAR/StRoot/macros/.rootrc
  > root.exe $STAR/StRoot/macros/mudst/draw3DTracks.C
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.


Constructor & Destructor Documentation

StuDraw3DMuEvent::StuDraw3DMuEvent ( const char *  detectorName = "TPC",
TVirtualPad *  pad = 0 
)

StuDraw3DMuEvent( const char *detectorName,TVirtualPad *pad) ctor.

Parameters:
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
Event over detector geometry Event with no detector geometry
Note:
If this is the first instance of the class then the global pointer to the current "display" is to be set too
See also:
Display()

StRoot/macros/mudst/draw3DTracks.C

Definition at line 40 of file StuDraw3DMuEvent.cxx.

StuDraw3DMuEvent::~StuDraw3DMuEvent (  )  [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.


Member Function Documentation

StuDraw3DMuEvent * StuDraw3DMuEvent::Display (  )  [static]

Returns:
The pointer to the current instance of the StuDraw3DMuEvent class to visualize StMuDst components

Definition at line 323 of file StuDraw3DMuEvent.cxx.

TObject * StuDraw3DMuEvent::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 288 of file StuDraw3DMuEvent.cxx.

References StDraw3D::Tower().

Referenced by addEmcHits().

void StuDraw3DMuEvent::Endcaps ( const StMuEmcCollection emc,
Style_t  sty = 0 
) [virtual]

This is an overloaded member function, provided for convenience.

Parameters:
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
Endcap towers and tpc tracks rendering example
XY plane view ZX plane view
YZ plane view 3D plane view

Definition at line 234 of file StuDraw3DMuEvent.cxx.

References EEmcGeomSimple::getEtaHalfWidth(), EEmcGeomSimple::getEtaMean(), EEmcGeomSimple::getPhiHalfWidth(), EEmcGeomSimple::getPhiMean(), and StDraw3D::Tower().

void StuDraw3DMuEvent::Endcaps ( Style_t  sty = 0  )  [virtual]

Add the endcap towers to the list to display.

Parameters:
sty - is the ROOT TAttFill style:
=0 - solid view,
=4001 - "wireframe" view,
=4002-4100 - solid semitransparent view
EdMu.C.Endcap.tracks.png

The first event from Run 9046031 pProduction2008 produced by EdMu.C macros

Definition at line 194 of file StuDraw3DMuEvent.cxx.

References StMuDst::muEmcCollection().

Referenced by addEmcHits().

TObject * StuDraw3DMuEvent::Track ( const StMuTrack 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 if provided

Definition at line 126 of file StuDraw3DMuEvent.cxx.

References StMuTrack::globalTrack(), StMuTrack::primaryTrack(), StDraw3D::Style(), and Track().

TObject * StuDraw3DMuEvent::Track ( const StMuTrack 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 style, and siz size if provided.

Parameters:
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 )
Returns:
- a pointer to the ROOT "view" TObject of track model

Definition at line 111 of file StuDraw3DMuEvent.cxx.

References StMuTrack::helix(), StMuTrack::length(), StDraw3D::Line(), and StMuTrack::outerHelix().

Referenced by addTracks(), Track(), and Tracks().

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

This is an overloaded member function, provided for convenience.

Parameters:
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.
Returns:
- a pointer to the ROOT "view" TObject of star/end point of track model

Definition at line 170 of file StuDraw3DMuEvent.cxx.

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

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

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

Parameters:
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 )
Returns:
- a pointer to the ROOT "view" TObject of star/end point of track model

Definition at line 152 of file StuDraw3DMuEvent.cxx.

References StMuTrack::firstPoint(), and StMuTrack::lastPoint().

Referenced by TrackInOut().

void StuDraw3DMuEvent::Tracks ( StTrackType  type = global  )  [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

 double pt =  double pt =track.pt(); 

Definition at line 67 of file StuDraw3DMuEvent.cxx.

References StMuDst::globalTracks(), StMuDst::primaryTracks(), StMuTrack::pt(), StDraw3DStyle::Pt2Color(), StDraw3D::Style(), and Track().


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

Generated on Thu Feb 9 04:27:36 2012 for StRoot by  doxygen 1.5.9