Skip to content

Commit b25a388

Browse files
fgrosaalibuildvkucera
authored
PWGHF: add converter for 3-prong ML table in D2H reduced data format (AliceO2Group#8006)
* PWGHF: add converter for 3-prong ML table in D2H reduced data format * Please consider the following formatting changes * Remove whitespace added by the bot * Add missing comma * Add missing iterator * Update PWGHF/D2H/TableProducer/converterReduced3ProngsMl.cxx Co-authored-by: Vít Kučera <[email protected]> * Update PWGHF/D2H/TableProducer/converterReduced3ProngsMl.cxx Co-authored-by: Vít Kučera <[email protected]> * Update PWGHF/D2H/TableProducer/converterReduced3ProngsMl.cxx Co-authored-by: Vít Kučera <[email protected]> * Update PWGHF/D2H/TableProducer/CMakeLists.txt Co-authored-by: Vít Kučera <[email protected]> --------- Co-authored-by: ALICE Action Bot <[email protected]> Co-authored-by: Vít Kučera <[email protected]>
1 parent fa44f24 commit b25a388

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,21 @@ DECLARE_SOA_TABLE(HfRed3ProngsCov, "AOD", "HFRED3PRONGSCOV", //! Table with 3pro
221221
HFTRACKPARCOV_COLUMNS,
222222
o2::soa::Marker<2>);
223223

224-
DECLARE_SOA_TABLE(HfRed3ProngsMl, "AOD", "HFRED3PRONGML", //! Table with 3prong candidate ML scores
224+
DECLARE_SOA_TABLE(HfRed3ProngsMl_000, "AOD", "HFRED3PRONGML", //! Table with 3prong candidate ML scores
225225
hf_charm_cand_reduced::MlScoreBkgMassHypo0,
226226
hf_charm_cand_reduced::MlScorePromptMassHypo0,
227-
hf_charm_cand_reduced::MlScoreNonpromptMassHypo0,
228-
hf_charm_cand_reduced::MlScoreBkgMassHypo1,
229-
hf_charm_cand_reduced::MlScorePromptMassHypo1,
230-
hf_charm_cand_reduced::MlScoreNonpromptMassHypo1,
231-
o2::soa::Marker<1>);
227+
hf_charm_cand_reduced::MlScoreNonpromptMassHypo0);
228+
229+
DECLARE_SOA_TABLE_VERSIONED(HfRed3ProngsMl_001, "AOD", "HFRED3PRONGML", 1, //! Table with 3prong candidate ML scores (format for 2 mass hypotheses needed for Ds and Lc)
230+
hf_charm_cand_reduced::MlScoreBkgMassHypo0,
231+
hf_charm_cand_reduced::MlScorePromptMassHypo0,
232+
hf_charm_cand_reduced::MlScoreNonpromptMassHypo0,
233+
hf_charm_cand_reduced::MlScoreBkgMassHypo1,
234+
hf_charm_cand_reduced::MlScorePromptMassHypo1,
235+
hf_charm_cand_reduced::MlScoreNonpromptMassHypo1,
236+
o2::soa::Marker<1>);
237+
238+
using HfRed3ProngsMl = HfRed3ProngsMl_001;
232239

233240
// Beauty candidates prongs
234241
namespace hf_cand_b0_reduced

PWGHF/D2H/TableProducer/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ o2physics_add_dpl_workflow(data-creator-charm-reso-reduced
6060
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
6161
COMPONENT_NAME Analysis)
6262

63+
# Converters
64+
65+
o2physics_add_dpl_workflow(converter-reduced-3-prongs-ml
66+
SOURCES converterReduced3ProngsMl.cxx
67+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
68+
COMPONENT_NAME Analysis)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file converterReduced3ProngsMl.cxx
13+
/// \brief Task for conversion of HfRed3ProngsMl to version 001
14+
///
15+
/// \author Fabrizio Grosa <[email protected]>, CERN
16+
17+
#include "Framework/runDataProcessing.h"
18+
#include "Framework/AnalysisTask.h"
19+
#include "Framework/AnalysisDataModel.h"
20+
21+
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
22+
23+
using namespace o2;
24+
using namespace o2::framework;
25+
26+
// Swaps covariance matrix elements if the data is known to be bogus (collision_000 is bogus)
27+
struct HfConverterReduced3ProngsMl {
28+
Produces<aod::HfRed3ProngsMl_001> ml3Prongs;
29+
30+
void process(aod::HfRed3ProngsMl_000::iterator const& mlScoreTable)
31+
{
32+
ml3Prongs(mlScoreTable.mlScoreBkgMassHypo0(), mlScoreTable.mlScorePromptMassHypo0(), mlScoreTable.mlScoreNonpromptMassHypo0(), -1.f, -1.f, -1.f);
33+
}
34+
};
35+
36+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
37+
{
38+
return WorkflowSpec{
39+
adaptAnalysisTask<HfConverterReduced3ProngsMl>(cfgc),
40+
};
41+
}

0 commit comments

Comments
 (0)