Skip to content

Commit 7d33c87

Browse files
authored
[PWGLF] Add THnsparse for MC related flow study (#10260)
1 parent c3f1685 commit 7d33c87

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

PWGLF/Tasks/Resonances/phipbpb.cxx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ struct phipbpb {
255255
// weight
256256
histos.add("hSparsePhiMCGenWeight", "hSparsePhiMCGenWeight", HistType::kTHnSparseD, {thnAxisCentrality, {36, 0.0f, TMath::Pi()}, {400, 0.0f, 1}, thnAxisPt, {8, -0.8, 0.8}});
257257
histos.add("hSparsePhiMCRecWeight", "hSparsePhiMCRecWeight", HistType::kTHnSparseD, {thnAxisCentrality, {36, 0.0f, TMath::Pi()}, {400, 0.0f, 1}, thnAxisPt, {8, -0.8, 0.8}});
258+
histos.add("hSparsePhiMCGenKaonWeight", "hSparsePhiMCGenKaonWeight", HistType::kTHnSparseD, {thnAxisCentrality, {36, 0.0f, TMath::Pi()}, {400, 0.0f, 1}, axisPtKaonWeight, {8, -0.8, 0.8}});
259+
histos.add("hSparsePhiMCRecKaonWeight", "hSparsePhiMCRecKaonWeight", HistType::kTHnSparseD, {thnAxisCentrality, {36, 0.0f, TMath::Pi()}, {400, 0.0f, 1}, axisPtKaonWeight, {8, -0.8, 0.8}});
260+
histos.add("hSparsePhiMCRecKaonMissMatchWeight", "hSparsePhiMCRecKaonMissMatchWeight", HistType::kTHnSparseD, {thnAxisCentrality, {36, 0.0f, TMath::Pi()}, {400, 0.0f, 1}, axisPtKaonWeight, {8, -0.8, 0.8}});
258261

259262
histos.add("hImpactParameter", "Impact parameter", kTH1F, {{200, 0.0f, 20.0f}});
260263
histos.add("hEventPlaneAngle", "hEventPlaneAngle", kTH1F, {{200, -2.0f * TMath::Pi(), 2.0f * TMath::Pi()}});
@@ -1038,13 +1041,15 @@ struct phipbpb {
10381041
return;
10391042
}
10401043
for (auto& RecCollision : RecCollisions) {
1041-
auto psiFT0C = evPhi;
1042-
if (!RecCollision.sel8()) {
1044+
auto psiFT0C = TrueCollision.eventPlaneAngle();
1045+
/*
1046+
if (!RecCollision.sel8()) {
10431047
continue;
10441048
}
10451049
if (!RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
1046-
continue;
1050+
continue;
10471051
}
1052+
*/
10481053
if (TMath::Abs(RecCollision.posZ()) > cfgCutVertex) {
10491054
continue;
10501055
}
@@ -1055,6 +1060,16 @@ struct phipbpb {
10551060
if (!track1.has_mcParticle()) {
10561061
continue;
10571062
}
1063+
1064+
const auto mctrack1 = track1.mcParticle();
1065+
1066+
if (selectionTrack(track1) && selectionPIDpTdependent(track1) && TMath::Abs(mctrack1.pdgCode()) == 321 && mctrack1.isPhysicalPrimary()) {
1067+
histos.fill(HIST("hSparsePhiMCRecKaonWeight"), centclass, GetPhiInRange(mctrack1.phi() - psiFT0C), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(mctrack1.phi() - psiFT0C)), 2.0), mctrack1.pt(), mctrack1.eta());
1068+
}
1069+
1070+
if (selectionTrack(track1) && track1.pt() > 0.5 && track1.hasTOF() && TMath::Abs(track1.tofNSigmaKa()) > nsigmaCutTOF && TMath::Abs(track1.tpcNSigmaKa()) < nsigmaCutTPC && TMath::Abs(mctrack1.pdgCode()) == 321 && mctrack1.isPhysicalPrimary()) {
1071+
histos.fill(HIST("hSparsePhiMCRecKaonMissMatchWeight"), centclass, GetPhiInRange(mctrack1.phi() - psiFT0C), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(mctrack1.phi() - psiFT0C)), 2.0), mctrack1.pt(), mctrack1.eta());
1072+
}
10581073
auto track1ID = track1.index();
10591074
for (auto track2 : Rectrackspart) {
10601075
if (!track2.has_mcParticle()) {
@@ -1064,7 +1079,6 @@ struct phipbpb {
10641079
if (track2ID <= track1ID) {
10651080
continue;
10661081
}
1067-
const auto mctrack1 = track1.mcParticle();
10681082
const auto mctrack2 = track2.mcParticle();
10691083
int track1PDG = TMath::Abs(mctrack1.pdgCode());
10701084
int track2PDG = TMath::Abs(mctrack2.pdgCode());
@@ -1109,6 +1123,11 @@ struct phipbpb {
11091123
}
11101124
// loop over generated particle
11111125
for (auto& mcParticle : GenParticles) {
1126+
if (TMath::Abs(mcParticle.eta()) > 0.8) // main acceptance
1127+
continue;
1128+
if (TMath::Abs(mcParticle.pdgCode()) == 321 && mcParticle.isPhysicalPrimary()) {
1129+
histos.fill(HIST("hSparsePhiMCGenKaonWeight"), centclass, GetPhiInRange(mcParticle.phi() - psiFT0C), TMath::Power(TMath::Cos(2.0 * GetPhiInRange(mcParticle.phi() - psiFT0C)), 2.0), mcParticle.pt(), mcParticle.eta());
1130+
}
11121131
if (TMath::Abs(mcParticle.y()) > confRapidity) {
11131132
continue;
11141133
}

0 commit comments

Comments
 (0)