--- /dev/null
+
+Reve::PointSet* its_clusters(RenderElement* cont=0)
+{
+ if (!gGeoManager)
+ gReve->GetGeometry("$PWD/misaligned_geometry.root");
+
+ AliRunLoader* rl = Alieve::Event::AssertRunLoader();
+ rl->LoadRecPoints("ITS");
+
+ TTree *cTree = rl->GetTreeR("ITS", false);
+
+ Reve::PointSet* clusters = new Reve::PointSet(10000);
+ clusters->SetOwnIds(kTRUE);
+
+ TClonesArray *cl=NULL;
+ TBranch *branch=cTree->GetBranch("ITSRecPoints");
+ branch->SetAddress(&cl);
+
+ Int_t nentr=(Int_t)cTree->GetEntries();
+ for (Int_t i=0; i<nentr; i++) {
+ if (!cTree->GetEvent(i)) continue;
+
+ Int_t ncl=cl->GetEntriesFast();
+
+ while (ncl--) {
+ AliCluster *c=(AliCluster*)cl->UncheckedAt(ncl);
+ Float_t g[3]; //global coordinates
+ c->GetGlobalXYZ(g);
+
+ clusters->SetNextPoint(g[0], g[1], g[2]);
+ AliCluster *atp = new AliCluster(*c);
+ clusters->SetPointId(atp);
+ }
+ }
+
+ if(clusters->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) {
+ Warning("its_clusters", "No ITS clusters");
+ delete clusters;
+ return 0;
+ }
+
+ clusters->SetMarkerStyle(2);
+ clusters->SetMarkerSize(0.5);
+ clusters->SetMarkerColor(4);
+
+ char form[1000];
+ sprintf(form,"ITS Clusters");
+ clusters->SetName(form);
+
+ char tip[1000];
+ sprintf(tip,"N=%d", clusters->Size());
+ clusters->SetTitle(tip);
+
+ using namespace Reve;
+ gReve->AddRenderElement(clusters);
+ gReve->Redraw3D();
+
+ return clusters;
+}