Skip to content

Commit d49e1a2

Browse files
authored
Fix
1 parent 018681a commit d49e1a2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ALICE3/Core/DelphesO2TrackSmearer.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
// or submit itself to any jurisdiction.
1111

1212
///
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.
1516
/// Minimal changes have been made to the original code for adaptation purposes, formatting and commented parts have been considered.
1617
/// Relevant sources:
1718
/// DelphesO2/src/lutCovm.hh https://github.com/AliceO2Group/DelphesO2/blob/master/src/lutCovm.hh
1819
/// DelphesO2/src/TrackSmearer.cc https://github.com/AliceO2Group/DelphesO2/blob/master/src/TrackSmearer.cc
1920
/// DelphesO2/src/TrackSmearer.hh https://github.com/AliceO2Group/DelphesO2/blob/master/src/TrackSmearer.hh
20-
/// @author: Roberto Preghenella
2121
/// @email: preghenella@bo.infn.it
2222
///
2323

@@ -153,8 +153,8 @@ lutEntry_t*
153153
// Interpolate if requested
154154
auto fraction = mLUTHeader[ipdg]->nchmap.fracPositionWithinBin(nch);
155155
if (mInterpolateEfficiency) {
156-
static constexpr float fractionThreshold = 0.5f;
157-
if (fraction > fractionThreshold) {
156+
static constexpr float kFractionThreshold = 0.5f;
157+
if (fraction > kFractionThreshold) {
158158
switch (mWhatEfficiency) {
159159
case 1:
160160
if (inch < mLUTHeader[ipdg]->nchmap.nbins - 1) {
@@ -237,18 +237,18 @@ bool TrackSmearer::smearTrack(O2Track& o2track, lutEntry_t* lutEntry, float inte
237237

238238
// transform params vector and smear
239239
static constexpr int kParSize = 5;
240-
double params_[kParSize];
240+
double params[kParSize];
241241
for (int i = 0; i < kParSize; ++i) {
242242
double val = 0.;
243243
for (int j = 0; j < kParSize; ++j)
244244
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]));
246246
}
247247
// transform back params vector
248248
for (int i = 0; i < kParSize; ++i) {
249249
double val = 0.;
250250
for (int j = 0; j < kParSize; ++j)
251-
val += lutEntry->eiginv[j][i] * params_[j];
251+
val += lutEntry->eiginv[j][i] * params[j];
252252
o2track.setParam(val, i);
253253
}
254254
// 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)
308308
{
309309
float dummy = 0.0f;
310310
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;
312312
return val;
313313
}
314314

0 commit comments

Comments
 (0)