2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
9 #if !defined(__CINT__) || defined(__MAKECINT__)
13 #include <TEveElement.h>
14 #include <TEveFrameBox.h>
15 #include <TEveManager.h>
16 #include <TEvePointSet.h>
17 #include <TEveRGBAPalette.h>
18 #include <TEveTrans.h>
20 #include <AliHMPIDDigit.h>
21 #include <AliHMPIDv3.h>
22 #include <AliCluster3D.h>
23 #include <AliRunLoader.h>
24 #include <AliEveEventManager.h>
25 #include <AliEvePMDModule.h>
28 void pmd_digits(Int_t mode = 0)
30 Bool_t drawBackPolygons = kFALSE;
32 gStyle->SetPalette(1, 0);
41 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
42 rl->LoadDigits("PMD");
43 TTree* pmdt = rl->GetTreeD("PMD", false);
45 // cout << pmdt->GetEntries() << endl;
47 gEve->DisableRedraw();
49 TEveElementList* l = new TEveElementList("PMD");
50 // l->SetTitle("tooltip");
51 // l->SetMainColor(3);
54 TEveRGBAPalette* pal = new TEveRGBAPalette(20, 1000);
55 pal->SetLimits(0, 1024);
61 Int_t istartPlane = 0;
70 printf("--- Visualization is set for PREshower Plane ---\n");
76 printf("--- Visualization is set for CPV Plane ---\n");
82 printf("--- Visualization is set for both Planes ---\n");
86 printf("--- Not set for any Plane ---\n");
89 for (Int_t ipl = istartPlane; ipl < iendPlane; ipl++)
107 TEveElementList* lplane = new TEveElementList(spl.Data());
108 // l->SetMainColor(3);
109 gEve->AddElement(lplane, l);
111 for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++)
115 TEveElementList* lddl = new TEveElementList(sddl.Data());
116 // l->SetMainColor(3);
117 gEve->AddElement(lddl, lplane);
125 else if (iddl >=4 && iddl < 6)
130 for (Int_t ism = 0; ism < NSM; ism++)
133 AliEvePMDModule *lmodule = new AliEvePMDModule();
134 lmodule->SetPosition(0.,0.,zpos);
135 lmodule->DisplayDigitsData(modnumber, pmdt);
136 lmodule->SetPalette(pal);
137 if (drawBackPolygons)
139 TEveFrameBox* b = lmodule->GetFrame();
140 b->SetFrameWidth(1.5);
142 b->SetBackColor ((Color_t) (kTeal - 9));
143 b->SetFrameFill (kFALSE);
144 b->SetDrawBack (kTRUE);
146 gEve->AddElement(lmodule, lddl);
148 if (iddl == 4 && modnumber == 30) modnumber = 42;
155 gEve->EnableRedraw();
158 // ---------------------------------------------------------------------- //