Skip to content

Commit 22ae462

Browse files
[PWGLF] Add TPCchi2 and shared clusters in strangeness data model + fixes in V0 analysis task (#10113)
Co-authored-by: Nicolò Jacazio <njacazio@users.noreply.github.com>
1 parent 6613d2c commit 22ae462

File tree

5 files changed

+167
-12
lines changed

5 files changed

+167
-12
lines changed

PWGLF/DataModel/LFStrangenessTables.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,45 @@ DECLARE_SOA_TABLE_VERSIONED(DauTrackExtras_002, "AOD", "DAUTRACKEXTRA", 2, //! d
417417
dautrack::HasTRD<dautrack::DetectorMap>,
418418
dautrack::HasTOF<dautrack::DetectorMap>);
419419

420+
DECLARE_SOA_TABLE_VERSIONED(DauTrackExtras_003, "AOD", "DAUTRACKEXTRA", 3, //! detector properties of decay daughters
421+
track::ITSChi2NCl,
422+
track::TPCChi2NCl,
423+
dautrack::DetectorMap, // here we don´t save everything so we simplify this
424+
track::ITSClusterSizes,
425+
track::TPCNClsFindable,
426+
track::TPCNClsFindableMinusFound,
427+
track::TPCNClsFindableMinusCrossedRows,
428+
track::TPCNClsShared,
429+
430+
// Dynamics for ITS matching TracksExtra
431+
track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
432+
track::v001::ITSClsSizeInLayer<track::ITSClusterSizes>,
433+
track::v001::ITSClusterMap<track::ITSClusterSizes>,
434+
track::v001::ITSNCls<track::ITSClusterSizes>,
435+
track::v001::IsITSAfterburner<track::v001::DetectorMap, track::ITSChi2NCl>,
436+
/*compatibility*/ dautrack::HasITSTracker<dautrack::DetectorMap, track::ITSChi2NCl>,
437+
/*compatibility*/ dautrack::HasITSAfterburner<dautrack::DetectorMap, track::ITSChi2NCl>,
438+
439+
// dynamics for TPC tracking properties matching main data model
440+
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
441+
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
442+
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
443+
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
444+
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
445+
/*compatibility*/ dautrack::compatibility::TPCClusters<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
446+
/*compatibility*/ dautrack::compatibility::TPCCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
447+
/*compatibility*/ dautrack::compatibility::ITSChi2PerNcl<track::ITSChi2NCl>,
448+
449+
// dynamics to identify detectors
450+
dautrack::HasITS<dautrack::DetectorMap>,
451+
dautrack::HasTPC<dautrack::DetectorMap>,
452+
dautrack::HasTRD<dautrack::DetectorMap>,
453+
dautrack::HasTOF<dautrack::DetectorMap>);
454+
420455
DECLARE_SOA_TABLE(DauTrackMCIds, "AOD", "DAUTRACKMCID", // index table when using AO2Ds
421456
dautrack::ParticleMCId);
422457

423-
using DauTrackExtras = DauTrackExtras_002;
458+
using DauTrackExtras = DauTrackExtras_003;
424459
using DauTrackExtra = DauTrackExtras::iterator;
425460

426461
namespace motherParticle

PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ o2physics_add_dpl_workflow(stradautracksextraconverter2
1919
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
2020
COMPONENT_NAME Analysis)
2121

22+
o2physics_add_dpl_workflow(stradautracksextraconverter3
23+
SOURCES stradautracksextraconverter3.cxx
24+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
25+
COMPONENT_NAME Analysis)
26+
2227
o2physics_add_dpl_workflow(strarawcentsconverter
2328
SOURCES strarawcentsconverter.cxx
2429
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 2 to 3
21+
struct stradautracksextraconverter3 {
22+
Produces<aod::DauTrackExtras_003> dauTrackExtras_003;
23+
24+
void process(aod::DauTrackExtras_002 const& dauTrackExtras_002)
25+
{
26+
for (auto& values : dauTrackExtras_002) {
27+
dauTrackExtras_003(values.itsChi2PerNcl(),
28+
-1 /* dummy tpcChi2PerNcl value */,
29+
values.detectorMap(),
30+
values.itsClusterSizes(),
31+
values.tpcNClsFindable(),
32+
values.tpcNClsFindableMinusFound(),
33+
values.tpcNClsFindableMinusCrossedRows(),
34+
-1 /* dummy tpcNClsShared value */);
35+
}
36+
}
37+
};
38+
39+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
40+
{
41+
return WorkflowSpec{
42+
adaptAnalysisTask<stradautracksextraconverter3>(cfgc)};
43+
}

PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,11 +694,13 @@ struct strangederivedbuilder {
694694
for (auto const& tr : tracksExtra) {
695695
if (trackMap[tr.globalIndex()] >= 0) {
696696
dauTrackExtras(tr.itsChi2NCl(),
697+
tr.tpcChi2NCl(),
697698
tr.detectorMap(),
698699
tr.itsClusterSizes(),
699700
tr.tpcNClsFindable(),
700701
tr.tpcNClsFindableMinusFound(),
701-
tr.tpcNClsFindableMinusCrossedRows());
702+
tr.tpcNClsFindableMinusCrossedRows(),
703+
tr.tpcNClsShared());
702704
}
703705
}
704706
// done!
@@ -788,11 +790,13 @@ struct strangederivedbuilder {
788790
for (auto const& tr : tracksExtra) {
789791
if (trackMap[tr.globalIndex()] >= 0) {
790792
dauTrackExtras(tr.itsChi2NCl(),
793+
tr.tpcChi2NCl(),
791794
tr.detectorMap(),
792795
tr.itsClusterSizes(),
793796
tr.tpcNClsFindable(),
794797
tr.tpcNClsFindableMinusFound(),
795-
tr.tpcNClsFindableMinusCrossedRows());
798+
tr.tpcNClsFindableMinusCrossedRows(),
799+
tr.tpcNClsShared());
796800

797801
// _________________________________________
798802
// if the table has MC info

0 commit comments

Comments
 (0)