Skip to content
Open
3 changes: 2 additions & 1 deletion Common/TableProducer/propagationService.cxx
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 failure on line 1 in Common/TableProducer/propagationService.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -77,6 +77,7 @@
o2::pwglf::strangenessbuilder::v0Configurables v0BuilderOpts;
o2::pwglf::strangenessbuilder::cascadeConfigurables cascadeBuilderOpts;
o2::pwglf::strangenessbuilder::preSelectOpts preSelectOpts;
o2::pwglf::strangenessbuilder::eventSelectOpts eventSelectOpts;
o2::pwglf::strangenessbuilder::BuilderModule strangenessBuilderModule;

// the track tuner object -> needs to be here as it inherits from ConfigurableGroup (+ has its own copy of ccdbApi)
Expand All @@ -99,7 +100,7 @@

// task-specific
trackPropagation.init(trackPropagationConfigurables, trackTunerObj, histos, initContext);
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, histos, initContext);
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, eventSelectOpts, histos, initContext);
}

void processRealData(soa::Join<aod::Collisions, aod::EvSels> const& collisions, aod::V0s const& v0s, aod::Cascades const& cascades, aod::TrackedCascades const& trackedCascades, FullTracksExtIU const& tracks, aod::BCsWithTimestamps const& bcs)
Expand Down
3 changes: 2 additions & 1 deletion Common/TableProducer/propagationServiceRun2.cxx
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 failure on line 1 in Common/TableProducer/propagationServiceRun2.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -75,6 +75,7 @@
o2::pwglf::strangenessbuilder::v0Configurables v0BuilderOpts;
o2::pwglf::strangenessbuilder::cascadeConfigurables cascadeBuilderOpts;
o2::pwglf::strangenessbuilder::preSelectOpts preSelectOpts;
o2::pwglf::strangenessbuilder::eventSelectOpts eventSelectOpts;
o2::pwglf::strangenessbuilder::BuilderModule strangenessBuilderModule;

// registry
Expand All @@ -89,7 +90,7 @@
ccdb->setFatalWhenNull(false);

// task-specific
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, histos, initContext);
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, eventSelectOpts, histos, initContext);
}

void processRealData(soa::Join<aod::Collisions, aod::EvSels> const& collisions, aod::V0s const& v0s, aod::Cascades const& cascades, FullTracksExt const& tracks, aod::BCsWithTimestamps const& bcs)
Expand Down
3 changes: 2 additions & 1 deletion Common/TableProducer/propagationServiceV2.cxx
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 failure on line 1 in Common/TableProducer/propagationServiceV2.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -82,6 +82,7 @@
o2::pwglf::strangenessbuilder::v0Configurables v0BuilderOpts;
o2::pwglf::strangenessbuilder::cascadeConfigurables cascadeBuilderOpts;
o2::pwglf::strangenessbuilder::preSelectOpts preSelectOpts;
o2::pwglf::strangenessbuilder::eventSelectOpts eventSelectOpts;
o2::pwglf::strangenessbuilder::BuilderModule strangenessBuilderModule;

// the track tuner object -> needs to be here as it inherits from ConfigurableGroup (+ has its own copy of ccdbApi)
Expand All @@ -106,7 +107,7 @@

// task-specific
trackPropagation.init(trackPropagationConfigurables, trackTunerObj, histos, initContext);
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, histos, initContext);
strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, eventSelectOpts, histos, initContext);
}

// Load MatLUT once (needs rectifyPtrFromFile, kept manual), set B-field and mean vertex
Expand Down
12 changes: 11 additions & 1 deletion PWGLF/DataModel/LFStrangenessPIDTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@
namespace dautrack_legacy
{
// ==== LEGACY TPC INFORMATION (full size tables) ===
DECLARE_SOA_COLUMN(TPCNSigmaEl, tpcNSigmaEl, float); //! Nsigma proton

Check failure on line 85 in PWGLF/DataModel/LFStrangenessPIDTables.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(TPCNSigmaPi, tpcNSigmaPi, float); //! Nsigma proton

Check failure on line 86 in PWGLF/DataModel/LFStrangenessPIDTables.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(TPCNSigmaKa, tpcNSigmaKa, float); //! Nsigma proton

Check failure on line 87 in PWGLF/DataModel/LFStrangenessPIDTables.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); //! Nsigma proton

Check failure on line 88 in PWGLF/DataModel/LFStrangenessPIDTables.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(TPCNSigmaHe, tpcNSigmaHe, float); //! Nsigma proton

Check failure on line 89 in PWGLF/DataModel/LFStrangenessPIDTables.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 dautrack_legacy

namespace dautrack
{
// ==== COMPACT TPC INFORMATION (full size tables) ===
DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); //! track TPC signal

Check failure on line 95 in PWGLF/DataModel/LFStrangenessPIDTables.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(PackedTPCNSigmaEl, packedTpcNSigmaEl, int8_t); //! Nsigma proton

Check failure on line 96 in PWGLF/DataModel/LFStrangenessPIDTables.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(PackedTPCNSigmaPi, packedTpcNSigmaPi, int8_t); //! Nsigma proton
DECLARE_SOA_COLUMN(PackedTPCNSigmaKa, packedTpcNSigmaKa, int8_t); //! Nsigma proton
DECLARE_SOA_COLUMN(PackedTPCNSigmaPr, packedTpcNSigmaPr, int8_t); //! Nsigma proton
Expand Down Expand Up @@ -182,7 +182,17 @@
dautrack::TOFExpTimeKa<dautrack::Length, dautrack::TOFExpMom>,
dautrack::TOFExpTimePr<dautrack::Length, dautrack::TOFExpMom>);

using DauTrackTOFPIDs = DauTrackTOFPIDs_002; // second gen: with collision Id, with TOFExpMom
DECLARE_SOA_TABLE_VERSIONED(DauTrackTOFPIDs_003, "AOD", "DAUTRACKTOFPID", 3, // raw table (for posterior TOF calculation)
o2::soa::Index<>,
bc::GlobalBC, dautrack::DauTrackExtraId,
dautrack::TOFSignal, dautrack::TOFEvTime, dautrack::TOFEvTimeErr,
dautrack::Length, dautrack::TOFExpMom,
dautrack::TOFExpTimeEl<dautrack::Length, dautrack::TOFExpMom>,
dautrack::TOFExpTimePi<dautrack::Length, dautrack::TOFExpMom>,
dautrack::TOFExpTimeKa<dautrack::Length, dautrack::TOFExpMom>,
dautrack::TOFExpTimePr<dautrack::Length, dautrack::TOFExpMom>);

using DauTrackTOFPIDs = DauTrackTOFPIDs_003; // second gen: with collision Id, with TOFExpMom

namespace v0data
{
Expand Down
10 changes: 10 additions & 0 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ DECLARE_SOA_COLUMN(DataframeID, dataframeID, uint64_t); //! Data frame ID (what
DECLARE_SOA_TABLE(StraOrigins, "AOD", "STRAORIGIN", //! Table which contains the IDs of all dataframes merged into this dataframe
o2::soa::Index<>, straorigin::DataframeID);

// for keeping track of the number of selected collisions
namespace straselections
{
DECLARE_SOA_COLUMN(TotalNbrOfCollisions, totalNbrOfCollisions, int); //! total number of analysed collisions
DECLARE_SOA_COLUMN(TotalNbrOfSelCollisions, totalNbrOfSelCollisions, int); //! total number of selected collisions
} // namespace straselections

DECLARE_SOA_TABLE(StraSelections, "AOD", "STRASELECTIONS", //! keep track of the number of analysed collisions in this DF
o2::soa::Index<>, straselections::TotalNbrOfCollisions, straselections::TotalNbrOfSelCollisions);

namespace stracollision
{
DECLARE_SOA_DYNAMIC_COLUMN(IsUPC, isUPC, //! check whether this is a UPC or hadronic collision
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 @@ -34,6 +34,11 @@ o2physics_add_dpl_workflow(stradautrackstofpidconverter3
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(stradautrackstofpidconverter4
SOURCES stradautrackstofpidconverter4.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(stradautracksextraconverter
SOURCES stradautracksextraconverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// 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.
//
/// \file stradautrackstofpidconverter4.cxx
/// \brief Converts DauTrackTOFPID_002 into DauTrackTOFPID_003
///
/// \author David Dobrigkeit Chinellato <david.dobrigkeit.chinellato@cern.ch>, Austrian Academy of Sciences & MBI
/// \author Romain Schotter <romain.schotter@cern.ch>, Austrian Academy of Sciences & MBI

#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisTask.h>
#include <Framework/runDataProcessing.h>

using namespace o2;
using namespace o2::framework;

// converts DauTrackTOFPIDs_002 to _003
struct stradautrackstofpidconverter4 {
Produces<aod::DauTrackTOFPIDs_003> dautracktofpids;

void process(aod::DauTrackTOFPIDs_002 const& dauTracks, soa::Join<aod::StraCollisions, aod::StraStamps> const& collisions)
{
// create new TOFPIDs
dautracktofpids.reserve(dauTracks.size());
for (const auto& dauTrack : dauTracks) {
uint64_t bc = 0;
if (dauTrack.straCollisionId() >= 0) {
auto collision = collisions.rawIteratorAt(dauTrack.straCollisionId());
bc = collision.globalBC();
}
dautracktofpids(
bc,
dauTrack.dauTrackExtraId(),
dauTrack.tofSignal(),
dauTrack.tofEvTime(),
dauTrack.tofEvTimeErr(),
dauTrack.length(),
dauTrack.tofExpMom());
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<stradautrackstofpidconverter4>(cfgc)};
}
Loading
Loading