Skip to content
Snippets Groups Projects
Commit 6a41fd20 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'GSF_polynomial_cleanup' into 'master'

GSF: A bit of cleanup on the Bethe Heitler effects parametrization

See merge request atlas/athena!37381
parents 326614be bd119a4f
No related branches found
No related tags found
No related merge requests found
Showing
with 27 additions and 91 deletions
12 5 1
-3.34333e+04 2.11896e+04 -4.35121e+03 2.54429e+02 1.82550e+01 -3.82904e+00
-3.74046e+04 2.42291e+04 -5.36227e+03 4.54971e+02 -1.32493e+01 4.46887e-02
-2.15389e+04 1.71624e+04 -4.45524e+03 4.40221e+02 -1.43713e+01 -2.82408e+00
-2.04753e+03 -9.27552e+03 5.23317e+03 -9.91972e+02 7.45628e+01 -4.26054e+00
-2.47776e+04 9.18419e+03 -1.04388e+01 -3.14778e+02 2.67693e+01 9.78552e-01
1.38802e+04 -5.82601e+03 7.51152e+02 -5.40330e+01 2.87371e+00 -4.48438e+00
1.37618e+05 -8.14312e+04 1.77966e+04 -1.72233e+03 6.53699e+01 -3.35729e+00
8.06544e+04 -5.21597e+04 1.29336e+04 -1.45986e+03 5.61233e+01 2.23539e+00
-5.25862e+04 4.36821e+04 -1.30287e+04 1.66146e+03 -8.14708e+01 -5.20331e+00
3.11400e+04 -1.71476e+04 3.24206e+03 -2.21689e+02 -3.21389e-01 -2.72289e+00
1.13748e+05 -6.89465e+04 1.56024e+04 -1.52507e+03 3.65047e+01 4.03085e+00
-2.36866e+05 1.45780e+05 -3.30388e+04 3.17879e+03 -9.60037e+01 -8.26819e+00
-1.61490e+03 1.57728e+03 -5.87629e+02 1.06926e+02 -9.79779e+00 -2.88626e+00
5.90287e+04 -3.68793e+04 8.43885e+03 -7.40248e+02 -1.09546e+01 5.91560e+00
-4.65133e+05 2.65079e+05 -5.40213e+04 4.41733e+03 -8.10398e+01 -1.15400e+01
8.04967e+03 -3.20482e+03 2.14321e+02 5.76661e+01 -9.28099e+00 -2.84841e+00
1.58232e+05 -8.65760e+04 1.67331e+04 -1.18658e+03 -2.05893e+01 7.40365e+00
-4.46225e+05 2.57118e+05 -5.23091e+04 4.05750e+03 -3.13143e+01 -1.46230e+01
-1.83076e+04 1.05336e+04 -2.37342e+03 2.64593e+02 -1.52874e+01 -2.73153e+00
1.23241e+05 -6.65059e+04 1.22160e+04 -6.53038e+02 -5.89921e+01 9.22297e+00
-3.32713e+05 1.91497e+05 -3.82201e+04 2.59041e+03 5.78193e+01 -1.82680e+01
-3.29345e+04 2.00010e+04 -4.67760e+03 5.24382e+02 -2.85104e+01 -2.46673e+00
1.21602e+05 -6.28564e+04 1.04518e+04 -2.92500e+02 -9.52978e+01 1.11506e+01
-2.89175e+05 1.64795e+05 -3.18469e+04 1.77900e+03 1.25690e+02 -2.19182e+01
-7.22818e+03 5.20011e+03 -1.52180e+03 2.23835e+02 -1.66046e+01 -2.45262e+00
1.32908e+05 -6.82645e+04 1.10353e+04 -2.00320e+02 -1.19970e+02 1.30944e+01
7.45461e+04 -5.27930e+04 1.70260e+04 -3.36547e+03 3.93079e+02 -2.90624e+01
-1.15951e+04 7.16772e+03 -1.70615e+03 1.97307e+02 -1.15485e+01 -2.49546e+00
5.63548e+04 -2.40446e+04 1.32956e+03 8.47211e+02 -1.84147e+02 1.58133e+01
1.76130e+05 -1.31579e+05 4.00875e+04 -6.56023e+03 6.15621e+02 -3.69406e+01
-4.74205e+03 2.57958e+03 -6.28583e+02 8.67199e+01 -6.78667e+00 -2.13778e+00
1.27592e+05 -6.64894e+04 1.08566e+04 -1.13324e+02 -1.51812e+02 1.72633e+01
-5.96958e+05 3.07118e+05 -5.13825e+04 1.85140e+03 3.21460e+02 -3.78177e+01
-4.20620e+03 2.13776e+03 -4.71918e+02 5.94499e+01 -4.55496e+00 -4.17635e-01
4.63824e+05 -2.88714e+05 6.81800e+04 -7.30780e+03 2.73588e+02 1.14589e+01
-5.87689e+05 4.43406e+05 -1.24153e+05 1.52259e+04 -6.19949e+02 -2.38927e+01
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
12 9 1
-8.90331e+09 8.83090e+09 -3.73734e+09 8.81007e+08 -1.26708e+08 1.14567e+07 -6.46996e+05 2.17334e+04 -3.65659e+02 -1.05247e+00
-8.84004e+09 8.76178e+09 -3.70417e+09 8.71886e+08 -1.25142e+08 1.12868e+07 -6.36022e+05 2.14403e+04 -3.86432e+02 2.72924e+00
-7.12742e+09 6.98409e+09 -2.91701e+09 6.77652e+08 -9.58557e+07 8.50400e+06 -4.70766e+05 1.56209e+04 -2.77770e+02 -9.77833e-01
-1.10616e+09 1.30918e+09 -6.68638e+08 1.93246e+08 -3.46580e+07 3.95032e+06 -2.78640e+05 1.10795e+04 -1.95528e+02 -1.88710e+00
-7.16517e+09 7.31091e+09 -3.20141e+09 7.86774e+08 -1.19069e+08 1.14404e+07 -6.90906e+05 2.47475e+04 -4.61467e+02 4.81463e+00
9.33998e+09 -9.14521e+09 3.81588e+09 -8.85883e+08 1.25362e+08 -1.11392e+07 6.16748e+05 -2.03583e+04 3.61726e+02 -7.05836e+00
-3.98683e+09 4.02449e+09 -1.72946e+09 4.11465e+08 -5.88937e+07 5.13711e+06 -2.61396e+05 6.81621e+03 -6.73860e+01 -2.56798e+00
-1.13023e+10 1.14711e+10 -4.98520e+09 1.21154e+09 -1.80275e+08 1.68771e+07 -9.80087e+05 3.32709e+04 -5.93634e+02 7.14002e+00
1.81255e+10 -1.78880e+10 7.56161e+09 -1.79162e+09 2.61271e+08 -2.41850e+07 1.40608e+06 -4.85057e+04 8.77289e+02 -1.26399e+01
-1.53066e+09 1.48678e+09 -6.09300e+08 1.36488e+08 -1.80487e+07 1.41104e+06 -6.09607e+04 1.21604e+03 -1.06445e+01 -2.76963e+00
-1.29683e+10 1.30297e+10 -5.59513e+09 1.34030e+09 -1.95950e+08 1.79490e+07 -1.01493e+06 3.34849e+04 -5.98109e+02 8.67223e+00
2.12346e+10 -2.03656e+10 8.29971e+09 -1.87445e+09 2.56334e+08 -2.17295e+07 1.11696e+06 -3.23939e+04 4.86558e+02 -1.21046e+01
2.70433e+09 -2.63745e+09 1.09347e+09 -2.51380e+08 3.50577e+07 -3.04915e+06 1.63534e+05 -5.10893e+03 7.83967e+01 -3.48869e+00
-5.67112e+09 5.44195e+09 -2.22379e+09 5.05570e+08 -7.00584e+07 6.08161e+06 -3.25483e+05 1.01782e+04 -2.03603e+02 7.30267e+00
3.40010e+10 -3.31872e+10 1.37504e+10 -3.14838e+09 4.34060e+08 -3.67423e+07 1.86063e+06 -5.25868e+04 7.90320e+02 -1.66984e+01
-6.86597e+08 5.65945e+08 -1.79269e+08 2.45431e+07 -3.35604e+05 -3.29562e+05 4.30719e+04 -2.34076e+03 5.28003e+01 -3.43982e+00
-1.46165e+10 1.46887e+10 -6.28860e+09 1.49438e+09 -2.15108e+08 1.91958e+07 -1.04386e+06 3.29045e+04 -5.95418e+02 1.12626e+01
3.87288e+10 -3.73709e+10 1.52937e+10 -3.45690e+09 4.70568e+08 -3.93826e+07 1.97876e+06 -5.60730e+04 8.88522e+02 -2.01205e+01
2.99419e+09 -2.93184e+09 1.21944e+09 -2.80722e+08 3.90485e+07 -3.36146e+06 1.75918e+05 -5.23225e+03 7.34296e+01 -3.30057e+00
-1.12401e+10 1.08030e+10 -4.40008e+09 9.88643e+08 -1.33521e+08 1.10576e+07 -5.48702e+05 1.55567e+04 -2.97906e+02 1.05712e+01
4.22501e+10 -4.10313e+10 1.68983e+10 -3.84408e+09 5.26995e+08 -4.45340e+07 2.27617e+06 -6.68731e+04 1.14185e+03 -2.49369e+01
4.43307e+09 -4.47186e+09 1.92676e+09 -4.62666e+08 6.77185e+07 -6.20161e+06 3.50122e+05 -1.14648e+04 1.87184e+02 -4.03033e+00
-1.29974e+10 1.26585e+10 -5.22933e+09 1.19282e+09 -1.63731e+08 1.38121e+07 -7.02422e+05 2.07526e+04 -4.13607e+02 1.30092e+01
3.05783e+10 -3.12108e+10 1.35661e+10 -3.27190e+09 4.78013e+08 -4.33257e+07 2.39862e+06 -7.77344e+04 1.49363e+03 -3.13117e+01
1.20967e+09 -1.26663e+09 5.70574e+08 -1.44475e+08 2.25209e+07 -2.22087e+06 1.36459e+05 -4.88385e+03 8.43526e+01 -3.25324e+00
-1.03372e+10 1.01747e+10 -4.24781e+09 9.78457e+08 -1.35343e+08 1.14544e+07 -5.79982e+05 1.70416e+04 -3.73432e+02 1.44949e+01
8.45507e+09 -9.35639e+09 4.42975e+09 -1.17137e+09 1.89460e+08 -1.93060e+07 1.23514e+06 -4.90483e+04 1.30218e+03 -3.62894e+01
1.13790e+09 -1.15998e+09 5.06038e+08 -1.23230e+08 1.83091e+07 -1.70152e+06 9.72002e+04 -3.18963e+03 5.00447e+01 -2.94550e+00
-3.99116e+09 4.09449e+09 -1.79548e+09 4.38663e+08 -6.51895e+07 6.04069e+06 -3.46869e+05 1.26088e+04 -3.93996e+02 1.73119e+01
-2.33359e+10 2.44770e+10 -1.10130e+10 2.77455e+09 -4.28257e+08 4.15692e+07 -2.49251e+06 8.48929e+04 -1.14364e+03 -2.33537e+01
-3.01511e+08 3.21743e+08 -1.46989e+08 3.74784e+07 -5.83420e+06 5.70632e+05 -3.49201e+04 1.30837e+03 -2.98254e+01 -1.96394e+00
3.35978e+10 -3.38761e+10 1.46167e+10 -3.52609e+09 5.21391e+08 -4.87139e+07 2.85381e+06 -9.94483e+04 1.71004e+03 3.15375e+00
-1.57173e+10 1.74763e+10 -8.44486e+09 2.31918e+09 -3.96896e+08 4.35540e+07 -3.02158e+06 1.23358e+05 -2.30868e+03 -1.53071e+01
8.56975e+08 -8.47353e+08 3.58106e+08 -8.45489e+07 1.22276e+07 -1.11606e+06 6.36811e+04 -2.14878e+03 3.63919e+01 -7.25863e-01
-3.89064e+10 3.97293e+10 -1.73483e+10 4.22551e+09 -6.27471e+08 5.82228e+07 -3.31500e+06 1.08430e+05 -1.82984e+03 2.68257e+01
5.10529e+10 -4.86599e+10 1.98382e+10 -4.53649e+09 6.40600e+08 -5.76450e+07 3.24223e+06 -1.04238e+05 1.70024e+03 -4.22981e+01
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
#Format of the files
The first line of the file looks ``Components,Order,transform code`` e.g ``6 5 1``
- This means that the Material effects are described by 6 Gaussian components mixture
- Each Gaussian components need a weight,mean,variance
- Each of the weight,mean,variance are described by the output of a 5th order polynomial meaning 6th coefficients
- Transfrorm can be 0 or 1 depending on if we needs to tranform the output of the polynomial in order to get
the weight,mean,variance
...@@ -27,8 +27,10 @@ class GsfBetheHeitlerEffects ...@@ -27,8 +27,10 @@ class GsfBetheHeitlerEffects
{ {
public: public:
/// Maximum number of Gaussian components in the mixture
static constexpr int maxNumberofComponents = 8; static constexpr int maxNumberofComponents = 8;
static constexpr int maxOrderPolynomial = 10; /// Polynomail coefficients , order is this -1
static constexpr int polynomialCoefficients = 6;
struct ComponentValues struct ComponentValues
{ {
// Default ctors/dtor/assignment operators // Default ctors/dtor/assignment operators
......
...@@ -241,13 +241,13 @@ Trk::GsfBetheHeitlerEffects::readParameters() ...@@ -241,13 +241,13 @@ Trk::GsfBetheHeitlerEffects::readParameters()
<< maxNumberofComponents << " : " << m_numberOfComponents); << maxNumberofComponents << " : " << m_numberOfComponents);
return false; return false;
} }
if (not inRange(orderPolynomial, 0, maxOrderPolynomial)) { if (orderPolynomial != (polynomialCoefficients - 1)) {
ATH_MSG_ERROR("orderPolynomial Parameter out of range 0- " ATH_MSG_ERROR(
<< maxOrderPolynomial << " : " << orderPolynomial); "orderPolynomial order != " << (polynomialCoefficients - 1));
return false; return false;
} }
if (not inRange(m_transformationCode, 0, 10)) { if (not inRange(m_transformationCode, 0, 1)) {
ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: " ATH_MSG_ERROR("transformationCode Parameter out of range 0-1: "
<< m_transformationCode); << m_transformationCode);
return false; return false;
} }
...@@ -256,6 +256,7 @@ Trk::GsfBetheHeitlerEffects::readParameters() ...@@ -256,6 +256,7 @@ Trk::GsfBetheHeitlerEffects::readParameters()
return false; return false;
} }
// Fill the polynomials
int componentIndex = 0; int componentIndex = 0;
for (; componentIndex < m_numberOfComponents; ++componentIndex) { for (; componentIndex < m_numberOfComponents; ++componentIndex) {
m_polynomialWeights[componentIndex] = readPolynomial(fin, orderPolynomial); m_polynomialWeights[componentIndex] = readPolynomial(fin, orderPolynomial);
...@@ -276,7 +277,6 @@ Trk::GsfBetheHeitlerEffects::readParameters() ...@@ -276,7 +277,6 @@ Trk::GsfBetheHeitlerEffects::readParameters()
} }
const char* filename = resolvedFileName.c_str(); const char* filename = resolvedFileName.c_str();
std::ifstream fin(filename); std::ifstream fin(filename);
if (fin.bad()) { if (fin.bad()) {
...@@ -298,14 +298,13 @@ Trk::GsfBetheHeitlerEffects::readParameters() ...@@ -298,14 +298,13 @@ Trk::GsfBetheHeitlerEffects::readParameters()
ATH_MSG_ERROR(" numberOfComponentsHighX0 != numberOfComponents"); ATH_MSG_ERROR(" numberOfComponentsHighX0 != numberOfComponents");
return false; return false;
} }
if (orderPolynomial != (polynomialCoefficients - 1)) {
if (not inRange(orderPolynomial, 0, maxOrderPolynomial)) { ATH_MSG_ERROR(
ATH_MSG_ERROR("orderPolynomial Parameter out of range 0- " "orderPolynomial order != " << (polynomialCoefficients - 1));
<< maxOrderPolynomial << " : " << orderPolynomial);
return false; return false;
} }
if (not inRange(m_transformationCodeHighX0, 0, 10)) { if (not inRange(m_transformationCodeHighX0, 0, 1)) {
ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: " ATH_MSG_ERROR("transformationCode Parameter out of range 0-1: "
<< m_transformationCodeHighX0); << m_transformationCodeHighX0);
return false; return false;
} }
...@@ -314,6 +313,7 @@ Trk::GsfBetheHeitlerEffects::readParameters() ...@@ -314,6 +313,7 @@ Trk::GsfBetheHeitlerEffects::readParameters()
return false; return false;
} }
// Fill the polynomials
int componentIndex = 0; int componentIndex = 0;
for (; componentIndex < m_numberOfComponentsHighX0; ++componentIndex) { for (; componentIndex < m_numberOfComponentsHighX0; ++componentIndex) {
m_polynomialWeightsHighX0[componentIndex] = m_polynomialWeightsHighX0[componentIndex] =
...@@ -373,8 +373,9 @@ Trk::GsfBetheHeitlerEffects::compute( ...@@ -373,8 +373,9 @@ Trk::GsfBetheHeitlerEffects::compute(
if (pathlengthInX0 < m_lowerRange) { if (pathlengthInX0 < m_lowerRange) {
const double meanZ = std::exp(-1. * pathlengthInX0); const double meanZ = std::exp(-1. * pathlengthInX0);
const double sign = (direction == Trk::oppositeMomentum) ? 1. : -1.; const double sign = (direction == Trk::oppositeMomentum) ? 1. : -1.;
const double varZ = std::exp(-1. * pathlengthInX0 * std::log(3.) / std::log(2.)) - const double varZ =
std::exp(-2. * pathlengthInX0); std::exp(-1. * pathlengthInX0 * std::log(3.) / std::log(2.)) -
std::exp(-2. * pathlengthInX0);
double deltaP(0.); double deltaP(0.);
double varQoverP(0.); double varQoverP(0.);
if (direction == Trk::alongMomentum) { if (direction == Trk::alongMomentum) {
......
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