@@ -299,23 +299,25 @@ struct HfDataCreatorJpsiHadReduced {
299299 df2.setWeightedFinalPCA (useWeightedFinalPCA);
300300 df2.setMatCorrType (noMatCorr);
301301
302- df3.setPropagateToPCA (propagateToPCA);
303- df3.setMaxR (maxR);
304- df3.setMaxDZIni (maxDZIni);
305- df3.setMinParamChange (minParamChange);
306- df3.setMinRelChi2Change (minRelChi2Change);
307- df3.setUseAbsDCA (useAbsDCA);
308- df3.setWeightedFinalPCA (useWeightedFinalPCA);
309- df3.setMatCorrType (noMatCorr);
310-
311- df4.setPropagateToPCA (propagateToPCA);
312- df4.setMaxR (maxR);
313- df4.setMaxDZIni (maxDZIni);
314- df4.setMinParamChange (minParamChange);
315- df4.setMinRelChi2Change (minRelChi2Change);
316- df4.setUseAbsDCA (useAbsDCA);
317- df4.setWeightedFinalPCA (useWeightedFinalPCA);
318- df4.setMatCorrType (noMatCorr);
302+ if (doprocessJpsiKData || doprocessJpsiKMc) {
303+ df3.setPropagateToPCA (propagateToPCA);
304+ df3.setMaxR (maxR);
305+ df3.setMaxDZIni (maxDZIni);
306+ df3.setMinParamChange (minParamChange);
307+ df3.setMinRelChi2Change (minRelChi2Change);
308+ df3.setUseAbsDCA (useAbsDCA);
309+ df3.setWeightedFinalPCA (useWeightedFinalPCA);
310+ df3.setMatCorrType (noMatCorr);
311+ } else {
312+ df4.setPropagateToPCA (propagateToPCA);
313+ df4.setMaxR (maxR);
314+ df4.setMaxDZIni (maxDZIni);
315+ df4.setMinParamChange (minParamChange);
316+ df4.setMinRelChi2Change (minRelChi2Change);
317+ df4.setUseAbsDCA (useAbsDCA);
318+ df4.setWeightedFinalPCA (useWeightedFinalPCA);
319+ df4.setMatCorrType (noMatCorr);
320+ }
319321
320322 // Configure CCDB access
321323 ccdb->setURL (ccdbUrl);
@@ -997,8 +999,11 @@ struct HfDataCreatorJpsiHadReduced {
997999 runNumber = bc.runNumber ();
9981000 }
9991001 df2.setBz (bz);
1000- df3.setBz (bz);
1001- df4.setBz (bz);
1002+ if constexpr (DecChannel == DecayChannel::BplusToJpsiK) {
1003+ df3.setBz (bz);
1004+ } else {
1005+ df4.setBz (bz);
1006+ }
10021007
10031008 auto thisCollId = collision.globalIndex ();
10041009 // looping over 2-prong candidates
@@ -1007,7 +1012,7 @@ struct HfDataCreatorJpsiHadReduced {
10071012 // Apply the selections on the J/Psi candidates
10081013 registry.fill (HIST (" hSelectionsJpsi" ), 1 , candidate.pt ());
10091014
1010- if (!(candidate.hfflag () & ( 1 << aod::hf_cand_2prong::DecayType::JpsiToMuMu) )) {
1015+ if (!TESTBIT (candidate.hfflag (), aod::hf_cand_2prong::DecayType::JpsiToMuMu)) {
10111016 continue ;
10121017 }
10131018 registry.fill (HIST (" hSelectionsJpsi" ), 2 + aod::SelectionStep::RecoSkims, candidate.pt ());
@@ -1201,7 +1206,6 @@ struct HfDataCreatorJpsiHadReduced {
12011206 }
12021207 registry.fill (HIST (" hFitCandidatesB0" ), SVFitting::FitOk);
12031208
1204- o2::track::TrackParCov trackParCovB0{};
12051209 std::array<float , 3 > pVecB0{}, pVec0{}, pVec1{}, pVecK0Star{};
12061210
12071211 auto secondaryVertexB0 = df4.getPCACandidate ();
@@ -1212,8 +1216,6 @@ struct HfDataCreatorJpsiHadReduced {
12121216 pVecB0 = RecoDecay::pVec (pVec0, pVec1, pVec2, pVec3);
12131217 pVecJpsi = RecoDecay::pVec (pVec0, pVec1);
12141218 pVecK0Star = RecoDecay::pVec (pVec2, pVec3);
1215- trackParCovB0 = df4.createParentTrackParCov ();
1216- trackParCovB0.setAbsCharge (0 ); // to be sure
12171219
12181220 if (!isBSelected (pVecB0, secondaryVertexB0, collision)) {
12191221 continue ;
@@ -1333,7 +1335,6 @@ struct HfDataCreatorJpsiHadReduced {
13331335 }
13341336 registry.fill (HIST (" hFitCandidatesBS" ), SVFitting::FitOk);
13351337
1336- o2::track::TrackParCov trackParCovBS{};
13371338 std::array<float , 3 > pVecBS{}, pVec0{}, pVec1{}, pVecPhi{};
13381339
13391340 auto secondaryVertexBS = df4.getPCACandidate ();
@@ -1344,8 +1345,6 @@ struct HfDataCreatorJpsiHadReduced {
13441345 pVecBS = RecoDecay::pVec (pVec0, pVec1, pVec2, pVec3);
13451346 pVecJpsi = RecoDecay::pVec (pVec0, pVec1);
13461347 pVecPhi = RecoDecay::pVec (pVec2, pVec3);
1347- trackParCovBS = df4.createParentTrackParCov ();
1348- trackParCovBS.setAbsCharge (0 ); // to be sure
13491348
13501349 if (!isBSelected (pVecBS, secondaryVertexBS, collision)) {
13511350 continue ;
0 commit comments