Commit 3b77e25d authored by Simon Spannagel's avatar Simon Spannagel
Browse files

DepositionCosmics: latitude should be a float

(cherry picked from commit 800769e8)
parent add5d4df
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ DepositionCosmicsModule::DepositionCosmicsModule(Configuration& config, Messenge
    config_.setDefault("altitude", Units::get(0, "m"));
    config_.setDefault("min_particles", 1);
    config_.setDefault("max_particles", 1000000);
    config_.setDefault("latitude", 53);
    config_.setDefault("latitude", 53.0);
    config_.setDefault("date", "12-31-2020");
    config_.setDefault("reset_particle_time", false);

@@ -125,9 +125,9 @@ DepositionCosmicsModule::DepositionCosmicsModule(Configuration& config, Messenge
               << ", selecting subbox of size " << size_meters << "m";
    cry_config << " subboxLength " << size_meters;

    auto latitude = config_.get<int>("latitude");
    auto latitude = config_.get<double>("latitude");
    if(latitude < -90 || latitude > 90) {
        throw InvalidValueError(config_, "latitude", "latitude has to be between 90 (north pole) and -90 (south pole)");
        throw InvalidValueError(config_, "latitude", "latitude has to be between 90.0 (north pole) and -90.0 (south pole)");
    }
    cry_config << " latitude " << latitude;
    cry_config << " date " << config_.get<std::string>("date");
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ Note: Neutrons have a lifetime of 882 seconds and will not be propagated in the
* `output_plots_scale` : Set the x-axis scale of the output plot, defaults to 100ke.

#### CRY Framework Parameters
* `latitude`: Latitude for which the incident particles from cosmic ray showers should be simulated. Should be between `90` (north pole) and `-90` (south pole). Defaults to `53` (DESY).
* `latitude`: Latitude for which the incident particles from cosmic ray showers should be simulated. Should be between `90.0` (north pole) and `-90.0` (south pole). Defaults to `53.0` (DESY).
* `date`: Date for the simulation to account for the 11-year cycle of solar activity and related change in cosmic ray flux. Should be given as string in the form `month-day-year` and defaults to the last day of 2020, i.e. `12-31-2020`.
* `return_neutrons`: Boolean to select whether neutrons should be returned to Geant4. Defaults to `true`.
* `return_protons`: Boolean to select whether protons should be returned to Geant4. Defaults to `true`.