Skip to content

Commit 8337ae9

Browse files
Add new converter task + fix error in filling the dautrackextra tables
1 parent 45eda8e commit 8337ae9

3 files changed

Lines changed: 71 additions & 64 deletions

File tree

PWGLF/TableProducer/converters/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ o2physics_add_dpl_workflow(strangederivedconverter
1313
SOURCES strangederivedconverter.cxx
1414
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
1515
COMPONENT_NAME Analysis)
16+
17+
o2physics_add_dpl_workflow(strarawcentsconverter
18+
SOURCES strarawcentsconverter.cxx
19+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
20+
COMPONENT_NAME Analysis)
21+
22+
o2physics_add_dpl_workflow(v0sconverter
23+
SOURCES v0sconverter.cxx
24+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
25+
COMPONENT_NAME Analysis)

PWGLF/TableProducer/converters/strarawcentsconverter.cxx

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,16 @@ using namespace o2::framework;
1818

1919
// Converts V0 version 001 to 002
2020
struct strarawcentsconverter {
21-
Produces<aod::DauTrackExtras_001> dauTrackExtras_001;
22-
Produces<aod::V0MCCores_001> v0MCCores_001;
2321
Produces<aod::StraRawCents_001> straRawCents_001;
2422
Produces<aod::StraRawCents_003> straRawCents_003;
2523

26-
void process000to001(aod::StraRawCents_000 const& straRawCents_000, aod::DauTrackExtras_000 const& dauTrackExtras_000, aod::V0MCCores_000 const& v0MCCores_000)
24+
void process000to001(aod::StraRawCents_000 const& straRawCents_000)
2725
{
2826
for (auto& values : straRawCents_000) {
2927
straRawCents_001(values.multFT0A(), values.multFT0C(), values.multFV0A(), values.multNTracksPVeta1(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
3028
}
31-
for (auto& values : dauTrackExtras_000) {
32-
dauTrackExtras_001(0,
33-
values.detectorMap(),
34-
values.itsClusterSizes(),
35-
values.tpcNClsFound(),
36-
values.tpcNClsCrossedRows(),
37-
values.tpcSignal(),
38-
values.tpcNSigmaEl(),
39-
values.tpcNSigmaPi(),
40-
values.tpcNSigmaKa(),
41-
values.tpcNSigmaPr(),
42-
values.tpcNSigmaHe());
43-
}
44-
for (auto& values : v0MCCores_000) {
45-
v0MCCores_001(0,
46-
values.pdgCode(),
47-
values.pdgCodeMother(),
48-
values.pdgCodePositive(),
49-
values.pdgCodeNegative(),
50-
values.isPhysicalPrimary(),
51-
values.xMC(),
52-
values.yMC(),
53-
values.zMC(),
54-
values.pxPosMC(),
55-
values.pyPosMC(),
56-
values.pzPosMC(),
57-
values.pxNegMC(),
58-
values.pyNegMC(),
59-
values.pzNegMC());
60-
}
6129
}
62-
void process002to003(aod::StraRawCents_002 const& straRawCents_002, aod::DauTrackExtras_000 const& dauTrackExtras_000, aod::V0MCCores_000 const& v0MCCores_000)
30+
void process002to003(aod::StraRawCents_002 const& straRawCents_002)
6331
{
6432
for (auto& values : straRawCents_002) {
6533
straRawCents_003(values.multFT0A(),
@@ -77,36 +45,6 @@ struct strarawcentsconverter {
7745
values.multZPA(),
7846
values.multZPC());
7947
}
80-
for (auto& values : dauTrackExtras_000) {
81-
dauTrackExtras_001(0,
82-
values.detectorMap(),
83-
values.itsClusterSizes(),
84-
values.tpcNClsFound(),
85-
values.tpcNClsCrossedRows(),
86-
values.tpcSignal(),
87-
values.tpcNSigmaEl(),
88-
values.tpcNSigmaPi(),
89-
values.tpcNSigmaKa(),
90-
values.tpcNSigmaPr(),
91-
values.tpcNSigmaHe());
92-
}
93-
for (auto& values : v0MCCores_000) {
94-
v0MCCores_001(0,
95-
values.pdgCode(),
96-
values.pdgCodeMother(),
97-
values.pdgCodePositive(),
98-
values.pdgCodeNegative(),
99-
values.isPhysicalPrimary(),
100-
values.xMC(),
101-
values.yMC(),
102-
values.zMC(),
103-
values.pxPosMC(),
104-
values.pyPosMC(),
105-
values.pzPosMC(),
106-
values.pxNegMC(),
107-
values.pyNegMC(),
108-
values.pzNegMC());
109-
}
11048
}
11149

11250
PROCESS_SWITCH(strarawcentsconverter, process000to001, "from raw 000 to 001", false);
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
16+
using namespace o2;
17+
using namespace o2::framework;
18+
19+
// Converts V0 version 001 to 002
20+
struct v0sconverter {
21+
Produces<aod::DauTrackExtras_001> dauTrackExtras_001;
22+
Produces<aod::V0MCCores_001> v0MCCores_001;
23+
24+
void process000to001(aod::DauTrackExtras_000 const& dauTrackExtras_000, aod::V0MCCores_000 const& v0MCCores_000)
25+
{
26+
for (auto& values : dauTrackExtras_000) {
27+
dauTrackExtras_001(0,
28+
values.detectorMap(),
29+
values.itsClusterSizes(),
30+
values.tpcClusters(),
31+
values.tpcCrossedRows());
32+
}
33+
for (auto& values : v0MCCores_000) {
34+
v0MCCores_001(0,
35+
values.pdgCode(),
36+
values.pdgCodeMother(),
37+
values.pdgCodePositive(),
38+
values.pdgCodeNegative(),
39+
values.isPhysicalPrimary(),
40+
values.xMC(),
41+
values.yMC(),
42+
values.zMC(),
43+
values.pxPosMC(),
44+
values.pyPosMC(),
45+
values.pzPosMC(),
46+
values.pxNegMC(),
47+
values.pyNegMC(),
48+
values.pzNegMC());
49+
}
50+
}
51+
52+
PROCESS_SWITCH(v0sconverter, process000to001, "from raw 000 to 001", false);
53+
};
54+
55+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
56+
{
57+
return WorkflowSpec{
58+
adaptAnalysisTask<v0sconverter>(cfgc)};
59+
}

0 commit comments

Comments
 (0)