]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/clusters_from_index.C
get beam type
[u/mrichter/AliRoot.git] / EVE / alice-macros / clusters_from_index.C
index cdd4ab6a8d97fce7b0e54494330db9f1d60d15cb..e7ec44a5918eff2fc640cc4d4be94ce819d57d12 100644 (file)
@@ -6,6 +6,16 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TEveManager.h>
+#include <TEveElement.h>
+#include <TEvePointSet.h>
+
+#include <AliESDEvent.h>
+#include <AliTrackPointArray.h>
+#include <AliEveEventManager.h>
+#include <AliEveMultiView.h>
+#endif
 
 TEvePointSet* clusters_from_index(Int_t index=0, TEveElement* cont=0)
 {
@@ -28,8 +38,8 @@ TEvePointSet* clusters_from_index(Int_t index=0, TEveElement* cont=0)
   const AliTrackPointArray* pArr = at->GetTrackPointArray();
   if (pArr == 0) {
     Warning("clusters_from_index", "TrackPointArray not stored with ESD track.");
-    continue;
   }
+  
   Int_t np =  pArr->GetNPoints();
   const Float_t* x = pArr->GetX();
   const Float_t* y = pArr->GetY();
@@ -42,27 +52,26 @@ TEvePointSet* clusters_from_index(Int_t index=0, TEveElement* cont=0)
 
 
   if(clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
-    Warning("clusters_from_index", Form("No clusters for index '%d'", index));
+    Warning("clusters_from_index", "No clusters for index '%d'", index);
     delete clusters;
     return 0;
   }
 
   clusters->SetMarkerStyle(2);
-  clusters->SetMarkerSize(0.5);
+  clusters->SetMarkerSize(2);
   clusters->SetMarkerColor(4);
 
-  //PH The line below is replaced waiting for a fix in Root
-  //PH which permits to use variable siza arguments in CINT
-  //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
-  //PH  clusters->SetName(Form("Clusters idx=%d", index));
-  char form[1000];
-  sprintf(form,"Clusters idx=%d", index);
-  clusters->SetName(form);
+  clusters->SetName(Form("Clusters idx=%d", index));
+  clusters->SetTitle(Form("N=%d", clusters->Size()));
 
-  char tip[1000];
-  sprintf(tip,"N=%d", clusters->Size());
-  clusters->SetTitle(tip);
   gEve->AddElement(clusters);
+
+  if (AliEveMultiView::Instance())
+  {
+    AliEveMultiView::Instance()->ImportEventRPhi(clusters);
+    AliEveMultiView::Instance()->ImportEventRhoZ(clusters);
+  }
+
   gEve->Redraw3D();
 
   return clusters;