Skip to content
Snippets Groups Projects
Commit 9c259a9e authored by Katharina Dort's avatar Katharina Dort Committed by Jens Kroeger
Browse files

Formatting changes

(cherry picked from commit 1ec226dc)
parent bd6a6a94
No related branches found
No related tags found
No related merge requests found
......@@ -127,23 +127,21 @@ void Prealignment::finalise() {
double shift_X = 0.;
double shift_Y = 0.;
LOG(INFO) << "Using prealignment method: " << prealign_method;
if(prealign_method == "gauss_fit"){
correlationX->Fit("gaus", "Q","", fit_low, fit_high);
correlationY->Fit("gaus", "Q","", fit_low, fit_high);
LOG(INFO) << "Using prealignment method: " << prealign_method;
if(prealign_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(prealign_method == "mean") {
shift_X = correlationX->GetMean();
shift_Y = correlationY->GetMean();
} else if(prealign_method == "maximum") {
int binMaxX = correlationX->GetMaximumBin();
shift_X = correlationX->GetXaxis()->GetBinCenter(binMaxX);
int binMaxY = correlationY->GetMaximumBin();
shift_Y = correlationY->GetXaxis()->GetBinCenter(binMaxY);
}
else if(prealign_method == "maximum"){
int binMaxX = correlationX->GetMaximumBin();
shift_X = correlationX->GetXaxis()->GetBinCenter(binMaxX);
int binMaxY = correlationY->GetMaximumBin();
shift_Y = correlationY->GetXaxis()->GetBinCenter(binMaxY);
}
LOG(INFO) << "Detector " << m_detector->name() << ": x = " << Units::display(shift_X, {"mm", "um"})
<< " , y = " << Units::display(shift_Y, {"mm", "um"});
......
......@@ -12,9 +12,9 @@
#define PREALIGNMENT_H 1
#include <TCanvas.h>
#include <TF1.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TF1.h>
#include <iostream>
#include "core/module/Module.hpp"
#include "objects/Cluster.hpp"
......@@ -50,9 +50,9 @@ namespace corryvreckan {
double max_correlation_rms;
double damping_factor;
double timeCut;
std::string prealign_method;
double fit_high;
double fit_low;
std::string prealign_method;
double fit_high;
double fit_low;
};
} // namespace corryvreckan
#endif // PREALIGNMENT_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment