Commit 0f547c0c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

EtaCalc/Corr: rename parameters

parent 86c5c99f
......@@ -5,9 +5,9 @@ using namespace std;
EtaCalculation::EtaCalculation(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
m_chi2ndofCut = m_config.get<double>("chi2ndofCut", 100.);
m_etaFormulaX = m_config.get<std::string>("EtaFormulaX", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_etaFormulaY = m_config.get<std::string>("EtaFormulaY", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_chi2ndofCut = m_config.get<double>("chi2ndof_cut", 100.);
m_etaFormulaX = m_config.get<std::string>("eta_formula_x", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_etaFormulaY = m_config.get<std::string>("eta_formula_y", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
}
void EtaCalculation::initialise() {
......@@ -121,9 +121,9 @@ void EtaCalculation::finalise() {
std::stringstream config;
config << std::endl
<< "EtaConstantsX_" << m_detector->name() << " =" << fit(m_etaFitX, "etaFormulaX", m_etaDistributionXprofile);
<< "eta_constants_x_" << m_detector->name() << " =" << fit(m_etaFitX, "etaFormulaX", m_etaDistributionXprofile);
config << std::endl
<< "EtaConstantsY_" << m_detector->name() << " =" << fit(m_etaFitY, "etaFormulaY", m_etaDistributionYprofile);
<< "eta_constants_y_" << m_detector->name() << " =" << fit(m_etaFitY, "etaFormulaY", m_etaDistributionYprofile);
LOG(INFO) << "\"EtaCorrection\":" << config.str();
}
......@@ -11,8 +11,8 @@ At the end of the run, fits to the recorded profiles are performed using the pro
In order to measure the correct $`\eta`$-distribution, no additional $`\eta`$-correction should be applied during this calculation, i.e. by using the EtaCorrection module.
### Parameters
* `chi2ndofCut`: Track quality cut on its Chi2 over numbers of degrees of freedom. Default value is `100`.
* `EtaFormulaX` / `EtaFormulaY`: Formula to for to the recorded $`\eta`$-distributions, defaults to a polynomial of fifth order, i.e. `[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5`.
* `chi2ndof_cut`: Track quality cut on its Chi2 over numbers of degrees of freedom. Default value is `100`.
* `eta_formula_x` / `eta_formula_y`: Formula to for to the recorded $`\eta`$-distributions, defaults to a polynomial of fifth order, i.e. `[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5`.
### Plots produced
For each detector the following plots are produced:
......@@ -23,5 +23,5 @@ For each detector the following plots are produced:
### Usage
```toml
[EtaCalculation]
chi2ndofCut = 100
chi2ndof_cut = 100
```
......@@ -5,8 +5,8 @@ using namespace std;
EtaCorrection::EtaCorrection(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
m_etaFormulaX = m_config.get<std::string>("EtaFormulaX", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_etaFormulaY = m_config.get<std::string>("EtaFormulaY", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_etaFormulaX = m_config.get<std::string>("eta_formula_x", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
m_etaFormulaY = m_config.get<std::string>("eta_formula_y", "[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5");
}
void EtaCorrection::initialise() {
......@@ -16,8 +16,8 @@ void EtaCorrection::initialise() {
double pitchY = m_detector->pitch().Y();
// Get info from configuration:
std::vector<double> m_etaConstantsX = m_config.getArray<double>("EtaConstantsX_" + m_detector->name(), {});
std::vector<double> m_etaConstantsY = m_config.getArray<double>("EtaConstantsY_" + m_detector->name(), {});
std::vector<double> m_etaConstantsX = m_config.getArray<double>("eta_constants_x_" + m_detector->name(), {});
std::vector<double> m_etaConstantsY = m_config.getArray<double>("eta_constants_y_" + m_detector->name(), {});
if(!m_etaConstantsX.empty() || !m_etaConstantsY.empty()) {
LOG(INFO) << "Found Eta correction factors for detector \"" << m_detector->name()
<< "\": " << (m_etaConstantsX.empty() ? "" : "X ") << (m_etaConstantsY.empty() ? "" : "Y ");
......
......@@ -10,8 +10,8 @@ This module applies previously determined $`\eta`$-corrections to cluster positi
This module does not calculate the $`\eta`$ distribution.
### Parameters
* `EtaFormulaX` / `EtaFormulaY`: The formula for the $`\eta`$ correction to be applied for the X an Y coordinate, respectively. It defaults to a polynomial of fifth ordern, i.e. `[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5`.
* `EtaConstantsX_<detector>` / `EtaConstantsY_<detector>`: Vector of correction factors, representing the parameters of the above correction function, in X and Y coordinates, respectively. Defaults to an empty vector, i.e. by default no correction is applied. The `<detector>` part of the variable has to be replaced with the respective unique name of the detector given in the setup file.
* `eta_formula_x` / `eta_formula_y`: The formula for the $`\eta`$ correction to be applied for the X an Y coordinate, respectively. It defaults to a polynomial of fifth ordern, i.e. `[0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5`.
* `eta_constants_x_<detector>` / `eta_constants_y_<detector>`: Vector of correction factors, representing the parameters of the above correction function, in X and Y coordinates, respectively. Defaults to an empty vector, i.e. by default no correction is applied. The `<detector>` part of the variable has to be replaced with the respective unique name of the detector given in the setup file.
### Plots produced
Currently, no plots are produced. The result of the $`\eta`$-correction is best observed in residual distributions of the respective detector.
......@@ -19,6 +19,6 @@ Currently, no plots are produced. The result of the $`\eta`$-correction is best
### Usage
```toml
[EtaCorrection]
EtaFormulaX = [0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5
EtaConstantsX_dut = 0.025 0.038 6.71 -323.58 5950.3 -34437.5
eta_formula_x = [0] + [1]*x + [2]*x^2 + [3]*x^3 + [4]*x^4 + [5]*x^5
eta_constants_x_dut = 0.025 0.038 6.71 -323.58 5950.3 -34437.5
```
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