Skip to content

Commit ac50e28

Browse files
committed
Merge branch 'master' into HFTagging
2 parents 4fb2f92 + e0c6e5c commit ac50e28

File tree

70 files changed

+5735
-1780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5735
-1780
lines changed

DPG/Tasks/AOTEvent/lightIonsEvSelQa.cxx

Lines changed: 112 additions & 42 deletions
Large diffs are not rendered by default.

EventFiltering/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ o2physics_add_header_only_library(HFFilterHelpers
3939

4040
o2physics_add_dpl_workflow(hf-filter
4141
SOURCES PWGHF/HFFilter.cxx
42-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore ONNXRuntime::ONNXRuntime O2Physics::HFFilterHelpers O2::DetectorsBase
42+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::HFFilterHelpers O2::DetectorsBase
4343
COMPONENT_NAME Analysis)
4444

4545
o2physics_add_dpl_workflow(hf-filter-charm-hadron-signals
4646
SOURCES PWGHF/HFFilterCharmHadronSignals.cxx
47-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore ONNXRuntime::ONNXRuntime O2Physics::HFFilterHelpers
47+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::HFFilterHelpers
4848
COMPONENT_NAME Analysis)
4949

5050
o2physics_add_dpl_workflow(hf-filter-prepare-ml-samples
5151
SOURCES PWGHF/HFFilterPrepareMLSamples.cxx
52-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore ONNXRuntime::ONNXRuntime O2Physics::HFFilterHelpers O2::DetectorsBase
52+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::HFFilterHelpers O2::DetectorsBase
5353
COMPONENT_NAME Analysis)
5454

5555
o2physics_add_dpl_workflow(cf-filter

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 173 additions & 117 deletions
Large diffs are not rendered by default.

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
18401840
template <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();
@@ -2377,7 +2377,6 @@ inline bool HfFilterHelper::isSelectedXiBach(T const& trackParCasc, T const& tra
23772377
}
23782378

23792379
const auto& vtx = dcaFitter.getPCACandidate();
2380-
dcaFitter.propagateTracksToVertex();
23812380
const auto& trackCascProp = dcaFitter.getTrack(0);
23822381
const auto& trackBachProp = dcaFitter.getTrack(1);
23832382
std::array<float, 3> momCasc{}, momBach{};
@@ -2456,7 +2455,6 @@ inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::arr
24562455
const auto& vtx = dcaFitter.getPCACandidate();
24572456

24582457
std::array<float, 3> momCasc{pVecCascade}, momBachFirst{}, momBachSecond{};
2459-
dcaFitter.propagateTracksToVertex();
24602458
const auto& trackBachFirstProp = dcaFitter.getTrack(0);
24612459
const auto& trackBachSecondProp = dcaFitter.getTrack(1);
24622460
trackBachFirstProp.getPxPyPzGlo(momBachFirst);
@@ -2681,7 +2679,6 @@ inline bool HfFilterHelper::buildV0(V const& v0Indices, T const& tracks, C const
26812679
}
26822680

26832681
// compute candidate momentum from tracks propagated to decay vertex
2684-
dcaFitter.propagateTracksToVertex();
26852682
auto& trackPosProp = dcaFitter.getTrack(0);
26862683
auto& trackNegProp = dcaFitter.getTrack(1);
26872684
std::array<float, 3> momPos{}, momNeg{};
@@ -2813,7 +2810,6 @@ inline bool HfFilterHelper::buildCascade(Casc const& cascIndices, V const& v0Ind
28132810
}
28142811

28152812
// compute candidate momentum from tracks propagated to decay vertex
2816-
dcaFitter.propagateTracksToVertex();
28172813
auto& trackV0Prop = dcaFitter.getTrack(0);
28182814
auto& trackBachProp = dcaFitter.getTrack(1);
28192815
std::array<float, 3> momV0{}, momBach{};

EventFiltering/PWGHF/HFFilterPrepareMLSamples.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include "Common/DataModel/PIDResponseTPC.h"
2929
#include "Common/DataModel/TrackSelectionTables.h"
3030

31-
#include <onnxruntime_cxx_api.h>
32-
3331
#include <CCDB/BasicCCDBManager.h>
3432
#include <CCDB/CcdbApi.h>
3533
#include <CommonConstants/PhysicsConstants.h>

0 commit comments

Comments
 (0)