From 953f08e10abe08337fe61aa61e8e53cd7ed312b7 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska Date: Thu, 21 Jul 2022 10:35:04 +0200 Subject: [PATCH 1/3] FemtoWorld_v.21.07 --- PWGCF/FemtoWorld/CMakeLists.txt | 15 + PWGCF/FemtoWorld/FemtoWorldContainer.h | 140 ++++++++++ PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h | 203 ++++++++++++++ PWGCF/FemtoWorld/FemtoWorldEventHisto.h | 59 ++++ PWGCF/FemtoWorld/FemtoWorldMath.h | 142 ++++++++++ PWGCF/FemtoWorld/FemtoWorldPairCleaner.h | 93 +++++++ PWGCF/FemtoWorld/FemtoWorldParticleHisto.h | 105 +++++++ PWGCF/FemtoWorld/FemtoWorldUtils.h | 123 +++++++++ .../femtoWorldPairTaskTrackTrack.cxx | 257 ++++++++++++++++++ 9 files changed, 1137 insertions(+) create mode 100644 PWGCF/FemtoWorld/CMakeLists.txt create mode 100644 PWGCF/FemtoWorld/FemtoWorldContainer.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldEventHisto.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldMath.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldPairCleaner.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldParticleHisto.h create mode 100644 PWGCF/FemtoWorld/FemtoWorldUtils.h create mode 100644 PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx diff --git a/PWGCF/FemtoWorld/CMakeLists.txt b/PWGCF/FemtoWorld/CMakeLists.txt new file mode 100644 index 00000000000..77bea9b453b --- /dev/null +++ b/PWGCF/FemtoWorld/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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. + +o2physics_add_dpl_workflow(femto-world-pair-track-track + SOURCES femtoWorldPairTaskTrackTrack.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/FemtoWorld/FemtoWorldContainer.h b/PWGCF/FemtoWorld/FemtoWorldContainer.h new file mode 100644 index 00000000000..d3511f091df --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldContainer.h @@ -0,0 +1,140 @@ +// 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 FemtoWorldContainer.h +/// \brief Definition of the FemtoWorldContainer +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de +/// \author Valentina Mantovani Sarti, valentina.mantovani-sarti@tum.de + +#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ +#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ + +#include "Framework/HistogramRegistry.h" +#include "FemtoWorldMath.h" + +#include "Math/Vector4D.h" +#include "TMath.h" +#include "TDatabasePDG.h" + +using namespace o2::framework; + +namespace o2::analysis::femtoWorld +{ + +namespace femtoWorldContainer +{ +/// Femtoscopic observable to be computed +enum Observable { kstar ///< kstar +}; + +/// Type of the event processind +enum EventType { same, ///< Pair from same event + mixed ///< Pair from mixed event +}; +}; // namespace femtoWorldContainer + +/// \class FemtoWorldContainer +/// \brief Container for all histogramming related to the correlation function. The two +/// particles of the pair are passed here, and the correlation function and QA histograms +/// are filled according to the specified observable +/// \tparam eventType Type of the event (same/mixed) +/// \tparam obs Observable to be computed (k*/Q_inv/...) +template +class FemtoWorldContainer +{ + public: + /// Destructor + virtual ~FemtoWorldContainer() = default; + + /// Initializes histograms for the task + /// \tparam T Type of the configurable for the axis configuration + /// \param registry Histogram registry to be passed + /// \param kstarBins k* binning for the histograms + /// \param multBins multiplicity binning for the histograms + /// \param kTBins kT binning for the histograms + /// \param mTBins mT binning for the histograms + template + void init(HistogramRegistry* registry, T& kstarBins, T& multBins, T& kTBins, T& mTBins) + { + mHistogramRegistry = registry; + std::string femtoObs; + if constexpr (mFemtoObs == femtoWorldContainer::Observable::kstar) { + femtoObs = "#it{k*} (GeV/#it{c})"; + } + std::vector tmpVecMult = multBins; + framework::AxisSpec multAxis = {tmpVecMult, "Multiplicity"}; + framework::AxisSpec femtoObsAxis = {kstarBins, femtoObs.c_str()}; + framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"}; + framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"}; + + std::string folderName = static_cast(mFolderSuffix[mEventType]); + mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); + mHistogramRegistry->add((folderName + "relPairkT").c_str(), "; #it{k}_{T} (GeV/#it{c}); Entries", kTH1F, {kTAxis}); + mHistogramRegistry->add((folderName + "relPairkstarkT").c_str(), ("; " + femtoObs + "; #it{k}_{T} (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, kTAxis}); + mHistogramRegistry->add((folderName + "relPairkstarmT").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); + mHistogramRegistry->add((folderName + "relPairkstarMult").c_str(), ("; " + femtoObs + "; Multiplicity").c_str(), kTH2F, {femtoObsAxis, multAxis}); + mHistogramRegistry->add((folderName + "kstarPtPart1").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 1 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); + mHistogramRegistry->add((folderName + "kstarPtPart2").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 2 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); + mHistogramRegistry->add((folderName + "MultPtPart1").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); + mHistogramRegistry->add((folderName + "MultPtPart2").c_str(), "; #it{p} _{T} Particle 2 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); + mHistogramRegistry->add((folderName + "PtPart1PtPart2").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); #it{p} _{T} Particle 2 (GeV/#it{c})", kTH2F, {{375, 0., 7.5}, {375, 0., 7.5}}); + } + + /// Set the PDG codes of the two particles involved + /// \param pdg1 PDG code of particle one + /// \param pdg2 PDG code of particle two + void setPDGCodes(const int pdg1, const int pdg2) + { + mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); + mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); + } + + /// Pass a pair to the container and compute all the relevant observables + /// \tparam T type of the femtoworldparticle + /// \param part1 Particle one + /// \param part2 Particle two + /// \param mult Multiplicity of the event + template + void setPair(T const& part1, T const& part2, const int mult) + { + float femtoObs; + if constexpr (mFemtoObs == femtoWorldContainer::Observable::kstar) { + femtoObs = FemtoWorldMath::getkstar(part1, mMassOne, part2, mMassTwo); + } + const float kT = FemtoWorldMath::getkT(part1, mMassOne, part2, mMassTwo); + const float mT = FemtoWorldMath::getmT(part1, mMassOne, part2, mMassTwo); + + if (mHistogramRegistry) { + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDist"), femtoObs); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkT"), kT); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkstarkT"), femtoObs, kT); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkstarmT"), femtoObs, mT); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkstarMult"), femtoObs, mult); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("kstarPtPart1"), femtoObs, part1.pt()); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("kstarPtPart2"), femtoObs, part2.pt()); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("MultPtPart1"), part1.pt(), mult); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("MultPtPart2"), part2.pt(), mult); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("PtPart1PtPart2"), part1.pt(), part2.pt()); + } + } + + protected: + HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output + static constexpr std::string_view mFolderSuffix[2] = {"SameEvent/", "MixedEvent/"}; ///< Folder naming for the output according to mEventType + static constexpr femtoWorldContainer::Observable mFemtoObs = obs; ///< Femtoscopic observable to be computed (according to femtoWorldContainer::Observable) + static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoWorldContainer::EventType) + float mMassOne = 0.f; ///< PDG mass of particle 1 + float mMassTwo = 0.f; ///< PDG mass of particle 2 +}; + +} // namespace o2::analysis::femtoWorld + +#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h b/PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h new file mode 100644 index 00000000000..724374e3686 --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h @@ -0,0 +1,203 @@ +// 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 FemtoWorldDetaDphiStar.h +/// \brief FemtoWorldDetaDphiStar - Checks particles for the close pair rejection. +/// \author Laura Serksnyte, TU München, laura.serksnyte@tum.de + +#ifndef ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ +#define ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ + +#include "PWGCF/DataModel/FemtoDerived.h" + +#include "Framework/HistogramRegistry.h" +#include + +namespace o2::analysis +{ +namespace femtoWorld +{ + +/// \class FemtoWorldDetaDphiStar +/// \brief Class to check particles for the close pair rejection. +/// \tparam partOne Type of particle 1 (Track/V0/Cascade/...) +/// \tparam partTwo Type of particle 2 (Track/V0/Cascade/...) +template +class FemtoWorldDetaDphiStar +{ + public: + /// Destructor + virtual ~FemtoWorldDetaDphiStar() = default; + /// Initalization of the histograms and setting required values + void init(HistogramRegistry* registry, HistogramRegistry* registryQA, float ldeltaPhiMax, float ldeltaEtaMax, bool lplotForEveryRadii) + { + deltaPhiMax = ldeltaPhiMax; + deltaEtaMax = ldeltaEtaMax; + plotForEveryRadii = lplotForEveryRadii; + mHistogramRegistry = registry; + mHistogramRegistryQA = registryQA; + + if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kTrack) { + std::string dirName = static_cast(dirNames[0]); + histdetadpi[0][0] = mHistogramRegistry->add((dirName + static_cast(histNames[0][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpi[0][1] = mHistogramRegistry->add((dirName + static_cast(histNames[1][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + if (plotForEveryRadii) { + for (int i = 0; i < 9; i++) { + histdetadpiRadii[0][i] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + } + } + } + if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) { + for (int i = 0; i < 2; i++) { + std::string dirName = static_cast(dirNames[1]); + histdetadpi[i][0] = mHistogramRegistry->add((dirName + static_cast(histNames[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpi[i][1] = mHistogramRegistry->add((dirName + static_cast(histNames[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + if (plotForEveryRadii) { + for (int j = 0; j < 9; j++) { + histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + } + } + } + } + } + /// Check if pair is close or not + template + bool isClosePair(Part const& part1, Part const& part2, Parts const& particles, float lmagfield) + { + magfield = lmagfield; + + if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kTrack) { + /// Track-Track combination + // check if provided particles are in agreement with the class instantiation + if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kTrack) { + LOG(fatal) << "FemtoWorldDetaDphiStar: passed arguments don't agree with FemtoWorldDetaDphiStar instantiation! Please provide kTrack,kTrack candidates."; + return false; + } + auto deta = part1.eta() - part2.eta(); + auto dphiAvg = AveragePhiStar(part1, part2, 0); + histdetadpi[0][0]->Fill(deta, dphiAvg); + if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { + return true; + } else { + histdetadpi[0][1]->Fill(deta, dphiAvg); + return false; + } + + } else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) { + /// Track-V0 combination + // check if provided particles are in agreement with the class instantiation + if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kV0) { + LOG(fatal) << "FemtoWorldDetaDphiStar: passed arguments don't agree with FemtoWorldDetaDphiStar instantiation! Please provide kTrack,kV0 candidates."; + return false; + } + + bool pass = false; + for (int i = 0; i < 2; i++) { + auto indexOfDaughter = part2.index() - 2 + i; + auto daughter = particles.begin() + indexOfDaughter; + auto deta = part1.eta() - daughter.eta(); + auto dphiAvg = AveragePhiStar(part1, *daughter, i); + histdetadpi[i][0]->Fill(deta, dphiAvg); + if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { + pass = true; + } else { + histdetadpi[i][1]->Fill(deta, dphiAvg); + } + } + return pass; + } else { + LOG(fatal) << "FemtoWorldPairCleaner: Combination of objects not defined - quitting!"; + return false; + } + } + + private: + HistogramRegistry* mHistogramRegistry = nullptr; ///< For main output + HistogramRegistry* mHistogramRegistryQA = nullptr; ///< For QA output + static constexpr std::string_view dirNames[2] = {"kTrack_kTrack/", "kTrack_kV0/"}; + + static constexpr std::string_view histNames[2][2] = {{"detadphidetadphi0Before_0", "detadphidetadphi0Before_1"}, + {"detadphidetadphi0After_0", "detadphidetadphi0After_1"}}; + static constexpr std::string_view histNamesRadii[2][9] = {{"detadphidetadphi0Before_0_0", "detadphidetadphi0Before_0_1", "detadphidetadphi0Before_0_2", + "detadphidetadphi0Before_0_3", "detadphidetadphi0Before_0_4", "detadphidetadphi0Before_0_5", + "detadphidetadphi0Before_0_6", "detadphidetadphi0Before_0_7", "detadphidetadphi0Before_0_8"}, + {"detadphidetadphi0Before_1_0", "detadphidetadphi0Before_1_1", "detadphidetadphi0Before_1_2", + "detadphidetadphi0Before_1_3", "detadphidetadphi0Before_1_4", "detadphidetadphi0Before_1_5", + "detadphidetadphi0Before_1_6", "detadphidetadphi0Before_1_7", "detadphidetadphi0Before_1_8"}}; + + static constexpr o2::aod::femtodreamparticle::ParticleType mPartOneType = partOne; ///< Type of particle 1 + static constexpr o2::aod::femtodreamparticle::ParticleType mPartTwoType = partTwo; ///< Type of particle 2 + + static constexpr float tmpRadiiTPC[9] = {85., 105., 125., 145., 165., 185., 205., 225., 245.}; + + static constexpr uint32_t kSignMinusMask = 1; + static constexpr uint32_t kSignPlusMask = 1 << 1; + static constexpr uint32_t kValue0 = 0; + + float deltaPhiMax; + float deltaEtaMax; + float magfield; + bool plotForEveryRadii = false; + + std::array, 2>, 2> histdetadpi{}; + std::array, 9>, 2> histdetadpiRadii{}; + + /// Calculate phi at all required radii stored in tmpRadiiTPC + /// Magnetic field to be provided in Tesla + template + void PhiAtRadiiTPC(const T& part, std::vector& tmpVec) + { + + float phi0 = part.phi(); + // Start: Get the charge from cutcontainer using masks + float charge = 0.; + if ((part.cut() & kSignMinusMask) == kValue0 && (part.cut() & kSignPlusMask) == kValue0) { + charge = 0; + } else if ((part.cut() & kSignPlusMask) == kSignPlusMask) { + charge = 1; + } else if ((part.cut() & kSignMinusMask) == kSignMinusMask) { + charge = -1; + } else { + LOG(fatal) << "FemtoWorldDetaDphiStar: Charge bits are set wrong!"; + } + // End: Get the charge from cutcontainer using masks + float pt = part.pt(); + for (size_t i = 0; i < 9; i++) { + tmpVec.push_back(phi0 - std::asin(0.3 * charge * 0.1 * magfield * tmpRadiiTPC[i] * 0.01 / (2. * pt))); + } + } + + /// Calculate average phi + template + float AveragePhiStar(const T1& part1, const T2& part2, int iHist) + { + std::vector tmpVec1; + std::vector tmpVec2; + PhiAtRadiiTPC(part1, tmpVec1); + PhiAtRadiiTPC(part2, tmpVec2); + const int num = tmpVec1.size(); + float dPhiAvg = 0; + for (int i = 0; i < num; i++) { + float dphi = tmpVec1.at(i) - tmpVec2.at(i); + dphi = TVector2::Phi_mpi_pi(dphi); + dPhiAvg += dphi; + if (plotForEveryRadii) { + histdetadpiRadii[iHist][i]->Fill(part1.eta() - part2.eta(), dphi); + } + } + return (dPhiAvg / (float)num); + } +}; + +} /* namespace femtoWorld */ +} /* namespace o2::analysis */ + +#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldEventHisto.h b/PWGCF/FemtoWorld/FemtoWorldEventHisto.h new file mode 100644 index 00000000000..4c1e33027fb --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldEventHisto.h @@ -0,0 +1,59 @@ +// 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 FemtoWorldEventHisto.h +/// \brief FemtoWorldEventHisto - Histogram class for tracks, V0s and cascades +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de + +#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ +#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ + +#include "PWGCF/DataModel/FemtoDerived.h" + +#include "Framework/HistogramRegistry.h" + +using namespace o2::framework; +namespace o2::analysis::femtoWorld +{ +/// \class FemtoWorldEventHisto +/// \brief Class for histogramming event properties +class FemtoWorldEventHisto +{ + public: + /// Destructor + virtual ~FemtoWorldEventHisto() = default; + /// Initializes histograms for the task + /// \param registry Histogram registry to be passed + void init(HistogramRegistry* registry) + { + mHistogramRegistry = registry; + mHistogramRegistry->add("Event/zvtxhist", "; vtx_{z} (cm); Entries", kTH1F, {{300, -12.5, 12.5}}); + mHistogramRegistry->add("Event/MultV0M", "; vMultV0M; Entries", kTH1F, {{600, 0, 600}}); + } + + /// Some basic QA of the event + /// \tparam T type of the collision + /// \param col Collision + template + void fillQA(T const& col) + { + if (mHistogramRegistry) { + mHistogramRegistry->fill(HIST("Event/zvtxhist"), col.posZ()); + mHistogramRegistry->fill(HIST("Event/MultV0M"), col.multV0M()); + } + } + + private: + HistogramRegistry* mHistogramRegistry; ///< For QA output +}; +} // namespace o2::analysis::femtoWorld + +#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldMath.h b/PWGCF/FemtoWorld/FemtoWorldMath.h new file mode 100644 index 00000000000..fcebe3d9eba --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldMath.h @@ -0,0 +1,142 @@ +// 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 FemtoWorldMath.h +/// \brief Definition of the FemtoWorldMath Container for math calculations of quantities related to pairs +/// \author Valentina Mantovani Sarti, TU München, valentina.mantovani-sarti@tum.de, Laura Serksnyte, TU München, laura.serksnyte@cern.ch + +#ifndef ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ +#define ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ + +#include "Math/Vector4D.h" +#include "Math/Boost.h" +#include "TLorentzVector.h" +#include "TMath.h" + +#include + +namespace o2::analysis::femtoWorld +{ + +/// \class FemtoWorldMath +/// \brief Container for math calculations of quantities related to pairs +class FemtoWorldMath +{ + public: + /// Compute the k* of a pair of particles + /// \tparam T type of tracks + /// \param part1 Particle 1 + /// \param mass1 Mass of particle 1 + /// \param part2 Particle 2 + /// \param mass2 Mass of particle 2 + template + static float getkstar(const T& part1, const float mass1, const T& part2, const float mass2) + { + const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1); + const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2); + const ROOT::Math::PtEtaPhiMVector trackSum = vecpart1 + vecpart2; + + const float beta = trackSum.Beta(); + const float betax = beta * std::cos(trackSum.Phi()) * std::sin(trackSum.Theta()); + const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta()); + const float betaz = beta * std::cos(trackSum.Theta()); + + ROOT::Math::PxPyPzMVector PartOneCMS(vecpart1); + ROOT::Math::PxPyPzMVector PartTwoCMS(vecpart2); + + const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz); + PartOneCMS = boostPRF(PartOneCMS); + PartTwoCMS = boostPRF(PartTwoCMS); + + const ROOT::Math::PxPyPzMVector trackRelK = PartOneCMS - PartTwoCMS; + return 0.5 * trackRelK.P(); + } + /// Compute the qij of a pair of particles + /// \tparam T type of tracks + /// \param vecparti Particle i PxPyPzMVector + /// \param vecpartj Particle j PxPyPzMVector + // The q12 components can be calculated as: + // q^mu = (p1-p2)^mu /2 - ((p1-p2)*P/(2P^2))*P^mu + // where P = p1+p2 + // Reference: https://www.annualreviews.org/doi/pdf/10.1146/annurev.nucl.55.090704.151533 + // In the following code the above written equation will be expressed as: + // q = trackDifference/2 - scaling * trackSum + // where scaling is a float number: + // scaling = trackDifference*trackSum/(2*trackSum^2) = ((p1-p2)*P/(2P^2)) + // We don't use the reduced vector - no division by 2 + template + static ROOT::Math::PxPyPzEVector getqij(const T& vecparti, const T& vecpartj) + { + ROOT::Math::PxPyPzEVector trackSum = vecparti + vecpartj; + ROOT::Math::PxPyPzEVector trackDifference = vecparti - vecpartj; + float scaling = trackDifference.Dot(trackSum) / trackSum.Dot(trackSum); + return trackDifference - scaling * trackSum; + } + + /// Compute the Q3 of a triplet of particles + /// \tparam T type of tracks + /// \param part1 Particle 1 + /// \param mass1 Mass of particle 1 + /// \param part2 Particle 2 + /// \param mass2 Mass of particle 2 + /// \param part3 Particle 3 + /// \param mass3 Mass of particle 3 + template + static float getQ3(const T& part1, const float mass1, const T& part2, const float mass2, const T& part3, const float mass3) + { + float E1 = sqrt(pow(part1.px(), 2) + pow(part1.py(), 2) + pow(part1.pz(), 2) + pow(mass1, 2)); + float E2 = sqrt(pow(part2.px(), 2) + pow(part2.py(), 2) + pow(part2.pz(), 2) + pow(mass2, 2)); + float E3 = sqrt(pow(part3.px(), 2) + pow(part3.py(), 2) + pow(part3.pz(), 2) + pow(mass3, 2)); + + const ROOT::Math::PxPyPzEVector vecpart1(part1.px(), part1.py(), part1.pz(), E1); + const ROOT::Math::PxPyPzEVector vecpart2(part2.px(), part2.py(), part2.pz(), E2); + const ROOT::Math::PxPyPzEVector vecpart3(part3.px(), part3.py(), part3.pz(), E3); + + ROOT::Math::PxPyPzEVector q12 = getqij(vecpart1, vecpart2); + ROOT::Math::PxPyPzEVector q23 = getqij(vecpart2, vecpart3); + ROOT::Math::PxPyPzEVector q31 = getqij(vecpart3, vecpart1); + + float Q32 = q12.M2() + q23.M2() + q31.M2(); + + return sqrt(-Q32); + } + + /// Compute the transverse momentum of a pair of particles + /// \tparam T type of tracks + /// \param part1 Particle 1 + /// \param mass1 Mass of particle 1 + /// \param part2 Particle 2 + /// \param mass2 Mass of particle 2 + template + static float getkT(const T& part1, const float mass1, const T& part2, const float mass2) + { + const ROOT::Math::PtEtaPhiMVector vecpart1(part1.pt(), part1.eta(), part1.phi(), mass1); + const ROOT::Math::PtEtaPhiMVector vecpart2(part2.pt(), part2.eta(), part2.phi(), mass2); + const ROOT::Math::PtEtaPhiMVector trackSum = vecpart1 + vecpart2; + return 0.5 * trackSum.Pt(); + } + + /// Compute the transverse mass of a pair of particles + /// \tparam T type of tracks + /// \param part1 Particle 1 + /// \param mass1 Mass of particle 1 + /// \param part2 Particle 2 + /// \param mass2 Mass of particle 2 + template + static float getmT(const T& part1, const float mass1, const T& part2, const float mass2) + { + return std::sqrt(std::pow(getkT(part1, mass1, part2, mass2), 2.) + std::pow(0.5 * (mass1 + mass2), 2.)); + } +}; + +} // namespace o2::analysis::femtoWorld + +#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldPairCleaner.h b/PWGCF/FemtoWorld/FemtoWorldPairCleaner.h new file mode 100644 index 00000000000..8a6b4565b88 --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldPairCleaner.h @@ -0,0 +1,93 @@ +// 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 FemtoWorldPairCleaner.h +/// \brief FemtoWorldPairCleaner - Makes sure only proper candidates are paired +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de, Laura Serksnyte , TU München + +#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ +#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ + +#include "PWGCF/DataModel/FemtoDerived.h" + +#include "Framework/HistogramRegistry.h" + +using namespace o2::framework; + +namespace o2::analysis::femtoWorld +{ + +/// \class FemtoWorldPairCleaner +/// \brief Class taking care that no autocorrelations enter the same event distribution +/// \tparam partOne Type of particle 1 (Track/V0/Cascade/...) +/// \tparam partTwo Type of particle 2 (Track/V0/Cascade/...) +template +class FemtoWorldPairCleaner +{ + public: + /// Destructor + virtual ~FemtoWorldPairCleaner() = default; + + /// Initalization of the QA histograms + /// \param registry HistogramRegistry + void init(HistogramRegistry* registry) + { + if (registry) { + mHistogramRegistry = registry; + // \todo some QA histograms like in FemtoWorld + } + } + + /// Check whether a given pair has shared tracks + /// \tparam Part Data type of the particle + /// \tparam Parts Data type of the collection of all particles + /// \param part1 Particle 1 + /// \param part2 Particle 2 + /// \param particles Collection of all particles passed to the task + /// \return Whether the pair has shared tracks + template + bool isCleanPair(Part const& part1, Part const& part2, Parts const& particles) + { + if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kTrack) { + /// Track-Track combination + if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kTrack) { + LOG(fatal) << "FemtoWorldPairCleaner: passed arguments don't agree with FemtoWorldPairCleaner instantiation! Please provide kTrack,kTrack candidates."; + return false; + } + return part1.globalIndex() != part2.globalIndex(); + } else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) { + /// Track-V0 combination + if (part2.partType() != o2::aod::femtodreamparticle::ParticleType::kV0) { + LOG(fatal) << "FemtoWorldPairCleaner: passed arguments don't agree with FemtoWorldPairCleaner instantiation! Please provide second argument kV0 candidate."; + return false; + } + uint64_t id1 = part2.index() - 2; + uint64_t id2 = part2.index() - 1; + auto daughter1 = particles.begin() + id1; + auto daughter2 = particles.begin() + id2; + if ((*daughter1).indices()[0] <= 0 && (*daughter1).indices()[1] <= 0 && (*daughter2).indices()[0] <= 0 && (*daughter2).indices()[1] <= 0) { + return true; + } + return false; + } else { + LOG(fatal) << "FemtoWorldPairCleaner: Combination of objects not defined - quitting!"; + return false; + } + } + + private: + HistogramRegistry* mHistogramRegistry; ///< For QA output + static constexpr o2::aod::femtodreamparticle::ParticleType mPartOneType = partOne; ///< Type of particle 1 + static constexpr o2::aod::femtodreamparticle::ParticleType mPartTwoType = partTwo; ///< Type of particle 2 +}; +} // namespace o2::analysis::femtoWorld + +#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldParticleHisto.h b/PWGCF/FemtoWorld/FemtoWorldParticleHisto.h new file mode 100644 index 00000000000..8de8ad41e0a --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldParticleHisto.h @@ -0,0 +1,105 @@ +// 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 FemtoWorldParticleHisto.h +/// \brief FemtoWorldParticleHisto - Histogram class for tracks, V0s and cascades +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de + +#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ +#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ + +#include "PWGCF/DataModel/FemtoDerived.h" +#include "Framework/HistogramRegistry.h" + +using namespace o2::framework; + +namespace o2::analysis::femtoWorld +{ + +/// \class FemtoWorldParticleHisto +/// \brief Class for histogramming particle properties +/// \tparam particleType Type of the particle (Track/V0/Cascade/...) +/// \tparam suffixType (optional) Takes care of the suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) +template +class FemtoWorldParticleHisto +{ + public: + /// Destructor + virtual ~FemtoWorldParticleHisto() = default; + + /// Initalization of the QA histograms + /// \param registry HistogramRegistry + void init(HistogramRegistry* registry) + { + if (registry) { + mHistogramRegistry = registry; + /// The folder names are defined by the type of the object and the suffix (if applicable) + std::string folderName = static_cast(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]); + folderName += static_cast(mFolderSuffix[mFolderSuffixType]); + + /// Histograms of the kinematic properties + mHistogramRegistry->add((folderName + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{240, 0, 6}}); + mHistogramRegistry->add((folderName + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); + mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{200, 0, 2. * M_PI}}); + + /// Particle-type specific histograms + if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kTrack) { + /// Track histograms + mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {{20, 0.5, 4.05}, {500, -5, 5}}); + } else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kV0) { + /// V0 histograms + mHistogramRegistry->add((folderName + "/hCPA").c_str(), "; #it{p}_{T} (GeV/#it{c}); cos#alpha", kTH2F, {{8, 0.3, 4.3}, {1000, 0.9, 1}}); + } else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kCascade) { + /// Cascade histograms + } else { + LOG(fatal) << "FemtoWorldParticleHisto: Histogramming for requested object not defined - quitting!"; + } + } + } + + /// Filling of the histograms + /// \tparam T Data type of the particle + /// \param part Particle + template + void fillQA(T const& part) + { + if (mHistogramRegistry) { + /// Histograms of the kinematic properties + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/hPt"), part.pt()); + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/hEta"), part.eta()); + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/hPhi"), part.phi()); + + /// Particle-type specific histograms + if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kTrack) { + /// Track histograms + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/hDCAxy"), + part.pt(), part.tempFitVar()); + } else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kV0) { + /// V0 histograms + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/hCPA"), + part.pt(), part.tempFitVar()); + } else if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kCascade) { + /// Cascade histograms + } else { + LOG(fatal) << "FemtoWorldParticleHisto: Histogramming for requested object not defined - quitting!"; + } + } + } + + private: + HistogramRegistry* mHistogramRegistry; ///< For QA output + static constexpr o2::aod::femtodreamparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis + static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below + static constexpr std::string_view mFolderSuffix[3] = {"", "_one", "_two"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) +}; +} // namespace o2::analysis::femtoWorld + +#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ */ diff --git a/PWGCF/FemtoWorld/FemtoWorldUtils.h b/PWGCF/FemtoWorld/FemtoWorldUtils.h new file mode 100644 index 00000000000..6a4a3618e04 --- /dev/null +++ b/PWGCF/FemtoWorld/FemtoWorldUtils.h @@ -0,0 +1,123 @@ +// 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 CFFilter.cxx +/// \brief Utilities for the FemtoWorld framework +/// +/// \author Luca Barioglio, TU München, luca.barioglio@cern.ch + +#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_ +#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_ + +#include "Framework/ASoAHelpers.h" +#include "PWGCF/DataModel/FemtoDerived.h" + +#include + +#include + +namespace o2::analysis::femtoWorld +{ + +enum kPIDselection { + k3d5sigma = 0, + k3sigma = 1, + k2d5sigma = 2 +}; + +enum kDetector { + kTPC = 0, + kTPCTOF = 1, + kNdetectors = 2 +}; + +/// internal function that returns the kPIDselection element corresponding to a specifica n-sigma value +/// \param nSigma number of sigmas for PID +/// \param vNsigma vector with the number of sigmas of interest +/// \return kPIDselection corresponing to n-sigma +kPIDselection getPIDselection(const float nSigma, const std::vector& vNsigma) +{ + for (int i = 0; i < (int)vNsigma.size(); i++) { + if (abs(nSigma - vNsigma[i]) < 1e-3) { + return static_cast(i); + } + } + LOG(info) << "Invalid value of nSigma: " << nSigma << ". Standard 3 sigma returned." << std::endl; + return kPIDselection::k3sigma; +} + +/// function that checks whether the PID selection specified in the vectors is fulfilled +/// \param pidcut Bit-wise container for the PID +/// \param vSpecies vector with ID corresponding to the selected species (output from cutculator) +/// \param nSpecies number of available selected species (output from cutculator) +/// \param nSigma number of sigma selection fo PID +/// \param vNsigma vector with available n-sigma selections for PID +/// \param kDetector enum corresponding to the PID technique +/// \return Whether the PID selection specified in the vectors is fulfilled +bool isPIDSelected(aod::femtodreamparticle::cutContainerType const& pidcut, std::vector const& vSpecies, int nSpecies, float nSigma, const std::vector& vNsigma, const kDetector iDet = kDetector::kTPC) +{ + bool pidSelection = true; + kPIDselection iNsigma = getPIDselection(nSigma, vNsigma); + for (auto iSpecies : vSpecies) { + //\todo we also need the possibility to specify whether the bit is true/false ->std>>vector> + // if (!((pidcut >> it.first) & it.second)) { + int bit_to_check = nSpecies * kDetector::kNdetectors * iNsigma + iSpecies * kDetector::kNdetectors + iDet; + if (!(pidcut & (1UL << bit_to_check))) { + pidSelection = false; + } + } + return pidSelection; +}; + +/// function that checks whether the PID selection specified in the vectors is fulfilled, depending on the momentum TPC or TPC+TOF PID is conducted +/// \param pidcut Bit-wise container for the PID +/// \param momentum Momentum of the track +/// \param pidThresh Momentum threshold that separates between TPC and TPC+TOF PID +/// \param vSpecies Vector with the species of interest (number returned by the CutCulator) +/// \param nSpecies number of available selected species (output from cutculator) +/// \param nSigmaTPC Number of TPC sigmas for selection +/// \param nSigmaTPCTOF Number of TPC+TOF sigmas for selection (circular selection) +/// \return Whether the PID selection is fulfilled +bool isFullPIDSelected(aod::femtodreamparticle::cutContainerType const& pidCut, float const momentum, float const pidThresh, std::vector const& vSpecies, int nSpecies, const std::vector& vNsigma = {3.5, 3., 2.5}, const float nSigmaTPC = 3.5, const float nSigmaTPCTOF = 3.5) +{ + bool pidSelection = true; + if (momentum < pidThresh) { + /// TPC PID only + pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPC, vNsigma, kDetector::kTPC); + } else { + /// TPC + TOF PID + pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPCTOF, vNsigma, kDetector::kTPCTOF); + } + return pidSelection; +}; + +/// function to retrieve the nominal mgnetic field in kG (0.1T) and convert it directly to T +/// \param timestamp timestamp corresponding the the collision +/// \param ccdb CCDB object that contains the configuration for the event +/// \return magnetic field in Tesla + +float getMagneticFieldTesla(const uint64_t& timestamp, const Service& ccdb) +{ + // TODO done only once (and not per run). Will be replaced by CCDBConfigurable + static o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp("GLO/GRP/GRP", timestamp); + if (!grpo) { + LOGF(fatal, "GRP object not found for timestamp %llu", timestamp); + return 0; + } else { + LOGF(info, "Retrieved GRP for timestamp %llu with magnetic field of %d kG", timestamp, grpo->getNominalL3Field()); + } + + return 0.1 * (grpo->getNominalL3Field()); +} + +} // namespace o2::analysis::femtoWorld + +#endif diff --git a/PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx new file mode 100644 index 00000000000..0742868edf1 --- /dev/null +++ b/PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx @@ -0,0 +1,257 @@ +// 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 femtoWorldPairTaskTrackTrack.cxx +/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de + +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/StepTHn.h" +#include +#include "DataFormatsParameters/GRPObject.h" + +#include "PWGCF/DataModel/FemtoDerived.h" +#include "FemtoWorldParticleHisto.h" +#include "FemtoWorldEventHisto.h" +#include "FemtoWorldPairCleaner.h" +#include "FemtoWorldContainer.h" +#include "FemtoWorldDetaDphiStar.h" +#include "FemtoWorldUtils.h" + +using namespace o2; +using namespace o2::analysis::femtoWorld; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +namespace +{ +static constexpr int nPart = 2; +static constexpr int nCuts = 5; +static const std::vector partNames{"PartOne", "PartTwo"}; +static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; +static const float cutsTable[nPart][nCuts]{ + {4.05f, 1.f, 3.f, 3.f, 100.f}, + {4.05f, 1.f, 3.f, 3.f, 100.f}}; + +static const std::vector kNsigma = {3.5f, 3.f, 2.5f}; + +} // namespace + +struct femtoWorldPairTaskTrackTrack { + + /// Particle selection part + + /// Table for both particles + Configurable> cfgCutTable{"cfgCutTable", {cutsTable[0], nPart, nCuts, partNames, cutNames}, "Particle selections"}; + Configurable cfgNspecies{"ccfgNspecies", 4, "Number of particle spieces with PID info"}; + + /// Particle 1 + Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 2212, "Particle 1 - PDG code"}; + Configurable ConfCutPartOne{"ConfCutPartOne", 84035877, "Particle 1 - Selection bit from cutCulator"}; + Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + + /// Partition for particle 1 + Partition partsOne = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && ((aod::femtodreamparticle::cut & ConfCutPartOne) == ConfCutPartOne); + + /// Histogramming for particle 1 + FemtoWorldParticleHisto trackHistoPartOne; + + /// Particle 2 + Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; + Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 2212, "Particle 2 - PDG code"}; + Configurable ConfCutPartTwo{"ConfCutPartTwo", 84035877, "Particle 2 - Selection bit"}; + Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + + /// Partition for particle 2 + Partition partsTwo = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && + // (aod::femtodreamparticle::pt < cfgCutTable->get("PartTwo", "MaxPt")) && + ((aod::femtodreamparticle::cut & ConfCutPartTwo) == ConfCutPartTwo); + + /// Histogramming for particle 2 + FemtoWorldParticleHisto trackHistoPartTwo; + + /// Histogramming for Event + FemtoWorldEventHisto eventHisto; + + /// The configurables need to be passed to an std::vector + std::vector vPIDPartOne, vPIDPartTwo; + + /// Correlation part + // ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + ConfigurableAxis CfgVtxBins{"CfgVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + ConfigurableAxis CfgkstarBins{"CfgkstarBins", {1500, 0., 6.}, "binning kstar"}; + ConfigurableAxis CfgkTBins{"CfgkTBins", {150, 0., 9.}, "binning kT"}; + ConfigurableAxis CfgmTBins{"CfgmTBins", {225, 0., 7.5}, "binning mT"}; + Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; + Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; + Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; + + FemtoWorldContainer sameEventCont; + + FemtoWorldContainer mixedEventCont; + FemtoWorldPairCleaner pairCleaner; + FemtoWorldDetaDphiStar pairCloseRejection; + /// Histogram output + HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject}; + + Service ccdb; /// Accessing the CCDB + + void init(InitContext&) + { + eventHisto.init(&qaRegistry); + trackHistoPartOne.init(&qaRegistry); + if (!ConfIsSame) { + trackHistoPartTwo.init(&qaRegistry); + } + + sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins); + sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins); + mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + pairCleaner.init(&qaRegistry); + if (ConfIsCPR) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, 0.01, 0.01, ConfCPRPlotPerRadii); /// \todo add config for Δη and ΔΦ cut values + } + + vPIDPartOne = ConfPIDPartOne; + vPIDPartTwo = ConfPIDPartTwo; + + /// Initializing CCDB + ccdb->setURL("http://alice-ccdb.cern.ch"); + ccdb->setCaching(true); + ccdb->setLocalObjectValidityChecking(); + + long now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + ccdb->setCreatedNotAfter(now); + } + + /// This function processes the same event and takes care of all the histogramming + /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processSameEvent(o2::aod::FemtoDreamCollision& col, + o2::aod::FemtoDreamParticles& parts) + { + const auto& tmstamp = col.timestamp(); + const auto& magFieldTesla = getMagneticFieldTesla(tmstamp, ccdb); + + auto groupPartsOne = partsOne->sliceByCached(aod::femtodreamparticle::femtoDreamCollisionId, col.globalIndex()); + + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtodreamparticle::femtoDreamCollisionId, col.globalIndex()); + + const int multCol = col.multV0M(); + eventHisto.fillQA(col); + /// Histogramming same event + for (auto& part : groupPartsOne) { + if (part.p() > cfgCutTable->get("PartOne", "MaxP") || part.pt() > cfgCutTable->get("PartOne", "MaxPt")) { + continue; + } + if (!isFullPIDSelected(part.pidcut(), part.p(), cfgCutTable->get("PartOne", "PIDthr"), vPIDPartOne, cfgNspecies, kNsigma, cfgCutTable->get("PartOne", "nSigmaTPC"), cfgCutTable->get("PartOne", "nSigmaTPCTOF"))) { + continue; + } + trackHistoPartOne.fillQA(part); + } + if (!ConfIsSame) { + for (auto& part : groupPartsTwo) { + if (part.p() > cfgCutTable->get("PartTwo", "MaxP") || part.pt() > cfgCutTable->get("PartTwo", "MaxPt")) { + continue; + } + if (!isFullPIDSelected(part.pidcut(), part.p(), cfgCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, cfgNspecies, kNsigma, cfgCutTable->get("PartTwo", "nSigmaTPC"), cfgCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + continue; + } + trackHistoPartTwo.fillQA(part); + } + } + /// Now build the combinations + for (auto& [p1, p2] : combinations(groupPartsOne, groupPartsTwo)) { + if (p1.p() > cfgCutTable->get("PartOne", "MaxP") || p1.pt() > cfgCutTable->get("PartOne", "MaxPt") || p2.p() > cfgCutTable->get("PartTwo", "MaxP") || p2.pt() > cfgCutTable->get("PartTwo", "MaxPt")) { + continue; + } + if (!isFullPIDSelected(p1.pidcut(), p1.p(), cfgCutTable->get("PartOne", "PIDthr"), vPIDPartOne, cfgNspecies, kNsigma, cfgCutTable->get("PartOne", "nSigmaTPC"), cfgCutTable->get("PartOne", "nSigmaTPCTOF")) || !isFullPIDSelected(p2.pidcut(), p2.p(), cfgCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, cfgNspecies, kNsigma, cfgCutTable->get("PartTwo", "nSigmaTPC"), cfgCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + continue; + } + + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla)) { + continue; + } + } + + // track cleaning + if (!pairCleaner.isCleanPair(p1, p2, parts)) { + continue; + } + sameEventCont.setPair(p1, p2, multCol); + } + } + + PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processSameEvent, "Enable processing same event", true); + + /// This function processes the mixed event + /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processMixedEvent(o2::aod::FemtoDreamCollisions& cols, + o2::aod::FemtoDreamParticles& parts) + { + + BinningPolicy colBinning{{CfgVtxBins, CfgMultBins}, true}; + + for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + + auto groupPartsOne = partsOne->sliceByCached(aod::femtodreamparticle::femtoDreamCollisionId, collision1.globalIndex()); + + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtodreamparticle::femtoDreamCollisionId, collision2.globalIndex()); + + const auto& tmstamp1 = collision1.timestamp(); + const auto& magFieldTesla1 = getMagneticFieldTesla(tmstamp1, ccdb); + + const auto& tmstamp2 = collision2.timestamp(); + const auto& magFieldTesla2 = getMagneticFieldTesla(tmstamp2, ccdb); + + if (magFieldTesla1 != magFieldTesla2) { + continue; + } + + /// \todo before mixing we should check whether both collisions contain a pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; + + for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + if (p1.p() > cfgCutTable->get("PartOne", "MaxP") || p1.pt() > cfgCutTable->get("PartOne", "MaxPt") || p2.p() > cfgCutTable->get("PartTwo", "MaxP") || p2.pt() > cfgCutTable->get("PartTwo", "MaxPt")) { + continue; + } + if (!isFullPIDSelected(p1.pidcut(), p1.p(), cfgCutTable->get("PartOne", "PIDthr"), vPIDPartOne, cfgNspecies, kNsigma, cfgCutTable->get("PartOne", "nSigmaTPC"), cfgCutTable->get("PartOne", "nSigmaTPCTOF")) || !isFullPIDSelected(p2.pidcut(), p2.p(), cfgCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, cfgNspecies, kNsigma, cfgCutTable->get("PartTwo", "nSigmaTPC"), cfgCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + continue; + } + + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1)) { + continue; + } + } + mixedEventCont.setPair(p1, p2, collision1.multV0M()); + } + } + } + + PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + WorkflowSpec workflow{ + adaptAnalysisTask(cfgc), + }; + return workflow; +} From 7a200b5ea8bb7b8da7be74ea90b3a10e4f1da4a7 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska Date: Thu, 21 Jul 2022 13:21:09 +0200 Subject: [PATCH 2/3] Femtoworld changes part 1 --- PWGCF/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGCF/CMakeLists.txt b/PWGCF/CMakeLists.txt index e810577ed49..f31b23ad6a3 100644 --- a/PWGCF/CMakeLists.txt +++ b/PWGCF/CMakeLists.txt @@ -13,6 +13,7 @@ add_subdirectory(Core) # add_subdirectory(DataModel) add_subdirectory(GenericFramework) add_subdirectory(FemtoDream) +add_subdirectory(FemtoWorld) add_subdirectory(MultiparticleCorrelations) add_subdirectory(Tasks) add_subdirectory(TableProducer) From 721767424da2e1914e30c8e711c5c9f9f49dc529 Mon Sep 17 00:00:00 2001 From: Zuzanna Chochulska Date: Fri, 22 Jul 2022 13:37:00 +0200 Subject: [PATCH 3/3] FemtoWorld new folders --- PWGCF/FemtoWorld/CMakeLists.txt | 9 +++++---- PWGCF/FemtoWorld/Core/CMakeLists.txt | 10 ++++++++++ PWGCF/FemtoWorld/{ => Core}/FemtoWorldContainer.h | 0 .../{ => Core}/FemtoWorldDetaDphiStar.h | 0 .../FemtoWorld/{ => Core}/FemtoWorldEventHisto.h | 0 PWGCF/FemtoWorld/{ => Core}/FemtoWorldMath.h | 0 .../FemtoWorld/{ => Core}/FemtoWorldPairCleaner.h | 0 .../{ => Core}/FemtoWorldParticleHisto.h | 0 PWGCF/FemtoWorld/{ => Core}/FemtoWorldUtils.h | 0 PWGCF/FemtoWorld/DataModel/CMakeLists.txt | 10 ++++++++++ PWGCF/FemtoWorld/TableProducer/CMakeLists.txt | 10 ++++++++++ PWGCF/FemtoWorld/Tasks/CMakeLists.txt | 15 +++++++++++++++ .../{ => Tasks}/femtoWorldPairTaskTrackTrack.cxx | 12 ++++++------ 13 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 PWGCF/FemtoWorld/Core/CMakeLists.txt rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldContainer.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldDetaDphiStar.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldEventHisto.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldMath.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldPairCleaner.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldParticleHisto.h (100%) rename PWGCF/FemtoWorld/{ => Core}/FemtoWorldUtils.h (100%) create mode 100644 PWGCF/FemtoWorld/DataModel/CMakeLists.txt create mode 100644 PWGCF/FemtoWorld/TableProducer/CMakeLists.txt create mode 100644 PWGCF/FemtoWorld/Tasks/CMakeLists.txt rename PWGCF/FemtoWorld/{ => Tasks}/femtoWorldPairTaskTrackTrack.cxx (97%) diff --git a/PWGCF/FemtoWorld/CMakeLists.txt b/PWGCF/FemtoWorld/CMakeLists.txt index 77bea9b453b..14a98889a2c 100644 --- a/PWGCF/FemtoWorld/CMakeLists.txt +++ b/PWGCF/FemtoWorld/CMakeLists.txt @@ -9,7 +9,8 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -o2physics_add_dpl_workflow(femto-world-pair-track-track - SOURCES femtoWorldPairTaskTrackTrack.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore - COMPONENT_NAME Analysis) +add_subdirectory(Core) +add_subdirectory(DataModel) +add_subdirectory(TableProducer) +add_subdirectory(Tasks) + diff --git a/PWGCF/FemtoWorld/Core/CMakeLists.txt b/PWGCF/FemtoWorld/Core/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/FemtoWorld/Core/CMakeLists.txt @@ -0,0 +1,10 @@ +# 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. diff --git a/PWGCF/FemtoWorld/FemtoWorldContainer.h b/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldContainer.h rename to PWGCF/FemtoWorld/Core/FemtoWorldContainer.h diff --git a/PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h b/PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldDetaDphiStar.h rename to PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h diff --git a/PWGCF/FemtoWorld/FemtoWorldEventHisto.h b/PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldEventHisto.h rename to PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h diff --git a/PWGCF/FemtoWorld/FemtoWorldMath.h b/PWGCF/FemtoWorld/Core/FemtoWorldMath.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldMath.h rename to PWGCF/FemtoWorld/Core/FemtoWorldMath.h diff --git a/PWGCF/FemtoWorld/FemtoWorldPairCleaner.h b/PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldPairCleaner.h rename to PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h diff --git a/PWGCF/FemtoWorld/FemtoWorldParticleHisto.h b/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldParticleHisto.h rename to PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h diff --git a/PWGCF/FemtoWorld/FemtoWorldUtils.h b/PWGCF/FemtoWorld/Core/FemtoWorldUtils.h similarity index 100% rename from PWGCF/FemtoWorld/FemtoWorldUtils.h rename to PWGCF/FemtoWorld/Core/FemtoWorldUtils.h diff --git a/PWGCF/FemtoWorld/DataModel/CMakeLists.txt b/PWGCF/FemtoWorld/DataModel/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/FemtoWorld/DataModel/CMakeLists.txt @@ -0,0 +1,10 @@ +# 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. diff --git a/PWGCF/FemtoWorld/TableProducer/CMakeLists.txt b/PWGCF/FemtoWorld/TableProducer/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/FemtoWorld/TableProducer/CMakeLists.txt @@ -0,0 +1,10 @@ +# 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. diff --git a/PWGCF/FemtoWorld/Tasks/CMakeLists.txt b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt new file mode 100644 index 00000000000..77bea9b453b --- /dev/null +++ b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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. + +o2physics_add_dpl_workflow(femto-world-pair-track-track + SOURCES femtoWorldPairTaskTrackTrack.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx similarity index 97% rename from PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx rename to PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx index 0742868edf1..439dc2504b1 100644 --- a/PWGCF/FemtoWorld/femtoWorldPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx @@ -23,12 +23,12 @@ #include "DataFormatsParameters/GRPObject.h" #include "PWGCF/DataModel/FemtoDerived.h" -#include "FemtoWorldParticleHisto.h" -#include "FemtoWorldEventHisto.h" -#include "FemtoWorldPairCleaner.h" -#include "FemtoWorldContainer.h" -#include "FemtoWorldDetaDphiStar.h" -#include "FemtoWorldUtils.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldContainer.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldUtils.h" using namespace o2; using namespace o2::analysis::femtoWorld;