code: def _compute_hanging_wall_effect(self, C, rjb, rrup, dip, mag):
          
          # eq. 8 (to be noticed that the USGS-NSHMP implementation defines
          # the hanging-wall term for all rjb distances, while in the original
          # manuscript, hw is computed only for rjb < 5). Again the 'firm rock'
          # is considered
          hw = np.zeros_like(rjb)
          if dip <= 70.:
              hw = (5. - rjb) / 5.
  
          # eq. 9
          f_m = 1 if mag > 6.5 else mag - 5.5
  
  #        # eq. 10
          f_rrup = C['c15'] + np.zeros_like(rrup)
          idx = rrup < 8
          f_rrup[idx] *= rrup[idx] / 8
  
          # eq. 7 (to be noticed that the f3 factor is not included
          # while this is defined in the original manuscript)
          f_hw = hw * f_m * f_rrup
  
          return f_hw
docs: Compute hanging-wall effect (see eq. 7, 8, 9 and 10 page 319).
          Considers correct version of equation 8 as given in the erratum and not
          in the original paper.