// Test Macro, shows how to load Digits and Geometry, and how can we get // some of the parameters and variables. // Author: Gustavo Conesa void TestEMCALDigit() { // Getting EMCAL Detector and Geometry. AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(), "read"); if (rl == 0x0) cout<<"Can not instatiate the Run Loader"<LoadgAlice();//Needed to get geometry AliEMCALLoader *emcalLoader = dynamic_cast (rl->GetDetectorLoader("EMCAL")); //AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance(); //AliEMCALGeometry *geom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); AliRun * alirun = rl->GetAliRun(); // Needed to get Geometry AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL"); AliEMCALGeometry * geom = emcal->GetGeometry(); if (geom==0) cout<<"Did not get geometry from EMCALLoader"<LoadDigits("EMCAL"); //Get maximum number of events Int_t maxevent = rl->GetNumberOfEvents(); cout<<"Number of events "< Event " << iEvent << endl ; //Load Event rl->GetEvent(iEvent); //Fill array of digits TClonesArray *digits = emcalLoader->Digits(); //Get digits from the list for(Int_t idig = 0; idig< digits->GetEntries();idig++){ //cout<<">> idig "<(digits->At(idig)) ; if(dig != 0){ id = dig->GetId() ; //cell (digit) label amp = dig->GetAmp(); //amplitude in cell (digit) time = dig->GetTime();//time of creation of digit after collision cout<<"Cell ID "<GetCellIndex(id,iSupMod,iTower,iIphi,iIeta); //Gives SuperModule and Tower numbers geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower, iIphi, iIeta,iphi,ieta); //Gives label of cell in eta-phi position per each supermodule cout<< "SModule "<