@@ -415,15 +415,15 @@ class HfFilterHelper
415415 mForceTofProtonForFemto = forceTofProtons;
416416 mForceTofDeuteronForFemto = forceTofDeuterons;
417417 }
418- void setPtBinsSingleTracks (std::vector<double > ptBins) { mPtBinsTracks = ptBins; }
419- void setPtBinsBeautyHadrons (std::vector<double > ptBins) { mPtBinsBeautyHadrons = ptBins; }
420- void setCutsSingleTrackBeauty (o2::framework::LabeledArray<double > cutsSingleTrack3P, o2::framework::LabeledArray<double > cutsSingleTrack4P, o2::framework::LabeledArray<double > cutsSingleToJPsi)
418+ void setPtBinsSingleTracks (const std::vector<double >& ptBins) { mPtBinsTracks = ptBins; }
419+ void setPtBinsBeautyHadrons (const std::vector<double >& ptBins) { mPtBinsBeautyHadrons = ptBins; }
420+ void setCutsSingleTrackBeauty (const o2::framework::LabeledArray<double >& cutsSingleTrack3P, const o2::framework::LabeledArray<double >& cutsSingleTrack4P, const o2::framework::LabeledArray<double >& cutsSingleToJPsi)
421421 {
422422 mCutsSingleTrackBeauty3Prong = cutsSingleTrack3P;
423423 mCutsSingleTrackBeauty4Prong = cutsSingleTrack4P;
424424 mCutsSingleTrackBeautyToJPsi = cutsSingleToJPsi;
425425 }
426- void setCutsBhadrons (o2::framework::LabeledArray<double > cutsBplus, o2::framework::LabeledArray<double > cutsB0toDstar, o2::framework::LabeledArray<double > cutsBc, o2::framework::LabeledArray<double > cutsB0, o2::framework::LabeledArray<double > cutsBs, o2::framework::LabeledArray<double > cutsLb, o2::framework::LabeledArray<double > cutsXib)
426+ void setCutsBhadrons (const o2::framework::LabeledArray<double >& cutsBplus, const o2::framework::LabeledArray<double >& cutsB0toDstar, const o2::framework::LabeledArray<double >& cutsBc, const o2::framework::LabeledArray<double >& cutsB0, const o2::framework::LabeledArray<double >& cutsBs, const o2::framework::LabeledArray<double >& cutsLb, const o2::framework::LabeledArray<double >& cutsXib)
427427 {
428428 mCutsBhad [kBplus ] = cutsBplus;
429429 mCutsBhad [kB0toDStar ] = cutsB0toDstar;
@@ -433,7 +433,7 @@ class HfFilterHelper
433433 mCutsBhad [kLb ] = cutsLb;
434434 mCutsBhad [kXib ] = cutsXib;
435435 }
436- void setCutsBtoJPsi (o2::framework::LabeledArray<double > cuts)
436+ void setCutsBtoJPsi (const o2::framework::LabeledArray<double >& cuts)
437437 {
438438 mCutsBhadToJPsi = cuts;
439439 }
@@ -554,7 +554,7 @@ class HfFilterHelper
554554 mMaxDcaXyXi = maxDcaxyXi;
555555 mMaxNsigmaXiDau = nSigma;
556556 }
557- void setCutsSingleTrackCharmBaryonBachelor (o2::framework::LabeledArray<double > cutsSingleTrack) { mCutsSingleTrackCharmBaryonBachelor = cutsSingleTrack; }
557+ void setCutsSingleTrackCharmBaryonBachelor (const o2::framework::LabeledArray<double >& cutsSingleTrack) { mCutsSingleTrackCharmBaryonBachelor = cutsSingleTrack; }
558558 void setNsigmaPiCutsForCharmBaryonBachelor (float nSigmaTpc, float nSigmaTof)
559559 {
560560 mNSigmaTpcPiCharmBaryonBachelor = nSigmaTpc;
@@ -583,7 +583,7 @@ class HfFilterHelper
583583
584584 void setTpcPidCalibrationOption (int opt) { mTpcPidCalibrationOption = opt; }
585585
586- void setMassResolParametrisation (std::string recoPass)
586+ void setMassResolParametrisation (const std::string& recoPass)
587587 {
588588 if (recoPass == " 2023_pass3" ) {
589589 mSigmaPars2Prongs [0 ] = 0 .01424f ;
@@ -610,7 +610,7 @@ class HfFilterHelper
610610
611611 void setNumSigmaForDeltaMassCharmHadCut (float nSigma) { mNumSigmaDeltaMassCharmHad = nSigma; }
612612
613- void setPreselDsToKKPi (std::vector<double > ptBins, o2::framework::LabeledArray<double > preselections)
613+ void setPreselDsToKKPi (const std::vector<double >& ptBins, const o2::framework::LabeledArray<double >& preselections)
614614 {
615615 mPtBinsPreselDsToKKPi = ptBins;
616616 mPreselDsToKKPi = preselections;
@@ -679,7 +679,7 @@ class HfFilterHelper
679679 template <typename T>
680680 T computeRelativeMomentum (const std::array<T, 3 >& pTrack, const std::array<T, 3 >& CharmCandMomentum, const T& CharmMass);
681681 template <typename T>
682- int computeNumberOfCandidates (std::vector<std::vector<T>> indices);
682+ int computeNumberOfCandidates (const std::vector<std::vector<T>>& indices);
683683 template <typename T1>
684684 int setVtxConfiguration (T1& vertexer, bool useAbsDCA);
685685 template <typename V, typename T, typename C>
@@ -1504,14 +1504,14 @@ inline int8_t HfFilterHelper::isSelectedV0(const V0& v0, const int& activateQA,
15041504 float nSigmaPrTpc[2 ] = {v0.nSigmaPrTpcPos , v0.nSigmaPrTpcNeg };
15051505 float nSigmaPrTof[2 ] = {v0.nSigmaPrTofPos , v0.nSigmaPrTofNeg };
15061506 float pInTpc[2 ] = {v0.pinTpcPos , v0.pinTpcNeg };
1507- float nClsTpc[2 ] = {v0.nClsFoundTpcPos , v0.nClsFoundTpcNeg };
1508- float etaDaus[2 ] = {v0.etaPos , v0.etaNeg };
1509- float signalTpc[2 ] = {v0.signalTpcPos , v0.signalTpcNeg };
15101507 if (mTpcPidCalibrationOption == 1 ) {
1508+ float nClsTpc[2 ] = {v0.nClsFoundTpcPos , v0.nClsFoundTpcNeg };
1509+ float etaDaus[2 ] = {v0.etaPos , v0.etaNeg };
15111510 for (int iDau{0 }; iDau < 2 ; ++iDau) {
15121511 nSigmaPrTpc[iDau] = getTPCPostCalib (pInTpc[iDau], nClsTpc[iDau], etaDaus[iDau], nSigmaPrTpc[iDau], kPr );
15131512 }
15141513 } else if (mTpcPidCalibrationOption == 2 ) {
1514+ float signalTpc[2 ] = {v0.signalTpcPos , v0.signalTpcNeg };
15151515 for (int iDau{0 }; iDau < 2 ; ++iDau) {
15161516 nSigmaPrTpc[iDau] = getTPCSplineCalib (pInTpc[iDau], signalTpc[iDau], (iDau == 0 ) ? kPr : kAntiPr );
15171517 }
@@ -1664,9 +1664,8 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16641664 float nClsTpc[3 ] = {casc.nClsFoundTpcBach , casc.v0 .nClsFoundTpcPos , casc.v0 .nClsFoundTpcNeg };
16651665 float nCrossedRowsTpc[3 ] = {casc.nClsCrossedRowsTpcBach , casc.v0 .nClsCrossedRowsTpcPos , casc.v0 .nClsCrossedRowsTpcNeg };
16661666 float crossedRowsOverFindableClsTpc[3 ] = {casc.crossedRowsOverFindableClsTpcBach , casc.v0 .crossedRowsOverFindableClsTpcPos , casc.v0 .crossedRowsOverFindableClsTpcNeg };
1667- float etaDaus[3 ] = {casc.etaBach , casc.v0 .etaPos , casc.v0 .etaNeg };
1668- float signalTpc[3 ] = {casc.signalTpcBach , casc.v0 .signalTpcPos , casc.v0 .signalTpcNeg };
16691667 if (mTpcPidCalibrationOption == 1 ) {
1668+ float etaDaus[3 ] = {casc.etaBach , casc.v0 .etaPos , casc.v0 .etaNeg };
16701669 for (int iDau{0 }; iDau < 3 ; ++iDau) {
16711670 nSigmaPiTpc[iDau] = getTPCPostCalib (pInTpc[iDau], nClsTpc[iDau], etaDaus[iDau], nSigmaPrTpc[iDau], kPi );
16721671 if (iDau == 0 ) {
@@ -1675,12 +1674,13 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16751674 nSigmaPrTpc[iDau] = getTPCPostCalib (pInTpc[iDau], nClsTpc[iDau], etaDaus[iDau], nSigmaPrTpc[iDau], kPr );
16761675 }
16771676 } else if (mTpcPidCalibrationOption == 2 ) {
1677+ float signalTpc[3 ] = {casc.signalTpcBach , casc.v0 .signalTpcPos , casc.v0 .signalTpcNeg };
16781678 for (int iDau{0 }; iDau < 3 ; ++iDau) {
16791679 nSigmaPiTpc[iDau] = getTPCSplineCalib (pInTpc[iDau], signalTpc[iDau], (iDau == 0 ) ? kPi : kAntiPi );
16801680 if (iDau == 0 ) {
16811681 continue ;
16821682 }
1683- nSigmaPrTpc[iDau] = getTPCSplineCalib (pInTpc[iDau], signalTpc[iDau], (iDau == 0 ) ? kPr : kAntiPr );
1683+ nSigmaPrTpc[iDau] = getTPCSplineCalib (pInTpc[iDau], signalTpc[iDau], kAntiPr );
16841684 }
16851685 }
16861686
@@ -1838,7 +1838,7 @@ inline T HfFilterHelper::computeRelativeMomentum(const std::array<T, 3>& pTrack,
18381838// / Computation of the number of candidates in an event that do not share daughter tracks
18391839// / \return 0 or 1 in case of less than 2 independent candidates in a single event, 2 otherwise
18401840template <typename T>
1841- inline int HfFilterHelper::computeNumberOfCandidates (std::vector<std::vector<T>> indices)
1841+ inline int HfFilterHelper::computeNumberOfCandidates (const std::vector<std::vector<T>>& indices)
18421842{
18431843 if (indices.size () < 2 ) {
18441844 return indices.size ();
0 commit comments