]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Set center of the projection to the primary vertex.
authoralja <alja@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Oct 2007 14:46:14 +0000 (14:46 +0000)
committeralja <alja@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Oct 2007 14:46:14 +0000 (14:46 +0000)
EVE/alice-macros/NLT_trackcount_init.C

index 699c8fa9eefa1d976582a3de001a26041c470000..616134fc16a1cd8f4aab33bc96502b0cf9577fe9 100644 (file)
@@ -7,7 +7,6 @@ class RnrElement*;
 
 Reve::NLTProjector  * proj = 0;
 Reve::GeoShapeRnrEl * geom = 0;
-// Reve::RenderElement* pgeom = 0;
 
 void NLT_trackcount_init()
 {
@@ -82,6 +81,11 @@ void on_new_event()
 
   Reve::RenderElement* top = gReve->GetCurrentEvent();
   proj->DestroyElements();
+  AliESDEvent* esd = Alieve::Event::AssertESD();
+  Double_t x[3];
+  esd->GetPrimaryVertex()->GetXYZ(x);
+  proj->SetCenter(x[0], x[1], x[2]);
+
   // geom
   proj->ImportElements(geom);
   // event