Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions PWGCF/FemtoWorld/Core/FemtoWorldContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 <typename T>
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 <typename T1, typename T2>
void init(HistogramRegistry* registry, T1& kstarBins, T1& multBins, T1& kTBins, T1& mTBins, T2& phiBins, T2& etaBins)
{
mHistogramRegistry = registry;
std::string femtoObs;
Expand All @@ -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;
Comment on lines +80 to +81

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In O2 CommonConstants/MathConstants.h you have these constants defined if you want to use them


framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};

std::string folderName = static_cast<std::string>(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});
Expand All @@ -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
Expand All @@ -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;
}
Comment on lines +127 to +132

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above


if (mHistogramRegistry) {
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDist"), femtoObs);
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkT"), kT);
Expand All @@ -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);
}
}

Expand All @@ -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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

};

} // namespace o2::analysis::femtoWorld

#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ */
#endif /* FEMTOWORDLCONTAINER_H_ */
6 changes: 3 additions & 3 deletions PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -200,4 +200,4 @@ class FemtoWorldDetaDphiStar
} /* namespace femtoWorld */
} /* namespace o2::analysis */

#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ */
#endif /* FEMTOWORLDDETADPHISTAR_H_ */
6 changes: 3 additions & 3 deletions PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -56,4 +56,4 @@ class FemtoWorldEventHisto
};
} // namespace o2::analysis::femtoWorld

#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ */
#endif /* FEMTOWORLDEVENTHISTO_H_ */
6 changes: 3 additions & 3 deletions PWGCF/FemtoWorld/Core/FemtoWorldMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -139,4 +139,4 @@ class FemtoWorldMath

} // namespace o2::analysis::femtoWorld

#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ */
#endif /* FEMTOWORLDMATH_H_ */
6 changes: 3 additions & 3 deletions PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <laura.serksnyte@cern.ch>, 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"

Expand Down Expand Up @@ -90,4 +90,4 @@ class FemtoWorldPairCleaner
};
} // namespace o2::analysis::femtoWorld

#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ */
#endif /* FEMTOWORLDPAIRCLEANER_H_ */
6 changes: 3 additions & 3 deletions PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -102,4 +102,4 @@ class FemtoWorldParticleHisto
};
} // namespace o2::analysis::femtoWorld

#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ */
#endif /* FEMTOWORLDPARTICLEHISTO_H_ */
4 changes: 2 additions & 2 deletions PWGCF/FemtoWorld/Core/FemtoWorldUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ struct femtoWorldPairTaskTrackTrack {
Configurable<int> ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"};
Configurable<bool> ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"};
Configurable<bool> ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"};
Configurable<int> ConfPhiBins{"ConfPhiBins", 15, "Number of phi bins in deta dphi"};
Configurable<int> ConfEtaBins{"ConfEtaBins", 15, "Number of eta bins in deta dphi"};

FemtoWorldContainer<femtoWorldContainer::EventType::same, femtoWorldContainer::Observable::kstar> sameEventCont;

Expand All @@ -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) {
Expand Down