IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 1ff43c3a authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Alan Coleman
Browse files

add some consts

parent 01c172fb
No related branches found
No related tags found
1 merge request!585Resolve "synchronize output format between examples"
...@@ -119,7 +119,7 @@ int main(int argc, char** argv) { ...@@ -119,7 +119,7 @@ int main(int argc, char** argv) {
Point const center{rootCS, 0_m, 0_m, 0_m}; Point const center{rootCS, 0_m, 0_m, 0_m};
double const refractive_index = 1.000327; double const refractive_index = 1.000327;
MagneticFieldVector bField{rootCS, 50_uT, 0_T, 0_T}; MagneticFieldVector const bField{rootCS, 50_uT, 0_T, 0_T};
create_5layer_atmosphere<EnvironmentInterface, MyExtraEnv>( create_5layer_atmosphere<EnvironmentInterface, MyExtraEnv>(
env, AtmosphereId::LinsleyUSStd, center, refractive_index, Medium::AirDry1Atm, env, AtmosphereId::LinsleyUSStd, center, refractive_index, Medium::AirDry1Atm,
bField); bField);
...@@ -132,19 +132,19 @@ int main(int argc, char** argv) { ...@@ -132,19 +132,19 @@ int main(int argc, char** argv) {
for (auto [pcode, energy] : energy_resolution) for (auto [pcode, energy] : energy_resolution)
set_energy_production_threshold(pcode, energy); set_energy_production_threshold(pcode, energy);
const Code beamCode = Code::Electron; Code const beamCode = Code::Electron;
auto const mass = get_mass(beamCode); auto const mass = get_mass(beamCode);
const HEPEnergyType E0 = 1_GeV * std::stof(std::string(argv[1])); HEPEnergyType const E0 = 1_GeV * std::stof(std::string(argv[1]));
double theta = 0.; double const theta = 0.;
auto const thetaRad = theta / 180. * M_PI; auto const thetaRad = theta / 180. * M_PI;
HEPMomentumType P0 = calculate_momentum(E0, mass); HEPMomentumType const P0 = calculate_momentum(E0, mass);
auto momentumComponents = [](double thetaRad, HEPMomentumType ptot) { auto momentumComponents = [](double thetaRad, HEPMomentumType ptot) {
return std::make_tuple(ptot * sin(thetaRad), 0_eV, -ptot * cos(thetaRad)); return std::make_tuple(ptot * sin(thetaRad), 0_eV, -ptot * cos(thetaRad));
}; };
auto const [px, py, pz] = momentumComponents(thetaRad, P0); auto const [px, py, pz] = momentumComponents(thetaRad, P0);
auto plab = MomentumVector(rootCS, {px, py, pz}); auto const plab = MomentumVector(rootCS, {px, py, pz});
auto const observationHeight = 1.4_km + constants::EarthRadius::Mean; auto const observationHeight = 1.4_km + constants::EarthRadius::Mean;
auto const injectionHeight = 112.75_km + constants::EarthRadius::Mean; auto const injectionHeight = 112.75_km + constants::EarthRadius::Mean;
...@@ -163,8 +163,8 @@ int main(int argc, char** argv) { ...@@ -163,8 +163,8 @@ int main(int argc, char** argv) {
// Radio antennas and relevant information // Radio antennas and relevant information
// the antenna time variables // the antenna time variables
const TimeType duration{1e-6_s}; TimeType const duration{1e-6_s};
const InverseTimeType sampleRate{1e+9_Hz}; InverseTimeType const sampleRate{1e+9_Hz};
// the detector (aka antenna collection) for CoREAS and ZHS // the detector (aka antenna collection) for CoREAS and ZHS
AntennaCollection<TimeDomainAntenna> detectorCoREAS; AntennaCollection<TimeDomainAntenna> detectorCoREAS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment