StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
draw3DTracks.C
1 {{
2 /* This is a very simple example macro using the StMuDstMaker to open
3  * a MuDst file and print out some event and charged track information
4  */
5  gROOT->Reset();
6  gROOT->Macro("loadMuDst.C");
7  TString muDstFile = "/star/data15/reco/ppProduction2008/ReversedFullField/P08ie/2008/046/9046031/st_physics_adc_9046031_raw_2070002.MuDst.root";
8  mudst_mk=new StMuDstMaker(0,0,muDstFile.Data());
9  mudst_mk->Init();
10 
11  Int_t n_evt=1;
12 // for (Int_t i_evt=0; i_evt<n_evt; i_evt++)
13  {
14  mudst_mk->Make();
15  if (mudst_mk->muDst()==0) {
16  cout << "No event" << endl;
17  continue;
18  }
19  StMuEvent *event=mudst_mk->muDst()->event();
20  cout << "Event: " << event->eventId() << endl;
21  StThreeVectorF vtx_pos = event->primaryVertexPosition();
22  cout << "Vertex at " << vtx_pos.x() << " " << vtx_pos.y() << " " << vtx_pos.z() << endl;
23  StuDraw3DMuEvent::Display()->Point(vtx_pos.x(),vtx_pos.y(),vtx_pos.z(),kVtx);
26  cout << "Rendering . . . ." << endl;
28  }
29 
30 }}
virtual void Update(bool asap=false)
Render all items from the current display list onto the screen and refesh the screen immiately if asa...
Definition: StDraw3D.cxx:1109
StMuDstMaker(const char *name="MuDst")
Default constructor.
virtual void Tracks(StTrackType type=global)
Add all tracks of the given type from the current event to the display list.
static StuDraw3DMuEvent * Display()