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
104 changes: 102 additions & 2 deletions PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_

#include "PWGCF/DataModel/FemtoDerived.h"

#include "Framework/HistogramRegistry.h"

#include <memory>
#include <string>
#include <vector>
#include "PWGCF/DataModel/FemtoDerived.h"
#include "Framework/HistogramRegistry.h"

using namespace o2;

Check failure on line 27 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 28 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis
{
Expand Down Expand Up @@ -98,6 +100,24 @@
}
}
}
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) {
for (int i = 0; i < 4; i++) {
std::string dirName = static_cast<std::string>(dirNames[1]);
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}});
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}});
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}});
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}});
if (plotForEveryRadii) {
for (int j = 0; j < 9; j++) {
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}});
}
}
if (fillQA) {
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}});
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}});
}
}
}
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) {
for (int i = 0; i < Nprongs; i++) {
std::string dirName = static_cast<std::string>(dirNames[2]);
Expand Down Expand Up @@ -171,7 +191,7 @@
}
if (sameCharge) {
if (atWhichRadiiToSelect == 1) {
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 194 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
} else {
if (Q3 == 999) {
Expand All @@ -184,7 +204,7 @@
return false;
}
} else if (atWhichRadiiToSelect == 0) {
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 207 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
} else {
if (Q3 == 999) {
Expand All @@ -197,7 +217,7 @@
return false;
}
} else if (atWhichRadiiToSelect == 2) {
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 220 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
} else {
if (Q3 == 999) {
Expand Down Expand Up @@ -255,7 +275,7 @@
}
if (sameCharge) {
if (atWhichRadiiToSelect == 1) {
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 278 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pass = true;
} else {
if (Q3 == 999) {
Expand All @@ -267,7 +287,7 @@
}
}
} else if (atWhichRadiiToSelect == 0) {
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 290 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pass = true;
} else {
if (Q3 == 999) {
Expand All @@ -279,7 +299,7 @@
}
}
} else if (atWhichRadiiToSelect == 2) {
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 302 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pass = true;
} else {
if (Q3 == 999) {
Expand All @@ -293,6 +313,86 @@
}
}
}
return pass;
} else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) {
/// V0-V0 combination
// check if provided particles are in agreement with the class instantiation
if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kV0) {
LOG(fatal) << "FemtoDreamDetaDphiStar: passed arguments don't agree with FemtoDreamDetaDphiStar instantiation! Please provide kV0,kV0 candidates.";
return false;
}

bool pass = false;
int nhist = 0;
for (int i = 0; i < 2; i++) {
int indexOfDaughterPart1, indexOfDaughterPart2;
for (int j = 0; j < 2; j++) {
if (isMixedEventLambda) {
indexOfDaughterPart1 = part1.globalIndex() - 2 + i;
indexOfDaughterPart2 = part2.globalIndex() - 2 + j;
} else {
indexOfDaughterPart1 = part1.index() - 2 + i;
indexOfDaughterPart2 = part2.index() - 2 + j;
}

auto daughterPart1 = particles.begin() + indexOfDaughterPart1;
auto daughterPart2 = particles.begin() + indexOfDaughterPart2;
auto deta = daughterPart1.eta() - daughterPart2.eta();
auto dphi_AT_PV = daughterPart1.phi() - daughterPart2.phi();
auto dphi_AT_SpecificRadii = PhiAtSpecificRadiiTPC(daughterPart1, radiiTPC) - PhiAtSpecificRadiiTPC(daughterPart2, radiiTPC);
bool sameCharge = false;
auto dphiAvg = AveragePhiStar(*daughterPart1, *daughterPart2, nhist, &sameCharge);
if (Q3 == 999) {
histdetadpi[nhist][0]->Fill(deta, dphiAvg);
histdetadpi[nhist][2]->Fill(deta, dphi_AT_PV);
if (fillQA) {
histdetadpi_eta[nhist]->Fill(deta, dphiAvg, daughterPart1.eta(), daughterPart2.eta());
histdetadpi_phi[nhist]->Fill(deta, dphiAvg, daughterPart1.phi(), daughterPart2.phi());
}
}
if (sameCharge) {
if (atWhichRadiiToSelect == 1) {
if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 355 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pass = true;
} else {
if (Q3 == 999) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
} else if (Q3 < upperQ3LimitForPlotting) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
}
}
} else if (atWhichRadiiToSelect == 0) {
if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {

Check failure on line 367 in PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
pass = true;
} else {
if (Q3 == 999) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
} else if (Q3 < upperQ3LimitForPlotting) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
}
}
} else if (atWhichRadiiToSelect == 2) {
if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) {
pass = true;
} else {
if (Q3 == 999) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
} else if (Q3 < upperQ3LimitForPlotting) {
histdetadpi[nhist][1]->Fill(deta, dphiAvg);
histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV);
}
}
}
}
nhist += 1;
}
}

return pass;
} else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) {
// check if provided particles are in agreement with the class instantiation
Expand Down
15 changes: 5 additions & 10 deletions PWGCF/FemtoDream/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ o2physics_add_dpl_workflow(femtodream-triplet-track-track-track
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(femtodream-triplet-track-track-track-pb-pb
SOURCES femtoDreamTripletTaskTrackTrackTrackPbPb.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(femtodream-pair-track-v0
SOURCES femtoDreamPairTaskTrackV0.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
Expand Down Expand Up @@ -59,12 +54,12 @@ o2physics_add_dpl_workflow(femtodream-collision-masker
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(femtodream-pair-efficiency
SOURCES femtoDreamPairEfficiency.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(femtodream-hash
SOURCES femtoDreamHashTask.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(femtodream-pair-v0-v0
SOURCES femtoDreamPairTaskV0V0.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Loading
Loading