Commit aec4bcddd59aadb13b2ae30ca5d978f3986c5cbf
1 parent
1314bbfa
Add debugging to GCTAResponse::arf_read method
Showing
1 changed file
with
13 additions
and
3 deletions
inst/cta/src/GCTAResponse.cpp
| @@ -69,6 +69,7 @@ | @@ -69,6 +69,7 @@ | ||
| 69 | /* __ Coding definitions _________________________________________________ */ | 69 | /* __ Coding definitions _________________________________________________ */ |
| 70 | 70 | ||
| 71 | /* __ Debug definitions __________________________________________________ */ | 71 | /* __ Debug definitions __________________________________________________ */ |
| 72 | +//#define G_DEBUG_READ_ARF //!< Debug read_arf method | ||
| 72 | //#define G_DEBUG_IRF_EXTENDED //!< Debug irf_extended method | 73 | //#define G_DEBUG_IRF_EXTENDED //!< Debug irf_extended method |
| 73 | //#define G_DEBUG_NPRED_EXTENDED //!< Debug npred_extended | 74 | //#define G_DEBUG_NPRED_EXTENDED //!< Debug npred_extended |
| 74 | //#define G_DEBUG_PRINT_AEFF //!< Debug print() Aeff | 75 | //#define G_DEBUG_PRINT_AEFF //!< Debug print() Aeff |
| @@ -777,11 +778,20 @@ void GCTAResponse::read_arf(const GFitsTable* hdu) | @@ -777,11 +778,20 @@ void GCTAResponse::read_arf(const GFitsTable* hdu) | ||
| 777 | integral.eps(m_eps); | 778 | integral.eps(m_eps); |
| 778 | 779 | ||
| 779 | // Perform integration | 780 | // Perform integration |
| 780 | - double value = integral.romb(0.0, rmax); | 781 | + double fraction = integral.romb(0.0, rmax); |
| 781 | 782 | ||
| 782 | // Update scale factor | 783 | // Update scale factor |
| 783 | - if (value > 0.0) { | ||
| 784 | - scale /= value; | 784 | + if (fraction > 0.0) { |
| 785 | + scale /= fraction; | ||
| 786 | + #if defined(G_DEBUG_READ_ARF) | ||
| 787 | + std::cout << "GCTAResponse::read_arf:"; | ||
| 788 | + std::cout << " e_min=" << e_min; | ||
| 789 | + std::cout << " e_max=" << e_max; | ||
| 790 | + std::cout << " logE=" << logE; | ||
| 791 | + std::cout << " scale=" << scale; | ||
| 792 | + std::cout << " fraction=" << fraction; | ||
| 793 | + std::cout << std::endl; | ||
| 794 | + #endif | ||
| 785 | } | 795 | } |
| 786 | else { | 796 | else { |
| 787 | std::cout << "WARNING: GCTAResponse::read_arf:"; | 797 | std::cout << "WARNING: GCTAResponse::read_arf:"; |