Commit 7300898d authored by Simon Spannagel's avatar Simon Spannagel
Browse files

GenericPropagation: rename parameter

parent 13972c6d
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ GenericPropagationModule::GenericPropagationModule(Configuration& config,
    // Set defaults for charge carrier multiplication
    config_.setDefault<std::string>("multiplication_model", "none");
    config_.setDefault<double>("multiplication_threshold", 1e-2);
    config_.setDefault<unsigned int>("multiplication_depth", 5);
    config_.setDefault<unsigned int>("max_multiplication_level", 5);

    // Copy some variables from configuration to avoid lookups:
    temperature_ = config_.get<double>("temperature");
@@ -117,7 +117,7 @@ GenericPropagationModule::GenericPropagationModule(Configuration& config,
    propagate_holes_ = config_.get<bool>("propagate_holes");
    charge_per_step_ = config_.get<unsigned int>("charge_per_step");
    max_charge_groups_ = config_.get<unsigned int>("max_charge_groups");
    multiplication_depth_ = config.get<unsigned int>("multiplication_depth");
    max_multiplication_level_ = config.get<unsigned int>("max_multiplication_level");

    // Enable multithreading of this module if multithreading is enabled and no per-event output plots are requested:
    // FIXME: Review if this is really the case or we can still use multithreading
@@ -254,12 +254,12 @@ void GenericPropagationModule::initialize() {
                                      500,
                                      1,
                                      25);
            multiplication_depthlevel_histo_ = CreateHistogram<TH1D>(
                "multiplication_depthlevel_histo",
                "Multiplication depth level of propagated charge carriers;multiplication depth;charge carriers",
                static_cast<int>(multiplication_depth_),
            multiplication_level_histo_ = CreateHistogram<TH1D>(
                "multiplication_level_histo",
                "Multiplication level of propagated charge carriers;multiplication level;charge carriers",
                static_cast<int>(max_multiplication_level_),
                0,
                static_cast<int>(multiplication_depth_));
                static_cast<int>(max_multiplication_level_));
            multiplication_depth_histo_ =
                CreateHistogram<TH1D>("multiplication_depth_histo",
                                      "Generation depth of charge carriers via impact ionization;depth [mm];charge carriers",
@@ -427,12 +427,12 @@ GenericPropagationModule::propagate(Event* event,
                                    const unsigned int charge,
                                    const double initial_time_local,
                                    const double initial_time_global,
                                    const unsigned int depth,
                                    const unsigned int level,
                                    std::vector<PropagatedCharge>& propagated_charges,
                                    LineGraph::OutputPlotPoints& output_plot_points) const {

    if(depth > multiplication_depth_) {
        LOG(WARNING) << "Found impact ionization shower with depth larger than " << multiplication_depth_
    if(level > max_multiplication_level_) {
        LOG(WARNING) << "Found impact ionization shower with level larger than " << max_multiplication_level_
                     << ", interrupting";
        return {};
    }
@@ -635,7 +635,7 @@ GenericPropagationModule::propagate(Event* event,
                              charge * (floor_gain - gain_integer),
                              initial_time_local + runge_kutta.getTime(),
                              initial_time_global + runge_kutta.getTime(),
                              depth + 1,
                              level + 1,
                              propagated_charges,
                              output_plot_points);

@@ -701,7 +701,7 @@ GenericPropagationModule::propagate(Event* event,
    }

    if(output_plots_ && !multiplication_.is<NoImpactIonization>()) {
        if(depth == 0) {
        if(level == 0) {
            gain_primary_histo_->Fill(gain, charge);
            if(type == CarrierType::ELECTRON) {
                gain_e_histo_->Fill(gain, charge);
@@ -711,7 +711,7 @@ GenericPropagationModule::propagate(Event* event,
        }
        gain_all_histo_->Fill(gain, charge);

        multiplication_depthlevel_histo_->Fill(depth, charge);
        multiplication_level_histo_->Fill(level, charge);
    }

    if(state == CarrierState::RECOMBINED) {
@@ -783,7 +783,7 @@ void GenericPropagationModule::finalize() {
            gain_all_histo_->Write();
            gain_e_histo_->Write();
            gain_h_histo_->Write();
            multiplication_depthlevel_histo_->Write();
            multiplication_level_histo_->Write();
            multiplication_depth_histo_->Write();
        }
    }
+4 −4
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ namespace allpix {
         * @param charge              Total charge of the observed charge carrier set
         * @param initial_time_local  Initial local time with respect to the start of the event
         * @param initial_time_global Initial global time with respect to the start of the event
         * @param depth               Current depth of the generated shower
         * @param level               Current level depth of the generated shower
         * @param propagated_charges  Reference to vector with all produced final PropagatedCharge objects
         * @param output_plot_points Reference to vector to hold points for line graph output plots
         *
@@ -101,7 +101,7 @@ namespace allpix {
                  const unsigned int charge,
                  const double initial_time_local,
                  const double initial_time_global,
                  const unsigned int depth,
                  const unsigned int level,
                  std::vector<PropagatedCharge>& propagated_charges,
                  LineGraph::OutputPlotPoints& output_plot_points) const;

@@ -113,7 +113,7 @@ namespace allpix {
        bool propagate_electrons_{}, propagate_holes_{};
        unsigned int charge_per_step_{};
        unsigned int max_charge_groups_{};
        unsigned int multiplication_depth_{};
        unsigned int max_multiplication_level_{};

        // Models for electron and hole mobility and lifetime
        Mobility mobility_;
@@ -150,7 +150,7 @@ namespace allpix {
        Histogram<TH1D> gain_all_histo_;
        Histogram<TH1D> gain_e_histo_;
        Histogram<TH1D> gain_h_histo_;
        Histogram<TH1D> multiplication_depthlevel_histo_;
        Histogram<TH1D> multiplication_level_histo_;
        Histogram<TH1D> multiplication_depth_histo_;
    };

+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ This module requires an installation of Eigen3.
* `ignore_magnetic_field`: The magnetic field, if present, is ignored for this module. Defaults to false.
* `multiplication_model`: Model used to calculate impact ionization parameters and charge multiplication. Defaults to `none` which corresponds to unity gain, a list of available models can be found in the documentation.
* `multiplication_threshold`: Threshold field above which charge multiplication is calculated. Defaults to `100kV/cm`.
* `multiplication_depth`: Maximum depth of the generated impact ionization charge multiplication shower after which the generation of further multiplication charge carrier levels is prohibited. This number represents the maximum number of daughter charge carrier groups that can be produced by one initial charge carrier group. This does not concern the size of the charge group itself but solely the level of generation. If a group generates a secondary group through impact ionization, the depth is `1`. If this secondary group again creates charge carriers when propagating, the depth is `2` and so on. The default value is `5`.
* `max_multiplication_level`: Maximum level depth of the generated impact ionization charge multiplication shower after which the generation of further multiplication charge carrier levels is prohibited. This number represents the maximum number of daughter charge carrier groups that can be produced by one initial charge carrier group. This does not concern the size of the charge group itself but solely the level of generation. If a group generates a secondary group through impact ionization, the depth is `1`. If this secondary group again creates charge carriers when propagating, the level is `2` and so on. The default value is `5`.

## Plotting parameters
* `output_plots` : Determines if simple output plots should be generated for a monitoring of the simulation flow. Disabled by default.