|
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 |
|
12 | 12 | /// |
13 | | -/// @file DelphesO2TrackSmearer.cxx |
14 | | -/// @brief Porting to O2Physics of DelphesO2 code. |
| 13 | +/// \file DelphesO2TrackSmearer.cxx |
| 14 | +/// \author: Roberto Preghenella |
| 15 | +/// \brief Porting to O2Physics of DelphesO2 code. |
15 | 16 | /// Minimal changes have been made to the original code for adaptation purposes, formatting and commented parts have been considered. |
16 | 17 | /// Relevant sources: |
17 | 18 | /// DelphesO2/src/lutCovm.hh https://github.com/AliceO2Group/DelphesO2/blob/master/src/lutCovm.hh |
18 | 19 | /// DelphesO2/src/TrackSmearer.cc https://github.com/AliceO2Group/DelphesO2/blob/master/src/TrackSmearer.cc |
19 | 20 | /// DelphesO2/src/TrackSmearer.hh https://github.com/AliceO2Group/DelphesO2/blob/master/src/TrackSmearer.hh |
20 | | -/// @author: Roberto Preghenella |
21 | 21 | /// @email: preghenella@bo.infn.it |
22 | 22 | /// |
23 | 23 |
|
@@ -153,8 +153,8 @@ lutEntry_t* |
153 | 153 | // Interpolate if requested |
154 | 154 | auto fraction = mLUTHeader[ipdg]->nchmap.fracPositionWithinBin(nch); |
155 | 155 | if (mInterpolateEfficiency) { |
156 | | - static constexpr float fractionThreshold = 0.5f; |
157 | | - if (fraction > fractionThreshold) { |
| 156 | + static constexpr float kFractionThreshold = 0.5f; |
| 157 | + if (fraction > kFractionThreshold) { |
158 | 158 | switch (mWhatEfficiency) { |
159 | 159 | case 1: |
160 | 160 | if (inch < mLUTHeader[ipdg]->nchmap.nbins - 1) { |
@@ -237,18 +237,18 @@ bool TrackSmearer::smearTrack(O2Track& o2track, lutEntry_t* lutEntry, float inte |
237 | 237 |
|
238 | 238 | // transform params vector and smear |
239 | 239 | static constexpr int kParSize = 5; |
240 | | - double params_[kParSize]; |
| 240 | + double params[kParSize]; |
241 | 241 | for (int i = 0; i < kParSize; ++i) { |
242 | 242 | double val = 0.; |
243 | 243 | for (int j = 0; j < kParSize; ++j) |
244 | 244 | val += lutEntry->eigvec[j][i] * o2track.getParam(j); |
245 | | - params_[i] = gRandom->Gaus(val, std::sqrt(lutEntry->eigval[i])); |
| 245 | + params[i] = gRandom->Gaus(val, std::sqrt(lutEntry->eigval[i])); |
246 | 246 | } |
247 | 247 | // transform back params vector |
248 | 248 | for (int i = 0; i < kParSize; ++i) { |
249 | 249 | double val = 0.; |
250 | 250 | for (int j = 0; j < kParSize; ++j) |
251 | | - val += lutEntry->eiginv[j][i] * params_[j]; |
| 251 | + val += lutEntry->eiginv[j][i] * params[j]; |
252 | 252 | o2track.setParam(val, i); |
253 | 253 | } |
254 | 254 | // should make a sanity check that par[2] sin(phi) is in [-1, 1] |
@@ -308,7 +308,7 @@ double TrackSmearer::getAbsPtRes(int pdg, float nch, float eta, float pt) |
308 | 308 | { |
309 | 309 | float dummy = 0.0f; |
310 | 310 | auto lutEntry = getLUTEntry(pdg, nch, 0., eta, pt, dummy); |
311 | | - auto val = std::sqrt(lutEntry->covm[14]) * pow(lutEntry->pt, 2); |
| 311 | + auto val = std::sqrt(lutEntry->covm[14]) * lutEntry->pt * lutEntry->pt; |
312 | 312 | return val; |
313 | 313 | } |
314 | 314 |
|
|
0 commit comments