Skip to content
Merged
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
37 changes: 36 additions & 1 deletion PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// 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.
#ifndef PWGLF_DATAMODEL_LFSTRANGENESSTABLES_H_

Check warning on line 11 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
#define PWGLF_DATAMODEL_LFSTRANGENESSTABLES_H_

#include <cmath>
Expand Down Expand Up @@ -298,10 +298,10 @@
// Daughter track declarations for derived data analysis
// These definitions are for the first version of the table
// The latest version will inherit most properties from TracksExtra
DECLARE_SOA_COLUMN(ITSChi2PerNcl, itsChi2PerNcl, float); //! ITS chi2 per N cluster

Check warning on line 301 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DetectorMap, detectorMap, uint8_t); //! detector map for reference (see DetectorMapEnum)
DECLARE_SOA_COLUMN(ITSClusterSizes, itsClusterSizes, uint32_t); //! ITS cluster sizes per layer

Check warning on line 303 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCClusters, tpcClusters, uint8_t); //! N TPC clusters

Check warning on line 304 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCCrossedRows, tpcCrossedRows, uint8_t); //! N TPC clusters

//______________________________________________________
Expand Down Expand Up @@ -417,10 +417,45 @@
dautrack::HasTRD<dautrack::DetectorMap>,
dautrack::HasTOF<dautrack::DetectorMap>);

DECLARE_SOA_TABLE_VERSIONED(DauTrackExtras_003, "AOD", "DAUTRACKEXTRA", 3, //! detector properties of decay daughters
track::ITSChi2NCl,
track::TPCChi2NCl,
dautrack::DetectorMap, // here we don´t save everything so we simplify this
track::ITSClusterSizes,
track::TPCNClsFindable,
track::TPCNClsFindableMinusFound,
track::TPCNClsFindableMinusCrossedRows,
track::TPCNClsShared,

// Dynamics for ITS matching TracksExtra
track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::v001::ITSClsSizeInLayer<track::ITSClusterSizes>,
track::v001::ITSClusterMap<track::ITSClusterSizes>,
track::v001::ITSNCls<track::ITSClusterSizes>,
track::v001::IsITSAfterburner<track::v001::DetectorMap, track::ITSChi2NCl>,
/*compatibility*/ dautrack::HasITSTracker<dautrack::DetectorMap, track::ITSChi2NCl>,
/*compatibility*/ dautrack::HasITSAfterburner<dautrack::DetectorMap, track::ITSChi2NCl>,

// dynamics for TPC tracking properties matching main data model
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
/*compatibility*/ dautrack::compatibility::TPCClusters<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
/*compatibility*/ dautrack::compatibility::TPCCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
/*compatibility*/ dautrack::compatibility::ITSChi2PerNcl<track::ITSChi2NCl>,

// dynamics to identify detectors
dautrack::HasITS<dautrack::DetectorMap>,
dautrack::HasTPC<dautrack::DetectorMap>,
dautrack::HasTRD<dautrack::DetectorMap>,
dautrack::HasTOF<dautrack::DetectorMap>);

DECLARE_SOA_TABLE(DauTrackMCIds, "AOD", "DAUTRACKMCID", // index table when using AO2Ds
dautrack::ParticleMCId);

using DauTrackExtras = DauTrackExtras_002;
using DauTrackExtras = DauTrackExtras_003;
using DauTrackExtra = DauTrackExtras::iterator;

namespace motherParticle
Expand Down Expand Up @@ -589,7 +624,7 @@
// Distance Over To Mom
DECLARE_SOA_DYNAMIC_COLUMN(DistOverTotMom, distovertotmom, //! PV to V0decay distance over total momentum
[](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) {
float P = RecoDecay::sqrtSumOfSquares(Px, Py, Pz);

Check warning on line 627 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
return std::sqrt(std::pow(X - pvX, 2) + std::pow(Y - pvY, 2) + std::pow(Z - pvZ, 2)) / (P + 1E-10);
});

Expand Down Expand Up @@ -625,14 +660,14 @@
DECLARE_SOA_DYNAMIC_COLUMN(PFracPos, pfracpos,
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) {
float ppos = RecoDecay::sqrtSumOfSquares(pxpos, pypos, pzpos);
float PV0 = RecoDecay::sqrtSumOfSquares(pxpos + pxneg, pypos + pyneg, pzpos + pzneg);

Check warning on line 663 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
return (ppos / PV0);
});

DECLARE_SOA_DYNAMIC_COLUMN(PFracNeg, pfracneg,
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) {
float pneg = RecoDecay::sqrtSumOfSquares(pxneg, pyneg, pzneg);
float PV0 = RecoDecay::sqrtSumOfSquares(pxpos + pxneg, pypos + pyneg, pzpos + pzneg);

Check warning on line 670 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
return (pneg / PV0);
});

Expand Down
5 changes: 5 additions & 0 deletions PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ o2physics_add_dpl_workflow(stradautracksextraconverter2
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(stradautracksextraconverter3
SOURCES stradautracksextraconverter3.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,43 @@
// 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 2 to 3
struct stradautracksextraconverter3 {
Produces<aod::DauTrackExtras_003> dauTrackExtras_003;

void process(aod::DauTrackExtras_002 const& dauTrackExtras_002)
{
for (auto& values : dauTrackExtras_002) {
dauTrackExtras_003(values.itsChi2PerNcl(),
-1 /* dummy tpcChi2PerNcl value */,
values.detectorMap(),
values.itsClusterSizes(),
values.tpcNClsFindable(),
values.tpcNClsFindableMinusFound(),
values.tpcNClsFindableMinusCrossedRows(),
-1 /* dummy tpcNClsShared value */);
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<stradautracksextraconverter3>(cfgc)};
}
8 changes: 6 additions & 2 deletions PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,13 @@ struct strangederivedbuilder {
for (auto const& tr : tracksExtra) {
if (trackMap[tr.globalIndex()] >= 0) {
dauTrackExtras(tr.itsChi2NCl(),
tr.tpcChi2NCl(),
tr.detectorMap(),
tr.itsClusterSizes(),
tr.tpcNClsFindable(),
tr.tpcNClsFindableMinusFound(),
tr.tpcNClsFindableMinusCrossedRows());
tr.tpcNClsFindableMinusCrossedRows(),
tr.tpcNClsShared());
}
}
// done!
Expand Down Expand Up @@ -788,11 +790,13 @@ struct strangederivedbuilder {
for (auto const& tr : tracksExtra) {
if (trackMap[tr.globalIndex()] >= 0) {
dauTrackExtras(tr.itsChi2NCl(),
tr.tpcChi2NCl(),
tr.detectorMap(),
tr.itsClusterSizes(),
tr.tpcNClsFindable(),
tr.tpcNClsFindableMinusFound(),
tr.tpcNClsFindableMinusCrossedRows());
tr.tpcNClsFindableMinusCrossedRows(),
tr.tpcNClsShared());

// _________________________________________
// if the table has MC info
Expand Down
Loading
Loading