Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@
const float inactiveBorderRPhi = pixelDimensionRPhi * std::sqrt(fractionInactive) / 2;
const float inactiveBorderZ = pixelDimensionZ * std::sqrt(fractionInactive) / 2;
const double arrayRPhi[4] = {-pixelDimensionRPhi / 2, -pixelDimensionRPhi / 2 + inactiveBorderRPhi, pixelDimensionRPhi / 2 - inactiveBorderRPhi, pixelDimensionRPhi / 2};
for (int i = 0; i < 4; i++) {

Check failure on line 335 in ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(info) << "arrayRPhi[" << i << "] = " << arrayRPhi[i];
}
axisInPixelRPhi = new TAxis(3, arrayRPhi);
const double arrayZ[4] = {-pixelDimensionZ / 2, -pixelDimensionZ / 2 + inactiveBorderZ, pixelDimensionZ / 2 - inactiveBorderZ, pixelDimensionZ / 2};
for (int i = 0; i < 4; i++) {

Check failure on line 340 in ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(info) << "arrayZ[" << i << "] = " << arrayZ[i];
}
axisInPixelZ = new TAxis(3, arrayZ);
Expand All @@ -363,7 +363,7 @@
const float r = std::sqrt(hitPosition[0] * hitPosition[0] + hitPosition[1] * hitPosition[1]);

// Check if hit is within layer geometric acceptance
if (std::abs(layerRadius - r) > 10.f) {

Check failure on line 366 in ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(debug) << "Hit out of TOF layer acceptance: r=" << r << " cm with respect to the layer radius " << layerRadius;
return false;
}
Expand Down Expand Up @@ -707,7 +707,9 @@
} else {
float x = 0.f;
o2track.getXatLabR(simConfig.innerTOFRadius, x, mMagneticField);
histos.fill(HIST("iTOF/h2HitMap"), o2track.getZAt(x, mMagneticField), simConfig.innerTOFRadius * o2track.getPhiAt(x, mMagneticField));
if (plotsConfig.doQAplots) {
histos.fill(HIST("iTOF/h2HitMap"), o2track.getZAt(x, mMagneticField), simConfig.innerTOFRadius * o2track.getPhiAt(x, mMagneticField));
}
}

const bool activeOuterTOF = isInOuterTOFActiveArea(o2track);
Expand All @@ -716,7 +718,9 @@
} else {
float x = 0.f;
o2track.getXatLabR(simConfig.outerTOFRadius, x, mMagneticField);
histos.fill(HIST("oTOF/h2HitMap"), o2track.getZAt(x, mMagneticField), simConfig.outerTOFRadius * o2track.getPhiAt(x, mMagneticField));
if (plotsConfig.doQAplots) {
histos.fill(HIST("oTOF/h2HitMap"), o2track.getZAt(x, mMagneticField), simConfig.outerTOFRadius * o2track.getPhiAt(x, mMagneticField));
}
}

// get mass to calculate velocity
Expand Down Expand Up @@ -938,15 +942,15 @@
}
}
}
}

const float deltaTrackLengthInnerTOF = std::abs(trackLengthInnerTOF - trackLengthRecoInnerTOF);
if (trackLengthInnerTOF > 0 && trackLengthRecoInnerTOF > 0) {
histos.fill(HIST("iTOF/h2dDeltaTrackLengthInnerVsPt"), noSmearingPt, deltaTrackLengthInnerTOF);
}
const float deltaTrackLengthOuterTOF = std::abs(trackLengthOuterTOF - trackLengthRecoOuterTOF);
if (trackLengthOuterTOF > 0 && trackLengthRecoOuterTOF > 0) {
histos.fill(HIST("oTOF/h2dDeltaTrackLengthOuterVsPt"), noSmearingPt, deltaTrackLengthOuterTOF);
const float deltaTrackLengthInnerTOF = std::abs(trackLengthInnerTOF - trackLengthRecoInnerTOF);
if (trackLengthInnerTOF > 0 && trackLengthRecoInnerTOF > 0) {
histos.fill(HIST("iTOF/h2dDeltaTrackLengthInnerVsPt"), noSmearingPt, deltaTrackLengthInnerTOF);
}
const float deltaTrackLengthOuterTOF = std::abs(trackLengthOuterTOF - trackLengthRecoOuterTOF);
if (trackLengthOuterTOF > 0 && trackLengthRecoOuterTOF > 0) {
histos.fill(HIST("oTOF/h2dDeltaTrackLengthOuterVsPt"), noSmearingPt, deltaTrackLengthOuterTOF);
}
}

// Sigmas have been fully calculated. Please populate the NSigma helper table (once per track)
Expand Down
Loading