]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGeoUtils.cxx
Return supermodule number from eta and phi, taking into account the number of supermo...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeoUtils.cxx
index e4c9bab0514b7c95859dc5cb43dc49a57e81a106..a7ed1477c74ad48f3b6a778744fc0e7bce76760c 100644 (file)
@@ -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++;