1 TEveRGBAPalette *g_zdc_palette = 0;
3 TEveGeoShape* zdc_make_shape(const Text_t* name, const Text_t* title_base,
4 Double_t signal, const Text_t* path)
6 if ( ! gGeoManager->cd(path))
8 Warning("zdc_make_shape", "Module name=%s, path='%s' not found.\n", name, path);
13 g_zdc_palette->ColorFromValue(TMath::Nint(signal), rgb, kFALSE);
15 TGeoShape *gs = (TGeoShape*) gGeoManager->GetCurrentVolume()->GetShape()->Clone();
17 TEveGeoShape *s = new TEveGeoShape(name, Form("%s %s, E=%.3f", title_base, name, signal));
18 s->SetPickable(kTRUE);
19 s->SetMainColorRGB(rgb[0], rgb[1], rgb[2]);
21 s->RefMainTrans().SetFrom(*gGeoManager->GetCurrentMatrix());
23 // Scale z-dictance by 0.1
24 Double_t* t = s->RefMainTrans().ArrT();
30 // ???? There are 5 towers in ESD, 4 in geom.
31 // Not sure about assignment A/C <-> 1/2
35 AliEveEventManager::AssertGeometry();
37 AliESDZDC *esd = AliEveEventManager::AssertESD()->GetESDZDC();
39 if (g_zdc_palette == 0)
41 // Map values from 0, 50 on a spectrum palette.
42 g_zdc_palette = new TEveRGBAPalette(0, 50, kTRUE, kFALSE);
43 g_zdc_palette->IncRefCount();
44 gStyle->SetPalette(1, 0);
45 g_zdc_palette->SetupColorArray();
48 TEveElementList* l = new TEveElementList("ZDC Data", "");
51 TEveElementList *c = 0;
56 // ZNC geometry ------------------------------------
58 c = new TEveElementList(tb);
61 te = esd->GetZN1TowerEnergy();
63 c->AddElement(zdc_make_shape("Tower 1", tb, te[1],
64 "ALIC_1/ZDCC_1/ZNEU_1/ZNTX_1/ZN1_1"));
66 c->AddElement(zdc_make_shape("Tower 2", tb, te[2],
67 "ALIC_1/ZDCC_1/ZNEU_1/ZNTX_1/ZN1_2"));
69 c->AddElement(zdc_make_shape("Tower 3", tb, te[3],
70 "ALIC_1/ZDCC_1/ZNEU_1/ZNTX_2/ZN1_1"));
72 c->AddElement(zdc_make_shape("Tower 4", tb, te[4],
73 "ALIC_1/ZDCC_1/ZNEU_1/ZNTX_2/ZN1_2"));
77 c = new TEveElementList(tb);
80 te = esd->GetZN2TowerEnergy();
82 c->AddElement(zdc_make_shape("Tower 1", tb, te[1],
83 "ALIC_1/ZDCA_1/ZNEU_2/ZNTX_1/ZN1_1"));
85 c->AddElement(zdc_make_shape("Tower 2", tb, te[2],
86 "ALIC_1/ZDCA_1/ZNEU_2/ZNTX_1/ZN1_2"));
88 c->AddElement(zdc_make_shape("Tower 3", tb, te[3],
89 "ALIC_1/ZDCA_1/ZNEU_2/ZNTX_2/ZN1_1"));
91 c->AddElement(zdc_make_shape("Tower 4", tb, te[4],
92 "ALIC_1/ZDCA_1/ZNEU_2/ZNTX_2/ZN1_2"));
95 // ZPC geometry ------------------------------------
97 c = new TEveElementList(tb);
100 te = esd->GetZP1TowerEnergy();
102 c->AddElement(zdc_make_shape("Tower 1", tb, te[1],
103 "ALIC_1/ZDCC_1/ZPRO_1/ZPTX_1/ZP1_1"));
105 c->AddElement(zdc_make_shape("Tower 2", tb, te[2],
106 "ALIC_1/ZDCC_1/ZPRO_1/ZPTX_2/ZP1_1"));
108 c->AddElement(zdc_make_shape("Tower 3", tb, te[3],
109 "ALIC_1/ZDCC_1/ZPRO_1/ZPTX_3/ZP1_1"));
111 c->AddElement(zdc_make_shape("Tower 4", tb, te[4],
112 "ALIC_1/ZDCC_1/ZPRO_1/ZPTX_4/ZP1_1"));
116 c = new TEveElementList(tb);
119 te = esd->GetZP2TowerEnergy();
121 c->AddElement(zdc_make_shape("Tower 1", tb, te[1],
122 "ALIC_1/ZDCA_1/ZPRO_2/ZPTX_1/ZP1_1"));
124 c->AddElement(zdc_make_shape("Tower 2", tb, te[2],
125 "ALIC_1/ZDCA_1/ZPRO_2/ZPTX_2/ZP1_1"));
127 c->AddElement(zdc_make_shape("Tower 3", tb, te[3],
128 "ALIC_1/ZDCA_1/ZPRO_2/ZPTX_3/ZP1_1"));
130 c->AddElement(zdc_make_shape("Tower 4", tb, te[4],
131 "ALIC_1/ZDCA_1/ZPRO_2/ZPTX_4/ZP1_1"));
133 // End - refresh screen