2 Reve::PointSet* its_clusters(RenderElement* cont=0, Float_t maxR=50)
4 Alieve::Event::AssertGeometry();
6 AliRunLoader* rl = Alieve::Event::AssertRunLoader();
7 rl->LoadRecPoints("ITS");
9 TTree *cTree = rl->GetTreeR("ITS", false);
11 Reve::PointSet* clusters = new Reve::PointSet(10000);
12 clusters->SetOwnIds(kTRUE);
14 TClonesArray *cl=NULL;
15 TBranch *branch=cTree->GetBranch("ITSRecPoints");
16 branch->SetAddress(&cl);
18 Int_t nentr=(Int_t)cTree->GetEntries();
19 for (Int_t i=0; i<nentr; i++) {
20 if (!cTree->GetEvent(i)) continue;
22 Int_t ncl=cl->GetEntriesFast();
24 Float_t maxRsqr = maxR*maxR;
26 AliCluster *c=(AliCluster*)cl->UncheckedAt(ncl);
27 Float_t g[3]; //global coordinates
29 if (g[0]*g[0]+g[1]*g[1] < maxRsqr)
31 clusters->SetNextPoint(g[0], g[1], g[2]);
32 AliCluster *atp = new AliCluster(*c);
33 clusters->SetPointId(atp);
38 if(clusters->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) {
39 Warning("its_clusters", "No ITS clusters");
44 clusters->SetMarkerStyle(2);
45 clusters->SetMarkerSize(0.2);
46 clusters->SetMarkerColor(4);
49 sprintf(form,"ITS Clusters");
50 clusters->SetName(form);
53 sprintf(tip,"N=%d", clusters->Size());
54 clusters->SetTitle(tip);
57 gReve->AddRenderElement(clusters);