|
| 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 <limits> |
| 12 | + |
| 13 | +#include "Framework/runDataProcessing.h" |
| 14 | +#include "Framework/AnalysisTask.h" |
| 15 | +#include "Framework/AnalysisDataModel.h" |
| 16 | + |
| 17 | +using namespace o2; |
| 18 | +using namespace o2::framework; |
| 19 | + |
| 20 | +struct trackQAConverter { |
| 21 | + Produces<aod::TracksQA_001> tracksQA_001; |
| 22 | + |
| 23 | + void process(aod::TracksQA_000 const& tracksQA_000) |
| 24 | + { |
| 25 | + for (const auto& trackQA : tracksQA_000) { |
| 26 | + tracksQA_001( |
| 27 | + trackQA.trackId(), |
| 28 | + trackQA.tpcTime0(), |
| 29 | + trackQA.tpcdcaR(), |
| 30 | + trackQA.tpcdcaZ(), |
| 31 | + trackQA.tpcClusterByteMask(), |
| 32 | + trackQA.tpcdEdxMax0R(), |
| 33 | + trackQA.tpcdEdxMax1R(), |
| 34 | + trackQA.tpcdEdxMax2R(), |
| 35 | + trackQA.tpcdEdxMax3R(), |
| 36 | + trackQA.tpcdEdxTot0R(), |
| 37 | + trackQA.tpcdEdxTot1R(), |
| 38 | + trackQA.tpcdEdxTot2R(), |
| 39 | + trackQA.tpcdEdxTot3R(), |
| 40 | + // dummy values, not available in _000 |
| 41 | + std::numeric_limits<int8_t>::min(), // deltaRefContParamY |
| 42 | + std::numeric_limits<int8_t>::min(), // deltaRefContParamZ |
| 43 | + std::numeric_limits<int8_t>::min(), // deltaRefContParamSnp |
| 44 | + std::numeric_limits<int8_t>::min(), // deltaRefContParamTgl |
| 45 | + std::numeric_limits<int8_t>::min(), // deltaRefContParamQ2Pt |
| 46 | + std::numeric_limits<int8_t>::min(), // deltaRefGloParamY |
| 47 | + std::numeric_limits<int8_t>::min(), // deltaRefGloParamZ |
| 48 | + std::numeric_limits<int8_t>::min(), // deltaRefGloParamSnp |
| 49 | + std::numeric_limits<int8_t>::min(), // deltaRefGloParamTgl |
| 50 | + std::numeric_limits<int8_t>::min()); // deltaRefGloParamQ2Pt |
| 51 | + } |
| 52 | + } |
| 53 | +}; |
| 54 | + |
| 55 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 56 | +{ |
| 57 | + return WorkflowSpec{ |
| 58 | + adaptAnalysisTask<trackQAConverter>(cfgc), |
| 59 | + }; |
| 60 | +} |
0 commit comments