Skip to content

Commit 36ce615

Browse files
authored
Merge branch 'AliceO2Group:master' into devJpsiPiPi
2 parents 98241f2 + 5a1aa28 commit 36ce615

37 files changed

+1080
-978
lines changed

Common/TableProducer/mftmchMatchingML.cxx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include <math.h>
13-
#if __has_include(<onnxruntime/core/session/onnxruntime_cxx_api.h>)
14-
#include <onnxruntime/core/session/experimental_onnxruntime_cxx_api.h>
15-
#else
1613
#include <onnxruntime_cxx_api.h>
17-
#endif
1814
#include <string>
1915
#include <regex>
2016
#include <TLorentzVector.h>
@@ -77,11 +73,7 @@ struct mftmchMatchingML {
7773

7874
Ort::Env env{ORT_LOGGING_LEVEL_WARNING, "model-explorer"};
7975
Ort::SessionOptions session_options;
80-
#if __has_include(<onnxruntime/core/session/onnxruntime_cxx_api.h>)
81-
std::shared_ptr<Ort::Experimental::Session> onnx_session = nullptr;
82-
#else
8376
std::shared_ptr<Ort::Session> onnx_session = nullptr;
84-
#endif
8577
OnnxModel model;
8678

8779
template <typename F, typename M>
@@ -158,12 +150,6 @@ struct mftmchMatchingML {
158150
std::vector<std::string> output_names;
159151
std::vector<std::vector<int64_t>> output_shapes;
160152

161-
#if __has_include(<onnxruntime/core/session/onnxruntime_cxx_api.h>)
162-
input_names = onnx_session->GetInputNames();
163-
input_shapes = onnx_session->GetInputShapes();
164-
output_names = onnx_session->GetOutputNames();
165-
output_shapes = onnx_session->GetOutputShapes();
166-
#else
167153
Ort::AllocatorWithDefaultOptions tmpAllocator;
168154
for (size_t i = 0; i < onnx_session->GetInputCount(); ++i) {
169155
input_names.push_back(onnx_session->GetInputNameAllocated(i, tmpAllocator).get());
@@ -177,7 +163,6 @@ struct mftmchMatchingML {
177163
for (size_t i = 0; i < onnx_session->GetOutputCount(); ++i) {
178164
output_shapes.emplace_back(onnx_session->GetOutputTypeInfo(i).GetTensorTypeAndShapeInfo().GetShape());
179165
}
180-
#endif
181166

182167
auto input_shape = input_shapes[0];
183168
input_shape[0] = 1;
@@ -187,11 +172,6 @@ struct mftmchMatchingML {
187172

188173
if (input_tensor_values[8] < cfgXYWindow) {
189174
std::vector<Ort::Value> input_tensors;
190-
#if __has_include(<onnxruntime/core/session/onnxruntime_cxx_api.h>)
191-
input_tensors.push_back(Ort::Experimental::Value::CreateTensor<float>(input_tensor_values.data(), input_tensor_values.size(), input_shape));
192-
193-
std::vector<Ort::Value> output_tensors = onnx_session->Run(input_names, input_tensors, output_names);
194-
#else
195175
Ort::MemoryInfo mem_info =
196176
Ort::MemoryInfo::CreateCpu(OrtAllocatorType::OrtArenaAllocator, OrtMemType::OrtMemTypeDefault);
197177
input_tensors.push_back(Ort::Value::CreateTensor<float>(mem_info, input_tensor_values.data(), input_tensor_values.size(), input_shape.data(), input_shape.size()));
@@ -206,7 +186,6 @@ struct mftmchMatchingML {
206186
[&](const std::string& str) { return str.c_str(); });
207187

208188
std::vector<Ort::Value> output_tensors = onnx_session->Run(runOptions, inputNamesChar.data(), input_tensors.data(), input_tensors.size(), outputNamesChar.data(), outputNamesChar.size());
209-
#endif
210189

211190
const float* output_value = output_tensors[0].GetTensorData<float>();
212191

Common/Tasks/qaMuon.cxx

Lines changed: 102 additions & 17 deletions
Large diffs are not rendered by default.

EventFiltering/PWGHF/HFFilterPrepareMLSamples.cxx

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

31-
#if __has_include(<onnxruntime/core/session/onnxruntime_cxx_api.h>)
32-
#include <onnxruntime/core/session/experimental_onnxruntime_cxx_api.h> // needed for HFFilterHelpers, to be fixed
33-
#else
3431
#include <onnxruntime_cxx_api.h>
35-
#endif
3632

3733
#include <CCDB/BasicCCDBManager.h>
3834
#include <CCDB/CcdbApi.h>

PWGCF/FemtoUniverse/DataModel/FemtoDerived.h

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,6 @@ DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V
139139

140140
} // namespace femtouniverseparticle
141141

142-
/// FemtoUniverseCascadeTrack
143-
namespace femtouniversecascparticle
144-
{
145-
146-
DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters
147-
DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle
148-
DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius
149-
DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float); //! cascade cosinus of pointing angle
150-
DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, float); //! DCA between cascade daughters
151-
DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius
152-
DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, float); //! DCA of positive daughter to PV
153-
DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, float); //! DCA of negative daughter to PV
154-
DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, float); //! DCA of bachelor track to PV
155-
DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV
156-
157-
} // namespace femtouniversecascparticle
158-
159142
DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE",
160143
o2::soa::Index<>,
161144
femtouniverseparticle::FdCollisionId,
@@ -176,6 +159,23 @@ DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE",
176159
femtouniverseparticle::P<femtouniverseparticle::Pt, femtouniverseparticle::Eta>);
177160
using FDParticle = FDParticles::iterator;
178161

162+
/// FemtoUniverseCascadeTrack
163+
namespace femtouniversecascparticle
164+
{
165+
DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle);
166+
DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters
167+
DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle
168+
DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius*/
169+
DECLARE_SOA_COLUMN(CpaCasc, cpaCasc, float); //! cascade cosinus of pointing angle
170+
DECLARE_SOA_COLUMN(Dcacascdaughters, dcacascdaughters, float); //! DCA between cascade daughters
171+
DECLARE_SOA_COLUMN(Cascradius, cascradius, float); //! cascade transverse radius
172+
DECLARE_SOA_COLUMN(Dcapostopv, dcapostopv, float); //! DCA of positive daughter to PV
173+
DECLARE_SOA_COLUMN(Dcanegtopv, dcanegtopv, float); //! DCA of negative daughter to PV
174+
DECLARE_SOA_COLUMN(Dcabachtopv, dcabachtopv, float); //! DCA of bachelor track to PV
175+
DECLARE_SOA_COLUMN(Dcav0topv, dcav0topv, float); //! DCA of V0 to PV
176+
177+
} // namespace femtouniversecascparticle
178+
179179
DECLARE_SOA_TABLE(FDExtParticles, "AOD", "FDEXTPARTICLE",
180180
femtouniverseparticle::Sign,
181181
femtouniverseparticle::TpcNClsFound,
@@ -221,16 +221,7 @@ using FDFullParticle = FDExtParticles::iterator;
221221
DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE",
222222
o2::soa::Index<>,
223223
femtouniverseparticle::FdCollisionId,
224-
femtouniverseparticle::Pt,
225-
femtouniverseparticle::Eta,
226-
femtouniverseparticle::Phi,
227-
femtouniverseparticle::PartType,
228-
femtouniverseparticle::Cut,
229-
femtouniverseparticle::PidCut,
230-
femtouniverseparticle::TempFitVar,
231-
femtouniverseparticle::ChildrenIds,
232-
femtouniverseparticle::MLambda,
233-
femtouniverseparticle::MAntiLambda,
224+
femtouniversecascparticle::FDParticleId,
234225
femtouniverseparticle::Theta<femtouniverseparticle::Eta>,
235226
femtouniverseparticle::Px<femtouniverseparticle::Pt, femtouniverseparticle::Phi>,
236227
femtouniverseparticle::Py<femtouniverseparticle::Pt, femtouniverseparticle::Phi>,

0 commit comments

Comments
 (0)