]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/muon_clusters.C
New files for MUON visualization by Bogdan Vulpescu.
[u/mrichter/AliRoot.git] / EVE / alice-macros / muon_clusters.C
1 void muon_clusters()
2 {
3   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
4
5   rl->LoadRecPoints("MUON");
6
7   TTree* ct = rl->GetTreeR("MUON", false);
8
9   Alieve::MUONDigitsInfo* di = new Alieve::MUONDigitsInfo();
10   di->SetRTree(ct);
11
12   gStyle->SetPalette(1, 0);
13
14   gReve->DisableRedraw();
15
16   rl->LoadgAlice();
17
18   char name[128];
19   char title[128];
20
21   /* CLUSTERS */
22
23   for (Int_t iSta = 1; iSta <= 5; iSta++) {
24
25     for (Int_t iCha = 1; iCha <= 2; iCha++) {
26
27       sprintf(name,"M-ST%1dCH%1d/Clusters",iSta,iCha);
28
29       Reve::RenderElementList* l = new Reve::RenderElementList(name);
30       
31       if (iSta <= 5) {
32         sprintf(title,"Station %1d chamber %1d (tracking)",iSta,iCha);
33       } else {
34         sprintf(title,"Station %1d chamber %1d (trigger)",iSta,iCha);
35       }
36       
37       l->SetTitle(title);
38       l->SetMainColor((Color_t)4);
39       TGListTreeItem *ti = gReve->AddRenderElement(l);
40     
41       Int_t iChamber = (iSta-1) * 2 + iCha; 
42
43       AliMpDEIterator it;
44       for ( it.First(iChamber-1); ! it.IsDone(); it.Next() ) {
45         
46         Int_t detElemId = it.CurrentDE();
47         
48         Alieve::MUONModule* m = new Alieve::MUONModule(detElemId, 0, di, 0, 1, (Color_t)2);
49         l->AddElement(m);
50         gReve->AddRenderElement(ti,m);      
51         
52       }
53
54       gReve->DrawRenderElement(l);
55       
56     }
57     
58   }
59   
60   gReve->EnableRedraw();
61
62 }