Skip to content
Open
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
95 changes: 95 additions & 0 deletions PWGLF/DataModel/DrvCollisions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// 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.
#ifndef PWGLF_DATAMODEL_DRVCOLLISIONS_H_
#define PWGLF_DATAMODEL_DRVCOLLISIONS_H_

#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"

namespace o2::aod
{
namespace drvcollision
{
DECLARE_SOA_COLUMN(Timestamp, timestamp, uint64_t);
DECLARE_SOA_COLUMN(RunNumber, runNumber, int); //! Run number
DECLARE_SOA_COLUMN(GlobalBC, globalBC, uint64_t); //! Bunch crossing number (globally unique in this run)

DECLARE_SOA_INDEX_COLUMN(BC, bc); //! Most probably BC to where this collision has occured

Check failure on line 25 in PWGLF/DataModel/DrvCollisions.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(PosX, posX, float); //! X Vertex position in cm
DECLARE_SOA_COLUMN(PosY, posY, float); //! Y Vertex position in cm
DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Z Vertex position in cm
DECLARE_SOA_COLUMN(CovXX, covXX, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CovXY, covXY, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CovXZ, covXZ, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CovYY, covYY, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CovYZ, covYZ, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CovZZ, covZZ, float); //! Vertex covariance matrix
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float);
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float);
DECLARE_SOA_COLUMN(MultNTracksPVeta1, multNTracksPVeta1, int);
DECLARE_SOA_COLUMN(IsInelGt0, isInelGt0, bool);
DECLARE_SOA_COLUMN(IsInelGt1, isInelGt1, bool);
DECLARE_SOA_COLUMN(Flags, flags, uint16_t); //! Run 2: see CollisionFlagsRun2 | Run 3: see Vertex::Flags
DECLARE_SOA_COLUMN(Chi2, chi2, float); //! Chi2 of vertex fit
DECLARE_SOA_COLUMN(NumContrib, numContrib, uint16_t); //! Number of tracks used for the vertex
DECLARE_SOA_COLUMN(CollisionTime, collisionTime, float); //! Collision time in ns relative to BC stored in bc()
DECLARE_SOA_COLUMN(CollisionTimeRes, collisionTimeRes, float); //! Resolution of collision time

DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(Sign, sign, int8_t);
DECLARE_SOA_COLUMN(Signed1Pt, signed1Pt, float);
DECLARE_SOA_COLUMN(Px, px, float);
DECLARE_SOA_COLUMN(Py, py, float);
DECLARE_SOA_COLUMN(Pz, pz, float);
DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, int16_t);

Check failure on line 54 in PWGLF/DataModel/DrvCollisions.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(HasITS, hasITS, bool);
DECLARE_SOA_COLUMN(TPCNClsShared, tpcNClsShared, int16_t);

Check failure on line 56 in PWGLF/DataModel/DrvCollisions.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(ITSClusterMap, itsClusterMap, uint32_t);

Check failure on line 57 in PWGLF/DataModel/DrvCollisions.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(DcaXY, dcaXY, float);
DECLARE_SOA_COLUMN(CollisionId, collisionId, int32_t);
DECLARE_SOA_COLUMN(TPCNSigmaPi, tpcNSigmaPi, float);

Check failure on line 60 in PWGLF/DataModel/DrvCollisions.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(TPCNSigmaPr, tpcNSigmaPr, float);

Check failure on line 61 in PWGLF/DataModel/DrvCollisions.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.
} // namespace drvcollision
DECLARE_SOA_TABLE(DrvTracks, "AOD", "DRVTRACKS",
o2::soa::Index<>,
drvcollision::CollisionId,
drvcollision::Pt,
drvcollision::Eta,
drvcollision::Phi,
drvcollision::Sign,
drvcollision::Signed1Pt,
drvcollision::Px,
drvcollision::Py,
drvcollision::Pz,
drvcollision::TPCNClsCrossedRows,
drvcollision::HasITS,
drvcollision::TPCNClsShared,
drvcollision::ITSClusterMap,
drvcollision::DcaXY,
drvcollision::TPCNSigmaPi,
drvcollision::TPCNSigmaPr);

DECLARE_SOA_TABLE(DrvCollisions, "AOD", "DRVCOLLISION", //! Time and vertex information of collision
o2::soa::Index<>, drvcollision::BCId,
drvcollision::PosX, drvcollision::PosY, drvcollision::PosZ, drvcollision::MultNTracksPVeta1,
drvcollision::CovXX, drvcollision::CovXY, drvcollision::CovXZ, drvcollision::CovYY, drvcollision::CovYZ, drvcollision::CovZZ,
drvcollision::CentFT0C, drvcollision::CentFT0M, drvcollision::IsInelGt0, drvcollision::IsInelGt1, drvcollision::Flags, drvcollision::Chi2, drvcollision::NumContrib,
drvcollision::CollisionTime, drvcollision::CollisionTimeRes);

DECLARE_SOA_TABLE(BCandTime, "AOD", "BCANDTIME",
o2::soa::Index<>,
drvcollision::Timestamp,
drvcollision::RunNumber, drvcollision::GlobalBC);
} // namespace o2::aod

#endif // PWGLF_DATAMODEL_DRVCOLLISIONS_H_
54 changes: 54 additions & 0 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
namespace stracollision
{
DECLARE_SOA_DYNAMIC_COLUMN(IsUPC, isUPC, //! check whether this is a UPC or hadronic collision
[](int value) -> bool { return value <= 2 ? true : false; });

Check failure on line 51 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(TotalFV0AmplitudeA, totalFV0AmplitudeA, //! get the total sum of the FV0 A amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(TotalFT0AmplitudeA, totalFT0AmplitudeA, //! get the total sum of the FT0 A amplitudes
Expand Down Expand Up @@ -370,7 +370,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(ITSClusterMap, itsClusterMap, //! ITS cluster map, one bit per layer, starting from the innermost
[](uint32_t itsClusterSizes) -> uint8_t {
uint8_t clmap = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 373 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if ((itsClusterSizes >> (layer * 4)) & 0xf) {
clmap |= (1 << layer);
}
Expand All @@ -380,7 +380,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(ITSNCls, itsNCls, //! Number of ITS clusters
[](uint32_t itsClusterSizes) -> uint8_t {
uint8_t itsNcls = 0;
for (int layer = 0; layer < 7; layer++) {

Check failure on line 383 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if ((itsClusterSizes >> (layer * 4)) & 0xf)
itsNcls++;
}
Expand All @@ -395,7 +395,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(HasTOF, hasTOF, //! Flag to check if track has a TOF measurement
[](uint8_t detectorMap) -> bool { return detectorMap & o2::aod::track::TOF; });
DECLARE_SOA_DYNAMIC_COLUMN(HasITSTracker, hasITSTracker, //! Flag to check if track is from ITS tracker
[](uint8_t detectorMap, float itsChi2PerNcl) -> bool { return (detectorMap & o2::aod::track::ITS) ? (itsChi2PerNcl > -1e-3f) : false; });

Check failure on line 398 in PWGLF/DataModel/LFStrangenessTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
DECLARE_SOA_DYNAMIC_COLUMN(HasITSAfterburner, hasITSAfterburner, //! Flag to check if track is from ITS AB
[](uint8_t detectorMap, float itsChi2PerNcl) -> bool { return (detectorMap & o2::aod::track::ITS) ? (itsChi2PerNcl < -1e-3f) : false; });

Expand Down Expand Up @@ -912,6 +912,60 @@
v0data::IsStandardV0<v0data::V0Type>,
v0data::IsPhotonTPConly<v0data::V0Type>);

DECLARE_SOA_TABLE_STAGED(V0CoresBaseWithDua, "V0COREWITHDAU", //! core information about decay, viable with AO2Ds or derived
o2::soa::Index<>,
v0data::X, v0data::Y, v0data::Z,
v0data::PxPos, v0data::PyPos, v0data::PzPos,
v0data::PxNeg, v0data::PyNeg, v0data::PzNeg,
v0data::DCAV0Daughters, v0data::DCAPosToPV, v0data::DCANegToPV,
v0data::V0CosPA, v0data::DCAV0ToPV, v0data::V0Type,
v0data::PosTrackId, v0data::NegTrackId, v0data::CollisionId,

// Dynamic columns
v0data::Px<v0data::PxPos, v0data::PxNeg>,
v0data::Py<v0data::PyPos, v0data::PyNeg>,
v0data::Pz<v0data::PzPos, v0data::PzNeg>,
v0data::Pt<v0data::PxPos, v0data::PyPos, v0data::PxNeg, v0data::PyNeg>,
v0data::P<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::Phi<v0data::PxPos, v0data::PyPos, v0data::PxNeg, v0data::PyNeg>,
v0data::Eta<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::PtHypertriton<v0data::PxPos, v0data::PyPos, v0data::PxNeg, v0data::PyNeg>,
v0data::PtAntiHypertriton<v0data::PxPos, v0data::PyPos, v0data::PxNeg, v0data::PyNeg>,
v0data::V0Radius<v0data::X, v0data::Y>,
v0data::DistOverTotMom<v0data::X, v0data::Y, v0data::Z, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::Alpha<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::QtArm<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::PsiPair<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::PFracPos<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::PFracNeg<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>, // 24

// Invariant masses
v0data::MLambda<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MAntiLambda<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MK0Short<v0data::V0Type, v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MLambda_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MAntiLambda_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MK0Short_unchecked<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MGamma<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::MAntiHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::M<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,

// Longitudinal
v0data::YK0Short<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::YLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::YHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::YAntiHypertriton<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::Rapidity<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::NegativePt<v0data::PxNeg, v0data::PyNeg>,
v0data::PositivePt<v0data::PxPos, v0data::PyPos>,
v0data::NegativeEta<v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>,
v0data::NegativePhi<v0data::PxNeg, v0data::PyNeg>,
v0data::PositiveEta<v0data::PxPos, v0data::PyPos, v0data::PzPos>,
v0data::PositivePhi<v0data::PxPos, v0data::PyPos>,
v0data::IsStandardV0<v0data::V0Type>,
v0data::IsPhotonTPConly<v0data::V0Type>);

// extended table with expression columns that can be used as arguments of dynamic columns
// DECLARE_SOA_EXTENDED_TABLE_USER(V0Cores, V0CoresBase, "V0COREEXT", //!
// v0data::Px, v0data::Py, v0data::Pz, v0data::Pt, v0data::P, v0data::Phi, v0data::Eta); // the table name has here to be the one with EXT which is not nice and under study
Expand Down
5 changes: 5 additions & 0 deletions PWGLF/TableProducer/Strangeness/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ if(FastJet_FOUND)
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::PWGJECore FastJet::FastJet FastJet::Contrib O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)
endif()

o2physics_add_dpl_workflow(hstrangederiveddata
SOURCES hStrangeDerivedData.cxx
PUBLIC_LINK_LIBRARIES O2::DCAFitter O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)
Loading
Loading