Skip to content

Commit

Permalink
Add helper function to make trivial progagator
Browse files Browse the repository at this point in the history
  • Loading branch information
sfegan committed Oct 10, 2023
1 parent 69da781 commit 982f29b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions include/simulation/vcl_iact_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ template<typename VCLArchitecture> class alignas(VCLArchitecture::vec_bytes) VCL

CALIN_TYPEALIAS(FocalPlaneRayPropagator, calin::simulation::vcl_ray_propagator::VCLFocalPlaneRayPropagator<VCLArchitecture>);
CALIN_TYPEALIAS(DaviesCottonVCLFocalPlaneRayPropagator, calin::simulation::vcl_ray_propagator::DaviesCottonVCLFocalPlaneRayPropagator<VCLArchitecture>);
CALIN_TYPEALIAS(TrivialVCLFocalPlaneRayPropagator, calin::simulation::vcl_ray_propagator::TrivialVCLFocalPlaneRayPropagator<VCLArchitecture>);

VCLIACTArray(calin::simulation::atmosphere::LayeredRefractiveAtmosphere* atm,
const calin::simulation::detector_efficiency::AtmosphericAbsorption& atm_abs,
Expand Down Expand Up @@ -288,6 +289,11 @@ template<typename VCLArchitecture> class alignas(VCLArchitecture::vec_bytes) VCL
const std::string& propagator_name, SplinePEAmplitudeGenerator* pe_generator = nullptr,
bool adopt_pe_processor = false, bool adopt_pe_generator = false);

TrivialVCLFocalPlaneRayPropagator* add_trivial_propagator(PEProcessor* pe_processor,
const DetectionEfficiency& detector_efficiency, const AngularEfficiency& fp_angular_efficiency,
const std::string& propagator_name, SplinePEAmplitudeGenerator* pe_generator = nullptr,
bool adopt_pe_processor = false, bool adopt_pe_generator = false);

void point_telescope_az_el_phi_deg(unsigned iscope, double az_deg, double el_deg, double phi_deg);
void point_telescope_az_el_deg(unsigned iscope, double az_deg, double el_deg);

Expand Down Expand Up @@ -565,6 +571,27 @@ VCLIACTArray<VCLArchitecture>::add_davies_cotton_propagator(
adopt_pe_generator);
}

template<typename VCLArchitecture>
calin::simulation::vcl_ray_propagator::TrivialVCLFocalPlaneRayPropagator<VCLArchitecture>*
VCLIACTArray<VCLArchitecture>::add_trivial_propagator(PEProcessor* pe_processor,
const DetectionEfficiency& detector_efficiency, const AngularEfficiency& fp_angular_efficiency,
const std::string& propagator_name, SplinePEAmplitudeGenerator* pe_generator,
bool adopt_pe_processor, bool adopt_pe_generator)
{
auto* propagator = new calin::simulation::vcl_ray_propagator::TrivialVCLFocalPlaneRayPropagator<VCLArchitecture>(
this->rng_, ref_index_, /* adopt_rng= */ false);

auto* bandwidth_manager = new VCLDCBandwidthManager<VCLArchitecture>(
&atm_abs_, detector_efficiency, fp_angular_efficiency, zobs_,
config_.detector_energy_lo(), config_.detector_energy_hi(),
config_.detector_energy_bin_width(), propagator_name);

add_propagator(propagator, pe_processor, bandwidth_manager, pe_generator, propagator_name,
/* adopt_propagator = */ true, adopt_pe_processor, adopt_pe_generator);

return propagator;
}

template<typename VCLArchitecture> void VCLIACTArray<VCLArchitecture>::
point_telescope_az_el_phi_deg(unsigned iscope,
double az_deg, double el_deg, double phi_deg)
Expand Down

0 comments on commit 982f29b

Please sign in to comment.