Skip to content

Commit

Permalink
Add tracks extra converter for str der data
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Dec 21, 2024
1 parent d22252e commit 15dd47f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ o2physics_add_dpl_workflow(stradautrackstofpidconverter
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(stradautracksextraconverter2
SOURCES stradautracksextraconverter2.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(strarawcentsconverter
SOURCES strarawcentsconverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"

using namespace o2;
using namespace o2::framework;

// Converts daughter TracksExtra from 1 to 2
struct stradautracksextraconverter2 {
Produces<aod::DauTrackExtras_002> dauTrackExtras_002;

void process(aod::DauTrackExtras_001 const& dauTrackExtras_001)
{
for (auto& values : dauTrackExtras_001) {
dauTrackExtras_002(values.itsChi2PerNcl(),
values.detectorMap(),
values.itsClusterSizes(),
static_cast<uint8_t>(0), // findable (unknown in old format)
-values.tpcClusters(), // findable minus found: we know found
values.tpcCrossedRows()); // findable minus crossed rows: we know crossed rows
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<stradautracksextraconverter2>(cfgc)};
}

0 comments on commit 15dd47f

Please sign in to comment.