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
2 changes: 1 addition & 1 deletion EventFiltering/PWGLF/filterdoublephi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include <Math/Vector4D.h>
#include <TMath.h>
#include <fairlogger/Logger.h>
#include <TDatabasePDG.h> // FIXME

Check warning on line 22 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TPDGCode.h> // FIXME

#include <iostream>

Check warning on line 25 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <string>
#include <vector>
Expand Down Expand Up @@ -127,14 +127,14 @@
template <typename T>
bool selectionPID(const T& candidate)
{
if (candidate.pt() < 0.5 && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {

Check warning on line 130 in EventFiltering/PWGLF/filterdoublephi.cxx

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.
return true;
}
if (candidate.pt() >= 0.5) {

Check warning on line 133 in EventFiltering/PWGLF/filterdoublephi.cxx

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.
if (!candidate.hasTOF() && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {

Check warning on line 134 in EventFiltering/PWGLF/filterdoublephi.cxx

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.
return true;
}
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0 && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) {

Check warning on line 137 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
}
Expand All @@ -147,7 +147,7 @@
return true;
}
if (candidate.pt() >= 0.5) {
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0 && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) {

Check warning on line 150 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
}
Expand All @@ -164,7 +164,7 @@
pz2 = candidate2.pz();
p1 = candidate1.p();
p2 = candidate2.p();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check warning on line 167 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (isDeepAngle && angle < cfgDeepAngle) {
return false;
}
Expand All @@ -186,7 +186,7 @@
if (collision.sel8()) {
auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
for (auto track1 : posThisColl) {

Check warning on line 189 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// track selection
if (!selectionTrack(track1)) {
continue;
Expand All @@ -207,7 +207,7 @@
qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt());
}
auto track1ID = track1.globalIndex();
for (auto track2 : negThisColl) {

Check warning on line 210 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// track selection
if (!selectionTrack(track2)) {
continue;
Expand Down Expand Up @@ -259,7 +259,7 @@
auto i6 = std::distance(phiresonance.begin(), if2);
PhiVectorDummy2 = phiresonance.at(i6);
PhiPair = PhiVectorDummy + PhiVectorDummy2;
if ((Phid1Index.at(i5) != Phid1Index.at(i6)) && (Phid2Index.at(i5) != Phid2Index.at(i6)) && PhiPair.M() > MinPhiPairMass && PhiPair.M() < MaxPhiPairMass && PhiPair.Pt() > MinPhiPairPt) {
if (!(Phid1Index.at(i5) == Phid1Index.at(i6) && Phid2Index.at(i5) == Phid2Index.at(i6)) && PhiPair.M() > MinPhiPairMass && PhiPair.M() < MaxPhiPairMass && PhiPair.Pt() > MinPhiPairPt) {
qaRegistry.fill(HIST("hInvMassDoublePhi"), PhiPair.M(), PhiPair.Pt());
keepEventDoublePhi = true;
}
Expand Down
16 changes: 12 additions & 4 deletions PWGLF/Tasks/Resonances/doublephimeson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct doublephimeson {
Configurable<int> strategyPID2{"strategyPID2", 0, "PID strategy 2"};
Configurable<float> minPhiMass{"minPhiMass", 1.01, "Minimum phi mass"};
Configurable<float> maxPhiMass{"maxPhiMass", 1.03, "Maximum phi mass"};
Configurable<float> minExoticMass{"minExoticMass", 2.4, "Minimum Exotic mass"};
Configurable<float> maxExoticMass{"maxExoticMass", 3.2, "Maximum Exotic mass"};
Configurable<bool> additionalEvsel{"additionalEvsel", false, "Additional event selection"};
Configurable<bool> isDeep{"isDeep", true, "Store deep angle"};
Configurable<float> cutMinNsigmaTPC{"cutMinNsigmaTPC", -2.5, "nsigma cut TPC"};
Expand Down Expand Up @@ -332,14 +334,20 @@ struct doublephimeson {
if (!selectionPID(phitrackd2.phid2TPC(), phitrackd2.phid2TOF(), phitrackd2.phid2TOFHit(), strategyPID2, kaonminusd2pt)) {
continue;
}
if (phitrackd1.phid1Index() == phitrackd2.phid1Index()) {
continue;
}
if (phitrackd1.phid2Index() == phitrackd2.phid2Index()) {
// if (phitrackd1.phid1Index() == phitrackd2.phid1Index()) {
// continue;
// }
// if (phitrackd1.phid2Index() == phitrackd2.phid2Index()) {
// continue;
// }
if (phitrackd1.phid1Index() == phitrackd2.phid1Index() && phitrackd1.phid2Index() == phitrackd2.phid2Index()) {
continue;
}
Phid2.SetXYZM(phitrackd2.phiPx(), phitrackd2.phiPy(), phitrackd2.phiPz(), phitrackd2.phiMass());
exotic = Phid1 + Phid2;
if (exotic.M() < minExoticMass || exotic.M() > maxExoticMass) {
continue;
}
// auto cosThetaStar = getCosTheta(exotic, Phid1);
// auto kstar = getkstar(Phid1, Phid2);
auto deltaR = TMath::Sqrt(TMath::Power(Phid1.Phi() - Phid2.Phi(), 2.0) + TMath::Power(Phid1.Eta() - Phid2.Eta(), 2.0));
Expand Down
Loading