diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h b/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h index 43b822dbbb1..0c04876288f 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldContainer.h @@ -23,6 +23,7 @@ #include "Math/Vector4D.h" #include "TMath.h" #include "TDatabasePDG.h" +#include "TLorentzVector.h" #include "CommonConstants/MathConstants.h" using namespace o2::constants::math; @@ -66,8 +67,10 @@ class FemtoWorldContainer /// \param mTBins mT binning for the histograms /// \param etaBins mT binning for the histograms /// \param phiBins mT binning for the histograms + /// \param mInvBins mT binning for the histograms + template - void init(HistogramRegistry* registry, T1& kstarBins, T1& multBins, T1& kTBins, T1& mTBins, T2& phiBins, T2& etaBins) + void init(HistogramRegistry* registry, T1& kstarBins, T1& multBins, T1& kTBins, T1& mTBins, T2& phiBins, T2& etaBins, T2& mInvBins) { mHistogramRegistry = registry; std::string femtoObs; @@ -85,6 +88,7 @@ class FemtoWorldContainer framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh}; framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0}; + framework::AxisSpec mInvAxis = {mInvBins, 0.0, 10.0}; std::string folderName = static_cast(mFolderSuffix[mEventType]); mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("Name; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); @@ -98,6 +102,7 @@ class FemtoWorldContainer 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}); + mHistogramRegistry->add((folderName + "relPairInvariantMass").c_str(), ";M_{#pi^{+}#pi^{-}} (GeV/#it{c}^{2});", kTH1D, {mInvAxis}); } /// Set the PDG codes of the two particles involved @@ -125,14 +130,24 @@ class FemtoWorldContainer 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 += TwoPI; } while (delta_phi > mPhiHigh) { delta_phi -= TwoPI; } + TLorentzVector part1Vec; + part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne); + TLorentzVector part2Vec; + part2Vec.SetPtEtaPhiM(part2.pt(), part2.eta(), part2.phi(), mMassTwo); + + TLorentzVector sumVec(part1Vec); + sumVec += part2Vec; + if (mHistogramRegistry) { + mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairInvariantMass"), sumVec.M()); + } if (mHistogramRegistry) { mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDist"), femtoObs); diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h b/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h index 927f5643e7e..a7dea558ef6 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h @@ -49,6 +49,7 @@ class FemtoWorldParticleHisto 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}}); + mHistogramRegistry->add((folderName + "/dEdxTPCVsMomentum").c_str(), "; #it{p} (GeV/#it{c}); dE/dx (keV/cm)", kTH2F, {{100, 0., 5.}, {250, 0., 500.}}); /// Particle-type specific histograms if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kTrack) { @@ -76,6 +77,7 @@ class FemtoWorldParticleHisto 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()); + mHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[mParticleType]) + HIST(mFolderSuffix[mFolderSuffixType]) + HIST("/dEdxTPCVsMomentum"), part.p(), part.tpcSignal()); /// Particle-type specific histograms if constexpr (mParticleType == o2::aod::femtodreamparticle::ParticleType::kTrack) { diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx index 6945d3d614e..609bd7c2332 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx @@ -50,6 +50,13 @@ static const std::vector kNsigma = {3.5f, 3.f, 2.5f}; } // namespace +namespace o2::aod +{ +using FemtoWorldParticles = soa::Join; +using FemtoWorldParticle = FemtoWorldParticles::iterator; +} // namespace o2::aod + struct femtoWorldPairTaskTrackTrack { /// Particle selection part @@ -59,26 +66,25 @@ struct femtoWorldPairTaskTrackTrack { 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 ConfPDGCodePartOne{"ConfPDGCodePartOne", 211, "Particle 1 - PDG code"}; + Configurable ConfCutPartOne{"ConfCutPartOne", 84035878, "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); - + 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 ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 211, "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); + 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; @@ -101,6 +107,7 @@ struct femtoWorldPairTaskTrackTrack { 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"}; + Configurable ConfMInvBins{"ConfMInvBins", 1000, "Number of bins in mInv distribution"}; FemtoWorldContainer sameEventCont; @@ -121,9 +128,9 @@ struct femtoWorldPairTaskTrackTrack { trackHistoPartTwo.init(&qaRegistry); } - sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins); + sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); - mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins); + mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); pairCleaner.init(&qaRegistry); if (ConfIsCPR) { @@ -145,7 +152,7 @@ struct femtoWorldPairTaskTrackTrack { /// 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) + o2::aod::FemtoWorldParticles& parts) { const auto& tmstamp = col.timestamp(); const auto& magFieldTesla = getMagneticFieldTesla(tmstamp, ccdb); @@ -205,7 +212,7 @@ struct femtoWorldPairTaskTrackTrack { /// 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) + o2::aod::FemtoWorldParticles& parts) { ColumnBinningPolicy colBinning{{CfgVtxBins, CfgMultBins}, true};