]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/pmd_digits.C
Put black-listed classes out of Alieve namespace.
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_digits.C
CommitLineData
ee0e160c 1// ---------------------------------------------------------------------- //
dcdad5c4 2void pmd_digits(Int_t mode = 0)
ee0e160c 3{
32e219c2 4 Bool_t drawBackPolygons = kFALSE;
5
ee0e160c 6 gStyle->SetPalette(1, 0);
7
ee0e160c 8
9 TString spl;
10
11 TString sddl;
12 TString bsddl="DDL";
13
14
15 AliRunLoader* rl = Alieve::Event::AssertRunLoader();
16 rl->LoadDigits("PMD");
17 TTree* pmdt = rl->GetTreeD("PMD", false);
18
19 // cout << pmdt->GetEntries() << endl;
20
84aff7a4 21 gEve->DisableRedraw();
dcdad5c4 22
84aff7a4 23 TEveElementList* l = new TEveElementList("PMD");
ee0e160c 24 // l->SetTitle("tooltip");
25 // l->SetMainColor((Color_t)3);
84aff7a4 26 gEve->AddElement(l);
32e219c2 27
84aff7a4 28 TEveRGBAPalette* pal = new TEveRGBAPalette(20, 1000);
32e219c2 29 pal->SetLimits(0, 1024);
30
dcdad5c4 31 Int_t NSM = 0;
32 Int_t istartDDL = 0;
33 Int_t iendDDL = 0;
34 Int_t modnumber = 0;
35 Int_t istartPlane = 0;
36 Int_t iendPlane = 0;
37 Float_t zpos = 0;
38
39 switch(mode)
40 {
41 case 0:
42 istartPlane = 0;
43 iendPlane = 1;
44 printf("--- Visualization is set for PREshower Plane ---\n");
45 break;
46
47 case 1:
48 istartPlane = 1;
49 iendPlane = 2;
50 printf("--- Visualization is set for CPV Plane ---\n");
51 break;
52
53 case 2:
54 istartPlane = 0;
55 iendPlane = 2;
56 printf("--- Visualization is set for both Planes ---\n");
57 break;
58
59 default:
60 printf("--- Not set for any Plane ---\n");
61 }
ee0e160c 62
dcdad5c4 63 for (Int_t ipl = istartPlane; ipl < iendPlane; ipl++)
ee0e160c 64 {
65
66 if (ipl == 0)
67 {
dcdad5c4 68 spl = "PRE";
ee0e160c 69 istartDDL = 0;
70 iendDDL = 4;
dcdad5c4 71 zpos = 365.;
ee0e160c 72 }
73 if (ipl == 1)
74 {
dcdad5c4 75 spl = "CPV";
ee0e160c 76 istartDDL = 4;
77 iendDDL = 6;
dcdad5c4 78 zpos = 360.;
ee0e160c 79 }
80
84aff7a4 81 TEveElementList* lplane = new TEveElementList(spl.Data());
ee0e160c 82 // l->SetMainColor((Color_t)3);
84aff7a4 83 gEve->AddElement(lplane, l);
ee0e160c 84
85 for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++)
86 {
87 sddl = bsddl;
88 sddl += iddl;
84aff7a4 89 TEveElementList* lddl = new TEveElementList(sddl.Data());
ee0e160c 90 // l->SetMainColor((Color_t)3);
84aff7a4 91 gEve->AddElement(lddl, lplane);
ee0e160c 92
93 modnumber = iddl*6;
94
95 if (iddl < 4)
96 {
97 NSM = 6;
98 }
99 else if (iddl >=4 && iddl < 6)
100 {
101 NSM = 12;
102 }
103
104 for (Int_t ism = 0; ism < NSM; ism++)
105 {
106
107 Alieve::PMDModule *lmodule = new Alieve::PMDModule();
dcdad5c4 108 lmodule->SetPosition(0.,0.,zpos);
ee0e160c 109 lmodule->DisplayDigitsData(modnumber, pmdt);
32e219c2 110 lmodule->SetPalette(pal);
111 if (drawBackPolygons)
112 {
84aff7a4 113 TEveFrameBox* b = lmodule->GetFrame();
32e219c2 114 b->SetFrameWidth(1.5);
115 b->SetFrameColor((Color_t) 1);
116 b->SetBackColor ((Color_t) (kTeal - 9));
117 b->SetFrameFill (kFALSE);
118 b->SetDrawBack (kTRUE);
119 }
84aff7a4 120 gEve->AddElement(lmodule, lddl);
ee0e160c 121 modnumber++;
122 if (iddl == 4 && modnumber == 30) modnumber = 42;
123 }
124
125 }
126
127 }
128
84aff7a4 129 gEve->EnableRedraw();
ee0e160c 130}
131
132// ---------------------------------------------------------------------- //