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
20 changes: 5 additions & 15 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,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}, {100, -0.15, 0.15}, {100, -0.15, 0.15}});

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

Check failure on line 78 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
}
}
}
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 84 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpisame[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
Expand All @@ -89,7 +89,7 @@
histdetadpimixed[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][i])).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++) {

Check failure on line 92 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
}
}
Expand All @@ -97,14 +97,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 100 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpisame[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpimixed[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpimixed[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
if (plotForEveryRadii) {
for (int l = 0; l < 9; l++) {

Check failure on line 107 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
}
}
Expand All @@ -112,14 +112,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 115 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpisame[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpimixed[k][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
histdetadpimixed[k][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
if (plotForEveryRadii) {
for (int l = 0; l < 9; l++) {

Check failure on line 122 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, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
}
}
Expand Down Expand Up @@ -200,7 +200,7 @@

if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) {
std::string dirName = static_cast<std::string>(DirNames[0]);
for (int j = 0; j < static_cast<int>(ktBins.size() - 1); j++) {
for (int j = 1; j < static_cast<int>(ktBins.size() - 1); j++) {
std::string histSuffixkT1 = std::to_string(static_cast<int>(ktBins[j] * 100.0));
std::string histSuffixkT2 = std::to_string(static_cast<int>(ktBins[j + 1] * 100.0));
std::string histFolderkT = "kT_" + histSuffixkT1 + "_" + histSuffixkT2 + "/";
Expand Down Expand Up @@ -511,13 +511,13 @@
}

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

Check failure on line 514 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 515 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 520 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 @@ -655,15 +655,15 @@
return false;
}

int ktbinval = -1;
if (ktval >= ktBins[0] && ktval < ktBins[1]) {
ktbinval = 0;
} else if (ktval >= ktBins[1] && ktval < ktBins[2]) {
int ktbinval = 1;
if (ktval >= ktBins[1] && ktval < ktBins[2]) {
ktbinval = 1;
} else if (ktval >= ktBins[2] && ktval < ktBins[3]) {
ktbinval = 2;
} else if (ktval >= ktBins[3] && ktval < ktBins[4]) {
ktbinval = 3;
} else if (ktval >= ktBins[4] && ktval < ktBins[5]) {
ktbinval = 4;
}

auto deta = part1.eta() - part2.eta();
Expand All @@ -676,16 +676,6 @@
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
}

if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMaxVector[ktbinval], 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMaxVector[ktbinval], 2) > 1.) {
if (ChosenEventType == femto_universe_container::EventType::same) {
histdetadphisameafterkT[ktbinval]->Fill(deta, dphiAvg);
} else if (ChosenEventType == femto_universe_container::EventType::mixed) {
histdetadphimixedafterkT[ktbinval]->Fill(deta, dphiAvg);
} else {
LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed.";
}
}

if (CircCut && (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMaxVector[ktbinval], 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMaxVector[ktbinval], 2) < 1.)) {
return true;
} else if (!CircCut && (dphiAvg > cutDeltaPhiStarMinVector[ktbinval]) && (dphiAvg < cutDeltaPhiStarMaxVector[ktbinval]) && (deta > cutDeltaEtaMinVector[ktbinval]) && (deta < cutDeltaEtaMaxVector[ktbinval])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
}

float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);
if (kT > ConfKtKstarBins.value.back() || kT < ConfKtKstarBins.value.front())
float lastElement = ConfKtKstarBins.value.back();
float firstRealElement = ConfKtKstarBins.value[1];

if (kT < firstRealElement || kT > lastElement)
continue;

if (twotracksconfigs.ConfIsCPR.value) {
Expand Down Expand Up @@ -565,7 +568,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
}

float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);
if (kT > ConfKtKstarBins.value.back() || kT < ConfKtKstarBins.value.front())
float lastElement = ConfKtKstarBins.value.back();
float firstRealElement = ConfKtKstarBins.value[1];

if (kT < firstRealElement || kT > lastElement)
continue;

if (twotracksconfigs.ConfIsCPR.value) {
Expand Down Expand Up @@ -944,7 +950,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
}

float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2);
if (kT > ConfKtKstarBins.value.back() || kT < ConfKtKstarBins.value.front())
float lastElement = ConfKtKstarBins.value.back();
float firstRealElement = ConfKtKstarBins.value[1];

if (kT < firstRealElement || kT > lastElement)
continue;

if (twotracksconfigs.ConfIsCPR.value) {
Expand Down
Loading