Пример #1
0
void on_new_event()
{
  Double_t x[3] = { 0, 0, 0 };
  
  if (IlcEveEventManager::HasESD())
  {
    IlcESDEvent* esd = IlcEveEventManager::AssertESD();
    esd->GetPrimaryVertex()->GetXYZ(x);
    
    TTimeStamp ts(esd->GetTimeStamp());
    TString win_title("Eve Main Window -- Timestamp: ");
    win_title += ts.AsString("s");
    win_title += "; Event # in ESD file: ";
    win_title += esd->GetEventNumberInFile();
    gEve->GetBrowser()->SetWindowName(win_title);
  }
  
  TEveElement* top = gEve->GetCurrentEvent();
  
  IlcEveMultiView *mv = IlcEveMultiView::Instance();
  
  mv->DestroyEventRPhi();
  if (gCenterProjectionsAtPrimaryVertex)
    mv->SetCenterRPhi(x[0], x[1], x[2]);
  mv->ImportEventRPhi(top);
  
  mv->DestroyEventRhoZ();
  if (gCenterProjectionsAtPrimaryVertex)
    mv->SetCenterRhoZ(x[0], x[1], x[2]);
  mv->ImportEventRhoZ(top);
}
Пример #2
0
TEveStraightLineSet*
primary_vertex_box(Bool_t use_sigma=kTRUE, Float_t fx=30, Float_t fy=30, Float_t fz=10)
{
  IlcESDEvent  *esd = IlcEveEventManager::AssertESD();
  const IlcESDVertex *pv  = esd->GetPrimaryVertex();
  if ( ! pv->GetStatus()) {
    Info("primary_vertex_box", "Primary vertex not available.");
    return 0;
  }

  TEveStraightLineSet* ls = make_vertex_box(pv, use_sigma, fx, fy, fz);
  ls->ApplyVizTag("REC PVTX Box");
  assert_vertex_parent("Primary Vertex", 7)->AddElement(ls);
  gEve->Redraw3D();
  return ls;
}