2 Reve::PointSet* its_clusters(RenderElement* cont=0, Float_t maxR=50)
4 AliLog::EnableDebug(1);
5 AliLog::SetGlobalDebugLevel(AliLog::kMaxType);
7 Alieve::Event::AssertGeometry();
9 AliRunLoader* rl = Alieve::Event::AssertRunLoader();
10 rl->LoadRecPoints("ITS");
12 TTree *cTree = rl->GetTreeR("ITS", false);
14 Reve::PointSet* clusters = new Reve::PointSet(10000);
15 clusters->SetOwnIds(kTRUE);
17 TClonesArray *cl=NULL;
18 TBranch *branch=cTree->GetBranch("ITSRecPoints");
19 branch->SetAddress(&cl);
21 Int_t nentr=(Int_t)cTree->GetEntries();
22 for (Int_t i=0; i<nentr; i++) {
23 if (!cTree->GetEvent(i)) continue;
25 Int_t ncl=cl->GetEntriesFast();
27 Float_t maxRsqr = maxR*maxR;
29 AliCluster *c=(AliCluster*)cl->UncheckedAt(ncl);
30 Float_t g[3]; //global coordinates
32 if (g[0]*g[0]+g[1]*g[1] < maxRsqr)
34 clusters->SetNextPoint(g[0], g[1], g[2]);
35 AliCluster *atp = new AliCluster(*c);
36 clusters->SetPointId(atp);
41 if(clusters->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) {
42 Warning("its_clusters", "No ITS clusters");
47 clusters->SetMarkerStyle(2);
48 clusters->SetMarkerSize(0.2);
49 clusters->SetMarkerColor(4);
52 sprintf(form,"ITS Clusters");
53 clusters->SetName(form);
56 sprintf(tip,"N=%d", clusters->Size());
57 clusters->SetTitle(tip);
60 gReve->AddRenderElement(clusters);