/***********************************************************************//** * @brief Return model value and set analytical gradients * * @param[in] photon Incident Photon. * * Evaluates the radial spatial model value and analytical model parameter * gradients for a specific incident @p photon. ***************************************************************************/ double GModelSpatialRadial::eval_gradients(const GPhoton& photon) const { // Compute distance from source (in radians) double theta = photon.dir().dist(dir()); // Evaluate model and set gradients double value = eval_gradients(theta, photon.energy(), photon.time()); // Return result return value; }
/***********************************************************************//** * @brief Return model value and set analytical gradients * * @param[in] srcDir True photon arrival direction. * * Evaluates the radial spatial model for a given true photon arrival * direction. ***************************************************************************/ double GModelRadial::eval_gradients(const GSkyDir& srcDir) const { // Compute distance from source (in radians) double theta = srcDir.dist(dir()); // Evaluate model and set gradients double value = eval_gradients(theta); // Return result return value; }