Commit 9d3063b6fba452ca91019c424426e5f837e71c3b

Authored by Jürgen Knödlseder
1 parent 716d4d07

Change remaining const references to pointers in the definition of the integrati…

…on helper classes. This should avoid using references that are no longer valid (see #1556).
inst/cta/src/GCTAAeffArf.cpp
... ... @@ -377,7 +377,7 @@ void GCTAAeffArf::remove_thetacut(const GCTAResponseIrf& rsp)
377 377 for (int i = 0; i < m_aeff.size(); ++i) {
378 378  
379 379 // Setup integration kernel for on-axis PSF
380   - cta_npsf_kern_rad_azsym integrand(rsp,
  380 + cta_npsf_kern_rad_azsym integrand(&rsp,
381 381 rmax,
382 382 0.0,
383 383 m_logE[i],
... ...
inst/cta/src/GCTACubeSourceDiffuse.cpp
... ... @@ -382,8 +382,9 @@ double GCTACubeSourceDiffuse::psf(const GCTAResponseCube* rsp,
382 382 // Setup integration kernel. We take here the observed photon arrival
383 383 // direction as the true photon arrival direction because the PSF does
384 384 // not vary significantly over a small region.
385   - cta_psf_diffuse_kern_delta integrand(rsp, model, obsDir, srcEng, srcTime,
386   - rot, iter_phi);
  385 + cta_psf_diffuse_kern_delta integrand(rsp, model, &rot,
  386 + obsDir, srcEng, srcTime,
  387 + iter_phi);
387 388  
388 389 // Setup integration
389 390 GIntegral integral(&integrand);
... ...
inst/cta/src/GCTAResponseIrf.cpp
... ... @@ -498,7 +498,7 @@ double GCTAResponseIrf::nroi(const GModelSky&amp; model,
498 498 if (emax > emin) {
499 499  
500 500 // Setup integration function
501   - cta_nroi_kern integrand(model, *this, srcTime, obsEng, obsTime, obs);
  501 + cta_nroi_kern integrand(this, &obs, &model, srcTime, obsEng, obsTime);
502 502 GIntegral integral(&integrand);
503 503  
504 504 // Set fixed number of iterations
... ... @@ -1852,7 +1852,7 @@ double GCTAResponseIrf::npsf(const GSkyDir&amp; srcDir,
1852 1852 if (rmax > rmin) {
1853 1853  
1854 1854 // Setup integration kernel
1855   - cta_npsf_kern_rad_azsym integrand(*this,
  1855 + cta_npsf_kern_rad_azsym integrand(this,
1856 1856 roi_radius,
1857 1857 roi_psf_distance,
1858 1858 srcLogEng,
... ... @@ -2208,8 +2208,8 @@ double GCTAResponseIrf::irf_radial(const GEvent&amp; event,
2208 2208 if (rho_max > rho_min) {
2209 2209  
2210 2210 // Setup integration kernel
2211   - cta_irf_radial_kern_rho integrand(*this,
2212   - *model,
  2211 + cta_irf_radial_kern_rho integrand(this,
  2212 + model,
2213 2213 zenith,
2214 2214 azimuth,
2215 2215 srcEng,
... ... @@ -2423,8 +2423,8 @@ double GCTAResponseIrf::irf_elliptical(const GEvent&amp; event,
2423 2423 if (rho_max > rho_min) {
2424 2424  
2425 2425 // Setup integration kernel
2426   - cta_irf_elliptical_kern_rho integrand(*this,
2427   - *model,
  2426 + cta_irf_elliptical_kern_rho integrand(this,
  2427 + model,
2428 2428 semimajor,
2429 2429 semiminor,
2430 2430 posangle,
... ... @@ -2617,8 +2617,9 @@ double GCTAResponseIrf::irf_diffuse(const GEvent&amp; event,
2617 2617 GMatrix rot = (ry * rz).transpose();
2618 2618  
2619 2619 // Setup integration kernel
2620   - cta_irf_diffuse_kern_theta integrand(*this,
2621   - *model,
  2620 + cta_irf_diffuse_kern_theta integrand(this,
  2621 + model,
  2622 + &rot,
2622 2623 theta,
2623 2624 phi,
2624 2625 zenith,
... ... @@ -2627,7 +2628,6 @@ double GCTAResponseIrf::irf_diffuse(const GEvent&amp; event,
2627 2628 srcTime,
2628 2629 srcLogEng,
2629 2630 obsEng,
2630   - rot,
2631 2631 eta,
2632 2632 iter_phi);
2633 2633  
... ... @@ -2828,14 +2828,14 @@ double GCTAResponseIrf::nroi_radial(const GModelSky&amp; model,
2828 2828 double omega0 = centre.posang(roi.centre().dir());
2829 2829  
2830 2830 // Setup integration kernel
2831   - cta_nroi_radial_kern_rho integrand(*this,
2832   - *spatial,
  2831 + cta_nroi_radial_kern_rho integrand(this,
  2832 + &cta,
  2833 + spatial,
  2834 + &rot,
2833 2835 srcEng,
2834 2836 srcTime,
2835 2837 obsEng,
2836 2838 obsTime,
2837   - cta,
2838   - rot,
2839 2839 roi_model_distance,
2840 2840 roi_psf_radius,
2841 2841 omega0,
... ... @@ -3033,8 +3033,10 @@ double GCTAResponseIrf::nroi_elliptical(const GModelSky&amp; model,
3033 3033 double posangle_roi = centre.posang(roi.centre().dir());
3034 3034  
3035 3035 // Setup integration kernel
3036   - cta_nroi_elliptical_kern_rho integrand(*this,
3037   - *spatial,
  3036 + cta_nroi_elliptical_kern_rho integrand(this,
  3037 + &cta,
  3038 + spatial,
  3039 + &rot,
3038 3040 semimajor,
3039 3041 semiminor,
3040 3042 posangle,
... ... @@ -3042,8 +3044,6 @@ double GCTAResponseIrf::nroi_elliptical(const GModelSky&amp; model,
3042 3044 srcTime,
3043 3045 obsEng,
3044 3046 obsTime,
3045   - cta,
3046   - rot,
3047 3047 rho_roi,
3048 3048 posangle_roi,
3049 3049 radius_roi,
... ... @@ -3213,14 +3213,14 @@ double GCTAResponseIrf::nroi_diffuse(const GModelSky&amp; model,
3213 3213 GMatrix rot = (ry * rz).transpose();
3214 3214  
3215 3215 // Setup integration kernel
3216   - cta_nroi_diffuse_kern_theta integrand(*this,
3217   - *spatial,
  3216 + cta_nroi_diffuse_kern_theta integrand(this,
  3217 + &cta,
  3218 + spatial,
  3219 + &rot,
3218 3220 srcEng,
3219 3221 srcTime,
3220 3222 obsEng,
3221 3223 obsTime,
3222   - cta,
3223   - rot,
3224 3224 iter_phi);
3225 3225  
3226 3226 // Integrate over model's zenith angle
... ...
inst/cta/src/GCTAResponse_helpers.cpp
... ... @@ -199,8 +199,8 @@ double cta_npsf_kern_rad_azsym::eval(const double&amp; delta)
199 199 if (phi > 0) {
200 200  
201 201 // Compute PSF value
202   - value = m_rsp.psf(delta, m_theta, m_phi, m_zenith, m_azimuth, m_logE) *
203   - phi * std::sin(delta);
  202 + value = m_rsp->psf(delta, m_theta, m_phi, m_zenith, m_azimuth, m_logE) *
  203 + phi * std::sin(delta);
204 204  
205 205 // Compile option: Check for NaN/Inf
206 206 #if defined(G_NAN_CHECK)
... ... @@ -235,9 +235,9 @@ double cta_nroi_kern::eval(const double&amp; logEsrc)
235 235 srcEng.MeV(expx);
236 236  
237 237 // Compute response components
238   - double nroi_spatial = m_rsp.nroi(m_model, srcEng, m_srcTime, m_obsEng, m_obsTime, m_obs);
239   - double nroi_spectral = m_model.spectral()->eval(srcEng, m_srcTime);
240   - double nroi_temporal = m_model.temporal()->eval(m_srcTime);
  238 + double nroi_spatial = m_rsp->nroi(*m_model, srcEng, m_srcTime, m_obsEng, m_obsTime, *m_obs);
  239 + double nroi_spectral = m_model->spectral()->eval(srcEng, m_srcTime);
  240 + double nroi_temporal = m_model->temporal()->eval(m_srcTime);
241 241  
242 242 // Compute response
243 243 double nroi = nroi_spatial * nroi_spectral * nroi_temporal * expx;
... ... @@ -301,7 +301,7 @@ double cta_irf_radial_kern_rho::eval(const double&amp; rho)
301 301 }
302 302  
303 303 // Evaluate sky model
304   - double model = m_model.eval(rho_kluge, m_srcEng, m_srcTime);
  304 + double model = m_model->eval(rho_kluge, m_srcEng, m_srcTime);
305 305  
306 306 // Debug: test if model is non positive
307 307 #if defined(G_DEBUG_MODEL_ZERO)
... ... @@ -422,12 +422,12 @@ double cta_irf_radial_kern_omega::eval(const double&amp; omega)
422 422 double azimuth = 0.0;
423 423  
424 424 // Evaluate IRF
425   - double irf = m_rsp.aeff(offset, azimuth, m_zenith, m_azimuth, m_srcLogEng) *
426   - m_rsp.psf(delta, offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
  425 + double irf = m_rsp->aeff(offset, azimuth, m_zenith, m_azimuth, m_srcLogEng) *
  426 + m_rsp->psf(delta, offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
427 427  
428 428 // Optionally take energy dispersion into account
429   - if (m_rsp.use_edisp() && irf > 0.0) {
430   - irf *= m_rsp.edisp(m_obsEng, offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
  429 + if (m_rsp->use_edisp() && irf > 0.0) {
  430 + irf *= m_rsp->edisp(m_obsEng, offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
431 431 }
432 432  
433 433 // Compile option: Check for NaN/Inf
... ... @@ -499,7 +499,7 @@ double cta_nroi_radial_kern_rho::eval(const double&amp; rho)
499 499 }
500 500  
501 501 // Get radial model value
502   - double model = m_model.eval(rho_kluge, m_srcEng, m_srcTime);
  502 + double model = m_model->eval(rho_kluge, m_srcEng, m_srcTime);
503 503  
504 504 // Debug: test if model is non positive
505 505 #if defined(G_DEBUG_MODEL_ZERO)
... ... @@ -521,12 +521,12 @@ double cta_nroi_radial_kern_rho::eval(const double&amp; rho)
521 521  
522 522 // Setup phi integration kernel
523 523 cta_nroi_radial_kern_omega integrand(m_rsp,
  524 + m_obs,
  525 + m_rot,
524 526 m_srcEng,
525 527 m_srcTime,
526 528 m_obsEng,
527 529 m_obsTime,
528   - m_obs,
529   - m_rot,
530 530 sin_rho,
531 531 cos_rho);
532 532  
... ... @@ -578,7 +578,7 @@ double cta_nroi_radial_kern_omega::eval(const double&amp; omega)
578 578 GVector native(-cos_omega*m_sin_rho, sin_omega*m_sin_rho, m_cos_rho);
579 579  
580 580 // Rotate from native into celestial system
581   - GVector cel = m_rot * native;
  581 + GVector cel = *m_rot * native;
582 582  
583 583 // Set sky direction
584 584 GSkyDir srcDir;
... ... @@ -588,7 +588,7 @@ double cta_nroi_radial_kern_omega::eval(const double&amp; omega)
588 588 GPhoton photon(srcDir, m_srcEng, m_srcTime);
589 589  
590 590 // Compute point source Nroi for this sky direction
591   - double nroi = m_rsp.nirf(photon, m_obsEng, m_obsTime, m_obs);
  591 + double nroi = m_rsp->nirf(photon, m_obsEng, m_obsTime, *m_obs);
592 592  
593 593 // Debug: Check for NaN
594 594 #if defined(G_NAN_CHECK)
... ... @@ -850,14 +850,14 @@ double cta_irf_elliptical_kern_omega::eval(const double&amp; omega)
850 850 double omega_model = omega + m_posangle_obs;
851 851  
852 852 // Evaluate sky model
853   - double model = m_model.eval(m_rho, omega_model, m_srcEng, m_srcTime);
  853 + double model = m_model->eval(m_rho, omega_model, m_srcEng, m_srcTime);
854 854  
855 855 // Debug: test if model is non positive
856 856 #if defined(G_DEBUG_MODEL_ZERO)
857 857 if (model <= 0.0) {
858   - double m_semiminor_rad = m_model.semiminor() * gammalib::deg2rad;
859   - double m_semimajor_rad = m_model.semimajor() * gammalib::deg2rad;
860   - double diff_angle = omega_model - m_model.posangle() * gammalib::deg2rad;
  858 + double m_semiminor_rad = m_model->semiminor() * gammalib::deg2rad;
  859 + double m_semimajor_rad = m_model->semimajor() * gammalib::deg2rad;
  860 + double diff_angle = omega_model - m_model->posangle() * gammalib::deg2rad;
861 861 double cosinus = std::cos(diff_angle);
862 862 double sinus = std::sin(diff_angle);
863 863 double arg1 = m_semiminor_rad * cosinus;
... ... @@ -885,14 +885,14 @@ double cta_irf_elliptical_kern_omega::eval(const double&amp; omega)
885 885 double phi = 0.0; //TODO: Implement IRF Phi dependence
886 886  
887 887 // Evaluate IRF * model
888   - irf = m_rsp.aeff(theta, phi, m_zenith, m_azimuth, m_srcLogEng) *
889   - m_rsp.psf(delta, theta, phi, m_zenith, m_azimuth, m_srcLogEng) *
  888 + irf = m_rsp->aeff(theta, phi, m_zenith, m_azimuth, m_srcLogEng) *
  889 + m_rsp->psf(delta, theta, phi, m_zenith, m_azimuth, m_srcLogEng) *
890 890 model;
891 891  
892 892 // Optionally take energy dispersion into account
893   - if (m_rsp.use_edisp() && irf > 0.0) {
894   - irf *= m_rsp.edisp(m_obsEng, theta, phi,
895   - m_zenith, m_azimuth, m_srcLogEng);
  893 + if (m_rsp->use_edisp() && irf > 0.0) {
  894 + irf *= m_rsp->edisp(m_obsEng, theta, phi,
  895 + m_zenith, m_azimuth, m_srcLogEng);
896 896 }
897 897  
898 898 // Compile option: Check for NaN/Inf
... ... @@ -979,13 +979,13 @@ double cta_nroi_elliptical_kern_rho::eval(const double&amp; rho)
979 979  
980 980 // Setup phi integration kernel
981 981 cta_nroi_elliptical_kern_omega integrand(m_rsp,
  982 + m_obs,
982 983 m_model,
  984 + m_rot,
983 985 m_srcEng,
984 986 m_srcTime,
985 987 m_obsEng,
986 988 m_obsTime,
987   - m_obs,
988   - m_rot,
989 989 rho_kluge,
990 990 sin_rho,
991 991 cos_rho,
... ... @@ -1123,14 +1123,14 @@ double cta_nroi_elliptical_kern_omega::eval(const double&amp; omega)
1123 1123 double omega_model = omega + m_posangle_roi;
1124 1124  
1125 1125 // Evaluate sky model
1126   - double model = m_model.eval(m_rho, omega_model, m_srcEng, m_srcTime);
  1126 + double model = m_model->eval(m_rho, omega_model, m_srcEng, m_srcTime);
1127 1127  
1128 1128 // Debug: test if model is non positive
1129 1129 #if defined(G_DEBUG_MODEL_ZERO)
1130 1130 if (model <= 0.0) {
1131   - double m_semiminor_rad = m_model.semiminor() * gammalib::deg2rad;
1132   - double m_semimajor_rad = m_model.semimajor() * gammalib::deg2rad;
1133   - double diff_angle = omega_model - m_model.posangle() * gammalib::deg2rad;
  1131 + double m_semiminor_rad = m_model->semiminor() * gammalib::deg2rad;
  1132 + double m_semimajor_rad = m_model->semimajor() * gammalib::deg2rad;
  1133 + double diff_angle = omega_model - m_model->posangle() * gammalib::deg2rad;
1134 1134 double cosinus = std::cos(diff_angle);
1135 1135 double sinus = std::sin(diff_angle);
1136 1136 double arg1 = m_semiminor_rad * cosinus;
... ... @@ -1155,7 +1155,7 @@ double cta_nroi_elliptical_kern_omega::eval(const double&amp; omega)
1155 1155 GVector native(-cos_omega*m_sin_rho, sin_omega*m_sin_rho, m_cos_rho);
1156 1156  
1157 1157 // Rotate from native into celestial system
1158   - GVector cel = m_rot * native;
  1158 + GVector cel = *m_rot * native;
1159 1159  
1160 1160 // Set sky direction
1161 1161 GSkyDir srcDir;
... ... @@ -1165,7 +1165,7 @@ double cta_nroi_elliptical_kern_omega::eval(const double&amp; omega)
1165 1165 GPhoton photon(srcDir, m_srcEng, m_srcTime);
1166 1166  
1167 1167 // Compute Nroi for this sky direction
1168   - nroi = m_rsp.nirf(photon, m_obsEng, m_obsTime, m_obs) * model;
  1168 + nroi = m_rsp->nirf(photon, m_obsEng, m_obsTime, *m_obs) * model;
1169 1169  
1170 1170 // Debug: Check for NaN
1171 1171 #if defined(G_NAN_CHECK)
... ... @@ -1228,7 +1228,7 @@ double cta_irf_diffuse_kern_theta::eval(const double&amp; theta)
1228 1228 // integration as the PSF is so far azimuthally symmetric. Once
1229 1229 // we introduce asymmetries, we have to move this done into the
1230 1230 // Phi kernel method/
1231   - double psf = m_rsp.psf(theta, m_theta, m_phi, m_zenith, m_azimuth, m_srcLogEng);
  1231 + double psf = m_rsp->psf(theta, m_theta, m_phi, m_zenith, m_azimuth, m_srcLogEng);
1232 1232  
1233 1233 // Continue only if PSF is positive
1234 1234 if (psf > 0.0) {
... ... @@ -1244,13 +1244,13 @@ double cta_irf_diffuse_kern_theta::eval(const double&amp; theta)
1244 1244 // Setup kernel for azimuthal integration
1245 1245 cta_irf_diffuse_kern_phi integrand(m_rsp,
1246 1246 m_model,
  1247 + m_rot,
1247 1248 m_zenith,
1248 1249 m_azimuth,
1249 1250 m_srcEng,
1250 1251 m_srcTime,
1251 1252 m_srcLogEng,
1252 1253 m_obsEng,
1253   - m_rot,
1254 1254 sin_theta,
1255 1255 cos_theta,
1256 1256 sin_ph,
... ... @@ -1335,14 +1335,14 @@ double cta_irf_diffuse_kern_phi::eval(const double&amp; phi)
1335 1335 GVector native(-cos_phi*m_sin_theta, sin_phi*m_sin_theta, m_cos_theta);
1336 1336  
1337 1337 // Rotate from native into celestial system
1338   - GVector cel = m_rot * native;
  1338 + GVector cel = *m_rot * native;
1339 1339  
1340 1340 // Set sky direction
1341 1341 GSkyDir srcDir;
1342 1342 srcDir.celvector(cel);
1343 1343  
1344 1344 // Get sky intensity for this sky direction
1345   - double intensity = m_model.eval(GPhoton(srcDir, m_srcEng, m_srcTime));
  1345 + double intensity = m_model->eval(GPhoton(srcDir, m_srcEng, m_srcTime));
1346 1346  
1347 1347 // Continue only if sky intensity is positive
1348 1348 if (intensity > 0.0) {
... ... @@ -1355,12 +1355,12 @@ double cta_irf_diffuse_kern_phi::eval(const double&amp; phi)
1355 1355  
1356 1356 // Evaluate model times the effective area
1357 1357 irf = intensity *
1358   - m_rsp.aeff(offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
  1358 + m_rsp->aeff(offset, azimuth, m_zenith, m_azimuth, m_srcLogEng);
1359 1359  
1360 1360 // Optionally take energy dispersion into account
1361   - if (m_rsp.use_edisp() && irf > 0.0) {
1362   - irf *= m_rsp.edisp(m_obsEng, offset, azimuth,
1363   - m_zenith, m_azimuth, m_srcLogEng);
  1361 + if (m_rsp->use_edisp() && irf > 0.0) {
  1362 + irf *= m_rsp->edisp(m_obsEng, offset, azimuth,
  1363 + m_zenith, m_azimuth, m_srcLogEng);
1364 1364 }
1365 1365  
1366 1366 // Compile option: Check for NaN/Inf
... ... @@ -1424,13 +1424,13 @@ double cta_nroi_diffuse_kern_theta::eval(const double&amp; theta)
1424 1424  
1425 1425 // Setup phi integration kernel
1426 1426 cta_nroi_diffuse_kern_phi integrand(m_rsp,
  1427 + m_obs,
1427 1428 m_model,
  1429 + m_rot,
1428 1430 m_srcEng,
1429 1431 m_srcTime,
1430 1432 m_obsEng,
1431 1433 m_obsTime,
1432   - m_obs,
1433   - m_rot,
1434 1434 theta,
1435 1435 sin_theta);
1436 1436  
... ... @@ -1491,7 +1491,7 @@ double cta_nroi_diffuse_kern_phi::eval(const double&amp; phi)
1491 1491 GVector native(-cos_phi*m_sin_theta, sin_phi*m_sin_theta, m_cos_theta);
1492 1492  
1493 1493 // Rotate from native into celestial system
1494   - GVector cel = m_rot * native;
  1494 + GVector cel = *m_rot * native;
1495 1495  
1496 1496 // Set sky direction
1497 1497 GSkyDir srcDir;
... ... @@ -1501,13 +1501,13 @@ double cta_nroi_diffuse_kern_phi::eval(const double&amp; phi)
1501 1501 GPhoton photon(srcDir, m_srcEng, m_srcTime);
1502 1502  
1503 1503 // Get sky intensity for this photon
1504   - double intensity = m_model.eval(photon);
  1504 + double intensity = m_model->eval(photon);
1505 1505  
1506 1506 // Continue only if sky intensity is positive
1507 1507 if (intensity > 0.0) {
1508 1508  
1509 1509 // Compute Nroi for this sky direction
1510   - nroi = m_rsp.nirf(photon, m_obsEng, m_obsTime, m_obs) * intensity;
  1510 + nroi = m_rsp->nirf(photon, m_obsEng, m_obsTime, *m_obs) * intensity;
1511 1511  
1512 1512 // Debug: Check for NaN
1513 1513 #if defined(G_NAN_CHECK)
... ... @@ -2181,8 +2181,8 @@ double cta_psf_diffuse_kern_delta::eval(const double&amp; delta)
2181 2181 double cos_delta = std::cos(delta);
2182 2182  
2183 2183 // Setup kernel for azimuthal integration of the diffuse model
2184   - cta_psf_diffuse_kern_phi integrand(m_model, m_srcEng, m_srcTime,
2185   - m_rot,
  2184 + cta_psf_diffuse_kern_phi integrand(m_model, m_rot,
  2185 + m_srcEng, m_srcTime,
2186 2186 sin_delta, cos_delta);
2187 2187  
2188 2188 // Setup untegration
... ... @@ -2233,7 +2233,7 @@ double cta_psf_diffuse_kern_phi::eval(const double&amp; phi)
2233 2233 GVector native(-cos_phi*m_sin_delta, sin_phi*m_sin_delta, m_cos_delta);
2234 2234  
2235 2235 // Rotate from native into celestial system
2236   - GVector cel = m_rot * native;
  2236 + GVector cel = *m_rot * native;
2237 2237  
2238 2238 // Set sky direction
2239 2239 GSkyDir srcDir;
... ...
inst/cta/src/GCTAResponse_helpers.hpp
... ... @@ -20,7 +20,7 @@
20 20 ***************************************************************************/
21 21 /**
22 22 * @file GCTAResponse_helpers.hpp
23   - * @brief CTA response hepler classes definition
  23 + * @brief CTA response helper classes definition
24 24 * @author Juergen Knoedlseder
25 25 */
26 26  
... ... @@ -74,7 +74,7 @@ namespace gammalib {
74 74 ***************************************************************************/
75 75 class cta_npsf_kern_rad_azsym : public GFunction {
76 76 public:
77   - cta_npsf_kern_rad_azsym(const GCTAResponseIrf& rsp,
  77 + cta_npsf_kern_rad_azsym(const GCTAResponseIrf* rsp,
78 78 const double& roi,
79 79 const double& psf,
80 80 const double& logE,
... ... @@ -95,7 +95,7 @@ public:
95 95 m_azimuth(azimuth) { }
96 96 double eval(const double& delta);
97 97 protected:
98   - const GCTAResponseIrf& m_rsp; //!< CTA response function
  98 + const GCTAResponseIrf* m_rsp; //!< CTA response function
99 99 double m_roi; //!< ROI radius in radians
100 100 double m_cosroi; //!< Cosine of ROI radius
101 101 double m_psf; //!< PSF-ROI centre distance in radians
... ... @@ -121,26 +121,26 @@ protected:
121 121 ***************************************************************************/
122 122 class cta_nroi_kern : public GFunction {
123 123 public:
124   - cta_nroi_kern(const GModelSky& model,
125   - const GCTAResponseIrf& rsp,
  124 + cta_nroi_kern(const GCTAResponseIrf* rsp,
  125 + const GObservation* obs,
  126 + const GModelSky* model,
126 127 const GTime& srcTime,
127 128 const GEnergy& obsEng,
128   - const GTime& obsTime,
129   - const GObservation& obs) :
130   - m_model(model),
  129 + const GTime& obsTime) :
131 130 m_rsp(rsp),
  131 + m_obs(obs),
  132 + m_model(model),
132 133 m_srcTime(srcTime),
133 134 m_obsEng(obsEng),
134   - m_obsTime(obsTime),
135   - m_obs(obs) {}
  135 + m_obsTime(obsTime) {}
136 136 double eval(const double& logEsrc);
137 137 protected:
138   - const GModelSky& m_model;
139   - const GCTAResponseIrf& m_rsp; //!< CTA response function
140   - const GObservation& m_obs;
141   - GTime m_srcTime;
142   - GEnergy m_obsEng;
143   - GTime m_obsTime;
  138 + const GCTAResponseIrf* m_rsp; //!< CTA response function
  139 + const GObservation* m_obs; //!< Observation
  140 + const GModelSky* m_model; //!< Sky model
  141 + GTime m_srcTime; //!< True arrival time
  142 + GEnergy m_obsEng; //!< Measured energy
  143 + GTime m_obsTime; //!< Measured arrival time
144 144 };
145 145  
146 146  
... ... @@ -174,8 +174,8 @@ protected:
174 174 ***************************************************************************/
175 175 class cta_irf_radial_kern_rho : public GFunction {
176 176 public:
177   - cta_irf_radial_kern_rho(const GCTAResponseIrf& rsp,
178   - const GModelSpatialRadial& model,
  177 + cta_irf_radial_kern_rho(const GCTAResponseIrf* rsp,
  178 + const GModelSpatialRadial* model,
179 179 const double& zenith,
180 180 const double& azimuth,
181 181 const GEnergy& srcEng,
... ... @@ -207,8 +207,8 @@ public:
207 207 m_iter(iter) { }
208 208 double eval(const double& rho);
209 209 protected:
210   - const GCTAResponseIrf& m_rsp; //!< CTA response
211   - const GModelSpatialRadial& m_model; //!< Radial spatial model
  210 + const GCTAResponseIrf* m_rsp; //!< CTA response
  211 + const GModelSpatialRadial* m_model; //!< Radial spatial model
212 212 double m_zenith; //!< Zenith angle
213 213 double m_azimuth; //!< Azimuth angle
214 214 GEnergy m_srcEng; //!< True photon energy
... ... @@ -248,7 +248,7 @@ protected:
248 248 ***************************************************************************/
249 249 class cta_irf_radial_kern_omega : public GFunction {
250 250 public:
251   - cta_irf_radial_kern_omega(const GCTAResponseIrf& rsp,
  251 + cta_irf_radial_kern_omega(const GCTAResponseIrf* rsp,
252 252 const double& zenith,
253 253 const double& azimuth,
254 254 const double& srcLogEng,
... ... @@ -276,7 +276,7 @@ public:
276 276 m_sin_ph(sin_ph) { }
277 277 double eval(const double& omega);
278 278 protected:
279   - const GCTAResponseIrf& m_rsp; //!< CTA response
  279 + const GCTAResponseIrf* m_rsp; //!< CTA response
280 280 double m_zenith; //!< Zenith angle
281 281 double m_azimuth; //!< Azimuth angle
282 282 double m_srcLogEng; //!< True photon energy
... ... @@ -324,26 +324,26 @@ protected:
324 324 ***************************************************************************/
325 325 class cta_nroi_radial_kern_rho : public GFunction {
326 326 public:
327   - cta_nroi_radial_kern_rho(const GCTAResponseIrf& rsp,
328   - const GModelSpatialRadial& model,
  327 + cta_nroi_radial_kern_rho(const GCTAResponseIrf* rsp,
  328 + const GCTAObservation* obs,
  329 + const GModelSpatialRadial* model,
  330 + const GMatrix* rot,
329 331 const GEnergy& srcEng,
330 332 const GTime& srcTime,
331 333 const GEnergy& obsEng,
332 334 const GTime& obsTime,
333   - const GCTAObservation& obs,
334   - const GMatrix& rot,
335 335 const double& dist,
336 336 const double& radius,
337 337 const double& omega0,
338 338 const int& iter) :
339 339 m_rsp(rsp),
  340 + m_obs(obs),
340 341 m_model(model),
  342 + m_rot(rot),
341 343 m_srcEng(srcEng),
342 344 m_srcTime(srcTime),
343 345 m_obsEng(obsEng),
344 346 m_obsTime(obsTime),
345   - m_obs(obs),
346   - m_rot(rot),
347 347 m_dist(dist),
348 348 m_cos_dist(std::cos(dist)),
349 349 m_sin_dist(std::sin(dist)),
... ... @@ -353,10 +353,10 @@ public:
353 353 m_iter(iter) { }
354 354 double eval(const double& rho);
355 355 protected:
356   - const GCTAResponseIrf& m_rsp; //!< CTA response
357   - const GModelSpatialRadial& m_model; //!< Radial spatial model
358   - const GCTAObservation& m_obs; //!< CTA observation
359   - const GMatrix& m_rot; //!< Rotation matrix
  356 + const GCTAResponseIrf* m_rsp; //!< CTA response
  357 + const GCTAObservation* m_obs; //!< CTA observation
  358 + const GModelSpatialRadial* m_model; //!< Radial spatial model
  359 + const GMatrix* m_rot; //!< Rotation matrix
360 360 GEnergy m_srcEng; //!< True photon energy
361 361 GTime m_srcTime; //!< True photon arrival time
362 362 GEnergy m_obsEng; //!< Observed photon energy
... ... @@ -393,29 +393,29 @@ protected:
393 393 ***************************************************************************/
394 394 class cta_nroi_radial_kern_omega : public GFunction {
395 395 public:
396   - cta_nroi_radial_kern_omega(const GCTAResponseIrf& rsp,
  396 + cta_nroi_radial_kern_omega(const GCTAResponseIrf* rsp,
  397 + const GCTAObservation* obs,
  398 + const GMatrix* rot,
397 399 const GEnergy& srcEng,
398 400 const GTime& srcTime,
399 401 const GEnergy& obsEng,
400 402 const GTime& obsTime,
401   - const GCTAObservation& obs,
402   - const GMatrix& rot,
403 403 double sin_rho,
404 404 double cos_rho) :
405 405 m_rsp(rsp),
  406 + m_obs(obs),
  407 + m_rot(rot),
406 408 m_srcEng(srcEng),
407 409 m_srcTime(srcTime),
408 410 m_obsEng(obsEng),
409 411 m_obsTime(obsTime),
410   - m_obs(obs),
411   - m_rot(rot),
412 412 m_cos_rho(cos_rho),
413 413 m_sin_rho(sin_rho) { }
414 414 double eval(const double& omega);
415 415 protected:
416   - const GCTAResponseIrf& m_rsp; //!< CTA response
417   - const GCTAObservation& m_obs; //!< CTA observation
418   - GMatrix m_rot; //!< Rotation matrix
  416 + const GCTAResponseIrf* m_rsp; //!< CTA response
  417 + const GCTAObservation* m_obs; //!< CTA observation
  418 + const GMatrix* m_rot; //!< Rotation matrix
419 419 GEnergy m_srcEng; //!< True photon energy
420 420 GTime m_srcTime; //!< True photon arrival time
421 421 GEnergy m_obsEng; //!< Observed photon energy
... ... @@ -456,8 +456,8 @@ protected:
456 456 ***************************************************************************/
457 457 class cta_irf_elliptical_kern_rho : public GFunction {
458 458 public:
459   - cta_irf_elliptical_kern_rho(const GCTAResponseIrf& rsp,
460   - const GModelSpatialElliptical& model,
  459 + cta_irf_elliptical_kern_rho(const GCTAResponseIrf* rsp,
  460 + const GModelSpatialElliptical* model,
461 461 const double& semimajor,
462 462 const double& semiminor,
463 463 const double& posangle,
... ... @@ -497,8 +497,8 @@ public:
497 497 m_iter(iter) { }
498 498 double eval(const double& rho);
499 499 public:
500   - const GCTAResponseIrf& m_rsp; //!< CTA response
501   - const GModelSpatialElliptical& m_model; //!< Elliptical model
  500 + const GCTAResponseIrf* m_rsp; //!< CTA response
  501 + const GModelSpatialElliptical* m_model; //!< Elliptical model
502 502 double m_semimajor; //!< Ellipse boundary semimajor axis
503 503 double m_semiminor; //!< Ellipse boundary semiminor axis
504 504 double m_posangle; //!< Ellipse boundary position angle
... ... @@ -543,8 +543,8 @@ public:
543 543 ***************************************************************************/
544 544 class cta_irf_elliptical_kern_omega : public GFunction {
545 545 public:
546   - cta_irf_elliptical_kern_omega(const GCTAResponseIrf& rsp,
547   - const GModelSpatialElliptical& model,
  546 + cta_irf_elliptical_kern_omega(const GCTAResponseIrf* rsp,
  547 + const GModelSpatialElliptical* model,
548 548 const double& zenith,
549 549 const double& azimuth,
550 550 const GEnergy& srcEng,
... ... @@ -575,8 +575,8 @@ public:
575 575 m_sin_ph(sin_ph) { }
576 576 double eval(const double& omega);
577 577 public:
578   - const GCTAResponseIrf& m_rsp; //!< CTA response
579   - const GModelSpatialElliptical& m_model; //!< Spatial model
  578 + const GCTAResponseIrf* m_rsp; //!< CTA response
  579 + const GModelSpatialElliptical* m_model; //!< Spatial model
580 580 double m_zenith; //!< Zenith angle
581 581 double m_azimuth; //!< Azimuth angle
582 582 GEnergy m_srcEng; //!< True photon energy
... ... @@ -626,8 +626,10 @@ public:
626 626 ***************************************************************************/
627 627 class cta_nroi_elliptical_kern_rho : public GFunction {
628 628 public:
629   - cta_nroi_elliptical_kern_rho(const GCTAResponseIrf& rsp,
630   - const GModelSpatialElliptical& model,
  629 + cta_nroi_elliptical_kern_rho(const GCTAResponseIrf* rsp,
  630 + const GCTAObservation* obs,
  631 + const GModelSpatialElliptical* model,
  632 + const GMatrix* rot,
631 633 const double& semimajor,
632 634 const double& semiminor,
633 635 const double& posangle,
... ... @@ -635,14 +637,14 @@ public:
635 637 const GTime& srcTime,
636 638 const GEnergy& obsEng,
637 639 const GTime& obsTime,
638   - const GCTAObservation& obs,
639   - const GMatrix& rot,
640 640 const double& rho_roi,
641 641 const double& posangle_roi,
642 642 const double& radius_roi,
643 643 const int& iter) :
644 644 m_rsp(rsp),
  645 + m_obs(obs),
645 646 m_model(model),
  647 + m_rot(rot),
646 648 m_semimajor(semimajor),
647 649 m_semiminor(semiminor),
648 650 m_posangle(posangle),
... ... @@ -650,8 +652,6 @@ public:
650 652 m_srcTime(srcTime),
651 653 m_obsEng(obsEng),
652 654 m_obsTime(obsTime),
653   - m_obs(obs),
654   - m_rot(rot),
655 655 m_rho_roi(rho_roi),
656 656 m_cos_rho_roi(std::cos(rho_roi)),
657 657 m_sin_rho_roi(std::sin(rho_roi)),
... ... @@ -661,10 +661,10 @@ public:
661 661 m_iter(iter) { }
662 662 double eval(const double& rho);
663 663 protected:
664   - const GCTAResponseIrf& m_rsp; //!< CTA response
665   - const GModelSpatialElliptical& m_model; //!< Elliptical model
666   - const GCTAObservation& m_obs; //!< CTA observation
667   - const GMatrix& m_rot; //!< Rotation matrix
  664 + const GCTAResponseIrf* m_rsp; //!< CTA response
  665 + const GCTAObservation* m_obs; //!< CTA observation
  666 + const GModelSpatialElliptical* m_model; //!< Elliptical model
  667 + const GMatrix* m_rot; //!< Rotation matrix
668 668 double m_semimajor; //!< Ellipse boundary semimajor axis
669 669 double m_semiminor; //!< Ellipse boundary semiminor axis
670 670 double m_posangle; //!< Ellipse boundary position angle
... ... @@ -706,36 +706,36 @@ protected:
706 706 ***************************************************************************/
707 707 class cta_nroi_elliptical_kern_omega : public GFunction {
708 708 public:
709   - cta_nroi_elliptical_kern_omega(const GCTAResponseIrf& rsp,
710   - const GModelSpatialElliptical& model,
  709 + cta_nroi_elliptical_kern_omega(const GCTAResponseIrf* rsp,
  710 + const GCTAObservation* obs,
  711 + const GModelSpatialElliptical* model,
  712 + const GMatrix* rot,
711 713 const GEnergy& srcEng,
712 714 const GTime& srcTime,
713 715 const GEnergy& obsEng,
714 716 const GTime& obsTime,
715   - const GCTAObservation& obs,
716   - const GMatrix& rot,
717 717 const double& rho,
718 718 const double& sin_rho,
719 719 const double& cos_rho,
720 720 const double& posangle_roi) :
721 721 m_rsp(rsp),
  722 + m_obs(obs),
722 723 m_model(model),
  724 + m_rot(rot),
723 725 m_srcEng(srcEng),
724 726 m_srcTime(srcTime),
725 727 m_obsEng(obsEng),
726 728 m_obsTime(obsTime),
727   - m_obs(obs),
728   - m_rot(rot),
729 729 m_rho(rho),
730 730 m_sin_rho(sin_rho),
731 731 m_cos_rho(cos_rho),
732 732 m_posangle_roi(posangle_roi) { }
733 733 double eval(const double& omega);
734 734 protected:
735   - const GCTAResponseIrf& m_rsp; //!< CTA response
736   - const GModelSpatialElliptical& m_model; //!< Model
737   - const GCTAObservation& m_obs; //!< Pointer to observation
738   - const GMatrix& m_rot; //!< Rotation matrix
  735 + const GCTAResponseIrf* m_rsp; //!< CTA response
  736 + const GCTAObservation* m_obs; //!< CTA observation
  737 + const GModelSpatialElliptical* m_model; //!< Elliptical model
  738 + const GMatrix* m_rot; //!< Rotation matrix
739 739 GEnergy m_srcEng; //!< True photon energy
740 740 GTime m_srcTime; //!< True photon arrival time
741 741 GEnergy m_obsEng; //!< Observed photon energy
... ... @@ -779,8 +779,9 @@ protected:
779 779 ***************************************************************************/
780 780 class cta_irf_diffuse_kern_theta : public GFunction {
781 781 public:
782   - cta_irf_diffuse_kern_theta(const GCTAResponseIrf& rsp,
783   - const GModelSpatial& model,
  782 + cta_irf_diffuse_kern_theta(const GCTAResponseIrf* rsp,
  783 + const GModelSpatial* model,
  784 + const GMatrix* rot,
784 785 const double& theta,
785 786 const double& phi,
786 787 const double& zenith,
... ... @@ -789,11 +790,11 @@ public:
789 790 const GTime& srcTime,
790 791 const double& srcLogEng,
791 792 const GEnergy& obsEng,
792   - const GMatrix& rot,
793 793 const double& eta,
794 794 const int& iter) :
795 795 m_rsp(rsp),
796 796 m_model(model),
  797 + m_rot(rot),
797 798 m_theta(theta),
798 799 m_phi(phi),
799 800 m_zenith(zenith),
... ... @@ -802,15 +803,14 @@ public:
802 803 m_srcTime(srcTime),
803 804 m_srcLogEng(srcLogEng),
804 805 m_obsEng(obsEng),
805   - m_rot(rot),
806 806 m_sin_eta(std::sin(eta)),
807 807 m_cos_eta(std::cos(eta)),
808 808 m_iter(iter) { }
809 809 double eval(const double& theta);
810 810 protected:
811   - const GCTAResponseIrf& m_rsp; //!< CTA response
812   - const GModelSpatial& m_model; //!< Spatial model
813   - const GMatrix& m_rot; //!< Rotation matrix
  811 + const GCTAResponseIrf* m_rsp; //!< CTA response
  812 + const GModelSpatial* m_model; //!< Spatial model
  813 + const GMatrix* m_rot; //!< Rotation matrix
814 814 double m_theta; //!< Photon offset angle
815 815 double m_phi; //!< Photon azimuth angle
816 816 double m_zenith; //!< Pointing zenith angle
... ... @@ -851,37 +851,37 @@ protected:
851 851 ***************************************************************************/
852 852 class cta_irf_diffuse_kern_phi : public GFunction {
853 853 public:
854   - cta_irf_diffuse_kern_phi(const GCTAResponseIrf& rsp,
855   - const GModelSpatial& model,
  854 + cta_irf_diffuse_kern_phi(const GCTAResponseIrf* rsp,
  855 + const GModelSpatial* model,
  856 + const GMatrix* rot,
856 857 const double& zenith,
857 858 const double& azimuth,
858 859 const GEnergy& srcEng,
859 860 const GTime& srcTime,
860 861 const double& srcLogEng,
861 862 const GEnergy& obsEng,
862   - const GMatrix& rot,
863 863 const double& sin_theta,
864 864 const double& cos_theta,
865 865 const double& sin_ph,
866 866 const double& cos_ph) :
867 867 m_rsp(rsp),
868 868 m_model(model),
  869 + m_rot(rot),
869 870 m_zenith(zenith),
870 871 m_azimuth(azimuth),
871 872 m_srcEng(srcEng),
872 873 m_srcTime(srcTime),
873 874 m_srcLogEng(srcLogEng),
874 875 m_obsEng(obsEng),
875   - m_rot(rot),
876 876 m_sin_theta(sin_theta),
877 877 m_cos_theta(cos_theta),
878 878 m_sin_ph(sin_ph),
879 879 m_cos_ph(cos_ph) { }
880 880 double eval(const double& phi);
881 881 protected:
882   - const GCTAResponseIrf& m_rsp; //!< CTA response
883   - const GModelSpatial& m_model; //!< Spatial model
884   - const GMatrix& m_rot; //!< Rotation matrix
  882 + const GCTAResponseIrf* m_rsp; //!< CTA response
  883 + const GModelSpatial* m_model; //!< Spatial model
  884 + const GMatrix* m_rot; //!< Rotation matrix
885 885 double m_zenith; //!< Zenith angle
886 886 double m_azimuth; //!< Azimuth angle
887 887 GEnergy m_srcEng; //!< True photon energy
... ... @@ -927,30 +927,30 @@ protected:
927 927 ***************************************************************************/
928 928 class cta_nroi_diffuse_kern_theta : public GFunction {
929 929 public:
930   - cta_nroi_diffuse_kern_theta(const GCTAResponseIrf& rsp,
931   - const GModelSpatial& model,
  930 + cta_nroi_diffuse_kern_theta(const GCTAResponseIrf* rsp,
  931 + const GCTAObservation* obs,
  932 + const GModelSpatial* model,
  933 + const GMatrix* rot,
932 934 const GEnergy& srcEng,
933 935 const GTime& srcTime,
934 936 const GEnergy& obsEng,
935 937 const GTime& obsTime,
936   - const GCTAObservation& obs,
937   - const GMatrix& rot,
938 938 const int& iter) :
939 939 m_rsp(rsp),
  940 + m_obs(obs),
940 941 m_model(model),
  942 + m_rot(rot),
941 943 m_srcEng(srcEng),
942 944 m_srcTime(srcTime),
943 945 m_obsEng(obsEng),
944 946 m_obsTime(obsTime),
945   - m_obs(obs),
946   - m_rot(rot),
947 947 m_iter(iter) { }
948 948 double eval(const double& theta);
949 949 protected:
950   - const GCTAResponseIrf& m_rsp; //!< CTA response
951   - const GModelSpatial& m_model; //!< Spatial model
952   - const GCTAObservation& m_obs; //!< CTA observation
953   - const GMatrix& m_rot; //!< Rotation matrix
  950 + const GCTAResponseIrf* m_rsp; //!< CTA response
  951 + const GCTAObservation* m_obs; //!< CTA observation
  952 + const GModelSpatial* m_model; //!< Spatial model
  953 + const GMatrix* m_rot; //!< Rotation matrix
954 954 GEnergy m_srcEng; //!< True photon energy
955 955 GTime m_srcTime; //!< True photon arrival time
956 956 GEnergy m_obsEng; //!< Observed photon energy
... ... @@ -981,33 +981,33 @@ protected:
981 981 ***************************************************************************/
982 982 class cta_nroi_diffuse_kern_phi : public GFunction {
983 983 public:
984   - cta_nroi_diffuse_kern_phi(const GCTAResponseIrf& rsp,
985   - const GModelSpatial& model,
  984 + cta_nroi_diffuse_kern_phi(const GCTAResponseIrf* rsp,
  985 + const GCTAObservation* obs,
  986 + const GModelSpatial* model,
  987 + const GMatrix* rot,
986 988 const GEnergy& srcEng,
987 989 const GTime& srcTime,
988 990 const GEnergy& obsEng,
989 991 const GTime& obsTime,
990   - const GCTAObservation& obs,
991   - const GMatrix& rot,
992 992 const double& theta,
993 993 const double& sin_theta) :
994 994 m_rsp(rsp),
  995 + m_obs(obs),
995 996 m_model(model),
  997 + m_rot(rot),
996 998 m_srcEng(srcEng),
997 999 m_srcTime(srcTime),
998 1000 m_obsEng(obsEng),
999 1001 m_obsTime(obsTime),
1000   - m_obs(obs),
1001   - m_rot(rot),
1002 1002 m_theta(theta),
1003 1003 m_cos_theta(std::cos(theta)),
1004 1004 m_sin_theta(sin_theta) { }
1005 1005 double eval(const double& phi);
1006 1006 protected:
1007   - const GCTAResponseIrf& m_rsp; //!< CTA response
1008   - const GModelSpatial& m_model; //!< Spatial model
1009   - const GCTAObservation& m_obs; //!< CTA observation
1010   - const GMatrix& m_rot; //!< Rotation matrix
  1007 + const GCTAResponseIrf* m_rsp; //!< CTA response
  1008 + const GCTAObservation* m_obs; //!< CTA observation
  1009 + const GModelSpatial* m_model; //!< Spatial model
  1010 + const GMatrix* m_rot; //!< Rotation matrix
1011 1011 GEnergy m_srcEng; //!< True photon energy
1012 1012 GTime m_srcTime; //!< True photon arrival time
1013 1013 GEnergy m_obsEng; //!< Observed photon energy
... ... @@ -1314,7 +1314,7 @@ public:
1314 1314 double eval(const double& omega);
1315 1315 public:
1316 1316 const GCTAResponseCube* m_rsp; //!< CTA response
1317   - const GModelSpatialElliptical* m_model; //!< Spatial model
  1317 + const GModelSpatialElliptical* m_model; //!< Elliptical model
1318 1318 GSkyDir m_srcDir; //!< True photon sky direction
1319 1319 GEnergy m_srcEng; //!< True photon energy
1320 1320 GTime m_srcTime; //!< True photon time
... ... @@ -1334,24 +1334,24 @@ class cta_psf_diffuse_kern_delta : public GFunction {
1334 1334 public:
1335 1335 cta_psf_diffuse_kern_delta(const GCTAResponseCube* rsp,
1336 1336 const GModelSpatial* model,
  1337 + const GMatrix* rot,
1337 1338 const GSkyDir& srcDir,
1338 1339 const GEnergy& srcEng,
1339 1340 const GTime& srcTime,
1340   - const GMatrix& rot,
1341 1341 const int& iter) :
1342 1342 m_rsp(rsp),
1343 1343 m_model(model),
  1344 + m_rot(rot),
1344 1345 m_srcDir(srcDir),
1345 1346 m_srcEng(srcEng),
1346 1347 m_srcTime(srcTime),
1347   - m_rot(rot),
1348 1348 m_iter (iter),
1349 1349 m_psf_max(rsp->psf()(srcDir, 0.0, srcEng)) { }
1350 1350 double eval(const double& delta);
1351 1351 protected:
1352 1352 const GCTAResponseCube* m_rsp; //!< Response cube
1353 1353 const GModelSpatial* m_model; //!< Spatial model
1354   - const GMatrix& m_rot; //!< Rotation matrix
  1354 + const GMatrix* m_rot; //!< Rotation matrix
1355 1355 GSkyDir m_srcDir; //!< True photon arrival direction
1356 1356 GEnergy m_srcEng; //!< True photon energy
1357 1357 GTime m_srcTime; //!< True photon arrival time
... ... @@ -1368,21 +1368,21 @@ protected:
1368 1368 class cta_psf_diffuse_kern_phi : public GFunction {
1369 1369 public:
1370 1370 cta_psf_diffuse_kern_phi(const GModelSpatial* model,
  1371 + const GMatrix* rot,
1371 1372 const GEnergy& srcEng,
1372 1373 const GTime& srcTime,
1373   - const GMatrix& rot,
1374 1374 const double& sin_delta,
1375 1375 const double& cos_delta) :
1376 1376 m_model(model),
  1377 + m_rot(rot),
1377 1378 m_srcEng(srcEng),
1378 1379 m_srcTime(srcTime),
1379   - m_rot(rot),
1380 1380 m_sin_delta(sin_delta),
1381 1381 m_cos_delta(cos_delta) { }
1382 1382 double eval(const double& phi);
1383 1383 protected:
1384 1384 const GModelSpatial* m_model; //!< Spatial model
1385   - const GMatrix& m_rot; //!< Rotation matrix
  1385 + const GMatrix* m_rot; //!< Rotation matrix
1386 1386 GEnergy m_srcEng; //!< True photon energy
1387 1387 GTime m_srcTime; //!< True photon arrival time
1388 1388 double m_sin_delta; //!< sin(delta)
... ...