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
3 changes: 2 additions & 1 deletion PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
Configurable<float> nTPCCrossedRowsMinHe{"nTPCCrossedRowsMinHe", 70, "helium minimum crossed rows"};
Configurable<float> nTPCCrossedRowsMinPi{"nTPCCrossedRowsMinPi", -1., "pion minimum crossed rows"};
Configurable<bool> mcSignalOnly{"mcSignalOnly", true, "If true, save only signal in MC"};
Configurable<bool> useLikeSignPairs{"useLikeSignPairs", false, "If true, reconstruct like-sign pairs for background estimation. Does not work with processDataTracked"};
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Skimmed dataset processing"};
Configurable<bool> isEventUsedForEPCalibration{"isEventUsedForEPCalibration", 1, "Event is used for EP calibration"};

Expand Down Expand Up @@ -407,7 +408,7 @@
o2::parameters::GRPMagField* grpmag = 0x0;
if (grpo) {
o2::base::Propagator::initFieldFromGRP(grpo);
if (d_bz_input < -990) {

Check failure on line 411 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
// Fetch magnetic field from ccdb for current collision
d_bz = grpo->getNominalL3Field();
LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG";
Expand All @@ -420,7 +421,7 @@
LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp;
}
o2::base::Propagator::initFieldFromGRP(grpmag);
if (d_bz_input < -990) {

Check failure on line 424 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
// Fetch magnetic field from ccdb for current collision
d_bz = std::lround(5.f * grpmag->getL3Current() / 30000.f);
LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG";
Expand All @@ -432,7 +433,7 @@
auto he3pid = ccdb->getForTimeStamp<std::array<float, 6>>(pidPath.value + "_He3", run3grp_timestamp);
std::copy(he3pid->begin(), he3pid->end(), mBBparamsHe.begin());
} else {
for (int i = 0; i < 5; i++) {

Check failure on line 436 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
mBBparamsHe[i] = cfgBetheBlochParams->get("He3", Form("p%i", i));
}
mBBparamsHe[5] = cfgBetheBlochParams->get("He3", "resolution");
Expand Down Expand Up @@ -478,7 +479,7 @@

hEvents->Fill(1.);

if (std::abs(collision.posZ()) > 10) {

Check failure on line 482 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
continue;
}
hEvents->Fill(2.);
Expand Down Expand Up @@ -523,7 +524,7 @@

hEvents->Fill(1.);

if (std::abs(collision.posZ()) > 10) {

Check failure on line 527 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
continue;
}
hEvents->Fill(2.);
Expand Down Expand Up @@ -598,7 +599,7 @@
hePropTrack.getPxPyPzGlo(hypCand.momHe3);
piPropTrack.getPxPyPzGlo(hypCand.momPi);
// the momentum has to be multiplied by 2 (charge)
for (int i = 0; i < 3; i++) {

Check failure on line 602 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
hypCand.momHe3[i] *= 2;
}
float heP2 = hypCand.momHe3[0] * hypCand.momHe3[0] + hypCand.momHe3[1] * hypCand.momHe3[1] + hypCand.momHe3[2] * hypCand.momHe3[2];
Expand All @@ -610,7 +611,7 @@
float h4lE = he4E + piE;
std::array<float, 3> hypMom;
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check failure on line 614 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
hypCand.decVtx[i] = vtx[i];
hypMom[i] = hypCand.momHe3[i] + hypCand.momPi[i];
}
Expand Down Expand Up @@ -663,7 +664,7 @@

auto collision = collisions.rawIteratorAt(collIDmax);
std::array<float, 3> primVtx = {collision.posX(), collision.posY(), collision.posZ()};
for (int i = 0; i < 3; i++) {

Check failure on line 667 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
hypCand.decVtx[i] = hypCand.decVtx[i] - primVtx[i];
}

Expand Down Expand Up @@ -768,7 +769,7 @@

svCreator.appendTrackCand(track, collisions, pdgHypo, ambiguousTracks, bcs);
}
auto& svPool = svCreator.getSVCandPool(collisions);
auto& svPool = svCreator.getSVCandPool(collisions, useLikeSignPairs);
LOG(debug) << "SV pool size: " << svPool.size();

for (const auto& svCand : svPool) {
Expand All @@ -782,7 +783,7 @@
}
void fillMCinfo(aod::McTrackLabels const& trackLabels, aod::McParticles const&)
{
for (auto& hypCand : hyperCandidates) {

Check failure on line 786 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto mcLabHe = trackLabels.rawIteratorAt(hypCand.heTrackID);
auto mcLabPi = trackLabels.rawIteratorAt(hypCand.piTrackID);

Expand All @@ -803,7 +804,7 @@
auto secVtx = std::array<float, 3>{mcTrackHe.vx(), mcTrackHe.vy(), mcTrackHe.vz()};
hypCand.gMom = std::array<float, 3>{heMother.px(), heMother.py(), heMother.pz()};
hypCand.gMomHe3 = std::array<float, 3>{mcTrackHe.px(), mcTrackHe.py(), mcTrackHe.pz()};
for (int i = 0; i < 3; i++) {

Check failure on line 807 in PWGLF/TableProducer/Nuspex/hyperRecoTask.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.
hypCand.gDecVtx[i] = secVtx[i] - primVtx[i];
}
hypCand.isSignal = true;
Expand Down
Loading