Commit 149d5a625d4c963dad4025dcaa597722eebbf19a

Authored by Jürgen Knödlseder
1 parent bf8c06ed

Remove obsolete GCTABackground3D::m_mc_one_minus_costheta member

inst/cta/include/GCTABackground3D.hpp
... ... @@ -125,9 +125,8 @@ private:
125 125 double m_logE_max; //!< Log10(E/TeV) maximum
126 126  
127 127 // Monte Carlo cache
128   - mutable std::vector<double> m_mc_max; //!< Maximum background rate
129   - mutable GModelSpectralNodes m_mc_spectrum; //!< Response cube spectrum
130   - mutable double m_mc_one_minus_costheta; //!< 1-cos(theta_max)
  128 + mutable std::vector<double> m_mc_max; //!< Maximum background rate
  129 + mutable GModelSpectralNodes m_mc_spectrum; //!< Response cube spectrum
131 130 };
132 131  
133 132  
... ...
inst/cta/src/GCTABackground3D.cpp
... ... @@ -749,7 +749,6 @@ void GCTABackground3D::init_members(void)
749 749 // Initialise MC cache
750 750 m_mc_max.clear();
751 751 m_mc_spectrum.clear();
752   - m_mc_one_minus_costheta = 0.0;
753 752  
754 753 // Return
755 754 return;
... ... @@ -785,9 +784,8 @@ void GCTABackground3D::copy_members(const GCTABackground3D&amp; bgd)
785 784 m_logE_max = bgd.m_logE_max;
786 785  
787 786 // Copy MC cache
788   - m_mc_max = bgd.m_mc_max;
789   - m_mc_spectrum = bgd.m_mc_spectrum;
790   - m_mc_one_minus_costheta = bgd.m_mc_one_minus_costheta;
  787 + m_mc_max = bgd.m_mc_max;
  788 + m_mc_spectrum = bgd.m_mc_spectrum;
791 789  
792 790 // Return
793 791 return;
... ... @@ -937,23 +935,6 @@ void GCTABackground3D::init_mc_cache(void) const
937 935 // Initialise maximum rate array
938 936 init_mc_max_rate();
939 937  
940   - // Compute 1-cos(theta_max)
941   - double theta1 = std::sqrt(m_detx_min * m_detx_min + m_dety_min * m_dety_min);
942   - double theta2 = std::sqrt(m_detx_min * m_detx_min + m_dety_max * m_dety_max);
943   - double theta3 = std::sqrt(m_detx_max * m_detx_max + m_dety_min * m_dety_min);
944   - double theta4 = std::sqrt(m_detx_max * m_detx_max + m_dety_max * m_dety_max);
945   - double theta = theta1;
946   - if (theta2 > theta) {
947   - theta = theta2;
948   - }
949   - if (theta3 > theta) {
950   - theta = theta3;
951   - }
952   - if (theta4 > theta) {
953   - theta = theta4;
954   - }
955   - m_mc_one_minus_costheta = 1.0 - std::cos(theta);
956   -
957 938 // Compute DETX and DETY binsize in radians
958 939 double detx_bin = (m_detx_max - m_detx_min) / m_num_detx;
959 940 double dety_bin = (m_dety_max - m_dety_min) / m_num_dety;
... ...