Skip to content
Closed
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
7 changes: 4 additions & 3 deletions PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@

//----------------create cascade track------------------------------------------------------------
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 6; i++) {

Check failure on line 247 in PWGHF/TableProducer/candidateCreatorXicToXiPiPi.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.
covCasc[MomInd[i]] = casc.momentumCovMat()[i];
covCasc[i] = casc.positionCovMat()[i];
}
Expand Down Expand Up @@ -498,7 +498,7 @@
// read {X,Y,Z,Px,Py,Pz} and corresponding covariance matrix from KF cascade Tables
std::array<float, 6> xyzpxpypz = {casc.x(), casc.y(), casc.z(), casc.px(), casc.py(), casc.pz()};
float parPosMom[6];
for (int i{0}; i < 6; ++i) {

Check failure on line 501 in PWGHF/TableProducer/candidateCreatorXicToXiPiPi.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.
parPosMom[i] = xyzpxpypz[i];
}
// create KFParticle
Expand Down Expand Up @@ -778,7 +778,7 @@
TracksWCovExtraPidPrPi const& tracks,
aod::BCsWithTimestamps const& bcs)
{
runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0C>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0C>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
}
PROCESS_SWITCH(HfCandidateCreatorXicToXiPiPi, processCentFT0CXicplusWithKFParticle, "Run candidate creator with KFParticle with centrality selection on FT0C.", false);

Expand All @@ -789,7 +789,7 @@
TracksWCovExtraPidPrPi const& tracks,
aod::BCsWithTimestamps const& bcs)
{
runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0M>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0M>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
}
PROCESS_SWITCH(HfCandidateCreatorXicToXiPiPi, processCentFT0MXicplusWithKFParticle, "Run candidate creator with KFParticle with centrality selection on FT0M.", false);

Expand Down Expand Up @@ -872,7 +872,8 @@

HfEventSelectionMc hfEvSelMc;

void init(InitContext& initContext) {
void init(InitContext& initContext)
{
const auto& workflows = initContext.services().get<RunningWorkflowInfo const>();
for (const DeviceSpec& device : workflows.devices) {
if (device.name.compare("hf-candidate-creator-xic-to-xi-pi-pi") == 0) {
Expand Down Expand Up @@ -942,7 +943,7 @@
}
if (indexRec > -1) {
RecoDecay::getDaughters(mcParticles.rawIteratorAt(indexRecXicPlus), &arrDaughIndex, std::array{0}, 1);
if (arrDaughIndex.size() == 2) {

Check failure on line 946 in PWGHF/TableProducer/candidateCreatorXicToXiPiPi.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.
for (auto iProng = 0u; iProng < arrDaughIndex.size(); ++iProng) {
auto daughI = mcParticles.rawIteratorAt(arrDaughIndex[iProng]);
arrPDGDaugh[iProng] = std::abs(daughI.pdgCode());
Expand Down Expand Up @@ -1010,7 +1011,7 @@
auto cascMC = mcParticles.rawIteratorAt(particle.daughtersIds().front());
// Find Xi- from Xi(1530) -> Xi pi in case of resonant decay
RecoDecay::getDaughters(particle, &arrDaughIndex, std::array{0}, 1);
if (arrDaughIndex.size() == 2) {

Check failure on line 1014 in PWGHF/TableProducer/candidateCreatorXicToXiPiPi.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.
auto cascStarMC = mcParticles.rawIteratorAt(particle.daughtersIds().front());
if (RecoDecay::isMatchedMCGen<false, true>(mcParticles, cascStarMC, +3324, std::array{+kXiMinus, +kPiPlus}, true)) {
cascMC = mcParticles.rawIteratorAt(cascStarMC.daughtersIds().front());
Expand All @@ -1022,7 +1023,7 @@
auto v0MC = mcParticles.rawIteratorAt(cascMC.daughtersIds().front());
if (RecoDecay::isMatchedMCGen<false, true>(mcParticles, v0MC, +kLambda0, std::array{+kProton, +kPiMinus}, true)) {
debug = 3;
if (arrDaughIndex.size() == 2) {

Check failure on line 1026 in PWGHF/TableProducer/candidateCreatorXicToXiPiPi.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.
for (auto iProng = 0u; iProng < arrDaughIndex.size(); ++iProng) {
auto daughI = mcParticles.rawIteratorAt(arrDaughIndex[iProng]);
arrPDGDaugh[iProng] = std::abs(daughI.pdgCode());
Expand Down
Loading