diff --git a/src/modules/Tracking4D/README.md b/src/modules/Tracking4D/README.md index be5fe790abc851f0dd60bf7b041ac6380898f63f..0b9838882f8dfc60e9bac276033b5b25f2d0f387 100644 --- a/src/modules/Tracking4D/README.md +++ b/src/modules/Tracking4D/README.md @@ -26,6 +26,7 @@ The DUT plane can be excluded from the track finding. * `volume_radiation_length`: Define the radiation length of the volume around the telescope. Defaults to dry air with a radiation length of`304.2 m` * `reject_by_roi`: If true, tracks intercepting any detector outside its ROI will be rejected. Defaults to `false`. * `unique_cluster_usage`: Only use a cluster for one track - in the case of multiple assignments, the track with the best chi2/ndof is kept. Defaults to `false` +* `max_plot_chi2`: Option to define the maximum chi2 in plots for chi2 and chi2/ndof - with an ill-aligned telescope, this is necessary for an initial alignment step. Defaults to `50.0` ### Plots produced diff --git a/src/modules/Tracking4D/Tracking4D.cpp b/src/modules/Tracking4D/Tracking4D.cpp index bec1bd2e353a0317c7ab844fcfd2b584df2169c4..ba760aa9afff6a7222b4dc7a2a62bd85cf7754b5 100644 --- a/src/modules/Tracking4D/Tracking4D.cpp +++ b/src/modules/Tracking4D/Tracking4D.cpp @@ -29,6 +29,7 @@ Tracking4D::Tracking4D(Configuration& config, std::vector("exclude_dut", true); config_.setDefault("track_model", "straightline"); config_.setDefault("momentum", Units::get(5, "GeV")); + config_.setDefault("max_plot_chi2", 50.0); config_.setDefault("volume_radiation_length", Units::get(304.2, "m")); config_.setDefault("volume_scattering", false); config_.setDefault("reject_by_roi", false); @@ -60,6 +61,7 @@ Tracking4D::Tracking4D(Configuration& config, std::vector("track_model"); momentum_ = config_.get("momentum"); + max_plot_chi2_ = config_.get("max_plot_chi2"); volume_radiation_length_ = config_.get("volume_radiation_length"); use_volume_scatterer_ = config_.get("volume_scattering"); reject_by_ROI_ = config_.get("reject_by_roi"); @@ -82,9 +84,9 @@ void Tracking4D::initialize() { // Set up histograms std::string title = "Track #chi^{2};#chi^{2};events"; - trackChi2 = new TH1F("trackChi2", title.c_str(), 300, 0, 150); + trackChi2 = new TH1F("trackChi2", title.c_str(), 300, 0, 3 * max_plot_chi2_); title = "Track #chi^{2}/ndof;#chi^{2}/ndof;events"; - trackChi2ndof = new TH1F("trackChi2ndof", title.c_str(), 500, 0, 50); + trackChi2ndof = new TH1F("trackChi2ndof", title.c_str(), 500, 0, max_plot_chi2_); title = "Clusters per track;clusters;tracks"; clustersPerTrack = new TH1F("clustersPerTrack", title.c_str(), 10, -0.5, 9.5); title = "Track multiplicity;tracks;events"; diff --git a/src/modules/Tracking4D/Tracking4D.h b/src/modules/Tracking4D/Tracking4D.h index 1bbed4871c83aafbdbe7a4e009254c2af1996017..93bb7ac669d815da1785ffcfb99a91d7b61c1e41 100644 --- a/src/modules/Tracking4D/Tracking4D.h +++ b/src/modules/Tracking4D/Tracking4D.h @@ -69,6 +69,7 @@ namespace corryvreckan { std::map kinkY; // Cuts for tracking double momentum_; + double max_plot_chi2_; double volume_radiation_length_; size_t min_hits_on_track_; bool exclude_DUT_;