Skip to content

Commit 15dd47f

Browse files
committed
Add tracks extra converter for str der data
1 parent d22252e commit 15dd47f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ o2physics_add_dpl_workflow(stradautrackstofpidconverter
1414
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
1515
COMPONENT_NAME Analysis)
1616

17+
o2physics_add_dpl_workflow(stradautracksextraconverter2
18+
SOURCES stradautracksextraconverter2.cxx
19+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
20+
COMPONENT_NAME Analysis)
21+
1722
o2physics_add_dpl_workflow(strarawcentsconverter
1823
SOURCES strarawcentsconverter.cxx
1924
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
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+
#include "Framework/runDataProcessing.h"
12+
#include "Framework/AnalysisTask.h"
13+
#include "Framework/AnalysisDataModel.h"
14+
#include "PWGLF/DataModel/LFStrangenessTables.h"
15+
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
16+
17+
using namespace o2;
18+
using namespace o2::framework;
19+
20+
// Converts daughter TracksExtra from 1 to 2
21+
struct stradautracksextraconverter2 {
22+
Produces<aod::DauTrackExtras_002> dauTrackExtras_002;
23+
24+
void process(aod::DauTrackExtras_001 const& dauTrackExtras_001)
25+
{
26+
for (auto& values : dauTrackExtras_001) {
27+
dauTrackExtras_002(values.itsChi2PerNcl(),
28+
values.detectorMap(),
29+
values.itsClusterSizes(),
30+
static_cast<uint8_t>(0), // findable (unknown in old format)
31+
-values.tpcClusters(), // findable minus found: we know found
32+
values.tpcCrossedRows()); // findable minus crossed rows: we know crossed rows
33+
}
34+
}
35+
};
36+
37+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
38+
{
39+
return WorkflowSpec{
40+
adaptAnalysisTask<stradautracksextraconverter2>(cfgc)};
41+
}

0 commit comments

Comments
 (0)