]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Return supermodule number from eta and phi, taking into account the number of supermo...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 05:45:41 +0000 (05:45 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 05:45:41 +0000 (05:45 +0000)
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++;