Commit 2de42d5d48f8e4153b77ea5bc5507830820a2c51

Authored by Jürgen Knödlseder
1 parent 735726c7

Convert all tables when reading from dP/dm to dP/dlog10E

inst/cta/include/GCTAEdisp2D.hpp
@@ -135,8 +135,8 @@ private: @@ -135,8 +135,8 @@ private:
135 void set_table(void); 135 void set_table(void);
136 void set_boundaries(void); 136 void set_boundaries(void);
137 void set_max_edisp(void) const; 137 void set_max_edisp(void) const;
  138 + void convert_dm2dlogE(void);
138 void normalize_table(void); 139 void normalize_table(void);
139 - void hess_renormalization(void);  
140 int table_index(const int& ietrue, 140 int table_index(const int& ietrue,
141 const int& imigra, 141 const int& imigra,
142 const int& itheta) const; 142 const int& itheta) const;
inst/cta/src/GCTAEdisp2D.cpp
@@ -1367,10 +1367,8 @@ void GCTAEdisp2D::set_table(void) @@ -1367,10 +1367,8 @@ void GCTAEdisp2D::set_table(void)
1367 // Set table boundaries 1367 // Set table boundaries
1368 set_boundaries(); 1368 set_boundaries();
1369 1369
1370 - // Renormalize energy dispersion table for H.E.S.S.  
1371 - if (gammalib::strip_whitespace(m_edisp.telescope()) == "HESS") {  
1372 - hess_renormalization();  
1373 - } 1370 + // Convert table from dP/dm to dP/dlogE
  1371 + convert_dm2dlogE();
1374 1372
1375 // Smooth energy dispersion table (kludge only for CTA) 1373 // Smooth energy dispersion table (kludge only for CTA)
1376 #if defined(G_SMOOTH_EDISP_KLUDGE) 1374 #if defined(G_SMOOTH_EDISP_KLUDGE)
@@ -1379,11 +1377,8 @@ void GCTAEdisp2D::set_table(void) @@ -1379,11 +1377,8 @@ void GCTAEdisp2D::set_table(void)
1379 } 1377 }
1380 #endif 1378 #endif
1381 1379
1382 - // Normalize energy dispersion table (not for H.E.S.S. normalization  
1383 - // since we renormalized the H.E.S.S. data before)  
1384 - if (gammalib::strip_whitespace(m_edisp.telescope()) != "HESS") {  
1385 - normalize_table();  
1386 - } 1380 + // Normalize energy dispersion table
  1381 + normalize_table();
1387 1382
1388 // Set maximum energy dispersion value 1383 // Set maximum energy dispersion value
1389 set_max_edisp(); 1384 set_max_edisp();
@@ -1566,9 +1561,9 @@ void GCTAEdisp2D::normalize_table(void) @@ -1566,9 +1561,9 @@ void GCTAEdisp2D::normalize_table(void)
1566 1561
1567 1562
1568 /***********************************************************************//** 1563 /***********************************************************************//**
1569 - * @brief Renormalize H.E.S.S. energy dispersion table 1564 + * @brief Convert table from dP/dm to dP/dlog10E
1570 * 1565 *
1571 - * The H.E.S.S. energy dispersion table is normalized so that 1566 + * The energy dispersion table when read-in is normalized so that
1572 * 1567 *
1573 * \f[ 1568 * \f[
1574 * \int_{{\rm migra}_{\rm min}}^{{\rm migra}_{\rm max}} 1569 * \int_{{\rm migra}_{\rm min}}^{{\rm migra}_{\rm max}}
@@ -1595,7 +1590,7 @@ void GCTAEdisp2D::normalize_table(void) @@ -1595,7 +1590,7 @@ void GCTAEdisp2D::normalize_table(void)
1595 * \f$E_{\rm reco}^{\rm min}\f$ and \f$E_{\rm reco}^{\rm max}\f$ are the 1590 * \f$E_{\rm reco}^{\rm min}\f$ and \f$E_{\rm reco}^{\rm max}\f$ are the
1596 * minimum and maximum reconstructed energy values for the same bin. 1591 * minimum and maximum reconstructed energy values for the same bin.
1597 ***************************************************************************/ 1592 ***************************************************************************/
1598 -void GCTAEdisp2D::hess_renormalization(void) 1593 +void GCTAEdisp2D::convert_dm2dlogE(void)
1599 { 1594 {
1600 // Optional dump header 1595 // Optional dump header
1601 #if defined(G_DEBUG_HESS_RENORMALIZATION) 1596 #if defined(G_DEBUG_HESS_RENORMALIZATION)