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 void tof_digits_strips()
11 TClonesArray *array = 0x0;
13 Int_t nDigitsInVolume[3] = {-1, -1, -1};
15 TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
16 if (!localGeoManager) {
17 printf("ERROR: no TGeo\n");
20 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
21 rl->LoadDigits("TOF");
22 TTree* dt = rl->GetTreeD("TOF", false);
24 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
29 AliTOFGeometry* g = di->fGeom;
31 gStyle->SetPalette(1, 0);
32 gEve->DisableRedraw();
35 TString bsPlate="Plate";
37 TString bsStrip="Strip";
39 TString bsPadZ="PadZ";
41 TString bsPadX="PadX";
43 Char_t sectorName[100];
44 Char_t sectorTitle[200];
46 TEveElementList* ll = new TEveElementList("TOF");
47 ll->SetTitle("TOF detector");
48 ll->SetMainColor((Color_t)2);
51 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
53 sprintf(sectorName,"Sector%2i",iSector);
54 TEveElementList* l = new TEveElementList(sectorName);
55 l->SetTitle(sectorTitle);
56 l->SetMainColor((Color_t)2);
57 gEve->AddElement(l, ll);
60 for(Int_t iPlate=0; iPlate<g->NPlates(); iPlate++) {
61 if(iPlate==2) nStrips=15;
66 TEveElementList* relPlate = new TEveElementList(sPlate.Data());
67 relPlate->SetMainColor((Color_t)2);
68 gEve->AddElement(relPlaete, l);
71 for(Int_t iStrip=0; iStrip<nStrips; iStrip++) {
73 array = di->GetDigits(iSector,iPlate, iStrip);
75 AliEveTOFStrip* m = new AliEveTOFStrip(localGeoManager,iSector,iPlate,iStrip,array);
76 gEve->AddElement(m, relPlate);