Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPG] Bug: Fix histogram filling for Mother pT and Decay Length #9056

Merged
merged 2 commits into from
Dec 19, 2024
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
10 changes: 6 additions & 4 deletions DPG/Tasks/AOTTrack/qaEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
using namespace o2::framework;

// Indices for the track cut histogram
static constexpr int trkCutIdxTrkRead = 1;

Check warning on line 46 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxHasMcPart = 2;

Check warning on line 47 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedPt = 3;

Check warning on line 48 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedEta = 4;

Check warning on line 49 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedPhi = 5;

Check warning on line 50 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedY = 6;

Check warning on line 51 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedFake = 7;

Check warning on line 52 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxHasCollision = 8;

Check warning on line 53 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedTrkType = 9;

Check warning on line 54 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static constexpr int trkCutIdxPassedPtRange = 10;
static constexpr int trkCutIdxPassedEtaRange = 11;
static constexpr int trkCutIdxPassedDcaXYMax = 12;
Expand Down Expand Up @@ -1156,12 +1156,13 @@
for (const auto& pdgToCheck : mothersPDGs.value) {
if (mother.pdgCode() == pdgToCheck) {
motherIsAccepted = true;
break;
}
if (motherIsAccepted) {
// Calculate the decay length
double decayLength = std::sqrt(std::pow(mother.vx() - mother.mcCollision().posX(), 2) + std::pow(mother.vy() - mother.mcCollision().posY(), 2) + std::pow(mother.vz() - mother.mcCollision().posZ(), 2));
hdecaylengthmother[histogramIndex]->Fill(decayLength);
break;
}
if (motherIsAccepted) {
break;
}
}
}
Expand Down Expand Up @@ -1260,10 +1261,11 @@
for (const auto& pdgToCheck : mothersPDGs.value) {
if (mother.pdgCode() == pdgToCheck) {
motherIsAccepted = true; // Mother matches the list of specified PDGs
hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother
break;
}
if (motherIsAccepted) {
hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother
break;
}
}
}
Expand Down Expand Up @@ -1914,7 +1916,7 @@
// Loop on particles to fill the denominator
float dNdEta = 0; // Multiplicity
for (const auto& mcParticle : groupedMcParticles) {
if (TMath::Abs(mcParticle.eta()) <= 2.f && !mcParticle.has_daughters()) {

Check warning on line 1919 in DPG/Tasks/AOTTrack/qaEfficiency.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
dNdEta += 1.f;
}
if (!isInAcceptance(mcParticle, HIST("MC/particleSelection"))) {
Expand Down
Loading