StuDraw3DEvent: visualizing event primitives

Speaker : Valeri Fine ( BNL )


Talk time : 12:15, Duration : 00:15

The new class StuDraw3DEvent implementation (StEventUtilities package) is available from STAR "dev" area.

The main idea is to create the simple, flexible and convinient API to the existent STAR / ROOT vizualization facilities to make it  suitable to debug the reconstruction code. The proposed API and its implementation is to satisfy the various requirements been collected from the STAR users over years.

The short write up is available http://www.star.bnl.gov/public/comp/vis/StDraw3D. API provides the simple way to visualize the event primitives in 3D quickly against of the STAR detector geometry. The GUI interface is described "STAR visualization and plotting" by "Offline Event Display" and "Star Geometry Browser" links. by "Offline Event Display" and "Star Geometry Browser" links.

Use cases

Draw the reconstructed by bfc chain global tracks:

root.exe

  root[0] .x Load.C
  root[1] .x bfc.C(0,"doevents","st_physics_6048025_raw_1020002.event.root");
  root[2]  // One can use any other chain parameters instead of "doevents" above
  root[3] chain->MakeEvent();                // to read the next event
  root[4] StEvent *event = chain->GetDataSet("StEvent");  // Access the StEvent pointer
  root[5] gEventDisplay->SetBkColor(kWhite);  // Change the backgorund color
  root[6] gEventDisplay->Tracks(event);      // Draw the tracks

Draw the red space point at (50,100,200)

root.exe
  root[0] .x Load.C
  root[1] gEventDisplay->Point(50.0,100.0,200,kRed);

Draw the reconstructed by bfc chain primary tracks:

root.exe
  root[0] .x Load.C
  root[1] .x bfc.C(0,"doevents","st_physics_6048025_raw_1020002.event.root");
  root[2]  // One can use any other chain parameters instead of "doevents" above
  root[3] chain->MakeEvent();                // to read the next event
  root[4] StEvent *event = chain->GetDataSet("StEvent");  // Access the StEvent pointer
  root[5] gEventDisplay->Tracks(event,primary);      // Draw the global tracks

Draw the reconstructed by bfc chain global tracks and its hits:

  root.exe [7]  gEventDisplay->Hits(event,kUsedHitsTracks);//

How to customize

To create the custom display, for example> to provide the custom cuts one has to

  • Copy the template from $STAR/StRoot/StEventUtilities/EveDis.C
  • Edit he method EveDis::Hits() (see the comments inside of the EveDis.C file)
  • Start ROOT
  • Load the standard STAR libraries
  • Invoke AClIC
  • Create the custom display instance as follows:
                    root.exe
                      root [0].x Load.C
                      root [1].L EveDis.C++
                      root [2] EveDis display;
                      root [3] display.Draw3DTest()
    How to use several custom "display" classesLet's assume you have your own nice cut for TPC tracks and you implemented it with your custom version of the EveDisTPC class as above. Then, another member of your team made another nice cut for the FTPC hits - EveDisTPC. Now, you want to see pciture that applies both of these cut together.
    root.exe
      root [0] .x Load.C
      root [1] .L EveDisTPC.C++
      root [2] .L EveDisFTPC.C++
      root [3] .x bfc.C(0,"doevents","st_physics_6048025_raw_1020002.event.root");
      root [4]  // One can use any other chain parameters instead of "doevents" above
      root [5] chain->MakeEvent();                // to read the next event
      root [6] StEvent *event = chain->GetDataSet("StEvent");  // Access the StEvent pointer
      root [7] EveDisTPC tpcDisplay;
      root [8] EveDisFTPC ftpcDisplay;
      root [9] tpcDisplay.Joint(&ftpcDisplay);
      root[10] tpcDisplay.Tracks(event);      // Draw the TPC track
      root[11] ftpcDisplay.Hits(event);      // Draw the FTPC his over the TPC tracks