Commit 716d4d076d342989cb9d4e7eda5c35bd4ec7860b
1 parent
6601df30
Change const member references to real members of the integration helper classes…
… as this is error prone (see #1556).
Showing
8 changed files
with
188 additions
and
227 deletions
inst/cta/include/GCTABackgroundPerfTable.hpp
inst/cta/include/GCTACubeSourceDiffuse.hpp
inst/cta/include/GCTAEdisp2D.hpp
| ... | ... | @@ -125,8 +125,8 @@ private: |
| 125 | 125 | double eval(const double& x); |
| 126 | 126 | protected: |
| 127 | 127 | const GCTAEdisp2D* m_parent; //!< Pointer to parent class |
| 128 | - const double& m_logEsrc; //!< True photon energy | |
| 129 | - const double& m_theta; //!< Offset angle | |
| 128 | + double m_logEsrc; //!< True photon energy | |
| 129 | + double m_theta; //!< Offset angle | |
| 130 | 130 | }; |
| 131 | 131 | |
| 132 | 132 | // Members | ... | ... |
inst/cta/include/GCTAEdispRmf.hpp
| ... | ... | @@ -122,8 +122,8 @@ private: |
| 122 | 122 | double eval(const double& x); |
| 123 | 123 | protected: |
| 124 | 124 | const GCTAEdispRmf* m_parent; //!< Pointer to parent class |
| 125 | - const double& m_logEsrc; //!< True photon energy | |
| 126 | - const double& m_theta; //!< Offset angle | |
| 125 | + double m_logEsrc; //!< True photon energy | |
| 126 | + double m_theta; //!< Offset angle | |
| 127 | 127 | }; |
| 128 | 128 | |
| 129 | 129 | // Members | ... | ... |
inst/cta/include/GCTAModelAeffBackground.hpp
| ... | ... | @@ -102,8 +102,8 @@ private: |
| 102 | 102 | double eval(const double& theta); |
| 103 | 103 | protected: |
| 104 | 104 | const GCTAAeff* m_aeff; //!< Pointer to effectve area |
| 105 | - const double& m_logE; //!< Log10 of energy | |
| 106 | - const int& m_iter; //!< Romberg iterations | |
| 105 | + double m_logE; //!< Log10 of energy | |
| 106 | + int m_iter; //!< Romberg iterations | |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | 109 | // ROI integration kernel over phi |
| ... | ... | @@ -118,8 +118,8 @@ private: |
| 118 | 118 | double eval(const double& phi); |
| 119 | 119 | protected: |
| 120 | 120 | const GCTAAeff* m_aeff; //!< Pointer to effective area |
| 121 | - const double& m_logE; //!< Log10 of energy | |
| 122 | - const double& m_theta; //!< Offset angle (radians) | |
| 121 | + double m_logE; //!< Log10 of energy | |
| 122 | + double m_theta; //!< Offset angle (radians) | |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | 125 | // Members | ... | ... |
inst/cta/include/GCTAModelCubeBackground.hpp
inst/cta/include/GCTAModelIrfBackground.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAModelIrfBackground.hpp - CTA IRF background model class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2014 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2014-2015 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -101,8 +101,8 @@ private: |
| 101 | 101 | double eval(const double& theta); |
| 102 | 102 | protected: |
| 103 | 103 | const GCTABackground* m_bgd; //!< Pointer to background |
| 104 | - const double& m_logE; //!< Log10 of energy | |
| 105 | - const int& m_iter; //!< Romberg iterations | |
| 104 | + double m_logE; //!< Log10 of energy | |
| 105 | + int m_iter; //!< Romberg iterations | |
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | 108 | // ROI integration kernel over phi |
| ... | ... | @@ -117,8 +117,8 @@ private: |
| 117 | 117 | double eval(const double& phi); |
| 118 | 118 | protected: |
| 119 | 119 | const GCTABackground* m_bgd; //!< Pointer to background |
| 120 | - const double& m_logE; //!< Log10 of energy | |
| 121 | - const double& m_theta; //!< Offset angle (radians) | |
| 120 | + double m_logE; //!< Log10 of energy | |
| 121 | + double m_theta; //!< Offset angle (radians) | |
| 122 | 122 | }; |
| 123 | 123 | |
| 124 | 124 | // Members | ... | ... |
inst/cta/src/GCTAResponse_helpers.hpp
| ... | ... | @@ -96,16 +96,16 @@ public: |
| 96 | 96 | double eval(const double& delta); |
| 97 | 97 | protected: |
| 98 | 98 | const GCTAResponseIrf& m_rsp; //!< CTA response function |
| 99 | - const double& m_roi; //!< ROI radius in radians | |
| 99 | + double m_roi; //!< ROI radius in radians | |
| 100 | 100 | double m_cosroi; //!< Cosine of ROI radius |
| 101 | - const double& m_psf; //!< PSF-ROI centre distance in radians | |
| 101 | + double m_psf; //!< PSF-ROI centre distance in radians | |
| 102 | 102 | double m_cospsf; //!< Cosine of PSF-ROI centre distance |
| 103 | 103 | double m_sinpsf; //!< Sine of PSF-ROI centre distance |
| 104 | - const double& m_logE; //!< Log10 of true photon energy (E/TeV). | |
| 105 | - const double& m_theta; //!< Offset angle of source in camera system | |
| 106 | - const double& m_phi; //!< Azimuth angle of source in camera system | |
| 107 | - const double& m_zenith; //!< Zenith angle of source in Earth system | |
| 108 | - const double& m_azimuth; //!< Azimuth angle of source in Earth system | |
| 104 | + double m_logE; //!< Log10 of true photon energy (E/TeV). | |
| 105 | + double m_theta; //!< Offset angle of source in camera system | |
| 106 | + double m_phi; //!< Azimuth angle of source in camera system | |
| 107 | + double m_zenith; //!< Zenith angle of source in Earth system | |
| 108 | + double m_azimuth; //!< Azimuth angle of source in Earth system | |
| 109 | 109 | }; |
| 110 | 110 | |
| 111 | 111 | |
| ... | ... | @@ -119,43 +119,6 @@ protected: |
| 119 | 119 | * given log10 of true photon energy as function of the log10 of observed |
| 120 | 120 | * event energy. |
| 121 | 121 | ***************************************************************************/ |
| 122 | -/* | |
| 123 | -class cta_nedisp_kern : public GFunction { | |
| 124 | -public: | |
| 125 | - cta_nedisp_kern(const GCTAResponseIrf& rsp, | |
| 126 | - const double& logEsrc, | |
| 127 | - const double& theta, | |
| 128 | - const double& phi, | |
| 129 | - const double& zenith, | |
| 130 | - const double& azimuth) : | |
| 131 | - m_rsp(rsp), | |
| 132 | - m_logEsrc(logEsrc), | |
| 133 | - m_theta(theta), | |
| 134 | - m_phi(phi), | |
| 135 | - m_zenith(zenith), | |
| 136 | - m_azimuth(azimuth) { } | |
| 137 | - double eval(const double& logEobs); | |
| 138 | -protected: | |
| 139 | - const GCTAResponseIrf& m_rsp; //!< CTA response function | |
| 140 | - const double& m_logEsrc; //!< Log10 of true photon energy (E/TeV). | |
| 141 | - const double& m_theta; //!< Offset angle of source in camera system | |
| 142 | - const double& m_phi; //!< Azimuth angle of source in camera system | |
| 143 | - const double& m_zenith; //!< Zenith angle of source in Earth system | |
| 144 | - const double& m_azimuth; //!< Azimuth angle of source in Earth system | |
| 145 | -}; | |
| 146 | -*/ | |
| 147 | - | |
| 148 | - | |
| 149 | -/***********************************************************************//** | |
| 150 | - * @class cta_nedisp_kern | |
| 151 | - * | |
| 152 | - * @brief Integration kernel for nedisp() method | |
| 153 | - * | |
| 154 | - * This class implements the integration kernel for the nedisp() method. | |
| 155 | - * The cta_nedisp_kern::eval method evaluates the energy dispersion for a | |
| 156 | - * given log10 of true photon energy as function of the log10 of observed | |
| 157 | - * event energy. | |
| 158 | - ***************************************************************************/ | |
| 159 | 122 | class cta_nroi_kern : public GFunction { |
| 160 | 123 | public: |
| 161 | 124 | cta_nroi_kern(const GModelSky& model, |
| ... | ... | @@ -174,10 +137,10 @@ public: |
| 174 | 137 | protected: |
| 175 | 138 | const GModelSky& m_model; |
| 176 | 139 | const GCTAResponseIrf& m_rsp; //!< CTA response function |
| 177 | - const GTime& m_srcTime; | |
| 178 | - const GEnergy& m_obsEng; | |
| 179 | - const GTime& m_obsTime; | |
| 180 | 140 | const GObservation& m_obs; |
| 141 | + GTime m_srcTime; | |
| 142 | + GEnergy m_obsEng; | |
| 143 | + GTime m_obsTime; | |
| 181 | 144 | }; |
| 182 | 145 | |
| 183 | 146 | |
| ... | ... | @@ -246,22 +209,22 @@ public: |
| 246 | 209 | protected: |
| 247 | 210 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 248 | 211 | const GModelSpatialRadial& m_model; //!< Radial spatial model |
| 249 | - const double& m_zenith; //!< Zenith angle | |
| 250 | - const double& m_azimuth; //!< Azimuth angle | |
| 251 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 252 | - const GTime& m_srcTime; //!< True photon time | |
| 253 | - const double& m_srcLogEng; //!< True photon log10 energy | |
| 254 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 255 | - const double& m_zeta; //!< Distance model centre - measured photon | |
| 212 | + double m_zenith; //!< Zenith angle | |
| 213 | + double m_azimuth; //!< Azimuth angle | |
| 214 | + GEnergy m_srcEng; //!< True photon energy | |
| 215 | + GTime m_srcTime; //!< True photon time | |
| 216 | + double m_srcLogEng; //!< True photon log10 energy | |
| 217 | + GEnergy m_obsEng; //!< Measured event energy | |
| 218 | + double m_zeta; //!< Distance model centre - measured photon | |
| 256 | 219 | double m_cos_zeta; //!< Cosine of zeta |
| 257 | 220 | double m_sin_zeta; //!< Sine of zeta |
| 258 | - const double& m_lambda; //!< Distance model centre - pointing | |
| 221 | + double m_lambda; //!< Distance model centre - pointing | |
| 259 | 222 | double m_cos_lambda; //!< Cosine of lambda |
| 260 | 223 | double m_sin_lambda; //!< Sine of lambda |
| 261 | - const double& m_omega0; //!< Azimuth of pointing in model system | |
| 262 | - const double& m_delta_max; //!< Maximum PSF radius | |
| 224 | + double m_omega0; //!< Azimuth of pointing in model system | |
| 225 | + double m_delta_max; //!< Maximum PSF radius | |
| 263 | 226 | double m_cos_delta_max; //!< Cosine of maximum PSF radius |
| 264 | - const int& m_iter; //!< Integration iterations | |
| 227 | + int m_iter; //!< Integration iterations | |
| 265 | 228 | }; |
| 266 | 229 | |
| 267 | 230 | |
| ... | ... | @@ -313,19 +276,19 @@ public: |
| 313 | 276 | m_sin_ph(sin_ph) { } |
| 314 | 277 | double eval(const double& omega); |
| 315 | 278 | protected: |
| 316 | - const GCTAResponseIrf& m_rsp; //!< CTA response | |
| 317 | - const double& m_zenith; //!< Zenith angle | |
| 318 | - const double& m_azimuth; //!< Azimuth angle | |
| 319 | - const double& m_srcLogEng; //!< True photon energy | |
| 320 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 321 | - const double& m_zeta; //!< Distance model centre - measured photon | |
| 322 | - const double& m_lambda; //!< Distance model centre - pointing | |
| 323 | - const double& m_omega0; //!< Azimuth of pointing in model system | |
| 324 | - const double& m_rho; //!< ... | |
| 325 | - const double& m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 326 | - const double& m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 327 | - const double& m_cos_ph; //!< Cosine term for photon offset angle computation | |
| 328 | - const double& m_sin_ph; //!< Sine term for photon offset angle computation | |
| 279 | + const GCTAResponseIrf& m_rsp; //!< CTA response | |
| 280 | + double m_zenith; //!< Zenith angle | |
| 281 | + double m_azimuth; //!< Azimuth angle | |
| 282 | + double m_srcLogEng; //!< True photon energy | |
| 283 | + GEnergy m_obsEng; //!< Measured event energy | |
| 284 | + double m_zeta; //!< Distance model centre - measured photon | |
| 285 | + double m_lambda; //!< Distance model centre - pointing | |
| 286 | + double m_omega0; //!< Azimuth of pointing in model system | |
| 287 | + double m_rho; //!< ... | |
| 288 | + double m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 289 | + double m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 290 | + double m_cos_ph; //!< Cosine term for photon offset angle computation | |
| 291 | + double m_sin_ph; //!< Sine term for photon offset angle computation | |
| 329 | 292 | }; |
| 330 | 293 | |
| 331 | 294 | |
| ... | ... | @@ -392,19 +355,19 @@ public: |
| 392 | 355 | protected: |
| 393 | 356 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 394 | 357 | const GModelSpatialRadial& m_model; //!< Radial spatial model |
| 395 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 396 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 397 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 398 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 399 | 358 | const GCTAObservation& m_obs; //!< CTA observation |
| 400 | 359 | const GMatrix& m_rot; //!< Rotation matrix |
| 401 | - const double& m_dist; //!< Distance model-ROI centre | |
| 360 | + GEnergy m_srcEng; //!< True photon energy | |
| 361 | + GTime m_srcTime; //!< True photon arrival time | |
| 362 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 363 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 364 | + double m_dist; //!< Distance model-ROI centre | |
| 402 | 365 | double m_cos_dist; //!< Cosine of distance model-ROI centre |
| 403 | 366 | double m_sin_dist; //!< Sine of distance model-ROI centre |
| 404 | - const double& m_radius; //!< ROI+PSF radius | |
| 367 | + double m_radius; //!< ROI+PSF radius | |
| 405 | 368 | double m_cos_radius; //!< Cosine of ROI+PSF radius |
| 406 | - const double& m_omega0; //!< Position angle of ROI | |
| 407 | - const int& m_iter; //!< Integration iterations | |
| 369 | + double m_omega0; //!< Position angle of ROI | |
| 370 | + int m_iter; //!< Integration iterations | |
| 408 | 371 | }; |
| 409 | 372 | |
| 410 | 373 | |
| ... | ... | @@ -450,15 +413,15 @@ public: |
| 450 | 413 | m_sin_rho(sin_rho) { } |
| 451 | 414 | double eval(const double& omega); |
| 452 | 415 | protected: |
| 453 | - const GCTAResponseIrf& m_rsp; //!< CTA response | |
| 454 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 455 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 456 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 457 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 458 | - const GCTAObservation& m_obs; //!< CTA observation | |
| 459 | - const GMatrix& m_rot; //!< Rotation matrix | |
| 460 | - double m_cos_rho; //!< Cosine of offset angle | |
| 461 | - double m_sin_rho; //!< Sine of offset angle | |
| 416 | + const GCTAResponseIrf& m_rsp; //!< CTA response | |
| 417 | + const GCTAObservation& m_obs; //!< CTA observation | |
| 418 | + GMatrix m_rot; //!< Rotation matrix | |
| 419 | + GEnergy m_srcEng; //!< True photon energy | |
| 420 | + GTime m_srcTime; //!< True photon arrival time | |
| 421 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 422 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 423 | + double m_cos_rho; //!< Cosine of offset angle | |
| 424 | + double m_sin_rho; //!< Sine of offset angle | |
| 462 | 425 | }; |
| 463 | 426 | |
| 464 | 427 | |
| ... | ... | @@ -536,26 +499,26 @@ public: |
| 536 | 499 | public: |
| 537 | 500 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 538 | 501 | const GModelSpatialElliptical& m_model; //!< Elliptical model |
| 539 | - const double& m_semimajor; //!< Ellipse boundary semimajor axis | |
| 540 | - const double& m_semiminor; //!< Ellipse boundary semiminor axis | |
| 541 | - const double& m_posangle; //!< Ellipse boundary position angle | |
| 542 | - const double& m_zenith; //!< Zenith angle | |
| 543 | - const double& m_azimuth; //!< Azimuth angle | |
| 544 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 545 | - const GTime& m_srcTime; //!< True photon time | |
| 546 | - const double& m_srcLogEng; //!< True photon log energy | |
| 547 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 548 | - const double& m_rho_obs; //!< Distance of model centre from measured photon | |
| 502 | + double m_semimajor; //!< Ellipse boundary semimajor axis | |
| 503 | + double m_semiminor; //!< Ellipse boundary semiminor axis | |
| 504 | + double m_posangle; //!< Ellipse boundary position angle | |
| 505 | + double m_zenith; //!< Zenith angle | |
| 506 | + double m_azimuth; //!< Azimuth angle | |
| 507 | + GEnergy m_srcEng; //!< True photon energy | |
| 508 | + GTime m_srcTime; //!< True photon time | |
| 509 | + double m_srcLogEng; //!< True photon log energy | |
| 510 | + GEnergy m_obsEng; //!< Measured event energy | |
| 511 | + double m_rho_obs; //!< Distance of model centre from measured photon | |
| 549 | 512 | double m_cos_rho_obs; //!< Cosine of m_rho_obs |
| 550 | 513 | double m_sin_rho_obs; //!< Sine of m_rho_obs |
| 551 | - const double& m_posangle_obs; //!< Photon position angle measured from model centre | |
| 552 | - const double& m_rho_pnt; //!< Distance of model centre from pointing | |
| 514 | + double m_posangle_obs; //!< Photon position angle measured from model centre | |
| 515 | + double m_rho_pnt; //!< Distance of model centre from pointing | |
| 553 | 516 | double m_cos_rho_pnt; //!< Cosine of m_rho_pnt |
| 554 | 517 | double m_sin_rho_pnt; //!< Sine of m_rho_pnt |
| 555 | - const double& m_omega_pnt; //!< Azimuth of pointing in model system | |
| 556 | - const double& m_delta_max; //!< Maximum PSF radius | |
| 518 | + double m_omega_pnt; //!< Azimuth of pointing in model system | |
| 519 | + double m_delta_max; //!< Maximum PSF radius | |
| 557 | 520 | double m_cos_delta_max; //!< Cosine of maximum PSF radius |
| 558 | - const int& m_iter; //!< Integration iterations | |
| 521 | + int m_iter; //!< Integration iterations | |
| 559 | 522 | }; |
| 560 | 523 | |
| 561 | 524 | |
| ... | ... | @@ -614,19 +577,19 @@ public: |
| 614 | 577 | public: |
| 615 | 578 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 616 | 579 | const GModelSpatialElliptical& m_model; //!< Spatial model |
| 617 | - const double& m_zenith; //!< Zenith angle | |
| 618 | - const double& m_azimuth; //!< Azimuth angle | |
| 619 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 620 | - const GTime& m_srcTime; //!< True photon time | |
| 621 | - const double& m_srcLogEng; //!< True photon log energy | |
| 622 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 623 | - const double& m_posangle_obs; //!< Measured photon position angle from model centre | |
| 624 | - const double& m_omega_pnt; //!< Azimuth of pointing in model system | |
| 625 | - const double& m_rho; //!< Model zenith angle | |
| 626 | - const double& m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 627 | - const double& m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 628 | - const double& m_cos_ph; //!< Cosine term for photon offset angle computation | |
| 629 | - const double& m_sin_ph; //!< Sine term for photon offset angle computation | |
| 580 | + double m_zenith; //!< Zenith angle | |
| 581 | + double m_azimuth; //!< Azimuth angle | |
| 582 | + GEnergy m_srcEng; //!< True photon energy | |
| 583 | + GTime m_srcTime; //!< True photon time | |
| 584 | + double m_srcLogEng; //!< True photon log energy | |
| 585 | + GEnergy m_obsEng; //!< Measured event energy | |
| 586 | + double m_posangle_obs; //!< Measured photon position angle from model centre | |
| 587 | + double m_omega_pnt; //!< Azimuth of pointing in model system | |
| 588 | + double m_rho; //!< Model zenith angle | |
| 589 | + double m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 590 | + double m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 591 | + double m_cos_ph; //!< Cosine term for photon offset angle computation | |
| 592 | + double m_sin_ph; //!< Sine term for photon offset angle computation | |
| 630 | 593 | }; |
| 631 | 594 | |
| 632 | 595 | |
| ... | ... | @@ -700,22 +663,22 @@ public: |
| 700 | 663 | protected: |
| 701 | 664 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 702 | 665 | const GModelSpatialElliptical& m_model; //!< Elliptical model |
| 703 | - const double& m_semimajor; //!< Ellipse boundary semimajor axis | |
| 704 | - const double& m_semiminor; //!< Ellipse boundary semiminor axis | |
| 705 | - const double& m_posangle; //!< Ellipse boundary position angle | |
| 706 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 707 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 708 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 709 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 710 | 666 | const GCTAObservation& m_obs; //!< CTA observation |
| 711 | 667 | const GMatrix& m_rot; //!< Rotation matrix |
| 712 | - const double& m_rho_roi; //!< Distance between model and ROI centre | |
| 668 | + double m_semimajor; //!< Ellipse boundary semimajor axis | |
| 669 | + double m_semiminor; //!< Ellipse boundary semiminor axis | |
| 670 | + double m_posangle; //!< Ellipse boundary position angle | |
| 671 | + GEnergy m_srcEng; //!< True photon energy | |
| 672 | + GTime m_srcTime; //!< True photon arrival time | |
| 673 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 674 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 675 | + double m_rho_roi; //!< Distance between model and ROI centre | |
| 713 | 676 | double m_cos_rho_roi; //!< Cosine of m_rho_roi |
| 714 | 677 | double m_sin_rho_roi; //!< Sine of m_rho_roi |
| 715 | - const double& m_posangle_roi; //!< Position angle of ROI | |
| 716 | - const double& m_radius_roi; //!< ROI+PSF radius | |
| 678 | + double m_posangle_roi; //!< Position angle of ROI | |
| 679 | + double m_radius_roi; //!< ROI+PSF radius | |
| 717 | 680 | double m_cos_radius_roi; //!< Cosine of m_radius_roi |
| 718 | - const int& m_iter; //!< Integration iterations | |
| 681 | + int m_iter; //!< Integration iterations | |
| 719 | 682 | }; |
| 720 | 683 | |
| 721 | 684 | |
| ... | ... | @@ -771,16 +734,16 @@ public: |
| 771 | 734 | protected: |
| 772 | 735 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 773 | 736 | const GModelSpatialElliptical& m_model; //!< Model |
| 774 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 775 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 776 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 777 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 778 | 737 | const GCTAObservation& m_obs; //!< Pointer to observation |
| 779 | 738 | const GMatrix& m_rot; //!< Rotation matrix |
| 780 | - const double& m_rho; | |
| 781 | - const double& m_sin_rho; //!< Sine of offset angle | |
| 782 | - const double& m_cos_rho; //!< Cosine of offset angle | |
| 783 | - const double& m_posangle_roi; //!< Position angle of ROI | |
| 739 | + GEnergy m_srcEng; //!< True photon energy | |
| 740 | + GTime m_srcTime; //!< True photon arrival time | |
| 741 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 742 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 743 | + double m_rho; | |
| 744 | + double m_sin_rho; //!< Sine of offset angle | |
| 745 | + double m_cos_rho; //!< Cosine of offset angle | |
| 746 | + double m_posangle_roi; //!< Position angle of ROI | |
| 784 | 747 | }; |
| 785 | 748 | |
| 786 | 749 | |
| ... | ... | @@ -847,22 +810,22 @@ public: |
| 847 | 810 | protected: |
| 848 | 811 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 849 | 812 | const GModelSpatial& m_model; //!< Spatial model |
| 850 | - const double& m_theta; //!< Photon offset angle | |
| 851 | - const double& m_phi; //!< Photon azimuth angle | |
| 852 | - const double& m_zenith; //!< Pointing zenith angle | |
| 853 | - const double& m_azimuth; //!< Pointing azimuth angle | |
| 854 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 855 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 856 | - const double& m_srcLogEng; //!< True photon log energy | |
| 857 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 858 | 813 | const GMatrix& m_rot; //!< Rotation matrix |
| 814 | + double m_theta; //!< Photon offset angle | |
| 815 | + double m_phi; //!< Photon azimuth angle | |
| 816 | + double m_zenith; //!< Pointing zenith angle | |
| 817 | + double m_azimuth; //!< Pointing azimuth angle | |
| 818 | + GEnergy m_srcEng; //!< True photon energy | |
| 819 | + GTime m_srcTime; //!< True photon arrival time | |
| 820 | + double m_srcLogEng; //!< True photon log energy | |
| 821 | + GEnergy m_obsEng; //!< Measured event energy | |
| 859 | 822 | double m_sin_eta; //!< Sine of angular distance between |
| 860 | 823 | // observed photon direction and |
| 861 | 824 | // camera centre |
| 862 | 825 | double m_cos_eta; //!< Cosine of angular distance between |
| 863 | 826 | // observed photon direction and |
| 864 | 827 | // camera centre |
| 865 | - const int& m_iter; // Integration iterations | |
| 828 | + int m_iter; // Integration iterations | |
| 866 | 829 | }; |
| 867 | 830 | |
| 868 | 831 | |
| ... | ... | @@ -918,17 +881,17 @@ public: |
| 918 | 881 | protected: |
| 919 | 882 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 920 | 883 | const GModelSpatial& m_model; //!< Spatial model |
| 921 | - const double& m_zenith; //!< Zenith angle | |
| 922 | - const double& m_azimuth; //!< Azimuth angle | |
| 923 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 924 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 925 | - const double& m_srcLogEng; //!< True photon log energy | |
| 926 | - const GEnergy& m_obsEng; //!< Measured event energy | |
| 927 | 884 | const GMatrix& m_rot; //!< Rotation matrix |
| 928 | - const double& m_sin_theta; //!< Sine of offset angle | |
| 929 | - const double& m_cos_theta; //!< Cosine of offset angle | |
| 930 | - const double& m_sin_ph; //!< Sine term in angular distance equation | |
| 931 | - const double& m_cos_ph; //!< Cosine term in angular distance equation | |
| 885 | + double m_zenith; //!< Zenith angle | |
| 886 | + double m_azimuth; //!< Azimuth angle | |
| 887 | + GEnergy m_srcEng; //!< True photon energy | |
| 888 | + GTime m_srcTime; //!< True photon arrival time | |
| 889 | + double m_srcLogEng; //!< True photon log energy | |
| 890 | + GEnergy m_obsEng; //!< Measured event energy | |
| 891 | + double m_sin_theta; //!< Sine of offset angle | |
| 892 | + double m_cos_theta; //!< Cosine of offset angle | |
| 893 | + double m_sin_ph; //!< Sine term in angular distance equation | |
| 894 | + double m_cos_ph; //!< Cosine term in angular distance equation | |
| 932 | 895 | }; |
| 933 | 896 | |
| 934 | 897 | |
| ... | ... | @@ -986,13 +949,13 @@ public: |
| 986 | 949 | protected: |
| 987 | 950 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 988 | 951 | const GModelSpatial& m_model; //!< Spatial model |
| 989 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 990 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 991 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 992 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 993 | 952 | const GCTAObservation& m_obs; //!< CTA observation |
| 994 | 953 | const GMatrix& m_rot; //!< Rotation matrix |
| 995 | - const int& m_iter; //!< Integration iterations | |
| 954 | + GEnergy m_srcEng; //!< True photon energy | |
| 955 | + GTime m_srcTime; //!< True photon arrival time | |
| 956 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 957 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 958 | + int m_iter; //!< Integration iterations | |
| 996 | 959 | }; |
| 997 | 960 | |
| 998 | 961 | |
| ... | ... | @@ -1043,15 +1006,15 @@ public: |
| 1043 | 1006 | protected: |
| 1044 | 1007 | const GCTAResponseIrf& m_rsp; //!< CTA response |
| 1045 | 1008 | const GModelSpatial& m_model; //!< Spatial model |
| 1046 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1047 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 1048 | - const GEnergy& m_obsEng; //!< Observed photon energy | |
| 1049 | - const GTime& m_obsTime; //!< Observed photon arrival time | |
| 1050 | 1009 | const GCTAObservation& m_obs; //!< CTA observation |
| 1051 | 1010 | const GMatrix& m_rot; //!< Rotation matrix |
| 1052 | - const double& m_theta; //!< Offset angle (radians) | |
| 1011 | + GEnergy m_srcEng; //!< True photon energy | |
| 1012 | + GTime m_srcTime; //!< True photon arrival time | |
| 1013 | + GEnergy m_obsEng; //!< Observed photon energy | |
| 1014 | + GTime m_obsTime; //!< Observed photon arrival time | |
| 1015 | + double m_theta; //!< Offset angle (radians) | |
| 1053 | 1016 | double m_cos_theta; //!< Cosine of offset angle |
| 1054 | - const double& m_sin_theta; //!< Sine of offset angle | |
| 1017 | + double m_sin_theta; //!< Sine of offset angle | |
| 1055 | 1018 | }; |
| 1056 | 1019 | |
| 1057 | 1020 | |
| ... | ... | @@ -1107,15 +1070,15 @@ public: |
| 1107 | 1070 | public: |
| 1108 | 1071 | const GCTAResponseCube* m_rsp; //!< CTA response |
| 1109 | 1072 | const GModelSpatialRadial* m_model; //!< Radial model |
| 1110 | - const GSkyDir& m_srcDir; //!< True photon arrival direction | |
| 1111 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1112 | - const GTime& m_srcTime; //!< True photon time | |
| 1113 | - const double& m_rho_obs; //!< Distance of model centre from measured photon | |
| 1073 | + GSkyDir m_srcDir; //!< True photon arrival direction | |
| 1074 | + GEnergy m_srcEng; //!< True photon energy | |
| 1075 | + GTime m_srcTime; //!< True photon time | |
| 1076 | + double m_rho_obs; //!< Distance of model centre from measured photon | |
| 1114 | 1077 | double m_cos_rho_obs; //!< Cosine of m_rho_obs |
| 1115 | 1078 | double m_sin_rho_obs; //!< Sine of m_rho_obs |
| 1116 | - const double& m_delta_max; //!< Maximum PSF radius | |
| 1079 | + double m_delta_max; //!< Maximum PSF radius | |
| 1117 | 1080 | double m_cos_delta_max; //!< Cosine of maximum PSF radius |
| 1118 | - const int& m_iter; //!< Integration iterations | |
| 1081 | + int m_iter; //!< Integration iterations | |
| 1119 | 1082 | }; |
| 1120 | 1083 | |
| 1121 | 1084 | |
| ... | ... | @@ -1156,11 +1119,11 @@ public: |
| 1156 | 1119 | public: |
| 1157 | 1120 | const GCTAResponseCube* m_rsp; //!< CTA response |
| 1158 | 1121 | const GModelSpatialRadial* m_model; //!< Radial model |
| 1159 | - const GSkyDir& m_srcDir; //!< True photon sky direction | |
| 1160 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1161 | - const GTime& m_srcTime; //!< True photon time | |
| 1162 | - const double& m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 1163 | - const double& m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 1122 | + GSkyDir m_srcDir; //!< True photon sky direction | |
| 1123 | + GEnergy m_srcEng; //!< True photon energy | |
| 1124 | + GTime m_srcTime; //!< True photon time | |
| 1125 | + double m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 1126 | + double m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 1164 | 1127 | }; |
| 1165 | 1128 | |
| 1166 | 1129 | |
| ... | ... | @@ -1194,15 +1157,15 @@ public: |
| 1194 | 1157 | protected: |
| 1195 | 1158 | const GCTAResponseCube* m_rsp; //!< Response cube |
| 1196 | 1159 | const GModelSpatialRadial* m_model; //!< Radial model |
| 1197 | - const GSkyDir& m_srcDir; //!< True photon arrival direction | |
| 1198 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1199 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 1200 | - const double& m_delta_mod; //!< Distance of model from Psf | |
| 1160 | + GSkyDir m_srcDir; //!< True photon arrival direction | |
| 1161 | + GEnergy m_srcEng; //!< True photon energy | |
| 1162 | + GTime m_srcTime; //!< True photon arrival time | |
| 1163 | + double m_delta_mod; //!< Distance of model from Psf | |
| 1201 | 1164 | double m_cos_delta_mod; //!< Cosine of m_delta_mod |
| 1202 | 1165 | double m_sin_delta_mod; //!< Sine of m_delta_mod |
| 1203 | - const double& m_theta_max; //!< Maximum model radius | |
| 1166 | + double m_theta_max; //!< Maximum model radius | |
| 1204 | 1167 | double m_cos_theta_max; //!< Cosine of m_theta_max |
| 1205 | - const int& m_iter; //!< Integration iterations | |
| 1168 | + int m_iter; //!< Integration iterations | |
| 1206 | 1169 | }; |
| 1207 | 1170 | |
| 1208 | 1171 | |
| ... | ... | @@ -1226,10 +1189,10 @@ public: |
| 1226 | 1189 | double eval(const double& phi); |
| 1227 | 1190 | protected: |
| 1228 | 1191 | const GModelSpatialRadial* m_model; //!< Radial model |
| 1229 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1230 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 1231 | - const double& m_sin_fact; //!< sin(delta)*sin(delta_mod) | |
| 1232 | - const double& m_cos_fact; //!< cos(delta)*cos(delta_mod) | |
| 1192 | + GEnergy m_srcEng; //!< True photon energy | |
| 1193 | + GTime m_srcTime; //!< True photon arrival time | |
| 1194 | + double m_sin_fact; //!< sin(delta)*sin(delta_mod) | |
| 1195 | + double m_cos_fact; //!< cos(delta)*cos(delta_mod) | |
| 1233 | 1196 | }; |
| 1234 | 1197 | |
| 1235 | 1198 | |
| ... | ... | @@ -1294,19 +1257,19 @@ public: |
| 1294 | 1257 | public: |
| 1295 | 1258 | const GCTAResponseCube* m_rsp; //!< CTA response |
| 1296 | 1259 | const GModelSpatialElliptical* m_model; //!< Elliptical model |
| 1297 | - const double& m_semimajor; //!< Ellipse boundary semimajor axis | |
| 1298 | - const double& m_semiminor; //!< Ellipse boundary semiminor axis | |
| 1299 | - const double& m_posangle; //!< Ellipse boundary position angle | |
| 1300 | - const GSkyDir& m_srcDir; //!< True photon arrival direction | |
| 1301 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1302 | - const GTime& m_srcTime; //!< True photon time | |
| 1303 | - const double& m_rho_obs; //!< Distance of model centre from measured photon | |
| 1260 | + double m_semimajor; //!< Ellipse boundary semimajor axis | |
| 1261 | + double m_semiminor; //!< Ellipse boundary semiminor axis | |
| 1262 | + double m_posangle; //!< Ellipse boundary position angle | |
| 1263 | + GSkyDir m_srcDir; //!< True photon arrival direction | |
| 1264 | + GEnergy m_srcEng; //!< True photon energy | |
| 1265 | + GTime m_srcTime; //!< True photon time | |
| 1266 | + double m_rho_obs; //!< Distance of model centre from measured photon | |
| 1304 | 1267 | double m_cos_rho_obs; //!< Cosine of m_rho_obs |
| 1305 | 1268 | double m_sin_rho_obs; //!< Sine of m_rho_obs |
| 1306 | - const double& m_posangle_obs; //!< Photon position angle measured from model centre | |
| 1307 | - const double& m_delta_max; //!< Maximum PSF radius | |
| 1269 | + double m_posangle_obs; //!< Photon position angle measured from model centre | |
| 1270 | + double m_delta_max; //!< Maximum PSF radius | |
| 1308 | 1271 | double m_cos_delta_max; //!< Cosine of maximum PSF radius |
| 1309 | - const int& m_iter; //!< Integration iterations | |
| 1272 | + int m_iter; //!< Integration iterations | |
| 1310 | 1273 | }; |
| 1311 | 1274 | |
| 1312 | 1275 | |
| ... | ... | @@ -1352,13 +1315,13 @@ public: |
| 1352 | 1315 | public: |
| 1353 | 1316 | const GCTAResponseCube* m_rsp; //!< CTA response |
| 1354 | 1317 | const GModelSpatialElliptical* m_model; //!< Spatial model |
| 1355 | - const GSkyDir& m_srcDir; //!< True photon sky direction | |
| 1356 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1357 | - const GTime& m_srcTime; //!< True photon time | |
| 1358 | - const double& m_posangle_obs; //!< Measured photon position angle from model centre | |
| 1359 | - const double& m_rho; //!< Model zenith angle | |
| 1360 | - const double& m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 1361 | - const double& m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 1318 | + GSkyDir m_srcDir; //!< True photon sky direction | |
| 1319 | + GEnergy m_srcEng; //!< True photon energy | |
| 1320 | + GTime m_srcTime; //!< True photon time | |
| 1321 | + double m_posangle_obs; //!< Measured photon position angle from model centre | |
| 1322 | + double m_rho; //!< Model zenith angle | |
| 1323 | + double m_cos_psf; //!< Cosine term for PSF offset angle computation | |
| 1324 | + double m_sin_psf; //!< Sine term for PSF offset angle computation | |
| 1362 | 1325 | }; |
| 1363 | 1326 | |
| 1364 | 1327 | |
| ... | ... | @@ -1388,11 +1351,11 @@ public: |
| 1388 | 1351 | protected: |
| 1389 | 1352 | const GCTAResponseCube* m_rsp; //!< Response cube |
| 1390 | 1353 | const GModelSpatial* m_model; //!< Spatial model |
| 1391 | - const GSkyDir& m_srcDir; //!< True photon arrival direction | |
| 1392 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1393 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 1394 | 1354 | const GMatrix& m_rot; //!< Rotation matrix |
| 1395 | - const int& m_iter; //!< Romberg iterations | |
| 1355 | + GSkyDir m_srcDir; //!< True photon arrival direction | |
| 1356 | + GEnergy m_srcEng; //!< True photon energy | |
| 1357 | + GTime m_srcTime; //!< True photon arrival time | |
| 1358 | + int m_iter; //!< Romberg iterations | |
| 1396 | 1359 | double m_psf_max; //!< Maximum PSF value |
| 1397 | 1360 | }; |
| 1398 | 1361 | |
| ... | ... | @@ -1419,11 +1382,11 @@ public: |
| 1419 | 1382 | double eval(const double& phi); |
| 1420 | 1383 | protected: |
| 1421 | 1384 | const GModelSpatial* m_model; //!< Spatial model |
| 1422 | - const GEnergy& m_srcEng; //!< True photon energy | |
| 1423 | - const GTime& m_srcTime; //!< True photon arrival time | |
| 1424 | 1385 | const GMatrix& m_rot; //!< Rotation matrix |
| 1425 | - const double& m_sin_delta; //!< sin(delta) | |
| 1426 | - const double& m_cos_delta; //!< cos(delta) | |
| 1386 | + GEnergy m_srcEng; //!< True photon energy | |
| 1387 | + GTime m_srcTime; //!< True photon arrival time | |
| 1388 | + double m_sin_delta; //!< sin(delta) | |
| 1389 | + double m_cos_delta; //!< cos(delta) | |
| 1427 | 1390 | }; |
| 1428 | 1391 | |
| 1429 | 1392 | #endif /* GCTARESPONSE_HELPERS_HPP */ | ... | ... |