Skip to content

Commit b0ebe7f

Browse files
gmantzarBianca-Maria Popa
authored andcommitted
[PWGCF] Adding V0-V0 pair task (AliceO2Group#12614)
Co-authored-by: Bianca-Maria Popa <ge84qed@nidoking.ktas.ph.tum.de>
1 parent 49fcb73 commit b0ebe7f

File tree

3 files changed

+533
-12
lines changed

3 files changed

+533
-12
lines changed

PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_
1717
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_
1818

19+
#include "PWGCF/DataModel/FemtoDerived.h"
20+
21+
#include "Framework/HistogramRegistry.h"
22+
1923
#include <memory>
2024
#include <string>
2125
#include <vector>
22-
#include "PWGCF/DataModel/FemtoDerived.h"
23-
#include "Framework/HistogramRegistry.h"
2426

2527
using namespace o2;
2628
using namespace o2::framework;
@@ -98,6 +100,24 @@ class FemtoDreamDetaDphiStar
98100
}
99101
}
100102
}
103+
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) {
104+
for (int i = 0; i < 4; i++) {
105+
std::string dirName = static_cast<std::string>(dirNames[1]);
106+
histdetadpi[i][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[0][i]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
107+
histdetadpi[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[1][i]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
108+
histdetadpi[i][2] = mHistogramRegistry->add<TH2>((dirName + "at_PV_" + std::to_string(i) + "_before" + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
109+
histdetadpi[i][3] = mHistogramRegistry->add<TH2>((dirName + "at_PV_" + std::to_string(i) + "_after" + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
110+
if (plotForEveryRadii) {
111+
for (int j = 0; j < 9; j++) {
112+
histdetadpiRadii[i][j] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(histNamesRadii[i][j]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
113+
}
114+
}
115+
if (fillQA) {
116+
histdetadpi_eta[i] = mHistogramRegistry->add<THnSparse>((dirName + "dEtadPhi_Eta_" + std::to_string(i) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}; #eta_{1}; #eta_{2}", kTHnSparseF, {{100, -0.15, 0.15}, {100, -0.15, 0.15}, {100, -0.8, 0.8}, {100, -0.8, 0.8}});
117+
histdetadpi_phi[i] = mHistogramRegistry->add<THnSparse>((dirName + "dEtadPhi_Phi_" + std::to_string(i) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}; #phi_{1}; #phi_{2}", kTHnSparseF, {{100, -0.15, 0.15}, {100, -0.15, 0.15}, {100, 0, 6.28}, {100, 0, 6.28}});
118+
}
119+
}
120+
}
101121
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) {
102122
for (int i = 0; i < Nprongs; i++) {
103123
std::string dirName = static_cast<std::string>(dirNames[2]);
@@ -293,6 +313,86 @@ class FemtoDreamDetaDphiStar
293313
}
294314
}
295315
}
316+
return pass;
317+
} else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) {
318+
/// V0-V0 combination
319+
// check if provided particles are in agreement with the class instantiation
320+
if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kV0) {
321+
LOG(fatal) << "FemtoDreamDetaDphiStar: passed arguments don't agree with FemtoDreamDetaDphiStar instantiation! Please provide kV0,kV0 candidates.";
322+
return false;
323+
}
324+
325+
bool pass = false;
326+
int nhist = 0;
327+
for (int i = 0; i < 2; i++) {
328+
int indexOfDaughterPart1, indexOfDaughterPart2;
329+
for (int j = 0; j < 2; j++) {
330+
if (isMixedEventLambda) {
331+
indexOfDaughterPart1 = part1.globalIndex() - 2 + i;
332+
indexOfDaughterPart2 = part2.globalIndex() - 2 + j;
333+
} else {
334+
indexOfDaughterPart1 = part1.index() - 2 + i;
335+
indexOfDaughterPart2 = part2.index() - 2 + j;
336+
}
337+
338+
auto daughterPart1 = particles.begin() + indexOfDaughterPart1;
339+
auto daughterPart2 = particles.begin() + indexOfDaughterPart2;
340+
auto deta = daughterPart1.eta() - daughterPart2.eta();
341+
auto dphi_AT_PV = daughterPart1.phi() - daughterPart2.phi();
342+
auto dphi_AT_SpecificRadii = PhiAtSpecificRadiiTPC(daughterPart1, radiiTPC) - PhiAtSpecificRadiiTPC(daughterPart2, radiiTPC);
343+
bool sameCharge = false;
344+
auto dphiAvg = AveragePhiStar(*daughterPart1, *daughterPart2, nhist, &sameCharge);
345+
if (Q3 == 999) {
346+
histdetadpi[nhist][0]->Fill(deta, dphiAvg);
347+
histdetadpi[nhist][2]->Fill(deta, dphi_AT_PV);
348+
if (fillQA) {
349+
histdetadpi_eta[nhist]->Fill(deta, dphiAvg, daughterPart1.eta(), daughterPart2.eta());
350+
histdetadpi_phi[nhist]->Fill(deta, dphiAvg, daughterPart1.phi(), daughterPart2.phi());
351+
}
352+
}
353+
if (sameCharge) {
354+
if (atWhichRadiiToSelect == 1) {
355+
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
356+
pass = true;
357+
} else {
358+
if (Q3 == 999) {
359+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
360+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
361+
} else if (Q3 < upperQ3LimitForPlotting) {
362+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
363+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
364+
}
365+
}
366+
} else if (atWhichRadiiToSelect == 0) {
367+
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
368+
pass = true;
369+
} else {
370+
if (Q3 == 999) {
371+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
372+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
373+
} else if (Q3 < upperQ3LimitForPlotting) {
374+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
375+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
376+
}
377+
}
378+
} else if (atWhichRadiiToSelect == 2) {
379+
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
380+
pass = true;
381+
} else {
382+
if (Q3 == 999) {
383+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
384+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
385+
} else if (Q3 < upperQ3LimitForPlotting) {
386+
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
387+
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
388+
}
389+
}
390+
}
391+
}
392+
nhist += 1;
393+
}
394+
}
395+
296396
return pass;
297397
} else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) {
298398
// check if provided particles are in agreement with the class instantiation

PWGCF/FemtoDream/Tasks/CMakeLists.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ o2physics_add_dpl_workflow(femtodream-triplet-track-track-track
1919
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
2020
COMPONENT_NAME Analysis)
2121

22-
o2physics_add_dpl_workflow(femtodream-triplet-track-track-track-pb-pb
23-
SOURCES femtoDreamTripletTaskTrackTrackTrackPbPb.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
25-
COMPONENT_NAME Analysis)
26-
2722
o2physics_add_dpl_workflow(femtodream-pair-track-v0
2823
SOURCES femtoDreamPairTaskTrackV0.cxx
2924
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
@@ -59,12 +54,12 @@ o2physics_add_dpl_workflow(femtodream-collision-masker
5954
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
6055
COMPONENT_NAME Analysis)
6156

62-
o2physics_add_dpl_workflow(femtodream-pair-efficiency
63-
SOURCES femtoDreamPairEfficiency.cxx
64-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
65-
COMPONENT_NAME Analysis)
66-
6757
o2physics_add_dpl_workflow(femtodream-hash
6858
SOURCES femtoDreamHashTask.cxx
6959
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
7060
COMPONENT_NAME Analysis)
61+
62+
o2physics_add_dpl_workflow(femtodream-pair-v0-v0
63+
SOURCES femtoDreamPairTaskV0V0.cxx
64+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
65+
COMPONENT_NAME Analysis)

0 commit comments

Comments
 (0)