From: gconesab Date: Wed, 16 Jun 2010 05:45:41 +0000 (+0000) Subject: Return supermodule number from eta and phi, taking into account the number of supermo... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=39ea291a502fa7dde945fcbecd162b215a605b54;p=u%2Fmrichter%2FAliRoot.git Return supermodule number from eta and phi, taking into account the number of supermodules of the selected geometry --- diff --git a/EMCAL/AliEMCALGeoUtils.cxx b/EMCAL/AliEMCALGeoUtils.cxx index e4c9bab0514..a7ed1477c74 100644 --- a/EMCAL/AliEMCALGeoUtils.cxx +++ b/EMCAL/AliEMCALGeoUtils.cxx @@ -382,6 +382,10 @@ Bool_t AliEMCALGeoUtils::SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, phi = TVector2::Phi_0_2pi(phi); // move phi to (0,2pi) boundaries for(i=0; i<6; i++) { + + //Check if it is not the complete geometry + if (i >= fEMCGeometry->GetNumberOfSuperModules()/2) return kFALSE; + if(phi>=fPhiBoundariesOfSM[2*i] && phi<=fPhiBoundariesOfSM[2*i+1]) { nSupMod = 2*i; if(eta < 0.0) nSupMod++;