Skip to content
Merged
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
81 changes: 40 additions & 41 deletions PWGLF/Tasks/Resonances/k892hadronphoton.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/Resonances/k892hadronphoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -121,7 +121,7 @@
} eventSelections;

// generated
Configurable<bool> mc_keepOnlyFromGenerator{"mc_keepOnlyFromGenerator", true, "if true, consider only particles from generator to calculate efficiency."};

Check failure on line 124 in PWGLF/Tasks/Resonances/k892hadronphoton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// QA
Configurable<bool> fillBkgQAhistos{"fillBkgQAhistos", false, "if true, fill MC QA histograms for Bkg study. Only works with MC."};
Expand Down Expand Up @@ -535,7 +535,7 @@
}
if (fillHists)
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {

Check failure on line 538 in PWGLF/Tasks/Resonances/k892hadronphoton.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 false;
}
if (fillHists)
Expand Down Expand Up @@ -632,7 +632,7 @@
continue;
}

if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {

Check failure on line 635 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
continue;
}
}
Expand Down Expand Up @@ -683,7 +683,7 @@
fillGeneratedEventProperties(mcCollisions, collisions);
std::vector<int> listBestCollisionIdx = getListOfRecoCollIndices(mcCollisions, collisions);

for (auto& genParticle : genParticles) {

Check failure on line 686 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
float centrality = 100.5f;

// Has MC collision
Expand All @@ -704,7 +704,7 @@
continue;
}

if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {

Check failure on line 707 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
continue;
}
}
Expand Down Expand Up @@ -743,18 +743,18 @@
TrkCode = 1;
if ((kstar.photonPosTrackCode() != 1 && kstar.photonNegTrackCode() == 1) || (kstar.photonPosTrackCode() == 1 && kstar.photonNegTrackCode() != 1))
TrkCode = 2;
if (kstar.photonPosTrackCode() == 3 && kstar.photonNegTrackCode() == 3)

Check failure on line 746 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
TrkCode = 3;
if (kstar.photonPosTrackCode() == 2 || kstar.photonNegTrackCode() == 2)

Check failure on line 748 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
TrkCode = 4;
} else {
if (kstar.kshortPosTrackCode() == 1 && kstar.kshortNegTrackCode() == 1)
TrkCode = 1;
if ((kstar.kshortPosTrackCode() != 1 && kstar.kshortNegTrackCode() == 1) || (kstar.kshortPosTrackCode() == 1 && kstar.kshortNegTrackCode() != 1))
TrkCode = 2;
if (kstar.kshortPosTrackCode() == 3 && kstar.kshortNegTrackCode() == 3)

Check failure on line 755 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
TrkCode = 3;
if (kstar.kshortPosTrackCode() == 2 || kstar.kshortNegTrackCode() == 2)

Check failure on line 757 in PWGLF/Tasks/Resonances/k892hadronphoton.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.
TrkCode = 4;
}

Expand Down Expand Up @@ -895,26 +895,25 @@
histos.fill(HIST(MainDir[mode]) + HIST("/h2dArmenteros"), kstar.photonAlpha(), kstar.photonQt());
histos.fill(HIST(MainDir[mode]) + HIST("/h2dArmenteros"), kstar.kshortAlpha(), kstar.kshortQt());

if (kstar.kshortAlpha() < 1) {
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h2dTPCvsTOFNSigma_KShortPi"), kstar.kshortPosPiTPCNSigma(), kstar.kshortPiTOFNSigma());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h2dTPCvsTOFNSigma_KShortPi"), kstar.kshortNegPiTPCNSigma(), kstar.kshortPiTOFNSigma());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortDCANegToPV"), kstar.kshortDCANegPV());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortDCAPosToPV"), kstar.kshortDCAPosPV());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortpT"), kstar.kshortPt());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortMass"), kstar.kshortMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h3dKShortMass"), centrality, kstar.kshortPt(), kstar.kshortMass());

histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hMass"), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hPt"), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hY"), kstar.kstarY());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hRadius"), kstar.radius());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h2dRadiusVspT"), kstar.radius(), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hDCAPairDau"), kstar.dcadaughters());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hDCAPairDauVsPt"), kstar.dcadaughters(), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h3dMass"), centrality, kstar.pt(), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h3dOPAngleVsMass"), kstar.opAngle(), kstar.pt(), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h2dOPAngleVsPt"), kstar.opAngle(), kstar.pt());
}
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h2dTPCvsTOFNSigma_KShortPi"), kstar.kshortPosPiTPCNSigma(), kstar.kshortPiTOFNSigma());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h2dTPCvsTOFNSigma_KShortPi"), kstar.kshortNegPiTPCNSigma(), kstar.kshortPiTOFNSigma());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortDCANegToPV"), kstar.kshortDCANegPV());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortDCAPosToPV"), kstar.kshortDCAPosPV());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortpT"), kstar.kshortPt());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/hKShortMass"), kstar.kshortMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KShort/h3dKShortMass"), centrality, kstar.kshortPt(), kstar.kshortMass());

histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hMass"), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hPt"), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hY"), kstar.kstarY());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hRadius"), kstar.radius());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h2dRadiusVspT"), kstar.radius(), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hDCAPairDau"), kstar.dcadaughters());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/hDCAPairDauVsPt"), kstar.dcadaughters(), kstar.pt());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h3dMass"), centrality, kstar.pt(), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h3dOPAngleVsMass"), kstar.opAngle(), kstar.pt(), kstar.kstarMass());
histos.fill(HIST(MainDir[mode]) + HIST("/KStar/h2dOPAngleVsPt"), kstar.opAngle(), kstar.pt());

//_______________________________________
// MC specific
if (doprocessMonteCarlo) {
Expand Down Expand Up @@ -1133,31 +1132,31 @@

// Separating kshort selections:
fillSelHistos<8>(cand, PDG_t::kK0Short);
if (cand.kshortAlpha() < 1) { // KShort selection
// TPC Selection
if (kshortSelections.fselKShortTPCPID && (TMath::Abs(cand.kshortPosPiTPCNSigma()) > kshortSelections.KShortMaxTPCNSigmas))
return false;
if (kshortSelections.fselKShortTPCPID && (TMath::Abs(cand.kshortNegPiTPCNSigma()) > kshortSelections.KShortMaxTPCNSigmas))
return false;

// // TOF Selection
// if (kshortSelections.fselKShortTOFPID && (TMath::Abs(cand.kshortPiTOFNSigma()) > kshortSelections.KShortPiMaxTOFNSigmas))
// return false;
// if (kshortSelections.fselKShortTOFPID && (TMath::Abs(cand.lambdaPiTOFNSigma()) > kshortSelections.KShortPiMaxTOFNSigmas))
// return false;
// TPC Selection
if (kshortSelections.fselKShortTPCPID && (TMath::Abs(cand.kshortPosPiTPCNSigma()) > kshortSelections.KShortMaxTPCNSigmas))
return false;
if (kshortSelections.fselKShortTPCPID && (TMath::Abs(cand.kshortNegPiTPCNSigma()) > kshortSelections.KShortMaxTPCNSigmas))
return false;

// DCA Selection
fillSelHistos<9>(cand, PDG_t::kK0Short);
if ((TMath::Abs(cand.kshortDCAPosPV()) < kshortSelections.KShortMinDCAPosToPv) || (TMath::Abs(cand.kshortDCANegPV()) < kshortSelections.KShortMinDCANegToPv))
return false;
// // TOF Selection
// if (kshortSelections.fselKShortTOFPID && (TMath::Abs(cand.kshortPiTOFNSigma()) > kshortSelections.KShortPiMaxTOFNSigmas))
// return false;
// if (kshortSelections.fselKShortTOFPID && (TMath::Abs(cand.lambdaPiTOFNSigma()) > kshortSelections.KShortPiMaxTOFNSigmas))
// return false;

// Mass Selection
fillSelHistos<10>(cand, PDG_t::kK0Short);
if (TMath::Abs(cand.kshortMass() - o2::constants::physics::MassK0Short) > kshortSelections.KShortWindow)
return false;
// DCA Selection
fillSelHistos<9>(cand, PDG_t::kK0Short);
if ((TMath::Abs(cand.kshortDCAPosPV()) < kshortSelections.KShortMinDCAPosToPv) || (TMath::Abs(cand.kshortDCANegPV()) < kshortSelections.KShortMinDCANegToPv))
return false;

// Mass Selection
fillSelHistos<10>(cand, PDG_t::kK0Short);
if (TMath::Abs(cand.kshortMass() - o2::constants::physics::MassK0Short) > kshortSelections.KShortWindow)
return false;

fillSelHistos<11>(cand, PDG_t::kK0Short);

fillSelHistos<11>(cand, PDG_t::kK0Short);
}
return true;
}

Expand Down
Loading