]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tof_digits_sector.C
- introduction of gain scenarios (e.g. OROC only - for homogeneous gain in 11h)
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits_sector.C
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
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
10 #if !defined(__CINT__) || defined(__MAKECINT__)
11 #include <TTree.h>
12 #include <TStyle.h>
13 #include <TGeoManager.h>
14 #include <TEveManager.h>
15 #include <TEveElement.h>
16
17 #include <AliRunLoader.h>
18 #include <AliTOFGeometry.h>
19 #include <AliEveEventManager.h>
20 #include <AliEveTOFDigitsInfo.h>
21 #include <AliEveTOFSector.h>
22 #endif
23
24 void tof_digits_sector(Int_t sector=0)
25 {
26   
27   TGeoManager *localGeoManager = AliEveEventManager::AssertGeometry(); //gEve->GetGeometry("./geometry.root");
28   if (!localGeoManager) {
29     printf("ERROR: no TGeo\n");
30   }
31
32   AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
33   rl->LoadDigits("TOF");
34   TTree* dt = rl->GetTreeD("TOF", false);
35
36   AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
37
38   di->SetTree(dt);
39
40   //AliTOFGeometry* g = di->GetTOFgeometry();
41
42   gStyle->SetPalette(1, 0);
43   gEve->DisableRedraw();
44
45   //Char_t sectorName[100];
46   //Char_t sectorTitle[200];
47
48   TEveElementList* ll = new TEveElementList("TOF");
49   ll->SetTitle("TOF detector");
50   ll->SetMainColor(2);
51   gEve->AddElement(ll);
52
53   AliEveTOFSector* m = new AliEveTOFSector(localGeoManager, sector, dt);
54   m->SetName("Sector");
55   m->SetAutoTrans(kFALSE);
56   m->SetTrans();
57   gEve->AddElement(m, ll);
58
59   gEve->EnableRedraw();
60 }