Skip to content

Commit 63b929e

Browse files
authored
Merge pull request #7 from alibuild/alibot-cleanup-11767
Please consider the following formatting changes to #11767
2 parents 2e13f45 + e33ba95 commit 63b929e

File tree

1 file changed

+45
-46
lines changed

1 file changed

+45
-46
lines changed

PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@
1717
/// \author M. Faggin (CERN) mattia.faggin@cern.ch
1818
/// \author M. Li (CCNU) mingze.li@cern.ch
1919

20-
#include <vector>
20+
#include "PWGHF/Core/CentralityEstimation.h"
21+
#include "PWGHF/Core/HfHelper.h"
22+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
23+
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2124

22-
#include "TRandom3.h"
23-
#include "Math/Vector3D.h"
24-
#include "Math/Vector4D.h"
25-
#include "Math/GenVector/Boost.h"
25+
#include "Common/Core/EventPlaneHelper.h"
26+
#include "Common/DataModel/Qvectors.h"
2627

2728
#include "Framework/AnalysisTask.h"
2829
#include "Framework/HistogramRegistry.h"
2930
#include "Framework/runDataProcessing.h"
3031

31-
#include "Common/Core/EventPlaneHelper.h"
32-
#include "Common/DataModel/Qvectors.h"
32+
#include "Math/GenVector/Boost.h"
33+
#include "Math/Vector3D.h"
34+
#include "Math/Vector4D.h"
35+
#include "TRandom3.h"
3336

34-
#include "PWGHF/Core/CentralityEstimation.h"
35-
#include "PWGHF/Core/HfHelper.h"
36-
#include "PWGHF/DataModel/CandidateSelectionTables.h"
37-
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
37+
#include <vector>
3838

3939
using namespace o2;
4040
using namespace o2::aod;
@@ -577,33 +577,33 @@ struct TaskPolarisationCharmHadrons {
577577
}
578578
}
579579
} else if (doprocessDstarWithMlInPbPb || doprocessDstarMcWithMlInPbPb) {
580-
if (doprocessDstarWithMlInPbPb) {
581-
/// analysis for D*+ meson in Pb-Pb collisions, w/o rot. background axis
582-
if (activateTHnSparseCosThStarHelicity) {
583-
registry.add("hHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis and BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate});
584-
}
585-
if (activateTHnSparseCosThStarEP) {
586-
registry.add("hEP", "THn for polarisation studies with cosThStar w.r.t. EP axis and BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate});
587-
}
588-
} else {
589-
/// analysis for D*+ meson in Pb-Pb collisions, w/o rot. background axis
590-
if (activateTHnSparseCosThStarHelicity) {
591-
registry.add("hRecoPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
592-
registry.add("hRecoNonPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
593-
if (activatePartRecoDstar) {
594-
registry.add("hPartRecoPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- partially reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
595-
registry.add("hPartRecoNonPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- partially reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
596-
}
580+
if (doprocessDstarWithMlInPbPb) {
581+
/// analysis for D*+ meson in Pb-Pb collisions, w/o rot. background axis
582+
if (activateTHnSparseCosThStarHelicity) {
583+
registry.add("hHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis and BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate});
584+
}
585+
if (activateTHnSparseCosThStarEP) {
586+
registry.add("hEP", "THn for polarisation studies with cosThStar w.r.t. EP axis and BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate});
587+
}
588+
} else {
589+
/// analysis for D*+ meson in Pb-Pb collisions, w/o rot. background axis
590+
if (activateTHnSparseCosThStarHelicity) {
591+
registry.add("hRecoPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
592+
registry.add("hRecoNonPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
593+
if (activatePartRecoDstar) {
594+
registry.add("hPartRecoPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- partially reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
595+
registry.add("hPartRecoNonPromptHelicity", "THn for polarisation studies with cosThStar w.r.t. helicity axis -- partially reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarHelicity, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
597596
}
598-
if (activateTHnSparseCosThStarEP) {
599-
registry.add("hRecoPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
600-
registry.add("hRecoNonPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
601-
if (activatePartRecoDstar) {
602-
registry.add("hPartRecoPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- partially reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
603-
registry.add("hPartRecoNonPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- partially reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
604-
}
597+
}
598+
if (activateTHnSparseCosThStarEP) {
599+
registry.add("hRecoPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
600+
registry.add("hRecoNonPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
601+
if (activatePartRecoDstar) {
602+
registry.add("hPartRecoPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- partially reco prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons});
603+
registry.add("hPartRecoNonPromptEP", "THn for polarisation studies with cosThStar w.r.t. EP axis -- partially reco non-prompt signal in Pb-Pb with BDT scores", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisNumPvContributors, thnAxisY, thnAxisInvMassD0, thnAxisCosThetaStarEP, thnAxisMlBkg, thnAxisMlNonPrompt, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisDauToMuons, thnAxisPtB});
605604
}
606605
}
606+
}
607607
}
608608

609609
// MC Gen histos
@@ -998,7 +998,7 @@ struct TaskPolarisationCharmHadrons {
998998
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, outputMl[0], /*outputMl[1],*/ outputMl[2], absEtaMin, numItsClsMin, numTpcClsMin, isRotatedCandidate);
999999
}
10001000
} else {
1001-
if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+
1001+
if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+
10021002
registry.fill(HIST("hEP"), invMassCharmHad, ptCharmHad, numPvContributors, std::abs(rapCharmHad), invMassD0, cosThetaStar, absEtaMin, numItsClsMin, numTpcClsMin, isRotatedCandidate);
10031003
}
10041004
}
@@ -1095,7 +1095,7 @@ struct TaskPolarisationCharmHadrons {
10951095
}
10961096
}
10971097
} else if constexpr (cosThetaStarType == charm_polarisation::CosThetaStarType::EP) { // EP
1098-
if (origin == RecoDecay::OriginType::Prompt) { // prompt
1098+
if (origin == RecoDecay::OriginType::Prompt) { // prompt
10991099
if (!isPartRecoDstar) {
11001100
registry.fill(HIST("hGenPromptEP"), ptCharmHad, numPvContributors, rapCharmHad, cosThetaStar, areDausInAcc, resoChannelLc, charge);
11011101
} else {
@@ -1265,7 +1265,7 @@ struct TaskPolarisationCharmHadrons {
12651265
bool runPolarisationAnalysis(Cand const& candidate, int bkgRotationId, int numPvContributors, Part const& particles, Trk const& /*tracks*/, EPPhi const* epPhi = nullptr)
12661266
{
12671267
if constexpr (withEP) {
1268-
assert(epPhi && "EP analysis requested but epPhi == nullptr");
1268+
assert(epPhi && "EP analysis requested but epPhi == nullptr");
12691269
}
12701270
bool isCandidateInSignalRegion{false};
12711271
int8_t origin{RecoDecay::OriginType::None};
@@ -1806,7 +1806,7 @@ struct TaskPolarisationCharmHadrons {
18061806
void runMcGenPolarisationAnalysis(Part const& mcParticle, Particles const& mcParticles, int numPvContributors, EPPhi const* epPhi = nullptr)
18071807
{
18081808
if constexpr (withEP) {
1809-
assert(epPhi && "EP analysis requested but epPhi == nullptr");
1809+
assert(epPhi && "EP analysis requested but epPhi == nullptr");
18101810
}
18111811
int8_t origin{RecoDecay::OriginType::None};
18121812
std::vector<int> listDaughters{};
@@ -2090,8 +2090,8 @@ struct TaskPolarisationCharmHadrons {
20902090
PROCESS_SWITCH(TaskPolarisationCharmHadrons, processDstarInPbPb, "Process Dstar candidates in PbPb collisions", false);
20912091

20922092
void processDstarWithMlInPbPb(CollsWithQvecs::iterator const& collision,
2093-
FilteredCandDstarWSelFlagAndMl const& dstarCandidates,
2094-
TracksWithExtra const& tracks)
2093+
FilteredCandDstarWSelFlagAndMl const& dstarCandidates,
2094+
TracksWithExtra const& tracks)
20952095
{
20962096
float centrality = {-1.f};
20972097
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
@@ -2163,10 +2163,10 @@ struct TaskPolarisationCharmHadrons {
21632163
PROCESS_SWITCH(TaskPolarisationCharmHadrons, processDstarMcInPbPb, "Process Dstar candidates in PbPb MC without ML", false);
21642164

21652165
void processDstarMcWithMlInPbPb(GenCollisWithQvecs::iterator const& collision,
2166-
McParticlesDstarMatched const& mcParticles,
2167-
CollsWithQvecsWithMcLabels const& collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
2168-
FilteredCandDstarWSelFlagAndMcAndMl const& dstarCandidates,
2169-
TracksWithExtra const& tracks)
2166+
McParticlesDstarMatched const& mcParticles,
2167+
CollsWithQvecsWithMcLabels const& collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
2168+
FilteredCandDstarWSelFlagAndMcAndMl const& dstarCandidates,
2169+
TracksWithExtra const& tracks)
21702170
{
21712171
float centrality = {-1.f};
21722172
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
@@ -2205,7 +2205,6 @@ struct TaskPolarisationCharmHadrons {
22052205
}
22062206
PROCESS_SWITCH(TaskPolarisationCharmHadrons, processDstarMcWithMlInPbPb, "Process Dstar candidates in PbPb MC with ML", false);
22072207

2208-
22092208
////////////////////////////
22102209
// Lc->pKpi analysis ///
22112210
////////////////////////////

0 commit comments

Comments
 (0)