Commit dabe9da8baa1e48bd545892d95e3a71e972ea826
1 parent
79d77c05
Use true energy for all CTA response cube computation (#2461)
Showing
1 changed file
with
10 additions
and
4 deletions
inst/cta/src/GCTAResponseCube.cpp
| ... | ... | @@ -1199,6 +1199,9 @@ double GCTAResponseCube::irf_ptsrc(const GEvent& event, |
| 1199 | 1199 | * @return Instrument response to radial source. |
| 1200 | 1200 | * |
| 1201 | 1201 | * Returns the instrument response to a specified radial source. |
| 1202 | + * | |
| 1203 | + * @todo Correct assumptions in exposure computation, PSF computation and | |
| 1204 | + * energy dispersion computation. | |
| 1202 | 1205 | ***************************************************************************/ |
| 1203 | 1206 | double GCTAResponseCube::irf_radial(const GEvent& event, |
| 1204 | 1207 | const GSource& source, |
| ... | ... | @@ -1249,7 +1252,7 @@ double GCTAResponseCube::irf_radial(const GEvent& event, |
| 1249 | 1252 | // true event direction does not vary significantly. In other words, |
| 1250 | 1253 | // the code assumes that the exposure is constant over the size of |
| 1251 | 1254 | // the PSF. |
| 1252 | - irf = exposure()(obsDir, obsEng); | |
| 1255 | + irf = exposure()(obsDir, srcEng); | |
| 1253 | 1256 | |
| 1254 | 1257 | // Continue only if exposure is positive |
| 1255 | 1258 | if (irf > 0.0) { |
| ... | ... | @@ -1258,7 +1261,7 @@ double GCTAResponseCube::irf_radial(const GEvent& event, |
| 1258 | 1261 | irf /= livetime; |
| 1259 | 1262 | |
| 1260 | 1263 | // Get PSF component |
| 1261 | - irf *= psf_radial(model, rho_obs, obsDir, obsEng, obsTime); | |
| 1264 | + irf *= psf_radial(model, rho_obs, obsDir, srcEng, obsTime); | |
| 1262 | 1265 | |
| 1263 | 1266 | // Multiply-in energy dispersion |
| 1264 | 1267 | if (use_edisp() && irf > 0.0) { |
| ... | ... | @@ -1304,6 +1307,9 @@ double GCTAResponseCube::irf_radial(const GEvent& event, |
| 1304 | 1307 | * @return Instrument response to elliptical source. |
| 1305 | 1308 | * |
| 1306 | 1309 | * Returns the instrument response to a specified elliptical source. |
| 1310 | + * | |
| 1311 | + * @todo Correct assumptions in exposure computation, PSF computation and | |
| 1312 | + * energy dispersion computation. | |
| 1307 | 1313 | ***************************************************************************/ |
| 1308 | 1314 | double GCTAResponseCube::irf_elliptical(const GEvent& event, |
| 1309 | 1315 | const GSource& source, |
| ... | ... | @@ -1354,7 +1360,7 @@ double GCTAResponseCube::irf_elliptical(const GEvent& event, |
| 1354 | 1360 | // true event direction does not vary significantly. In other words, |
| 1355 | 1361 | // the code assumes that the exposure is constant over the size of |
| 1356 | 1362 | // the PSF. |
| 1357 | - irf = exposure()(obsDir, obsEng); | |
| 1363 | + irf = exposure()(obsDir, srcEng); | |
| 1358 | 1364 | |
| 1359 | 1365 | // Continue only if exposure is positive |
| 1360 | 1366 | if (irf > 0.0) { |
| ... | ... | @@ -1363,7 +1369,7 @@ double GCTAResponseCube::irf_elliptical(const GEvent& event, |
| 1363 | 1369 | irf /= livetime; |
| 1364 | 1370 | |
| 1365 | 1371 | // Get PSF component |
| 1366 | - irf *= psf_elliptical(model, rho_obs, posangle_obs, obsDir, obsEng, obsTime); | |
| 1372 | + irf *= psf_elliptical(model, rho_obs, posangle_obs, obsDir, srcEng, obsTime); | |
| 1367 | 1373 | |
| 1368 | 1374 | // Multiply-in energy dispersion |
| 1369 | 1375 | if (use_edisp() && irf > 0.0) { | ... | ... |