]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/macros/TestEMCALGeometry.C
Changes for report #69974: Virtual class for calorimeter analysis objects
[u/mrichter/AliRoot.git] / EMCAL / macros / TestEMCALGeometry.C
1
2
3 // Test Macro, shows how to load Digits and Geometry, and how can we get 
4 // some of the parameters and variables.
5 // Author: Gustavo Conesa
6
7 void TestEMCALGeometry()
8 {
9    
10   // Getting EMCAL Detector and Geometry.
11   
12   AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),
13                           "read");
14  
15   if (rl == 0x0)
16       cout<<"Can not instatiate the Run Loader"<<endl;
17
18   rl->LoadgAlice();//Needed to get geometry
19
20   AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>
21     (rl->GetDetectorLoader("EMCAL"));
22
23   //AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
24   //AliEMCALGeometry *geom = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry();
25   TGeoManager::Import("geometry.root");
26
27   gGeoManager->CheckOverlaps();
28   gGeoManager->PrintOverlaps();
29
30   /*
31   AliRun * alirun   = rl->GetAliRun(); // Needed to get Geometry
32   AliEMCAL * emcal  = (AliEMCAL*)alirun->GetDetector("EMCAL");
33   AliEMCALGeometry * geom = emcal->GetGeometry();
34   
35   if (geom==0)
36     cout<<"Did not get geometry from EMCALLoader"<<endl;
37
38   geom->PrintGeometry();
39   */
40
41 }
42