Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UPC info in the derived data producer & V0 analysis task #7526

Merged
merged 9 commits into from
Sep 9, 2024
12 changes: 6 additions & 6 deletions PWGLF/DataModel/LFStrangenessPIDTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ DECLARE_SOA_COLUMN(BachTOFEventTime, bachTOFEventTime, float); //! bachelor tr

// delta-times
DECLARE_SOA_COLUMN(PosTOFDeltaTXiPi, posTOFDeltaTXiPi, float); //! positive track TOFDeltaT from pion <- lambda <- xi expectation
DECLARE_SOA_COLUMN(PosTOFDeltaTXiPr, posTOFDeltaTXiPr, float); //! positive track TOFDeltaT from pion <- lambda <- xi expectation
DECLARE_SOA_COLUMN(PosTOFDeltaTXiPr, posTOFDeltaTXiPr, float); //! positive track TOFDeltaT from proton <- lambda <- xi expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTXiPi, negTOFDeltaTXiPi, float); //! negative track TOFDeltaT from pion <- lambda <- xi expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTXiPr, negTOFDeltaTXiPr, float); //! negative track TOFDeltaT from pion <- lambda <- xi expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTXiPr, negTOFDeltaTXiPr, float); //! negative track TOFDeltaT from proton <- lambda <- xi expectation
DECLARE_SOA_COLUMN(BachTOFDeltaTXiPi, bachTOFDeltaTXiPi, float); //! bachelor track TOFDeltaT from pion <- xi expectation
DECLARE_SOA_COLUMN(PosTOFDeltaTOmPi, posTOFDeltaTOmPi, float); //! positive track TOFDeltaT from pion <- lambda <- omega expectation
DECLARE_SOA_COLUMN(PosTOFDeltaTOmPr, posTOFDeltaTOmPr, float); //! positive track TOFDeltaT from pion <- lambda <- omega expectation
DECLARE_SOA_COLUMN(PosTOFDeltaTOmPr, posTOFDeltaTOmPr, float); //! positive track TOFDeltaT from proton <- lambda <- omega expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTOmPi, negTOFDeltaTOmPi, float); //! negative track TOFDeltaT from pion <- lambda <- omega expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTOmPr, negTOFDeltaTOmPr, float); //! negative track TOFDeltaT from pion <- lambda <- omega expectation
DECLARE_SOA_COLUMN(BachTOFDeltaTOmPi, bachTOFDeltaTOmPi, float); //! bachelor track TOFDeltaT from pion <- omega expectation
DECLARE_SOA_COLUMN(NegTOFDeltaTOmPr, negTOFDeltaTOmPr, float); //! negative track TOFDeltaT from proton <- lambda <- omega expectation
DECLARE_SOA_COLUMN(BachTOFDeltaTOmKa, bachTOFDeltaTOmKa, float); //! bachelor track TOFDeltaT from kaon <- omega expectation

// n-sigmas
DECLARE_SOA_COLUMN(TOFNSigmaXiLaPi, tofNSigmaXiLaPi, float); //! meson track NSigma from pion <- lambda <- xi expectation
Expand All @@ -170,7 +170,7 @@ DECLARE_SOA_TABLE(CascTOFPIDs, "AOD", "CASCTOFPID", // processed information for
cascdata::BachTOFDeltaTXiPi,
cascdata::PosTOFDeltaTOmPi, cascdata::PosTOFDeltaTOmPr,
cascdata::NegTOFDeltaTOmPi, cascdata::NegTOFDeltaTOmPr,
cascdata::BachTOFDeltaTOmPi);
cascdata::BachTOFDeltaTOmKa);
DECLARE_SOA_TABLE(CascTOFNSigmas, "AOD", "CascTOFNSigmas", // Nsigmas for cascades
cascdata::TOFNSigmaXiLaPi, cascdata::TOFNSigmaXiLaPr, cascdata::TOFNSigmaXiPi,
cascdata::TOFNSigmaOmLaPi, cascdata::TOFNSigmaOmLaPr, cascdata::TOFNSigmaOmKa);
Expand Down
61 changes: 60 additions & 1 deletion PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,31 @@
#include "Common/DataModel/Qvectors.h"
#include "Common/DataModel/McCollisionExtra.h"
#include "PWGLF/DataModel/EPCalibrationTables.h"
#include "PWGUD/DataModel/UDTables.h"

namespace o2::aod
{

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; });
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
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(TotalFT0AmplitudeC, totalFT0AmplitudeC, //! get the total sum of the FT0 C amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(TotalFDDAmplitudeA, totalFDDAmplitudeA, //! get the total sum of the FDD A amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(TotalFDDAmplitudeC, totalFDDAmplitudeC, //! get the total sum of the FDD C amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(EnergyCommonZNA, energyCommonZNA, //! get the total sum of the ZN A amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(EnergyCommonZNC, energyCommonZNC, //! get the total sum of the ZN A amplitudes
[](float value) -> float { return value; });
} // namespace stracollision

//______________________________________________________
// Collision declarations for derived data analysis
// this is optional but will ensure full flexibility
Expand All @@ -35,20 +56,24 @@ DECLARE_SOA_TABLE(StraCollisions, "AOD", "STRACOLLISION", //! basic collision pr
DECLARE_SOA_TABLE(StraCents, "AOD", "STRACENTS", //! centrality percentiles
cent::CentFT0M, cent::CentFT0A,
cent::CentFT0C, cent::CentFV0A);
// !!! DEPRECATED TABLE: StraRawCents_000 !!! All info in StraEvSels_001, in order to group all event characteristics in a unique table. Please use StraEvSels_001
DECLARE_SOA_TABLE(StraRawCents_000, "AOD", "STRARAWCENTS", //! debug information
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, mult::MultNTracksPVeta1);
// !!! DEPRECATED TABLE: StraRawCents_001 !!! All info in StraEvSels_001, in order to group all event characteristics in a unique table. Please use StraEvSels_001
DECLARE_SOA_TABLE_VERSIONED(StraRawCents_001, "AOD", "STRARAWCENTS", 1, //! debug information
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, // FIT detectors
mult::MultNTracksPVeta1, // track multiplicities
mult::MultZNA, mult::MultZNC, mult::MultZEM1, // ZDC signals
mult::MultZEM2, mult::MultZPA, mult::MultZPC);
// !!! DEPRECATED TABLE: StraRawCents_002 !!! All info in StraEvSels_001, in order to group all event characteristics in a unique table. Please use StraEvSels_001
DECLARE_SOA_TABLE_VERSIONED(StraRawCents_002, "AOD", "STRARAWCENTS", 2, //! debug information
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, // FIT detectors
mult::MultNTracksPVeta1, // track multiplicities with eta cut for INEL>0
mult::MultNTracksITSTPC, // track multiplicities, PV contribs, no eta cut
mult::MultAllTracksTPCOnly, mult::MultAllTracksITSTPC, // track multiplicities, all, no eta cut
mult::MultZNA, mult::MultZNC, mult::MultZEM1, // ZDC signals
mult::MultZEM2, mult::MultZPA, mult::MultZPC);
// !!! DEPRECATED TABLE: StraRawCents_003 !!! All info in StraEvSels_001, in order to group all event characteristics in a unique table. Please use StraEvSels_001
DECLARE_SOA_TABLE_VERSIONED(StraRawCents_003, "AOD", "STRARAWCENTS", 3, //! debug information
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, // FIT detectors
mult::MultNTracksPVeta1, // track multiplicities with eta cut for INEL>0
Expand All @@ -59,6 +84,7 @@ DECLARE_SOA_TABLE_VERSIONED(StraRawCents_003, "AOD", "STRARAWCENTS", 3, //!
mult::MultAllTracksITSTPC, // ITSTPC track multiplicities, all, no eta cut
mult::MultZNA, mult::MultZNC, mult::MultZEM1, // ZDC signals
mult::MultZEM2, mult::MultZPA, mult::MultZPC);
// !!! DEPRECATED TABLE: StraRawCents_004 !!! All info in StraEvSels_001, in order to group all event characteristics in a unique table. Please use StraEvSels_001
DECLARE_SOA_TABLE_VERSIONED(StraRawCents_004, "AOD", "STRARAWCENTS", 4, //! debug information
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, // FIT detectors
mult::MultNTracksPVeta1, // track multiplicities with eta cut for INEL>0
Expand All @@ -70,8 +96,40 @@ DECLARE_SOA_TABLE_VERSIONED(StraRawCents_004, "AOD", "STRARAWCENTS", 4, //!
mult::MultZNA, mult::MultZNC, mult::MultZEM1, // ZDC signals
mult::MultZEM2, mult::MultZPA, mult::MultZPC,
evsel::NumTracksInTimeRange); // add occupancy as extra
DECLARE_SOA_TABLE(StraEvSels, "AOD", "STRAEVSELS", //! event selection: sel8
DECLARE_SOA_TABLE(StraEvSels_000, "AOD", "STRAEVSELS", //! event selection: sel8
evsel::Sel8, evsel::Selection);
DECLARE_SOA_TABLE_VERSIONED(StraEvSels_001, "AOD", "STRAEVSELS", 1, //! debug information
evsel::Sel8, evsel::Selection, //! event selection: sel8
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, // FIT detectors
mult::MultFDDA, mult::MultFDDC,
mult::MultNTracksPVeta1, // track multiplicities with eta cut for INEL>0
mult::MultPVTotalContributors, // number of PV contribs total
mult::MultNTracksGlobal, // global track multiplicities
mult::MultNTracksITSTPC, // track multiplicities, PV contribs, no eta cut
mult::MultAllTracksTPCOnly, // TPConly track multiplicities, all, no eta cut
mult::MultAllTracksITSTPC, // ITSTPC track multiplicities, all, no eta cut
mult::MultZNA, mult::MultZNC, mult::MultZEM1, // ZDC signals
mult::MultZEM2, mult::MultZPA, mult::MultZPC,
evsel::NumTracksInTimeRange, // add occupancy as extra
udcollision::GapSide, // UPC info: 0 for side A, 1 for side C, 2 for both sides, 3 neither A or C, 4 not enough or too many pv contributors
udcollision::TotalFT0AmplitudeA, // UPC info: re-assigned FT0-A amplitude, in case of SG event, from the most active bc
udcollision::TotalFT0AmplitudeC, // UPC info: re-assigned FT0-C amplitude, in case of SG event, from the most active bc
udcollision::TotalFV0AmplitudeA, // UPC info: re-assigned FV0-A amplitude, in case of SG event, from the most active bc
udcollision::TotalFDDAmplitudeA, // UPC info: re-assigned FDD-A amplitude, in case of SG event, from the most active bc
udcollision::TotalFDDAmplitudeC, // UPC info: re-assigned FDD-C amplitude, in case of SG event, from the most active bc
udzdc::EnergyCommonZNA, // UPC info: re-assigned ZN-A amplitude, in case of SG event, from the most active bc
udzdc::EnergyCommonZNC, // UPC info: re-assigned ZN-C amplitude, in case of SG event, from the most active bc

// Dynamic columns for manipulating information
// stracollision::TotalFV0AmplitudeA<mult::MultFV0A>,
// stracollision::TotalFT0AmplitudeA<mult::MultFT0A>,
// stracollision::TotalFT0AmplitudeC<mult::MultFT0C>,
// stracollision::TotalFDDAmplitudeA<mult::MultFDDA>,
// stracollision::TotalFDDAmplitudeC<mult::MultFDDC>,
// stracollision::EnergyCommonZNA<mult::MultZNA>,
// stracollision::EnergyCommonZNC<mult::MultZNC>,
stracollision::IsUPC<udcollision::GapSide>);

DECLARE_SOA_TABLE(StraFT0AQVs, "AOD", "STRAFT0AQVS", //! t0a Qvec
qvec::QvecFT0ARe, qvec::QvecFT0AIm, qvec::SumAmplFT0A);
DECLARE_SOA_TABLE(StraFT0CQVs, "AOD", "STRAFT0CQVS", //! t0c Qvec
Expand All @@ -89,6 +147,7 @@ DECLARE_SOA_TABLE(StraStamps, "AOD", "STRASTAMPS", //! information for ID-ing ma
bc::RunNumber, timestamp::Timestamp);

using StraRawCents = StraRawCents_004;
using StraEvSels = StraEvSels_001;
using StraCollision = StraCollisions::iterator;
using StraCent = StraCents::iterator;

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 @@ -24,6 +24,11 @@ o2physics_add_dpl_workflow(strarawcentsconverter2v4
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

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

o2physics_add_dpl_workflow(v0coresconverter
SOURCES v0coresconverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// 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"

using namespace o2;
using namespace o2::framework;

// Converts Stra Event selections from 000 to 001
struct straevselsconverter {
Produces<aod::StraEvSels_001> straEvSels_001;

void process(soa::Join<aod::StraEvSels_000, aod::StraRawCents_004> const& straEvSels_000_RawCents_004)
{
for (auto& values : straEvSels_000_RawCents_004) {
straEvSels_001(values.sel8(),
values.selection_raw(),
values.multFT0A(),
values.multFT0C(),
values.multFT0A(),
0 /*dummy FDDA value*/,
0 /*dummy FDDC value*/,
values.multNTracksPVeta1(),
values.multPVTotalContributors(),
values.multNTracksGlobal(),
values.multNTracksITSTPC(),
values.multAllTracksTPCOnly(),
values.multAllTracksITSTPC(),
values.multZNA(),
values.multZNC(),
values.multZEM1(),
values.multZEM2(),
values.multZPA(),
values.multZPC(),
values.trackOccupancyInTimeRange(),
-1 /*dummy gap side value*/,
-999. /*dummy FT0-A value*/,
-999. /*dummy FT0-C value*/,
-999. /*dummy FV0-A value*/,
-999. /*dummy FDD-A value*/,
-999. /*dummy FDD-C value*/,
-999. /*dummy ZN-A value*/,
-999. /*dummy ZN-C value*/);
}
}
};

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