]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/tof_digits_strips.C
Remove EVE/Reve/ sub-module.
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits_strips.C
CommitLineData
61d93123 1void tof_digits_strips()
2{
3 TClonesArray *array = 0x0;
4
5 Int_t nDigitsInVolume[3] = {-1, -1, -1};
6 Int_t nStrips=19;
84aff7a4 7 TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
61d93123 8 if (!localGeoManager) {
9 printf("ERROR: no TGeo\n");
10 }
11
12 AliRunLoader* rl = Alieve::Event::AssertRunLoader();
13 rl->LoadDigits("TOF");
14 TTree* dt = rl->GetTreeD("TOF", false);
15
16 Alieve::TOFDigitsInfo* di = new Alieve::TOFDigitsInfo();
17 di->SetTree(dt);
18 di->LoadDigits();
19 di->Dump();
20
21 AliTOFGeometry* g = di->fGeom;
22
23 gStyle->SetPalette(1, 0);
84aff7a4 24 gEve->DisableRedraw();
61d93123 25
26 TString sPlate;
27 TString bsPlate="Plate";
28 TString sStrip;
29 TString bsStrip="Strip";
30 TString sPadZ;
31 TString bsPadZ="PadZ";
32 TString sPadX;
33 TString bsPadX="PadX";
34
35 Char_t sectorName[100];
36 Char_t sectorTitle[200];
37
84aff7a4 38 TEveElementList* ll = new TEveElementList("TOF");
61d93123 39 ll->SetTitle("TOF detector");
40 ll->SetMainColor((Color_t)2);
84aff7a4 41 gEve->AddElement(ll);
61d93123 42
43 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
44
45 sprintf(sectorName,"Sector%2i",iSector);
84aff7a4 46 TEveElementList* l = new TEveElementList(sectorName);
61d93123 47 l->SetTitle(sectorTitle);
48 l->SetMainColor((Color_t)2);
84aff7a4 49 gEve->AddElement(l, ll);
61d93123 50
51
52 for(Int_t iPlate=0; iPlate<g->NPlates(); iPlate++) {
53 if(iPlate==2) nStrips=15;
54 else nStrips=19;
55
56 sPlate=bsPlate;
57 sPlate+=iPlate;
84aff7a4 58 TEveElementList* relPlate = new TEveElementList(sPlate.Data());
61d93123 59 relPlate->SetMainColor((Color_t)2);
84aff7a4 60 gEve->AddElement(relPlaete, l);
61d93123 61
62
63 for(Int_t iStrip=0; iStrip<nStrips; iStrip++) {
64
65 array = di->GetDigits(iSector,iPlate, iStrip);
66
67 Alieve::TOFStrip* m = new Alieve::TOFStrip(localGeoManager,iSector,iPlate,iStrip,array);
84aff7a4 68 gEve->AddElement(m, relPlate);
61d93123 69
70 }
71 }
72 }
73
84aff7a4 74 gEve->EnableRedraw();
61d93123 75
76
77}