@@ -243,8 +243,8 @@ struct HfCandidateCreatorXicToXiPiPi {
243243 std::array<float , 21 > covCasc = {0 .};
244244
245245 // ----------------create cascade track------------------------------------------------------------
246- constexpr int MomInd[ 6 ] = {9 , 13 , 14 , 18 , 19 , 20 }; // cov matrix elements for momentum component
247- for (int i = 0 ; i < 6 ; i++) {
246+ constexpr std::array< int , 6 > MomInd = {9 , 13 , 14 , 18 , 19 , 20 }; // cov matrix elements for momentum component
247+ for (int i = 0 ; i < MomInd. size () ; i++) {
248248 covCasc[MomInd[i]] = casc.momentumCovMat ()[i];
249249 covCasc[i] = casc.positionCovMat ()[i];
250250 }
@@ -498,7 +498,7 @@ struct HfCandidateCreatorXicToXiPiPi {
498498 // read {X,Y,Z,Px,Py,Pz} and corresponding covariance matrix from KF cascade Tables
499499 std::array<float , 6 > xyzpxpypz = {casc.x (), casc.y (), casc.z (), casc.px (), casc.py (), casc.pz ()};
500500 float parPosMom[6 ];
501- for (int i{0 }; i < 6 ; ++i) {
501+ for (int i{0 }; i < xyzpxpypz. size () ; ++i) {
502502 parPosMom[i] = xyzpxpypz[i];
503503 }
504504 // create KFParticle
@@ -778,7 +778,7 @@ struct HfCandidateCreatorXicToXiPiPi {
778778 TracksWCovExtraPidPrPi const & tracks,
779779 aod::BCsWithTimestamps const & bcs)
780780 {
781- runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0C>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
781+ runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0C>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
782782 }
783783 PROCESS_SWITCH (HfCandidateCreatorXicToXiPiPi, processCentFT0CXicplusWithKFParticle, " Run candidate creator with KFParticle with centrality selection on FT0C." , false );
784784
@@ -789,7 +789,7 @@ struct HfCandidateCreatorXicToXiPiPi {
789789 TracksWCovExtraPidPrPi const & tracks,
790790 aod::BCsWithTimestamps const & bcs)
791791 {
792- runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0M>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
792+ runXicplusCreatorWithKFParticle<o2::hf_centrality::CentralityEstimator::FT0M>(collisions, rowsTrackIndexXicPlus, kfCascadesLinked, kfCascadesFull, tracks, bcs);
793793 }
794794 PROCESS_SWITCH (HfCandidateCreatorXicToXiPiPi, processCentFT0MXicplusWithKFParticle, " Run candidate creator with KFParticle with centrality selection on FT0M." , false );
795795
@@ -872,7 +872,8 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
872872
873873 HfEventSelectionMc hfEvSelMc;
874874
875- void init (InitContext& initContext) {
875+ void init (InitContext& initContext)
876+ {
876877 const auto & workflows = initContext.services ().get <RunningWorkflowInfo const >();
877878 for (const DeviceSpec& device : workflows.devices ) {
878879 if (device.name .compare (" hf-candidate-creator-xic-to-xi-pi-pi" ) == 0 ) {
@@ -942,7 +943,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
942943 }
943944 if (indexRec > -1 ) {
944945 RecoDecay::getDaughters (mcParticles.rawIteratorAt (indexRecXicPlus), &arrDaughIndex, std::array{0 }, 1 );
945- if (arrDaughIndex.size () == 2 ) {
946+ if (arrDaughIndex.size () == arrXiResonance. size () ) {
946947 for (auto iProng = 0u ; iProng < arrDaughIndex.size (); ++iProng) {
947948 auto daughI = mcParticles.rawIteratorAt (arrDaughIndex[iProng]);
948949 arrPDGDaugh[iProng] = std::abs (daughI.pdgCode ());
@@ -1010,7 +1011,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
10101011 auto cascMC = mcParticles.rawIteratorAt (particle.daughtersIds ().front ());
10111012 // Find Xi- from Xi(1530) -> Xi pi in case of resonant decay
10121013 RecoDecay::getDaughters (particle, &arrDaughIndex, std::array{0 }, 1 );
1013- if (arrDaughIndex.size () == 2 ) {
1014+ if (arrDaughIndex.size () == arrXiResonance. size () ) {
10141015 auto cascStarMC = mcParticles.rawIteratorAt (particle.daughtersIds ().front ());
10151016 if (RecoDecay::isMatchedMCGen<false , true >(mcParticles, cascStarMC, +3324 , std::array{+kXiMinus , +kPiPlus }, true )) {
10161017 cascMC = mcParticles.rawIteratorAt (cascStarMC.daughtersIds ().front ());
@@ -1022,7 +1023,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
10221023 auto v0MC = mcParticles.rawIteratorAt (cascMC.daughtersIds ().front ());
10231024 if (RecoDecay::isMatchedMCGen<false , true >(mcParticles, v0MC, +kLambda0 , std::array{+kProton , +kPiMinus }, true )) {
10241025 debug = 3 ;
1025- if (arrDaughIndex.size () == 2 ) {
1026+ if (arrDaughIndex.size () == arrXiResonance. size () ) {
10261027 for (auto iProng = 0u ; iProng < arrDaughIndex.size (); ++iProng) {
10271028 auto daughI = mcParticles.rawIteratorAt (arrDaughIndex[iProng]);
10281029 arrPDGDaugh[iProng] = std::abs (daughI.pdgCode ());
0 commit comments