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 **************************************************************************/
10 void tof_digits_strips()
12 TClonesArray *array = 0x0;
14 Int_t nDigitsInVolume[3] = {-1, -1, -1};
16 TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
17 if (!localGeoManager) {
18 printf("ERROR: no TGeo\n");
21 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
22 rl->LoadDigits("TOF");
23 TTree* dt = rl->GetTreeD("TOF", false);
25 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
30 AliTOFGeometry* g = di->fGeom;
32 gStyle->SetPalette(1, 0);
33 gEve->DisableRedraw();
36 TString bsPlate="Plate";
38 TString bsStrip="Strip";
40 TString bsPadZ="PadZ";
42 TString bsPadX="PadX";
44 Char_t sectorName[100];
45 Char_t sectorTitle[200];
47 TEveElementList* ll = new TEveElementList("TOF");
48 ll->SetTitle("TOF detector");
49 ll->SetMainColor((Color_t)2);
52 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
54 sprintf(sectorName,"Sector%2i",iSector);
55 TEveElementList* l = new TEveElementList(sectorName);
56 l->SetTitle(sectorTitle);
57 l->SetMainColor((Color_t)2);
58 gEve->AddElement(l, ll);
61 for(Int_t iPlate=0; iPlate<g->NPlates(); iPlate++) {
62 if(iPlate==2) nStrips=15;
67 TEveElementList* relPlate = new TEveElementList(sPlate.Data());
68 relPlate->SetMainColor((Color_t)2);
69 gEve->AddElement(relPlaete, l);
72 for(Int_t iStrip=0; iStrip<nStrips; iStrip++) {
74 array = di->GetDigits(iSector,iPlate, iStrip);
76 AliEveTOFStrip* m = new AliEveTOFStrip(localGeoManager,iSector,iPlate,iStrip,array);
77 gEve->AddElement(m, relPlate);