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
25 changes: 25 additions & 0 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
histdetadpiqlcmsmixed = mHistogramRegistry->add<TH3>((dirName + static_cast<std::string>(HistNamesMixed[1][7])).c_str(), "; #it{q}_{LCMS}; #Delta #eta; #Delta #phi", kTH3F, {{100, 0.0, 0.5}, {fDeltaEtaAxis}, {fDeltaPhiStarAxis}});

if (plotForEveryRadii) {
for (int i = 0; i < 9; i++) {

Check failure on line 79 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histdetadpiRadii[0][i] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(HistNamesRadii[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
}
}
}
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) {
for (int i = 0; i < 2; i++) {

Check failure on line 85 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::string dirName = static_cast<std::string>(DirNames[1]);
histdetadpisame[i][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpisame[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
Expand All @@ -90,7 +90,7 @@
histdetadpimixed[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});

if (plotForEveryRadii) {
for (int j = 0; j < 9; j++) {

Check failure on line 93 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histdetadpiRadii[i][j] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(HistNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
}
}
Expand All @@ -98,14 +98,14 @@
}
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) {
/// V0-V0 combination
for (int k = 0; k < 2; k++) {

Check failure on line 101 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::string dirName = static_cast<std::string>(DirNames[2]);
histdetadpisame[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpisame[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpimixed[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpimixed[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
if (plotForEveryRadii) {
for (int l = 0; l < 9; l++) {

Check failure on line 108 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histdetadpiRadii[k][l] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(HistNamesRadii[k][l])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
}
}
Expand All @@ -113,14 +113,14 @@
}
if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kCascade && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
/// Cascade-Cascade combination
for (int k = 0; k < 7; k++) {

Check failure on line 116 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::string dirName = static_cast<std::string>(DirNames[5]);
histdetadpisame[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpisame[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpimixed[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
histdetadpimixed[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
if (plotForEveryRadii) {
for (int l = 0; l < 9; l++) {

Check failure on line 123 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
histdetadpiRadii[k][l] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(HistNamesRadii[k][l])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{fDeltaEtaAxis}, {fDeltaPhiStarAxis}});
}
}
Expand Down Expand Up @@ -520,13 +520,13 @@
}

// REMOVING THE "RING" -- CALCULATING THE INVARIANT MASS
TLorentzVector part1Vec;

Check failure on line 523 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
TLorentzVector part2Vec;

Check failure on line 524 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
float mMassOne = o2::constants::physics::MassKPlus;
float mMassTwo = o2::constants::physics::MassKMinus;
part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne);
part2Vec.SetPtEtaPhiM(daughter.pt(), daughter.eta(), daughter.phi(), mMassTwo);
TLorentzVector sumVec(part1Vec);

Check failure on line 529 in PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
sumVec += part2Vec;
float phiM = sumVec.M();
if ((phiM > cutPhiInvMassLow) && (phiM < cutPhiInvMassHigh)) {
Expand Down Expand Up @@ -780,6 +780,31 @@
}
}

template <typename PartType>
bool isGammaPair(PartType track1, PartType track2, double maxEEMinv, double maxDTheta)
{
double me = o2::constants::physics::MassElectron;

double magTrack1 = track1.px() * track1.px() + track1.py() * track1.py() + track1.pz() * track1.pz();
double magTrack2 = track2.px() * track2.px() + track2.py() * track2.py() + track2.pz() * track2.pz();
double dotTr1Tr2 = track1.px() * track2.px() + track1.py() * track2.py() + track1.pz() * track2.pz();

if ((track1.sign() * track2.sign()) < 0.0) {
double theta1 = track1.theta();
double theta2 = track2.theta();
double dtheta = TMath::Abs(theta1 - theta2);

double e1 = TMath::Sqrt(me * me + magTrack1);
double e2 = TMath::Sqrt(me * me + magTrack2);

double minv = 2 * me * me + 2 * (e1 * e2 - dotTr1Tr2);
if ((TMath::Abs(minv) < maxEEMinv) && (dtheta < maxDTheta)) {
return true;
}
}
return false;
}

/// Check if pair is close or not
template <typename Part>
void ClosePairqLCMS(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType, double qlcms) // add typename Parts and variable parts for adding MClabels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
Configurable<bool> cfgProcessKtBins{"cfgProcessKtBins", false, "Process kstar histograms in kT bins (if 'cfgProcessMultBins' is false, it will not be processed regardless of 'cfgProcessKtBins' state)"};
Configurable<bool> cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and MultBins"};

Configurable<bool> confRejectGammaPair{"confRejectGammaPair", false, "Additional check to reject e+e- pairs base on theta and minv"};
Configurable<double> confMaxEEMinv{"confMaxEEMinv", 0.002, "Max. minv of e-e+ pair for gamma pair rejection"};
Configurable<double> confMaxDTheta{"confMaxDTheta", 0.008, "Max. DeltaTheta of pair for gamma pair rejection"};

ConfigurableAxis confDeltaEtaAxis{"confDeltaEtaAxis", {100, -0.15, 0.15}, "DeltaEta"};
ConfigurableAxis confDeltaPhiStarAxis{"confDeltaPhiStarAxis", {100, -0.15, 0.15}, "DeltaPhiStar"};

Expand Down Expand Up @@ -483,6 +487,15 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
continue;
}

if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) {
continue;
}

// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
}

if (confIsCPR.value) {
double rand;
auto part1 = p1;
Expand All @@ -503,11 +516,6 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
}
}

// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
}

float kstar = FemtoUniverseMath::getkstar(p1, mass1, p2, mass2);
float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);

Expand Down Expand Up @@ -676,6 +684,10 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
continue;
}

if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) {
continue;
}

if (confIsCPR.value) {
double rand;
auto part1 = p1;
Expand Down Expand Up @@ -758,7 +770,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
void processMixedEvent(soa::Filtered<o2::aod::FdCollisions> const& cols,
FilteredFemtoFullParticles const& parts)
{
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) {
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) {

const int multiplicityCol = collision1.multV0M();
if (confFillDebug) {
Expand Down Expand Up @@ -799,7 +811,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
FemtoRecoParticles const& parts,
o2::aod::FdMCParticles const&)
{
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) {
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) {

const int multiplicityCol = collision1.multV0M();
if (confFillDebug) {
Expand Down Expand Up @@ -908,7 +920,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
}
};

for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) {
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) {
const int multiplicityCol = collision1.multV0M();
if (confFillDebug) {
mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol}));
Expand Down Expand Up @@ -1003,7 +1015,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
void processFractionsMCTruth(o2::aod::FdCollisions const& cols,
FemtoTruthParticles const&)
{
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) {
for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) {

const int multiplicityCol = collision1.multV0M();
if (confFillDebug) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
Configurable<bool> cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"};
Configurable<bool> cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"};

Configurable<bool> confRejectGammaPair{"confRejectGammaPair", false, "Additional check to reject e+e- pairs base on theta and minv"};
Configurable<double> confMaxEEMinv{"confMaxEEMinv", 0.002, "Max. minv of e-e+ pair for gamma pair rejection"};
Configurable<double> confMaxDTheta{"confMaxDTheta", 0.008, "Max. DeltaTheta of pair for gamma pair rejection"};

FemtoUniverseSHContainer<femto_universe_sh_container::EventType::same, femto_universe_sh_container::Observable::kstar> sameEventCont;
FemtoUniverseSHContainer<femto_universe_sh_container::EventType::mixed, femto_universe_sh_container::Observable::kstar> mixedEventCont;

Expand Down Expand Up @@ -579,6 +583,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
continue;
}

if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) {
continue;
}

float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);
float lastElement = confKtKstarBins.value.back();
float firstRealElement = confKtKstarBins.value[1];
Expand Down Expand Up @@ -612,6 +620,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
}

sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF);
}
} else {
Expand Down Expand Up @@ -994,6 +1003,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
continue;
}

if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) {
continue;
}

float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);
float lastElement = confKtKstarBins.value.back();
float firstRealElement = confKtKstarBins.value[1];
Expand Down
Loading