Skip to content
Open
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
5 changes: 5 additions & 0 deletions PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5988,7 +5988,7 @@
if (icase == 0) {
cut->AddCut(VarManager::kTPCnSigmaEl, -4., 4., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi, -99., 2.5, true, VarManager::kPin, 0.0, 1e+10, false);
} else if (icase == 1 || icase == 2) {

Check failure on line 5991 in PWGDQ/Core/CutsLibrary.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.
cut->AddCut(VarManager::kTPCnSigmaEl_Corr, -4., 4., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi_Corr, -99., 2.5, true, VarManager::kPin, 0.0, 1e+10, false);
}
Expand Down Expand Up @@ -7173,6 +7173,11 @@
return cut;
}

if (nameStr == "pairIsPr") {
cut->AddCut(VarManager::kIsPrPair, 0.5, 1.5);
return cut;
}

// -------------------------------------------------------------------------------------------------
//
// Below are a list of single electron single muon and pair selection in order or optimize the trigger
Expand Down
6 changes: 6 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -744,22 +744,22 @@
if (subGroupStr.Contains("tpcpid_fine")) {
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
std::array<double, 281> pIN_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 747 in PWGDQ/Core/HistogramsLibrary.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.
pIN_bins[i] = 0.01 * i;
}
for (int i = 1; i <= 80; i++) {

Check failure on line 750 in PWGDQ/Core/HistogramsLibrary.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.
pIN_bins[200 + i] = 2. + 0.1 * i;
}
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;

std::array<double, 201> TPCdEdx_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 756 in PWGDQ/Core/HistogramsLibrary.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.
TPCdEdx_bins[i] = i;
}
int nbins_TPCdEdx = static_cast<int>(TPCdEdx_bins.size()) - 1;

std::array<double, 101> nSigma_bins{};
for (int i = 0; i <= 100; i++) {

Check failure on line 762 in PWGDQ/Core/HistogramsLibrary.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.
nSigma_bins[i] = -5. + 0.1 * i;
}
int nbins_nSigma = static_cast<int>(nSigma_bins.size()) - 1;
Expand Down Expand Up @@ -882,22 +882,22 @@
if (subGroupStr.Contains("tofpid_fine")) {
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
std::array<double, 281> pIN_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 885 in PWGDQ/Core/HistogramsLibrary.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.
pIN_bins[i] = 0.01 * i;
}
for (int i = 1; i <= 80; i++) {

Check failure on line 888 in PWGDQ/Core/HistogramsLibrary.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.
pIN_bins[200 + i] = 2. + 0.1 * i;
}
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;

std::array<double, 241> TOFbeta_bins{};
for (int i = 0; i <= 240; i++) {

Check failure on line 894 in PWGDQ/Core/HistogramsLibrary.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.
TOFbeta_bins[i] = 0.005 * i;
}
int nbins_TOFbeta = static_cast<int>(TOFbeta_bins.size()) - 1;

std::array<double, 101> nSigma_bins{};
for (int i = 0; i <= 100; i++) {

Check failure on line 900 in PWGDQ/Core/HistogramsLibrary.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.
nSigma_bins[i] = -5. + 0.1 * i;
}
int nbins_nSigma = static_cast<int>(nSigma_bins.size()) - 1;
Expand All @@ -919,7 +919,7 @@
const int kNvarsPID = 3;
const int kNbins_pIN = 169;
std::array<double, kNbins_pIN + 1> pIN_bins{};
for (int i = 0; i <= 140; i++) {

Check failure on line 922 in PWGDQ/Core/HistogramsLibrary.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.
pIN_bins[i] = 0.01 * i + 0.1;
}
for (int i = 1; i <= 15; i++) {
Expand Down Expand Up @@ -1584,6 +1584,12 @@
hm->AddHistogram(histClass, "Mass_cos2DeltaPhi", "cos 2(#varphi-#Psi_{2}^{A}) vs m", true, 125, 0.0, 5.0, VarManager::kMass, 100, -1.0, 1.0, VarManager::kCos2DeltaPhi);
hm->AddHistogram(histClass, "Mass_cos3DeltaPhi", "cos 3(#varphi-#Psi_{3}^{A}) vs m", true, 125, 0.0, 5.0, VarManager::kMass, 100, -1.0, 1.0, VarManager::kCos3DeltaPhi);
}

if (subGroupStr.Contains("prpairpid")) {
hm->AddHistogram(histClass, "nSigmaPr1_nSigmaPr2", "", false, 100, -8.0, 8.0, VarManager::kTPCorTOFnSigmaPr1, 100, -8.0, 8.0, VarManager::kTPCorTOFnSigmaPr2);
hm->AddHistogram(histClass, "t1Pt", "", false, 2000, 0.0, 20.0, VarManager::kPt1);
hm->AddHistogram(histClass, "t2Pt", "", false, 2000, 0.0, 20.0, VarManager::kPt2);
}
} else if (subGroupStr.Contains("dimuon")) {
hm->AddHistogram(histClass, "Mass_Pt", "", false, 750, 0.0, 15.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kPt);
hm->AddHistogram(histClass, "Mass_Rapidity", "", false, 750, 0.0, 15.0, VarManager::kMass, 150, 2.5, 4.0, VarManager::kRap);
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,8 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kDCAz2"] = kDCAz2;
fgVarNamesMap["kITSclusterMap2"] = kITSclusterMap2;
fgVarNamesMap["kTPCnSigmaEl2"] = kTPCnSigmaEl2;
fgVarNamesMap["kTPCorTOFnSigmaPr1"] = kTPCorTOFnSigmaPr1;
fgVarNamesMap["kTPCorTOFnSigmaPr2"] = kTPCorTOFnSigmaPr2;
fgVarNamesMap["kPin"] = kPin;
fgVarNamesMap["kSignedPin"] = kSignedPin;
fgVarNamesMap["kTOFExpMom"] = kTOFExpMom;
Expand Down Expand Up @@ -2315,6 +2317,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kIsLegFromOmega"] = kIsLegFromOmega;
fgVarNamesMap["kIsProtonFromLambdaAndAntiLambda"] = kIsProtonFromLambdaAndAntiLambda;
fgVarNamesMap["kIsDalitzLeg"] = kIsDalitzLeg;
fgVarNamesMap["kIsPrPair"] = kIsPrPair;
fgVarNamesMap["kBarrelNAssocsInBunch"] = kBarrelNAssocsInBunch;
fgVarNamesMap["kBarrelNAssocsOutOfBunch"] = kBarrelNAssocsOutOfBunch;
fgVarNamesMap["kNBarrelTrackVariables"] = kNBarrelTrackVariables;
Expand Down
39 changes: 39 additions & 0 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class VarManager : public TObject
kDecayToEE = 0, // e.g. J/psi -> e+ e-
kDecayToMuMu, // e.g. J/psi -> mu+ mu-
kDecayToPiPi,
kDecayToPrPr,
kElectronMuon, // e.g. Electron - muon correlations
kBcToThreeMuons, // e.g. Bc -> mu+ mu- mu+
kBtoJpsiEEK, // e.g. B+ -> e+ e- K+
Expand Down Expand Up @@ -986,6 +987,9 @@ class VarManager : public TObject
kPairEfficiency,
kPairWeight,
kNPairVariables,
kTPCorTOFnSigmaPr1,
kTPCorTOFnSigmaPr2,
kIsPrPair,

// Candidate-track correlation variables
kPairMass,
Expand Down Expand Up @@ -3686,6 +3690,11 @@ void VarManager::FillPair(T1 const& t1, T2 const& t2, float* values)
values[kTPCnSigmaKa_leg1] = t1.tpcNSigmaKa();
}

if constexpr (pairType == kDecayToPrPr) {
m1 = o2::constants::physics::MassProton;
m2 = o2::constants::physics::MassProtonBar;
}

if constexpr (pairType == kElectronMuon) {
m2 = o2::constants::physics::MassMuon;
}
Expand Down Expand Up @@ -3744,6 +3753,36 @@ void VarManager::FillPair(T1 const& t1, T2 const& t2, float* values)
}
}

if constexpr (pairType == kDecayToPrPr && (fillMap & ReducedTrackBarrelPID) > 0 && (fillMap & ReducedTrackBarrel) > 0) {

if (t1.hasTOF()) {
values[kTPCorTOFnSigmaPr1] = t1.tofNSigmaPr();
} else if (t1.hasTPC()) {
values[kTPCorTOFnSigmaPr1] = t1.tpcNSigmaPr();
} else {
values[kTPCorTOFnSigmaPr1] = -999.f;
}

if (t2.hasTOF()) {
values[kTPCorTOFnSigmaPr2] = t2.tofNSigmaPr();
} else if (t2.hasTPC()) {
values[kTPCorTOFnSigmaPr2] = t2.tpcNSigmaPr();
} else {
values[kTPCorTOFnSigmaPr2] = -999.f;
}

bool tof1 = t1.hasTOF(), tpc1 = t1.hasTPC();
bool tof2 = t2.hasTOF(), tpc2 = t2.hasTPC();
bool hasTOForgood = (tof1 && tpc2) || (tpc1 && tof2) || (tof1 && tof2);
if (hasTOForgood) {
float nsigma1 = values[kTPCorTOFnSigmaPr1];
float nsigma2 = values[kTPCorTOFnSigmaPr2];
values[kIsPrPair] = (std::abs(nsigma1) < 4.f && std::abs(nsigma2) < 4.f && std::pow(nsigma1, 2.0) + std::pow(nsigma2, 2.0) < 16.f) ? 1 : 0;
} else {
values[kIsPrPair] = 0;
}
}

// polarization parameters
bool useHE = fgUsedVars[kCosThetaHE] || fgUsedVars[kPhiHE]; // helicity frame
bool useCS = fgUsedVars[kCosThetaCS] || fgUsedVars[kPhiCS]; // Collins-Soper frame
Expand Down
8 changes: 8 additions & 0 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3814,6 +3814,13 @@ struct AnalysisAsymmetricPairing {
runAsymmetricPairing<true, VarManager::kDecayToKPi, gkEventFillMapWithCovZdcFitMultExtra, gkTrackFillMapWithCov>(events, trackAssocsPerCollision, barrelAssocs, barrelTracks);
}

void processProtonPairSkimmed(MyEventsVtxCovZdcFitSelected const& events,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts> const& barrelAssocs,
MyBarrelTracksWithCovWithAmbiguities const& barrelTracks)
{
runAsymmetricPairing<false, VarManager::kDecayToPrPr, gkEventFillMapWithCovZdcFit, gkTrackFillMapWithCov>(events, trackAssocsPerCollision, barrelAssocs, barrelTracks);
}

void processKaonPionPionSkimmed(MyEventsVtxCovZdcFitSelected const& events,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts> const& barrelAssocs,
MyBarrelTracksWithCovWithAmbiguities const& barrelTracks)
Expand Down Expand Up @@ -3841,6 +3848,7 @@ struct AnalysisAsymmetricPairing {
}

PROCESS_SWITCH(AnalysisAsymmetricPairing, processKaonPionSkimmed, "Run kaon pion pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisAsymmetricPairing, processProtonPairSkimmed, "Run proton anti-proton pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisAsymmetricPairing, processKaonPionPionSkimmed, "Run kaon pion pion triplets, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisAsymmetricPairing, processKaonPionSkimmedMultExtra, "Run kaon pion pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisAsymmetricPairing, processKaonPionPionSkimmedMultExtra, "Run kaon pion pion triplets, with skimmed tracks", false);
Expand Down
Loading