Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sfegan committed Jul 1, 2024
1 parent b5e9eec commit 260d6c5
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions include/simulation/vcl_iact_ground_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ template<typename VCLArchitecture> class alignas(VCLArchitecture::vec_bytes) VCL

unsigned iobs_ = 0;
double zobs_ = 0.0;
double ref_index_ = 1.0;
double ref_index_correction_ = 0.0;
#endif
};

Expand All @@ -101,9 +99,6 @@ VCLIACTTrackVisitor<VCLArchitecture>(atm, config, rng, adopt_atm, adopt_rng)
{
iobs_ = 0;
zobs_ = this->atm_->zobs(iobs_);
double n_minus_one = this->atm_->n_minus_one(zobs_);
ref_index_ = 1.0 + n_minus_one;
ref_index_correction_ = -n_minus_one;
}

template<typename VCLArchitecture> VCLIACTGroundMap<VCLArchitecture>::
Expand Down Expand Up @@ -140,13 +135,11 @@ propagate_rays(calin::math::ray::VCLRay<double_real> ray, double_bvt ray_mask,

ray_mask &= (ray.z()>zobs_) & (ray.uz()<0);

double_vt dz = ray.z()-zobs_;
ray.mutable_ct() -= vcl::select(ray_mask,
(dz*ref_index_correction_ + this->atm_->template vcl_propagation_ct_correction_to_iobs<VCLArchitecture>(ray.z(), 0))/ray.uz(),
(this->atm_->template vcl_propagation_ct_correction_to_iobs<VCLArchitecture>(ray.z(), 0))/ray.uz(),
0);

ray_mask = ray.propagate_to_z_plane_with_mask(ray_mask,
VCLIACTTrackVisitor<VCLArchitecture>::atm_->zobs(0), false);
ray_mask = ray.propagate_to_z_plane_with_mask(ray_mask, zobs_, false);

double_at t;
double_at x;
Expand Down

0 comments on commit 260d6c5

Please sign in to comment.