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
7 void TestEMCALGeometry()
10 // Getting EMCAL Detector and Geometry.
12 AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),
16 cout<<"Can not instatiate the Run Loader"<<endl;
18 rl->LoadgAlice();//Needed to get geometry
20 AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>
21 (rl->GetDetectorLoader("EMCAL"));
23 //AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
24 //AliEMCALGeometry *geom = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry();
25 TGeoManager::Import("geometry.root");
27 gGeoManager->CheckOverlaps();
28 gGeoManager->PrintOverlaps();
31 AliRun * alirun = rl->GetAliRun(); // Needed to get Geometry
32 AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL");
33 AliEMCALGeometry * geom = emcal->GetGeometry();
36 cout<<"Did not get geometry from EMCALLoader"<<endl;
38 geom->PrintGeometry();