v->GetXYZ(x); v->GetSigmaXYZ(e);
TEveStraightLineSet* ls = new TEveStraightLineSet("Cross");
+ TString title;
if (use_sigma)
{
e[0] *= fx; e[1] *= fy; e[2] *= fz;
- ls->SetTitle(Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f*sigma_z", fx, fy, fz));
+ title += Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f*sigma_z", fx, fy, fz);
}
else
{
e[0] = fx; e[1] = fy; e[2] = fz;
- ls->SetTitle(Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz));
+ title += Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz);
}
+ title += Form("\nx=%.5f, y=%.5f, z=%.5f\nsx=%.5f, sy=%.5f, sz=%.5f",
+ x[0], x[1], x[2], e[0], e[1], e[2]);
+ ls.SetTitle(title);
+
ls->AddLine(e[0], 0, 0, -e[0], 0, 0);
ls->AddLine(0, e[1], 0, 0, -e[1], 0);
ls->AddLine(0, 0, e[2], 0, 0, -e[2]);
v->GetXYZ(x); v->GetSigmaXYZ(e);
TEveStraightLineSet* ls = new TEveStraightLineSet("Ellipse");
+ TString title;
if (use_sigma)
{
e[0] *= fx; e[1] *= fy; e[2] *= fz;
- ls->SetTitle(Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f sigma_z", fx, fy, fz));
+ title += Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f sigma_z", fx, fy, fz);
}
else
{
e[0] = fx; e[1] = fy; e[2] = fz;
- ls->SetTitle(Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz));
+ title += Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz);
}
+ title += Form("\nx=%.5f, y=%.5f, z=%.5f\nsx=%.5f, sy=%.5f, sz=%.5f",
+ x[0], x[1], x[2], e[0], e[1], e[2]);
+ ls.SetTitle(title);
const Int_t N = 32;
const Float_t S = 2*TMath::Pi()/N;
v->GetXYZ(x); v->GetSigmaXYZ(e);
TEveStraightLineSet* ls = new TEveStraightLineSet("Box");
+ TString title;
if (use_sigma)
{
e[0] *= fx; e[1] *= fy; e[2] *= fz;
- ls->SetTitle(Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f*sigma_z", fx, fy, fz));
+ title += Form("+- %.1f*sigma_x, %.1f*sigma_y, %.1f*sigma_z", fx, fy, fz);
}
else
{
e[0] = fx; e[1] = fy; e[2] = fz;
- ls->SetTitle(Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz));
+ title += Form("+- %.1f cm x %.1f cm x %.1f cm", fx, fy, fz);
}
+ title += Form("\nx=%.5f, y=%.5f, z=%.5f\nsx=%.5f, sy=%.5f, sz=%.5f",
+ x[0], x[1], x[2], e[0], e[1], e[2]);
+ ls.SetTitle(title);
+
// pos z
ls->AddLine( e[0], e[1], e[2], e[0], -e[1], e[2]);
ls->AddLine( e[0], -e[1], e[2], -e[0], -e[1], e[2]);
{
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDVertex *tpcv = esd->GetPrimaryVertexTPC();
- if ( ! pv->GetStatus()) {
+ if ( ! tpcv->GetStatus()) {
Info("primary_vertex_tpc", "Primary vertex TPC not available.");
return 0;
}
{
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDVertex *tpcv = esd->GetPrimaryVertexTPC();
- if ( ! pv->GetStatus()) {
+ if ( ! tpcv->GetStatus()) {
Info("primary_vertex_ellipse_tpc", "Primary vertex TPC not available.");
return 0;
}
{
AliESDEvent *esd = AliEveEventManager::AssertESD();
AliESDVertex *tpcv = esd->GetPrimaryVertexTPC();
- if ( ! pv->GetStatus()) {
+ if ( ! tpcv->GetStatus()) {
Info("primary_vertex_box_tpc", "Primary vertex TPC not available.");
return 0;
}
#include <EveBase/AliEveEventManager.h>
+#include <AliESDEvent.h>
+#include <AliESDVertex.h>
+
#include <AliRunLoader.h>
#include <AliCluster.h>
#include <TPC/AliTPCClustersRow.h>
AliEveEventManager::AssertGeometry();
+ Double_t pvert[3] = { 0, 0, 0 };
+ if (AliEveEventManager::HasESD())
+ {
+ AliESDEvent *esd = AliEveEventManager::AssertESD();
+ const AliESDVertex *tpcv = esd->GetPrimaryVertexTPC();
+ if (tpcv->GetStatus())
+ tpcv->GetXYZ(pvert);
+ else
+ Info("vplot_tpc", "Primary vertex TPC not available, using 0.");
+ }
+ else
+ {
+ Info("vplot_tpc", "ESD not available, using 0 for primary vertex.");
+ }
+
AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
rl->LoadRecPoints("TPC");
AliCluster *c = (AliCluster*) cl->UncheckedAt(ncl);
Float_t g[3]; //global coordinates
c->GetGlobalXYZ(g);
+ g[0] -= pvert[0];
+ g[1] -= pvert[1];
+ g[2] -= pvert[2];
if (g[0]*g[0] + g[1]*g[1] < maxRsqr)
{
phi = TMath::ATan2(g[1], g[0]);