Skip to content

Commit 9ddb447

Browse files
zchochulsaganatt
andauthored
Femtoworld - Adding angular correlation analysis (#1055)
* Ifndf fixed + added detadphi histograms * Update PWGCF/FemtoWorld/Core/FemtoWorldContainer.h * Stylistic nitpicks Commiting on behalf of Zuzanna who cannot now access the computer but we want to run on Hyperloop tomorrow. Co-authored-by: Maja Kabus <8majak8@gmail.com>
1 parent 6f560b4 commit 9ddb447

8 files changed

Lines changed: 50 additions & 25 deletions

PWGCF/FemtoWorld/Core/FemtoWorldContainer.h

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
1515
/// \author Valentina Mantovani Sarti, valentina.mantovani-sarti@tum.de
1616

17-
#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_
18-
#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_
17+
#ifndef FEMTOWORDLCONTAINER_H_
18+
#define FEMTOWORDLCONTAINER_H_
1919

2020
#include "Framework/HistogramRegistry.h"
2121
#include "FemtoWorldMath.h"
@@ -61,8 +61,10 @@ class FemtoWorldContainer
6161
/// \param multBins multiplicity binning for the histograms
6262
/// \param kTBins kT binning for the histograms
6363
/// \param mTBins mT binning for the histograms
64-
template <typename T>
65-
void init(HistogramRegistry* registry, T& kstarBins, T& multBins, T& kTBins, T& mTBins)
64+
/// \param etaBins mT binning for the histograms
65+
/// \param phiBins mT binning for the histograms
66+
template <typename T1, typename T2>
67+
void init(HistogramRegistry* registry, T1& kstarBins, T1& multBins, T1& kTBins, T1& mTBins, T2& phiBins, T2& etaBins)
6668
{
6769
mHistogramRegistry = registry;
6870
std::string femtoObs;
@@ -75,8 +77,14 @@ class FemtoWorldContainer
7577
framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"};
7678
framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"};
7779

80+
mPhiLow = (-(int)(phiBins / 4) + 0.5) * 2. * TMath::Pi() / phiBins;
81+
mPhiHigh = 2 * TMath::Pi() + (-(int)(phiBins / 4) + 0.5) * 2. * TMath::Pi() / phiBins;
82+
83+
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
84+
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
85+
7886
std::string folderName = static_cast<std::string>(mFolderSuffix[mEventType]);
79-
mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis});
87+
mHistogramRegistry->add((folderName + "relPairDist").c_str(), ("Name; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis});
8088
mHistogramRegistry->add((folderName + "relPairkT").c_str(), "; #it{k}_{T} (GeV/#it{c}); Entries", kTH1F, {kTAxis});
8189
mHistogramRegistry->add((folderName + "relPairkstarkT").c_str(), ("; " + femtoObs + "; #it{k}_{T} (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, kTAxis});
8290
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
8694
mHistogramRegistry->add((folderName + "MultPtPart1").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis});
8795
mHistogramRegistry->add((folderName + "MultPtPart2").c_str(), "; #it{p} _{T} Particle 2 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis});
8896
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}});
97+
mHistogramRegistry->add((folderName + "relPairDetaDphi").c_str(), "; #Delta#varphi (rad); #Delta#eta", kTH2D, {phiAxis, etaAxis});
8998
}
9099

91100
/// Set the PDG codes of the two particles involved
@@ -112,6 +121,16 @@ class FemtoWorldContainer
112121
const float kT = FemtoWorldMath::getkT(part1, mMassOne, part2, mMassTwo);
113122
const float mT = FemtoWorldMath::getmT(part1, mMassOne, part2, mMassTwo);
114123

124+
double delta_eta = part1.eta() - part2.eta();
125+
126+
double delta_phi = part1.phi() - part2.phi();
127+
while (delta_phi < mPhiLow) {
128+
delta_phi += PIT;
129+
}
130+
while (delta_phi > mPhiHigh) {
131+
delta_phi -= PIT;
132+
}
133+
115134
if (mHistogramRegistry) {
116135
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDist"), femtoObs);
117136
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairkT"), kT);
@@ -123,6 +142,7 @@ class FemtoWorldContainer
123142
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("MultPtPart1"), part1.pt(), mult);
124143
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("MultPtPart2"), part2.pt(), mult);
125144
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("PtPart1PtPart2"), part1.pt(), part2.pt());
145+
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST("relPairDetaDphi"), delta_phi, delta_eta);
126146
}
127147
}
128148

@@ -133,8 +153,11 @@ class FemtoWorldContainer
133153
static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoWorldContainer::EventType)
134154
float mMassOne = 0.f; ///< PDG mass of particle 1
135155
float mMassTwo = 0.f; ///< PDG mass of particle 2
156+
double mPhiLow;
157+
double mPhiHigh;
158+
static constexpr double PIT = 6.28318530717958623;
136159
};
137160

138161
} // namespace o2::analysis::femtoWorld
139162

140-
#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ */
163+
#endif /* FEMTOWORDLCONTAINER_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// \brief FemtoWorldDetaDphiStar - Checks particles for the close pair rejection.
1414
/// \author Laura Serksnyte, TU München, laura.serksnyte@tum.de
1515

16-
#ifndef ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_
17-
#define ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_
16+
#ifndef FEMTOWORLDDETADPHISTAR_H_
17+
#define FEMTOWORLDDETADPHISTAR_H_
1818

1919
#include "PWGCF/DataModel/FemtoDerived.h"
2020

@@ -200,4 +200,4 @@ class FemtoWorldDetaDphiStar
200200
} /* namespace femtoWorld */
201201
} /* namespace o2::analysis */
202202

203-
#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTODETADPHISTAR_H_ */
203+
#endif /* FEMTOWORLDDETADPHISTAR_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// \brief FemtoWorldEventHisto - Histogram class for tracks, V0s and cascades
1414
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
1515

16-
#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_
17-
#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_
16+
#ifndef FEMTOWORLDEVENTHISTO_H_
17+
#define FEMTOWORLDEVENTHISTO_H_
1818

1919
#include "PWGCF/DataModel/FemtoDerived.h"
2020

@@ -56,4 +56,4 @@ class FemtoWorldEventHisto
5656
};
5757
} // namespace o2::analysis::femtoWorld
5858

59-
#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOEVENTHISTO_H_ */
59+
#endif /* FEMTOWORLDEVENTHISTO_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldMath.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// \brief Definition of the FemtoWorldMath Container for math calculations of quantities related to pairs
1414
/// \author Valentina Mantovani Sarti, TU München, valentina.mantovani-sarti@tum.de, Laura Serksnyte, TU München, laura.serksnyte@cern.ch
1515

16-
#ifndef ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_
17-
#define ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_
16+
#ifndef FEMTOWORLDMATH_H_
17+
#define FEMTOWORLDMATH_H_
1818

1919
#include "Math/Vector4D.h"
2020
#include "Math/Boost.h"
@@ -139,4 +139,4 @@ class FemtoWorldMath
139139

140140
} // namespace o2::analysis::femtoWorld
141141

142-
#endif /* ANALYSIS_TASKS_PWGCF_O2FEMTO_O2FEMTOMATH_H_ */
142+
#endif /* FEMTOWORLDMATH_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// \brief FemtoWorldPairCleaner - Makes sure only proper candidates are paired
1414
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de, Laura Serksnyte <laura.serksnyte@cern.ch>, TU München
1515

16-
#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_
17-
#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_
16+
#ifndef FEMTOWORLDPAIRCLEANER_H_
17+
#define FEMTOWORLDPAIRCLEANER_H_
1818

1919
#include "PWGCF/DataModel/FemtoDerived.h"
2020

@@ -90,4 +90,4 @@ class FemtoWorldPairCleaner
9090
};
9191
} // namespace o2::analysis::femtoWorld
9292

93-
#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOWORLDPAIRCLEANER_H_ */
93+
#endif /* FEMTOWORLDPAIRCLEANER_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// \brief FemtoWorldParticleHisto - Histogram class for tracks, V0s and cascades
1414
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
1515

16-
#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_
17-
#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_
16+
#ifndef FEMTOWORLDPARTICLEHISTO_H_
17+
#define FEMTOWORLDPARTICLEHISTO_H_
1818

1919
#include "PWGCF/DataModel/FemtoDerived.h"
2020
#include "Framework/HistogramRegistry.h"
@@ -102,4 +102,4 @@ class FemtoWorldParticleHisto
102102
};
103103
} // namespace o2::analysis::femtoWorld
104104

105-
#endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_INCLUDE_FEMTOWORLD_FEMTOPARTICLEHISTO_H_ */
105+
#endif /* FEMTOWORLDPARTICLEHISTO_H_ */

PWGCF/FemtoWorld/Core/FemtoWorldUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
///
1515
/// \author Luca Barioglio, TU München, luca.barioglio@cern.ch
1616

17-
#ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_
18-
#define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_UTILS_H_
17+
#ifndef FEMTOWORLDUTILS_H_
18+
#define FEMTOWORLDUTILS_H_
1919

2020
#include "Framework/ASoAHelpers.h"
2121
#include "PWGCF/DataModel/FemtoDerived.h"

PWGCF/FemtoWorld/Tasks/femtoWorldPairTaskTrackTrack.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ struct femtoWorldPairTaskTrackTrack {
9999
Configurable<int> ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"};
100100
Configurable<bool> ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"};
101101
Configurable<bool> ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"};
102+
Configurable<int> ConfPhiBins{"ConfPhiBins", 15, "Number of phi bins in deta dphi"};
103+
Configurable<int> ConfEtaBins{"ConfEtaBins", 15, "Number of eta bins in deta dphi"};
102104

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

@@ -119,9 +121,9 @@ struct femtoWorldPairTaskTrackTrack {
119121
trackHistoPartTwo.init(&qaRegistry);
120122
}
121123

122-
sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins);
124+
sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins);
123125
sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo);
124-
mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins);
126+
mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins);
125127
mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo);
126128
pairCleaner.init(&qaRegistry);
127129
if (ConfIsCPR) {

0 commit comments

Comments
 (0)