Commit 7eafdc3c authored by Katharina Dort's avatar Katharina Dort
Browse files

Renamed parameter and corrected README

parent 1ec226dc
......@@ -19,7 +19,7 @@ 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);
prealign_method = m_config.get<std::string>("prealign_method", "mean");
method = m_config.get<std::string>("method", "mean");
fit_high = m_config.get<double>("fit_high", Units::get<double>(2, "mm"));
fit_low = m_config.get<double>("fit_low", Units::get<double>(-2, "mm"));
......@@ -128,15 +128,15 @@ void Prealignment::finalise() {
double shift_Y = 0.;
LOG(INFO) << "Using prealignment method: " << prealign_method;
if(prealign_method == "gauss_fit") {
if(method == "gauss_fit") {
correlationX->Fit("gaus", "Q", "", fit_low, fit_high);
correlationY->Fit("gaus", "Q", "", fit_low, fit_high);
shift_X = correlationX->GetFunction("gaus")->GetParameter(1);
shift_Y = correlationY->GetFunction("gaus")->GetParameter(1);
} else if(prealign_method == "mean") {
} else if(method == "mean") {
shift_X = correlationX->GetMean();
shift_Y = correlationY->GetMean();
} else if(prealign_method == "maximum") {
} else if(method == "maximum") {
int binMaxX = correlationX->GetMaximumBin();
shift_X = correlationX->GetXaxis()->GetBinCenter(binMaxX);
int binMaxY = correlationY->GetMaximumBin();
......
......@@ -9,7 +9,8 @@ This module performs translational telescope plane alignment. The rotational ali
This initial alignment along the X and Y axes is designed to be performed before the `Alignment` module, which carries out translational and rotational alignment of the planes. To not include the DUT in this transaltional alignment, it will need to be masked in the configuration file.
The way in which the required translational shifts in X and Y are calculated is specified in the parameter `prealign_method`. Either the mean of the 1D correlation histogram, its maximum or the mean of a Gaussian fit can be used to determine the translational shifts.
The way in which the required translational shifts in X and Y are calculated is specified by the parameter `prealign_method`.
Either the mean of the 1D correlation histogram, its maximum or the mean of a Gaussian fit can be used to determine the translational shifts.
As described in the alignment chapter of the user manual, the spatial correlations in X and Y should not be forced to be centered around zero for the final alignment as they correspond to the *physical displacement* of the detector plane in X and Y with respect to the reference plane.
However, for the prealignment this is a an acceptable estimation which works without any tracking.
......@@ -18,7 +19,7 @@ However, for the prealignment this is a an acceptable estimation which works wit
* `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`.
* `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.
* `prealign_method`: Specifies which method should be used to compute the translational shifts. With the option `mean` the mean of the 1D correlation histogram is used. The option `maximum` uses the maximum value of the histogram and with `gauss_fit` a Gaussian is fitted in the range `fit_low` to `fit_high` and its mean is used for the translational shift. Default is to `mean`. The default of the fitting range is `fit_low` = -2mm and `fit_high` = 2mm.
* `method`: Specifies which method should be used to compute the translational shifts. With the option `mean` the mean of the 1D correlation histogram is used. The option `maximum` uses the maximum value of the histogram and with `gauss_fit` a Gaussian is fitted in the range `fit_low` to `fit_high` and its mean is used for the translational shift. Default is to `mean`. The default of the fitting range is `fit_low` = -2mm and `fit_high` = 2mm.
### Plots Created
......
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