Skip to content

Commit 61616dc

Browse files
mfagginmattia
andauthored
[PWGHF] tree creator for Sigmac correlated bkg. sources. (#12859)
Co-authored-by: mattia <mfaggin@cern.ch>
1 parent 8ab21f6 commit 61616dc

File tree

4 files changed

+357
-23
lines changed

4 files changed

+357
-23
lines changed

PWGHF/D2H/Tasks/taskSigmac.cxx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include "PWGHF/Core/DecayChannels.h"
1919
#include "PWGHF/Core/HfHelper.h"
20+
#include "PWGHF/D2H/Utils/utilsSigmac.h"
2021
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2122
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2223

@@ -340,27 +341,6 @@ struct HfTaskSigmac {
340341

341342
}; /// end init
342343

343-
/// @brief Function to determine if the reconstructed candidate Σc0,++ decays into Λc+ → pK-π+, Λc+ → π+K-p or both
344-
/// @tparam L template for Lc daughter of Sc candidate
345-
/// @tparam S template for Sc candidate
346-
/// @param candidateLc Lc daughter of Sc candidate
347-
/// @param candSc Sc candidate
348-
/// @return 0: none; 1: only Λc+ → pK-π+ possible; 2: Λc+ → π+K-p possible; 3: both possible
349-
template <typename L, typename S>
350-
int8_t isDecayToPKPiToPiKP(L& candidateLc, S& candSc)
351-
{
352-
int8_t channel = 0;
353-
if ((candidateLc.isSelLcToPKPi() >= 1) && candSc.statusSpreadLcMinvPKPiFromPDG()) {
354-
// Λc+ → pK-π+ and within the requested mass to build the Σc0,++
355-
SETBIT(channel, o2::aod::hf_cand_sigmac::Decays::PKPi);
356-
}
357-
if ((candidateLc.isSelLcToPiKP() >= 1) && candSc.statusSpreadLcMinvPiKPFromPDG()) {
358-
// Λc+ → π+K-p and within the requested mass to build the Σc0,++
359-
SETBIT(channel, o2::aod::hf_cand_sigmac::Decays::PiKP);
360-
}
361-
return channel; /// 0: none; 1: pK-π+ only; 2: π+K-p only; 3: both possible
362-
}
363-
364344
/// @brief function to fill the histograms needed in analysis (data)
365345
/// @param candidatesSc are the reconstructed candidate Σc0,++
366346
/// @param
@@ -386,7 +366,7 @@ struct HfTaskSigmac {
386366
const auto& candidateLc = candSc.prongLc_as<CandsLc>();
387367
// const int iscandidateLcpKpi = (candidateLc.isSelLcToPKPi() >= 1) && candSc.statusSpreadLcMinvPKPiFromPDG(); // Λc+ → pK-π+ and within the requested mass to build the Σc0,++
388368
// const int iscandidateLcpiKp = (candidateLc.isSelLcToPiKP() >= 1) && candSc.statusSpreadLcMinvPiKPFromPDG(); // Λc+ → π+K-p and within the requested mass to build the Σc0,++
389-
const int8_t isCandPKPiPiKP = isDecayToPKPiToPiKP(candidateLc, candSc);
369+
const int8_t isCandPKPiPiKP = hf_sigmac_utils::isDecayToPKPiToPiKP(candidateLc, candSc);
390370
double massSc(-1.), massLc(-1.), deltaMass(-1.);
391371
double ptSc(candSc.pt()), ptLc(candidateLc.pt());
392372
double etaSc(candSc.eta()), etaLc(candidateLc.eta());
@@ -817,7 +797,7 @@ struct HfTaskSigmac {
817797
/// get the candidate Λc+ used to build the Σc0
818798
/// and understand which mass hypotheses are possible
819799
const auto& candidateLc = candSc.prongLc_as<CandsLc>();
820-
const int8_t isCandPKPiPiKP = isDecayToPKPiToPiKP(candidateLc, candSc);
800+
const int8_t isCandPKPiPiKP = hf_sigmac_utils::isDecayToPKPiToPiKP(candidateLc, candSc);
821801

822802
// candidateLc.flagMcDecayChanRec();
823803

PWGHF/D2H/Utils/utilsSigmac.h

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file utilsSigmac.h
13+
/// \brief Utilities for Sigmac analysis
14+
/// \author Mattia Faggin <mattia.faggin@cern.ch>, INFN Padova
15+
16+
#ifndef PWGHF_D2H_UTILS_UTILSSIGMAC_H_
17+
#define PWGHF_D2H_UTILS_UTILSSIGMAC_H_
18+
19+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
20+
21+
#include <cstdint>
22+
23+
namespace o2::hf_sigmac_utils
24+
{
25+
/// @brief Function to determine if the reconstructed candidate Σc0,++ decays into Λc+ → pK-π+, Λc+ → π+K-p or both
26+
/// @tparam L template for Lc daughter of Sc candidate
27+
/// @tparam S template for Sc candidate
28+
/// @param candidateLc Lc daughter of Sc candidate
29+
/// @param candSc Sc candidate
30+
/// @return 0: none; 1: only Λc+ → pK-π+ possible; 2: Λc+ → π+K-p possible; 3: both possible
31+
template <typename L, typename S>
32+
int8_t isDecayToPKPiToPiKP(L& candidateLc, S& candSc)
33+
{
34+
int8_t channel = 0;
35+
if ((candidateLc.isSelLcToPKPi() >= 1) && candSc.statusSpreadLcMinvPKPiFromPDG()) {
36+
// Λc+ → pK-π+ and within the requested mass to build the Σc0,++
37+
SETBIT(channel, o2::aod::hf_cand_sigmac::Decays::PKPi);
38+
}
39+
if ((candidateLc.isSelLcToPiKP() >= 1) && candSc.statusSpreadLcMinvPiKPFromPDG()) {
40+
// Λc+ → π+K-p and within the requested mass to build the Σc0,++
41+
SETBIT(channel, o2::aod::hf_cand_sigmac::Decays::PiKP);
42+
}
43+
return channel; /// 0: none; 1: pK-π+ only; 2: π+K-p only; 3: both possible
44+
}
45+
} // namespace o2::hf_sigmac_utils
46+
47+
#endif // PWGHF_D2H_UTILS_UTILSSIGMAC_H_

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ o2physics_add_dpl_workflow(tree-creator-lc-to-p-k-pi
249249
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
250250
COMPONENT_NAME Analysis)
251251

252+
o2physics_add_dpl_workflow(tree-creator-sigmac-corr-bkg
253+
SOURCES treeCreatorSigmacCorrBkg.cxx
254+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
255+
COMPONENT_NAME Analysis)
256+
252257
o2physics_add_dpl_workflow(tree-creator-omegac-st
253258
SOURCES treeCreatorOmegacSt.cxx
254259
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils

0 commit comments

Comments
 (0)