Commit 5d199072 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

timing_cut -> time_cut_abs/rel

parent 50909035
......@@ -8,7 +8,14 @@ Prealignment::Prealignment(Configuration config, std::shared_ptr<Detector> detec
max_correlation_rms = m_config.get<double>("max_correlation_rms", Units::get<double>(6, "mm"));
damping_factor = m_config.get<double>("damping_factor", 1.0);
timingCut = m_config.get<double>("timing_cut", Units::get<double>(100, "ns"));
if(m_config.count({"time_cut_rel", "time_cut_abs"}) > 1) {
throw InvalidCombinationError(
m_config, {"time_cut_rel", "time_cut_abs"}, "Absolute and relative time cuts are mutually exclusive.");
} else if(m_config.has("time_cut_abs")) {
timeCut = m_config.get<double>("time_cut_abs");
} else {
timeCut = m_config.get<double>("time_cut_rel", 3.0) * m_detector->getTimeResolution();
}
LOG(DEBUG) << "Setting max_correlation_rms to : " << max_correlation_rms;
LOG(DEBUG) << "Setting damping_factor to : " << damping_factor;
}
......@@ -72,7 +79,7 @@ StatusCode Prealignment::run(std::shared_ptr<Clipboard> clipboard) {
double timeDifference = refCluster->timestamp() - cluster->timestamp();
// Correlation plots
if(abs(timeDifference) < timingCut) {
if(abs(timeDifference) < timeCut) {
correlationX->Fill(refCluster->global().x() - cluster->global().x());
correlationX2D->Fill(cluster->global().x(), refCluster->global().x());
correlationX2Dlocal->Fill(cluster->column(), refCluster->column());
......
......@@ -38,7 +38,7 @@ namespace corryvreckan {
// Parameters which can be set by user
double max_correlation_rms;
double damping_factor;
double timingCut;
double timeCut;
};
} // namespace corryvreckan
#endif // PREALIGNMENT_H
......@@ -12,9 +12,10 @@ This initial alignment along the X and Y axes is designed to be performed before
The required translational shifts in X and Y are calculated for each detector as the mean of the 1D correlation histogram along the axis.
### Parameters
* `damping_factor`: A factor to change the percentage of the calcuated shift applied to each detector. Default value is `1`.
* `damping_factor`: A factor to change the percentage of the calculated shift applied to each detector. Default value is `1`.
* `max_correlation_rms`: The maximum RMS of the 1D correlation histograms allowed for the shifts to be applied. This factor should be tuned for each run, and is combat the effect of flat distributions. Default value is `6mm`.
* `timing_cut`: maximum time difference between clusters to be taken into account. Defaults to `100ns`.
* `time_cut_rel`: Number of standard deviations the `time_resolution` of the detector plane will be multiplied by. This value is then used as the maximum time difference between a cluster on the current detector and a cluster on the reference plane to be considered in the prealignment. Absolute and relative time cuts are mutually exclusive. Defaults to `3.0`.
* `time_cut_abs`: Specifies an absolute value for the maximum time difference between a cluster on the current detector and a cluster on the reference plane to be considered in the prealignment. Absolute and relative time cuts are mutually exclusive. No default value.
### Plots Created
For each detector the following plots are produced:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment