Commit a1f1aa7a authored by Paul Schütze's avatar Paul Schütze
Browse files

Merge branch 'fix_linegraphs' into 'master'

Linegraphs: disable MT if Requested

See merge request allpix-squared/allpix-squared!817
parents 07cb33b7 b25cee35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@ void GenericPropagationModule::run(Event* event) {
        if(output_linegraphs_trapped_) {
            LineGraph::Create(event->number, this, config_, output_plot_points, CarrierState::TRAPPED);
        }
        if(config_.get<bool>("output_animations")) {
        if(output_animations_) {
            LineGraph::Animate(event->number, this, config_, output_plot_points);
        }
    }
+8 −3
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@ ProjectionPropagationModule::ProjectionPropagationModule(Configuration& config,
                                                         std::shared_ptr<Detector> detector)
    : Module(config, detector), messenger_(messenger), detector_(std::move(detector)),
      top_z_(detector_->getModel()->getSensorSize().z() / 2) {
    // Enable multithreading of this module if multithreading is enabled
    allow_multithreading();

    // Save detector model
    model_ = detector_->getModel();
@@ -63,7 +61,14 @@ ProjectionPropagationModule::ProjectionPropagationModule(Configuration& config,

    output_plots_ = config_.get<bool>("output_plots");
    output_linegraphs_ = config_.get<bool>("output_linegraphs");
    output_animations_ = config_.get<bool>("output_animations");

    // 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
    if(!output_linegraphs_) {
        allow_multithreading();
    } else {
        LOG(WARNING) << "Per-event line graphs or animations requested, disabling parallel event processing";
    }

    // Set default for charge carrier propagation:
    config_.setDefault<bool>("propagate_holes", false);
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ namespace allpix {
        std::shared_ptr<DetectorModel> model_;

        // Config parameters
        bool output_plots_{}, output_linegraphs_{}, output_animations_{};
        bool output_plots_{}, output_linegraphs_{};
        double integration_time_{};
        bool diffuse_deposit_;
        unsigned int charge_per_step_{};
+8 −1
Original line number Diff line number Diff line
@@ -86,9 +86,16 @@ TransientPropagationModule::TransientPropagationModule(Configuration& config,
    output_linegraphs_collected_ = config_.get<bool>("output_linegraphs_collected");
    output_linegraphs_recombined_ = config_.get<bool>("output_linegraphs_recombined");
    output_linegraphs_trapped_ = config_.get<bool>("output_linegraphs_trapped");
    output_animations_ = config_.get<bool>("output_animations");
    output_plots_step_ = config_.get<double>("output_plots_step");

    // 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
    if(!(config_.get<bool>("output_animations") || output_linegraphs_)) {
        allow_multithreading();
    } else {
        LOG(WARNING) << "Per-event line graphs or animations requested, disabling parallel event processing";
    }

    // Parameter for charge transport in magnetic field (approximated from graphs:
    // http://www.ioffe.ru/SVA/NSM/Semicond/Si/electric.html) FIXME
    electron_Hall_ = 1.15;
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ namespace allpix {
        // Local copies of configuration parameters to avoid costly lookup:
        double temperature_{}, timestep_{}, integration_time_{}, output_plots_step_{};
        bool output_plots_{}, output_linegraphs_{}, output_linegraphs_collected_{}, output_linegraphs_recombined_{},
            output_linegraphs_trapped_{}, output_animations_{};
            output_linegraphs_trapped_{};
        unsigned int distance_{};
        unsigned int charge_per_step_{};
        unsigned int max_charge_groups_{};