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
33 changes: 33 additions & 0 deletions PWGHF/D2H/Tasks/taskSigmac.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct HfTaskSigmac {
Configurable<float> yCandRecoMax{"yCandRecoMax", -1, "Maximum Sc candidate rapidity"};
Configurable<bool> enableTHn{"enableTHn", false, "enable the usage of THn for Λc+ and Σc0,++"};
Configurable<bool> addSoftPiDcaToSigmacSparse{"addSoftPiDcaToSigmacSparse", false, "enable the filling of sof-pion dcaXY, dcaZ in the Σc0,++ THnSparse"};
Configurable<float> deltaMassSigmacRecoMax{"deltaMassSigmacRecoMax", 1000, "Maximum allowed value for Sigmac deltaMass. Conceived to reduce the output size (i.e. reject background above a certain threshold)"};

bool isMc{};
static constexpr std::size_t NDaughters{2u};
Expand Down Expand Up @@ -375,6 +376,12 @@ struct HfTaskSigmac {
massSc = HfHelper::invMassScRecoLcToPKPi(candSc, candidateLc);
massLc = HfHelper::invMassLcToPKPi(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}
Comment on lines +379 to +383
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to apply the same condition six times?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I fill the objects in 6 different places in my code, depending on data / MC separation and on the mass hypotheses (pKpi vs. piKp)


/// fill the histograms
if (chargeSc == o2::aod::hf_cand_sigmac::ChargeNull) {
registry.fill(HIST("Data/hPtSc0"), ptSc);
Expand Down Expand Up @@ -458,6 +465,12 @@ struct HfTaskSigmac {
massSc = HfHelper::invMassScRecoLcToPiKP(candSc, candidateLc);
massLc = HfHelper::invMassLcToPiKP(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}

/// fill the histograms
if (chargeSc == o2::aod::hf_cand_sigmac::ChargeNull) {
registry.fill(HIST("Data/hPtSc0"), ptSc);
Expand Down Expand Up @@ -879,6 +892,11 @@ struct HfTaskSigmac {
massLc = HfHelper::invMassLcToPKPi(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}

/// Fill the histograms for reconstructed Σc0 signal
registry.fill(HIST("MC/reconstructed/hPtSc0Sig"), ptSc, origin, channel);
registry.fill(HIST("MC/reconstructed/hPtGenSc0Sig"), ptGenSc, origin, channel);
Expand Down Expand Up @@ -964,6 +982,11 @@ struct HfTaskSigmac {
massLc = HfHelper::invMassLcToPiKP(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}

/// Fill the histograms for reconstructed Σc0 signal
registry.fill(HIST("MC/reconstructed/hPtSc0Sig"), ptSc, origin, channel);
registry.fill(HIST("MC/reconstructed/hPtGenSc0Sig"), ptGenSc, origin, channel);
Expand Down Expand Up @@ -1086,6 +1109,11 @@ struct HfTaskSigmac {
massLc = HfHelper::invMassLcToPKPi(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}

/// Fill the histograms for reconstructed Σc++ signal
registry.fill(HIST("MC/reconstructed/hPtScPlusPlusSig"), ptSc, origin, channel);
registry.fill(HIST("MC/reconstructed/hPtGenScPlusPlusSig"), ptGenSc, origin, channel);
Expand Down Expand Up @@ -1171,6 +1199,11 @@ struct HfTaskSigmac {
massLc = HfHelper::invMassLcToPiKP(candidateLc);
deltaMass = massSc - massLc;

if (deltaMass > deltaMassSigmacRecoMax) {
/// the reconstructed deltaMass is too large, let's ignore this candidate for TH1 / THnSparse filling
continue;
}

/// Fill the histograms for reconstructed Σc++ signal
registry.fill(HIST("MC/reconstructed/hPtScPlusPlusSig"), ptSc, origin, channel);
registry.fill(HIST("MC/reconstructed/hPtGenScPlusPlusSig"), ptGenSc, origin, channel);
Expand Down
Loading