Skip to content

Commit

Permalink
Merge branch 'AliceO2Group:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Astronica-Software authored Sep 2, 2024
2 parents c17010d + 9251df9 commit ffbaa75
Show file tree
Hide file tree
Showing 33 changed files with 2,085 additions and 821 deletions.
49 changes: 49 additions & 0 deletions DPG/Tasks/AOTTrack/qaEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusTrkItsTpc;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcTof;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusGenerated;

std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcPrm;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusTrkItsTpcPrm;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcTofPrm;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusGeneratedPrm;

std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcStr;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusTrkItsTpcStr;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcTofStr;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusGeneratedStr;

std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcTer;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusTrkItsTpcTer;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusItsTpcTofTer;
std::array<std::shared_ptr<TH2>, nParticles> hPtRadiusGeneratedTer;

struct QaEfficiency {
// Track/particle selection
Configurable<bool> numSameCollision{"numSameCollision", false, "Flag to ask that the numerator is in the same collision as the denominator"};
Expand Down Expand Up @@ -396,6 +411,18 @@ struct QaEfficiency {
hPtRadiusItsTpc[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/radius/its_tpc", PDGs[histogramIndex]), "ITS-TPC tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusItsTpcTof[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/radius/its_tpc_tof", PDGs[histogramIndex]), "ITS-TPC-TOF tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusGenerated[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/radius/generated", PDGs[histogramIndex]), "Generated " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});

hPtRadiusItsTpcPrm[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/prm/radius/its_tpc", PDGs[histogramIndex]), "ITS-TPC tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusItsTpcTofPrm[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/prm/radius/its_tpc_tof", PDGs[histogramIndex]), "ITS-TPC-TOF tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusGeneratedPrm[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/prm/radius/generated", PDGs[histogramIndex]), "Generated " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});

hPtRadiusItsTpcStr[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/str/radius/its_tpc", PDGs[histogramIndex]), "ITS-TPC tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusItsTpcTofStr[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/str/radius/its_tpc_tof", PDGs[histogramIndex]), "ITS-TPC-TOF tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusGeneratedStr[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/str/radius/generated", PDGs[histogramIndex]), "Generated " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});

hPtRadiusItsTpcTer[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/ter/radius/its_tpc", PDGs[histogramIndex]), "ITS-TPC tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusItsTpcTofTer[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/ter/radius/its_tpc_tof", PDGs[histogramIndex]), "ITS-TPC-TOF tracks " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
hPtRadiusGeneratedTer[histogramIndex] = histos.add<TH2>(Form("MC/pdg%i/pt/ter/radius/generated", PDGs[histogramIndex]), "Generated " + tagPt + " vs Radius", kTH2D, {axisPt, axisRadius});
}

LOG(info) << "Done with making histograms for particle: " << partName;
Expand Down Expand Up @@ -515,6 +542,12 @@ struct QaEfficiency {
if (doPtRadius) {
makeEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpc[histogramIndex]);
makeEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTof[histogramIndex]);
makeEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcPrm[histogramIndex]);
makeEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofPrm[histogramIndex]);
makeEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcStr[histogramIndex]);
makeEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofStr[histogramIndex]);
makeEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcTer[histogramIndex]);
makeEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofTer[histogramIndex]);
}

LOG(info) << "Done with making histograms for particle: " << partName << " for efficiencies";
Expand Down Expand Up @@ -1017,8 +1050,15 @@ struct QaEfficiency {
}
if (doPtRadius) {
hPtRadiusItsTpc[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcPrm[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcStr[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcTer[histogramIndex]->Fill(mcParticle.pt(), radius);

if (passedTOF) {
hPtRadiusItsTpcTof[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcTofPrm[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcTofStr[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusItsTpcTofTer[histogramIndex]->Fill(mcParticle.pt(), radius);
}
}
}
Expand Down Expand Up @@ -1181,6 +1221,9 @@ struct QaEfficiency {
}
if (doPtRadius) {
hPtRadiusGenerated[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusGeneratedPrm[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusGeneratedStr[histogramIndex]->Fill(mcParticle.pt(), radius);
hPtRadiusGeneratedTer[histogramIndex]->Fill(mcParticle.pt(), radius);
}
}

Expand Down Expand Up @@ -1303,6 +1346,12 @@ struct QaEfficiency {
}
fillEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpc[histogramIndex], hPtRadiusGenerated[histogramIndex]);
fillEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTof[histogramIndex], hPtRadiusGenerated[histogramIndex]);
fillEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcPrm[histogramIndex], hPtRadiusGeneratedPrm[histogramIndex]);
fillEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofPrm[histogramIndex], hPtRadiusGeneratedPrm[histogramIndex]);
fillEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcStr[histogramIndex], hPtRadiusGeneratedStr[histogramIndex]);
fillEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofStr[histogramIndex], hPtRadiusGeneratedStr[histogramIndex]);
fillEfficiency2D("ITS-TPC_vsPt_vsRadius", hPtRadiusItsTpcTer[histogramIndex], hPtRadiusGeneratedTer[histogramIndex]);
fillEfficiency2D("ITS-TPC-TOF_vsPt_vsRadius", hPtRadiusItsTpcTofTer[histogramIndex], hPtRadiusGeneratedTer[histogramIndex]);
}
template <bool doFillHistograms, typename CollType>
bool isCollisionSelected(const CollType& collision)
Expand Down
Loading

0 comments on commit ffbaa75

Please sign in to comment.