Skip to content

Commit a861eb4

Browse files
authored
[PWGHF] add converter for table with Dstar indices (#8434)
1 parent f63dc54 commit a861eb4

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,10 @@ o2physics_add_dpl_workflow(derived-data-creator-lc-to-p-k-pi
285285
SOURCES derivedDataCreatorLcToPKPi.cxx
286286
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
287287
COMPONENT_NAME Analysis)
288+
289+
# Converters
290+
291+
o2physics_add_dpl_workflow(converter-dstar-indices
292+
SOURCES converterDstarIndices.cxx
293+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
294+
COMPONENT_NAME Analysis)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 converterDstarIndices.cxx
13+
/// \brief Task for conversion of HfDstars to version 001, using the collision index from the D0 daughter
14+
///
15+
/// \author Fabrizio Grosa <fabrizio.grosa@cern.ch>, CERN
16+
17+
#include "Framework/runDataProcessing.h"
18+
#include "Framework/AnalysisTask.h"
19+
#include "Framework/AnalysisDataModel.h"
20+
21+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
22+
23+
using namespace o2;
24+
using namespace o2::framework;
25+
26+
struct HfConverterDstarIndices {
27+
Produces<aod::HfDstars_001> dstarIndices;
28+
29+
void process(aod::HfDstars_000::iterator const& candDstar,
30+
aod::Hf2Prongs const&)
31+
{
32+
auto candDzero = candDstar.prongD0_as<aod::Hf2Prongs>();
33+
dstarIndices(candDzero.collisionId(), candDstar.prong0Id(), candDstar.prongD0Id());
34+
}
35+
};
36+
37+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
38+
{
39+
return WorkflowSpec{
40+
adaptAnalysisTask<HfConverterDstarIndices>(cfgc),
41+
};
42+
}

0 commit comments

Comments
 (0)