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(Int_t selectedSector=-1)
12 TClonesArray *array = 0x0;
14 Int_t nDigitsInVolume[3] = {-1, -1, -1};
16 TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");// gGeoManager = gEve->GetDefaultGeometry();
18 if (!localGeoManager) {
19 printf("ERROR: no TGeo\n");
22 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
23 rl->LoadDigits("TOF");
24 TTree* dt = rl->GetTreeD("TOF", false);
26 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
31 AliTOFGeometry* g = di->GetTOFgeometry();
33 gStyle->SetPalette(1, 0);
34 gEve->DisableRedraw();
37 TString bsPlate="Plate";
39 Char_t sectorName[100];
40 Char_t sectorTitle[200];
42 TEveElementList* ll = new TEveElementList("TOF");
43 ll->SetTitle("TOF detector");
47 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
48 if (selectedSector!=-1 && iSector!=selectedSector) continue;
49 sprintf(sectorName,"Sector%2i",iSector);
50 TEveElementList* l = new TEveElementList(sectorName);
51 l->SetTitle(sectorTitle);
53 gEve->AddElement(l, ll);
56 for(Int_t iPlate=0; iPlate<g->NPlates(); iPlate++) {
57 if ((iSector==13 || iSector==14 || iSector==15) &&
58 (iPlate==2) )continue; // staging TOF geometry with holes
60 if(iPlate==2) nStrips=15;
65 TEveElementList* relPlate = new TEveElementList(sPlate.Data());
66 relPlate->SetMainColor(2);
67 gEve->AddElement(relPlate, l);
70 for(Int_t iStrip=0; iStrip<nStrips; iStrip++) {
72 array = di->GetDigits(iSector,iPlate, iStrip);
74 AliEveTOFStrip* m = new AliEveTOFStrip(localGeoManager,
75 iSector,iPlate,iStrip,array);
76 gEve->AddElement(m, relPlate);