Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Common] TrackQA: Add converter for _000 to _001 #8404

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Common/TableProducer/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ o2physics_add_dpl_workflow(multsextra-converter
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(trackqa-converter
SOURCES trackQAConverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
60 changes: 60 additions & 0 deletions Common/TableProducer/Converters/trackQAConverter.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// 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 <limits>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"

using namespace o2;
using namespace o2::framework;

struct trackQAConverter {
Produces<aod::TracksQA_001> tracksQA_001;

void process(aod::TracksQA_000 const& tracksQA_000)
{
for (auto& trackQA : tracksQA_000) {
tracksQA_001(
trackQA.trackId(),
trackQA.tpcTime0(),
trackQA.tpcdcaR(),
trackQA.tpcdcaZ(),
trackQA.tpcClusterByteMask(),
trackQA.tpcdEdxMax0R(),
trackQA.tpcdEdxMax1R(),
trackQA.tpcdEdxMax2R(),
trackQA.tpcdEdxMax3R(),
trackQA.tpcdEdxTot0R(),
trackQA.tpcdEdxTot1R(),
trackQA.tpcdEdxTot2R(),
trackQA.tpcdEdxTot3R(),
// dummy values, not available in _000
std::numeric_limits<int8_t>::min(), // deltaRefContParamY
std::numeric_limits<int8_t>::min(), // deltaRefContParamZ
std::numeric_limits<int8_t>::min(), // deltaRefContParamSnp
std::numeric_limits<int8_t>::min(), // deltaRefContParamTgl
std::numeric_limits<int8_t>::min(), // deltaRefContParamQ2Pt
std::numeric_limits<int8_t>::min(), // deltaRefGloParamY
std::numeric_limits<int8_t>::min(), // deltaRefGloParamZ
std::numeric_limits<int8_t>::min(), // deltaRefGloParamSnp
std::numeric_limits<int8_t>::min(), // deltaRefGloParamTgl
std::numeric_limits<int8_t>::min()); // deltaRefGloParamQ2Pt
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<trackQAConverter>(cfgc),
};
}
Loading