diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h b/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h index d3511f091df..558466e9c25 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h @@ -14,8 +14,8 @@ /// \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_ +#ifndef FEMTOWORDLCONTAINER_H_ +#define FEMTOWORDLCONTAINER_H_ #include "Framework/HistogramRegistry.h" #include "FemtoWorldMath.h" @@ -61,8 +61,10 @@ class FemtoWorldContainer /// \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) + /// \param etaBins mT binning for the histograms + /// \param phiBins mT binning for the histograms + template + void init(HistogramRegistry* registry, T1& kstarBins, T1& multBins, T1& kTBins, T1& mTBins, T2& phiBins, T2& etaBins) { mHistogramRegistry = registry; std::string femtoObs; @@ -75,8 +77,14 @@ class FemtoWorldContainer framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"}; framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"}; + mPhiLow = (-(int)(phiBins / 4) + 0.5) * 2. * TMath::Pi() / phiBins; + mPhiHigh = 2 * TMath::Pi() + (-(int)(phiBins / 4) + 0.5) * 2. * TMath::Pi() / phiBins; + + framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh}; + framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0}; + std::string folderName = static_cast(mFolderSuffix[mEventType]); - mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); + mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("Name; " + 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}); @@ -86,6 +94,7 @@ class FemtoWorldContainer 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}}); + mHistogramRegistry->add((folderName + "relPairDetaDphi").c_str(), "; #Delta#varphi (rad); #Delta#eta", kTH2D, {phiAxis, etaAxis}); } /// Set the PDG codes of the two particles involved @@ -112,6 +121,16 @@ class FemtoWorldContainer const float kT = FemtoWorldMath::getkT(part1, mMassOne, part2, mMassTwo); const float mT = FemtoWorldMath::getmT(part1, mMassOne, part2, mMassTwo); + double delta_eta = part1.eta() - part2.eta(); + + double delta_phi = part1.phi() - part2.phi(); + while (delta_phi < mPhiLow) { + delta_phi += PIT; + } + while (delta_phi > mPhiHigh) { + delta_phi -= PIT; + } + if (mHistogramRegistry) { mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDist"), femtoObs); mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkT"), kT); @@ -123,6 +142,7 @@ class FemtoWorldContainer 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()); + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDetaDphi"), delta_phi, delta_eta); } } @@ -133,8 +153,11 @@ class FemtoWorldContainer 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 + double mPhiLow; + double mPhiHigh; + static constexpr double PIT = 6.28318530717958623; }; } // namespace o2::analysis::femtoWorld -#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ */ +#endif /* FEMTOWORDLCONTAINER_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h b/PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h index 724374e3686..a40b7fa52d0 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h @@ -13,8 +13,8 @@ /// \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_ +#ifndef FEMTOWORLDDETADPHISTAR_H_ +#define FEMTOWORLDDETADPHISTAR_H_ #include "PWGCF/DataModel/FemtoDerived.h" @@ -200,4 +200,4 @@ class FemtoWorldDetaDphiStar } /* namespace femtoWorld */ } /* namespace o2::analysis */ -#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ */ +#endif /* FEMTOWORLDDETADPHISTAR_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h b/PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h index 4c1e33027fb..5bc0a6fb1ce 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h @@ -13,8 +13,8 @@ /// \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_ +#ifndef FEMTOWORLDEVENTHISTO_H_ +#define FEMTOWORLDEVENTHISTO_H_ #include "PWGCF/DataModel/FemtoDerived.h" @@ -56,4 +56,4 @@ class FemtoWorldEventHisto }; } // namespace o2::analysis::femtoWorld -#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ */ +#endif /* FEMTOWORLDEVENTHISTO_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldMath.h b/PWGCF/FemtoWorld/Core/FemtoWorldMath.h index fcebe3d9eba..400d283f49b 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldMath.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldMath.h @@ -13,8 +13,8 @@ /// \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_ +#ifndef FEMTOWORLDMATH_H_ +#define FEMTOWORLDMATH_H_ #include "Math/Vector4D.h" #include "Math/Boost.h" @@ -139,4 +139,4 @@ class FemtoWorldMath } // namespace o2::analysis::femtoWorld -#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ */ +#endif /* FEMTOWORLDMATH_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h b/PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h index 8a6b4565b88..c0cce6f7986 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h @@ -13,8 +13,8 @@ /// \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_ +#ifndef FEMTOWORLDPAIRCLEANER_H_ +#define FEMTOWORLDPAIRCLEANER_H_ #include "PWGCF/DataModel/FemtoDerived.h" @@ -90,4 +90,4 @@ class FemtoWorldPairCleaner }; } // namespace o2::analysis::femtoWorld -#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ */ +#endif /* FEMTOWORLDPAIRCLEANER_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h b/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h index 8de8ad41e0a..927f5643e7e 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h @@ -13,8 +13,8 @@ /// \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_ +#ifndef FEMTOWORLDPARTICLEHISTO_H_ +#define FEMTOWORLDPARTICLEHISTO_H_ #include "PWGCF/DataModel/FemtoDerived.h" #include "Framework/HistogramRegistry.h" @@ -102,4 +102,4 @@ class FemtoWorldParticleHisto }; } // namespace o2::analysis::femtoWorld -#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ */ +#endif /* FEMTOWORLDPARTICLEHISTO_H_ */ diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldUtils.h b/PWGCF/FemtoWorld/Core/FemtoWorldUtils.h index 6a4a3618e04..074739fff0b 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldUtils.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldUtils.h @@ -14,8 +14,8 @@ /// /// \author Luca Barioglio, TU München, luca.barioglio@cern.ch -#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_ -#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_ +#ifndef FEMTOWORLDUTILS_H_ +#define FEMTOWORLDUTILS_H_ #include "Framework/ASoAHelpers.h" #include "PWGCF/DataModel/FemtoDerived.h" diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx index 439dc2504b1..1b8052e68df 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx @@ -99,6 +99,8 @@ struct femtoWorldPairTaskTrackTrack { Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable ConfPhiBins{"ConfPhiBins", 15, "Number of phi bins in deta dphi"}; + Configurable ConfEtaBins{"ConfEtaBins", 15, "Number of eta bins in deta dphi"}; FemtoWorldContainer sameEventCont; @@ -119,9 +121,9 @@ struct femtoWorldPairTaskTrackTrack { trackHistoPartTwo.init(&qaRegistry); } - sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins); + sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins); sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); - mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins); + mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins); mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); pairCleaner.init(&qaRegistry); if (ConfIsCPR) {