Commit b194413048622bbb3b8ac39f70c903d09523922a

Authored by Jürgen Knödlseder
1 parent b0570719

Implement values of exclusion regions for failed PMTs in D2 modules

inst/com/src/GCOMSupport.cpp
@@ -131,3 +131,69 @@ double gammalib::com_energy2(const double& energy, const double& phigeo) @@ -131,3 +131,69 @@ double gammalib::com_energy2(const double& energy, const double& phigeo)
131 // Return D2 energy deposit 131 // Return D2 energy deposit
132 return e2; 132 return e2;
133 } 133 }
  134 +
  135 +
  136 +/***********************************************************************//**
  137 + * @brief Return D2 module exclusion region X position
  138 + *
  139 + * @param[in] id2 Module identifier [0,...,13].
  140 + * @return Exclusion region X position (cm).
  141 + *
  142 + * Returns the D2 module exclusion region X position for a given module.
  143 + * The method does not check the validity of the module identifier.
  144 + *
  145 + * The values have been implemented from the MPE-FPM-7 file.
  146 + ***************************************************************************/
  147 +const double& gammalib::com_exd2x(const int& id2)
  148 +{
  149 + // Set D2 module exclusion region X positions
  150 + static const double exd2x[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  151 + 0.0, 0.0, 0.0, -51.7, 0.0, 9.0, -34.7};
  152 +
  153 + // Return value
  154 + return exd2x[id2];
  155 +}
  156 +
  157 +
  158 +/***********************************************************************//**
  159 + * @brief Return D2 module exclusion region Y position
  160 + *
  161 + * @param[in] id2 Module identifier [0,...,13].
  162 + * @return Exclusion region Y position (cm).
  163 + *
  164 + * Returns the D2 module exclusion region Y position for a given module.
  165 + * The method does not check the validity of the module identifier.
  166 + *
  167 + * The values have been implemented from the MPE-FPM-7 file.
  168 + ***************************************************************************/
  169 +const double& gammalib::com_exd2y(const int& id2)
  170 +{
  171 + // Set D2 module exclusion region Y positions
  172 + static const double exd2y[] = { 0.0,-41.254, 0.0, 0.0, 0.0, 0.0, 0.0,
  173 + 0.0, 0.0, 0.0, 8.7, 0.0, +41.2, +49.0};
  174 +
  175 + // Return value
  176 + return exd2y[id2];
  177 +}
  178 +
  179 +
  180 +/***********************************************************************//**
  181 + * @brief Return D2 module exclusion region radius
  182 + *
  183 + * @param[in] id2 Module identifier [0,...,13].
  184 + * @return Exclusion region radius (cm).
  185 + *
  186 + * Returns the D2 module exclusion region radius for a given module.
  187 + * The method does not check the validity of the module identifier.
  188 + *
  189 + * The values have been implemented from the MPE-FPM-7 file.
  190 + ***************************************************************************/
  191 +const double& gammalib::com_exd2r(const int& id2)
  192 +{
  193 + // Set D2 module exclusion region radii
  194 + static const double exd2r[] = { 0.0, 14.085, 0.0, 0.0, 0.0, 0.0, 0.0,
  195 + 0.0, 0.0, 0.0, 9.0, 0.0, 9.0, 9.0};
  196 +
  197 + // Return value
  198 + return exd2r[id2];
  199 +}
inst/com/src/GCOMSupport.hpp
@@ -38,9 +38,12 @@ class GSkyMap; @@ -38,9 +38,12 @@ class GSkyMap;
38 38
39 /* __ Prototypes _________________________________________________________ */ 39 /* __ Prototypes _________________________________________________________ */
40 namespace gammalib { 40 namespace gammalib {
41 - void com_wcs_mer2car(GSkyMap& map);  
42 - double com_energy1(const double& energy, const double& phigeo);  
43 - double com_energy2(const double& energy, const double& phigeo); 41 + void com_wcs_mer2car(GSkyMap& map);
  42 + double com_energy1(const double& energy, const double& phigeo);
  43 + double com_energy2(const double& energy, const double& phigeo);
  44 + const double& com_exd2x(const int& id2);
  45 + const double& com_exd2y(const int& id2);
  46 + const double& com_exd2r(const int& id2);
44 } 47 }
45 48
46 #endif /* GCOMSUPPORT_HPP */ 49 #endif /* GCOMSUPPORT_HPP */