Skip to content

Commit a4c719e

Browse files
authored
Update treeCreatorOmegacSt.cxx
1 parent 9c1ecd3 commit a4c719e

File tree

1 file changed

+70
-69
lines changed

1 file changed

+70
-69
lines changed

PWGHF/TableProducer/treeCreatorOmegacSt.cxx

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
/// \author Ruiqi Yin
1818

1919
#include "PWGHF/DataModel/TrackIndexSkimmingTables.h"
20-
#include "PWGHF/Utils/utilsEvSelHf.h"
2120
#include "PWGHF/Utils/utilsTrkCandHf.h"
21+
#include "PWGHF/Utils/utilsEvSelHf.h"
2222
#include "PWGLF/DataModel/LFStrangenessTables.h"
2323

2424
#include "Common/Core/RecoDecay.h"
2525
#include "Common/Core/Zorro.h"
2626
#include "Common/Core/ZorroSummary.h"
2727
#include "Common/Core/trackUtilities.h"
28-
#include "Common/DataModel/Centrality.h"
2928
#include "Common/DataModel/CollisionAssociationTables.h"
29+
#include "Common/DataModel/Centrality.h"
3030
#include "Common/DataModel/EventSelection.h"
3131
#include "Common/DataModel/PIDResponseTOF.h"
3232
#include "Common/DataModel/PIDResponseTPC.h"
@@ -269,22 +269,22 @@ struct HfTreeCreatorOmegacSt {
269269
Configurable<std::string> cfgTriggersOfInterest{"cfgTriggersOfInterest", "fTrackedOmega,fHfCharmBarToXiBach", "Triggers of interest, comma separated for Zorro"};
270270

271271
// TOF nsigma configurable cuts (defaults: very loose = 9999)
272-
Configurable<float> maxAbsTofNsigmaTrackPi{"maxAbsTofNsigmaTrackPi", 9999.f, "Max abs TOF nsigma for charm bachelor track as pion"};
273-
Configurable<float> maxAbsTofNsigmaTrackKa{"maxAbsTofNsigmaTrackKa", 9999.f, "Max abs TOF nsigma for charm bachelor track as kaon"};
274-
Configurable<float> maxAbsTofNsigmaV0Pr{"maxAbsTofNsigmaV0Pr", 9999.f, "Max abs TOF nsigma for V0 proton"};
275-
Configurable<float> maxAbsTofNsigmaV0Pi{"maxAbsTofNsigmaV0Pi", 9999.f, "Max abs TOF nsigma for V0 pion"};
276-
Configurable<float> maxAbsTofNsigmaBachelorPi{"maxAbsTofNsigmaBachelorPi", 9999.f, "Max abs TOF nsigma for cascade bachelor as pion"};
277-
Configurable<float> maxAbsTofNsigmaBachelorKa{"maxAbsTofNsigmaBachelorKa", 9999.f, "Max abs TOF nsigma for cascade bachelor as kaon"};
272+
Configurable<float> maxAbsTofnSigmaTrackPi{"maxAbsTofnSigmaTrackPi", 9999.f, "Max abs TOF nsigma for charm bachelor track as pion"};
273+
Configurable<float> maxAbsTofnSigmaTrackKa{"maxAbsTofnSigmaTrackKa", 9999.f, "Max abs TOF nsigma for charm bachelor track as kaon"};
274+
Configurable<float> maxAbsTofnSigmaV0Pr{"maxAbsTofnSigmaV0Pr", 9999.f, "Max abs TOF nsigma for V0 proton"};
275+
Configurable<float> maxAbsTofnSigmaV0Pi{"maxAbsTofnSigmaV0Pi", 9999.f, "Max abs TOF nsigma for V0 pion"};
276+
Configurable<float> maxAbsTofnSigmaBachelorPi{"maxAbsTofnSigmaBachelorPi", 9999.f, "Max abs TOF nsigma for cascade bachelor as pion"};
277+
Configurable<float> maxAbsTofnSigmaBachelorKa{"maxAbsTofnSigmaBachelorKa", 9999.f, "Max abs TOF nsigma for cascade bachelor as kaon"};
278278
// whether to require TOF in addition to TPC
279279
Configurable<bool> useTofPid{"useTofPid", false, "Require TOF PID together with TPC PID when true; otherwise use TPC only"};
280280

281-
// pT cut for CharmBaryon
281+
//pT cut for CharmBaryon
282282
Configurable<float> minPtCharmedBaryon{"minPtCharmedBaryon", 0.f, "Minimum pT for the charmed baryon"};
283283
Configurable<float> maxPtCharmedBaryon{"maxPtCharmedBaryon", 50.f, "Maximum pT for the charmed baryon"};
284284

285285
// CPA cuts (defaults: >= 0.9)
286286
Configurable<float> minCpaCharmedBaryon{"minCpaCharmedBaryon", 0.9f, "Minimum CPA for charmed baryon"};
287-
Configurable<float> minCpaXYCharmedBaryon{"minCpaXYCharmedBaryon", 0.9f, "Minimum CPA XY for charmed baryon"}; // remove maybe???
287+
Configurable<float> minCpaXYCharmedBaryon{"minCpaXYCharmedBaryon", 0.9f, "Minimum CPA XY for charmed baryon"};//remove maybe???
288288
Configurable<float> minCpaCasc{"minCpaCasc", 0.9f, "Minimum CPA for cascade"};
289289
Configurable<float> minCpaXYCasc{"minCpaXYCasc", 0.9f, "Minimum CPA XY for cascade"};
290290

@@ -494,15 +494,15 @@ struct HfTreeCreatorOmegacSt {
494494
const auto matCorr = static_cast<o2::base::Propagator::MatCorrType>(materialCorrectionType.value);
495495

496496
for (const auto& collision : collisions) {
497-
// Event selection & centrality using HF helper
498-
float centrality{-1.f};
499-
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentEstimator, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
500-
if (rejectionMask != 0) {
501-
continue; // reject collisions failing HF event selection
502-
}
503-
// record event-level monitoring (centrality, vertex, etc.)
504-
hfEvSel.fillHistograms(collision, rejectionMask, centrality);
505-
const auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
497+
// Event selection & centrality using HF helper
498+
float centrality{-1.f};
499+
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentEstimator, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
500+
if (rejectionMask != 0) {
501+
continue; // reject collisions failing HF event selection
502+
}
503+
// record event-level monitoring (centrality, vertex, etc.)
504+
hfEvSel.fillHistograms(collision, rejectionMask, centrality);
505+
const auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
506506
if (runNumber != bc.runNumber()) {
507507
if (skimmedProcessing) {
508508
if (runNumber == 0) {
@@ -646,17 +646,17 @@ struct HfTreeCreatorOmegacSt {
646646
const bool tpcBachelor = (std::abs(bachelor.tpcNSigmaKa()) < maxNSigmaBachelor) || (std::abs(bachelor.tpcNSigmaPi()) < maxNSigmaBachelor);
647647
const float tofBachelorPiAbs = std::abs(bachelor.tofNSigmaPi());
648648
const float tofBachelorKaAbs = std::abs(bachelor.tofNSigmaKa());
649-
const bool tofBachelorPiPass = (tofBachelorPiAbs > TofWoSignalRange[0] && tofBachelorPiAbs < TofWoSignalRange[1]) || (tofBachelorPiAbs < maxAbsTofNsigmaBachelorPi);
650-
const bool tofBachelorKaPass = (tofBachelorKaAbs > TofWoSignalRange[0] && tofBachelorKaAbs < TofWoSignalRange[1]) || (tofBachelorKaAbs < maxAbsTofNsigmaBachelorKa);
649+
const bool tofBachelorPiPass = (tofBachelorPiAbs > TofWoSignalRange[0] && tofBachelorPiAbs < TofWoSignalRange[1]) || (tofBachelorPiAbs < maxAbsTofnSigmaBachelorPi);
650+
const bool tofBachelorKaPass = (tofBachelorKaAbs > TofWoSignalRange[0] && tofBachelorKaAbs < TofWoSignalRange[1]) || (tofBachelorKaAbs < maxAbsTofnSigmaBachelorKa);
651651
const bool tofBachelorPass = tofBachelorPiPass || tofBachelorKaPass;
652652
const bool bachelorPass = useTofPid.value ? (tpcBachelor && tofBachelorPass) : tpcBachelor;
653653

654654
const bool tpcV0Pr = (std::abs(v0TrackPr.tpcNSigmaPr()) < maxNSigmaV0Pr);
655655
const bool tpcV0Pi = (std::abs(v0TrackPi.tpcNSigmaPi()) < maxNSigmaV0Pi);
656656
const float tofV0PrAbs = std::abs(v0TrackPr.tofNSigmaPr());
657657
const float tofV0PiAbs = std::abs(v0TrackPi.tofNSigmaPi());
658-
const bool tofV0PrPass = (tofV0PrAbs > TofWoSignalRange[0] && tofV0PrAbs < TofWoSignalRange[1]) || (tofV0PrAbs < maxAbsTofNsigmaV0Pr);
659-
const bool tofV0PiPass = (tofV0PiAbs > TofWoSignalRange[0] && tofV0PiAbs < TofWoSignalRange[1]) || (tofV0PiAbs < maxAbsTofNsigmaV0Pi);
658+
const bool tofV0PrPass = (tofV0PrAbs > TofWoSignalRange[0] && tofV0PrAbs < TofWoSignalRange[1]) || (tofV0PrAbs < maxAbsTofnSigmaV0Pr);
659+
const bool tofV0PiPass = (tofV0PiAbs > TofWoSignalRange[0] && tofV0PiAbs < TofWoSignalRange[1]) || (tofV0PiAbs < maxAbsTofnSigmaV0Pi);
660660
const bool v0PrPass = useTofPid.value ? (tpcV0Pr && tofV0PrPass) : tpcV0Pr;
661661
const bool v0PiPass = useTofPid.value ? (tpcV0Pi && tofV0PiPass) : tpcV0Pi;
662662

@@ -696,12 +696,12 @@ struct HfTreeCreatorOmegacSt {
696696
(track.tpcNClsCrossedRows() >= TpcNclsFindableFraction * track.tpcNClsFindable()) &&
697697
(track.tpcChi2NCl() <= TpcChi2NclMax) &&
698698
(track.itsChi2NCl() <= ItsChi2NclMax)) {
699-
// TPC and TOF PID for pion/kaon from chambaryon
699+
//TPC and TOF PID for pion/kaon from chambaryon
700700
const bool passTPCpid = (std::abs(track.tpcNSigmaPi()) < maxNSigmaPion) || (std::abs(track.tpcNSigmaKa()) < maxNSigmaKaon);
701701
const float tofPiAbs = std::abs(track.tofNSigmaPi());
702702
const float tofKaAbs = std::abs(track.tofNSigmaKa());
703-
const bool tofPiPass = (tofPiAbs > TofWoSignalRange[0] && tofPiAbs < TofWoSignalRange[1]) || (tofPiAbs < maxAbsTofNsigmaTrackPi);
704-
const bool tofKaPass = (tofKaAbs > TofWoSignalRange[0] && tofKaAbs < TofWoSignalRange[1]) || (tofKaAbs < maxAbsTofNsigmaTrackKa);
703+
const bool tofPiPass = (tofPiAbs > TofWoSignalRange[0] && tofPiAbs < TofWoSignalRange[1]) || (tofPiAbs < maxAbsTofnSigmaTrackPi);
704+
const bool tofKaPass = (tofKaAbs > TofWoSignalRange[0] && tofKaAbs < TofWoSignalRange[1]) || (tofKaAbs < maxAbsTofnSigmaTrackKa);
705705
const bool passTOFpid = tofPiPass || tofKaPass;
706706
if (useTofPid.value) {
707707
if (!(passTPCpid && passTOFpid)) {
@@ -799,10 +799,10 @@ struct HfTreeCreatorOmegacSt {
799799
//--- do the MC Rec match
800800
if (mcParticles) {
801801
auto arrayDaughters = std::array{
802-
trackId.template track_as<TracksExtMc>(), // bachelor <- charm baryon
803-
casc.template bachelor_as<TracksExtMc>(), // bachelor <- cascade
804-
v0.template posTrack_as<TracksExtMc>(), // p <- lambda
805-
v0.template negTrack_as<TracksExtMc>()}; // pi <- lambda
802+
trackId.template track_as<TracksExtMc>(), // bachelor <- charm baryon
803+
casc.template bachelor_as<TracksExtMc>(), // bachelor <- cascade
804+
v0.template posTrack_as<TracksExtMc>(), // p <- lambda
805+
v0.template negTrack_as<TracksExtMc>()}; // pi <- lambda
806806

807807
auto arrayDaughtersCasc = std::array{
808808
casc.template bachelor_as<TracksExtMc>(), // bachelor <- cascade
@@ -896,7 +896,7 @@ struct HfTreeCreatorOmegacSt {
896896
bachelor.tpcNSigmaKa(),
897897
bachelor.tofNSigmaKa(),
898898
momenta[0][0], // cascade momentum
899-
momenta[0][1],
899+
momenta[0][1],
900900
momenta[0][2],
901901
static_cast<bool>(trackCasc.sign() > 0),
902902
momenta[1][0], // pion/kaon momentum
@@ -950,45 +950,46 @@ struct HfTreeCreatorOmegacSt {
950950
}
951951
}
952952
}
953+
954+
// No centrality selection
955+
void processDataNocent(Collisions const& collisions,
956+
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
957+
aod::TrackAssoc const& trackIndices,
958+
aod::Cascades const&,
959+
aod::V0s const&,
960+
TracksExt const&,
961+
aod::BCsWithTimestamps const&)
962+
{
963+
fillTable<CentralityEstimator::None, TracksExt>(collisions, trackedCascades, trackIndices);
964+
}
965+
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataNocent, "Process data (No centrality)", true);
966+
967+
// FT0C centrality selection
968+
void processDataFT0C(CollisionsFT0C const& collisions,
969+
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
970+
aod::TrackAssoc const& trackIndices,
971+
aod::Cascades const&,
972+
aod::V0s const&,
973+
TracksExt const&,
974+
aod::BCsWithTimestamps const&)
975+
{
976+
fillTable<CentralityEstimator::FT0C, TracksExt>(collisions, trackedCascades, trackIndices);
977+
}
978+
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataFT0C, "Process data (FT0C centrality)", false);
979+
980+
// FT0M centrality selection
981+
void processDataFT0M(CollisionsFT0M const& collisions,
982+
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
983+
aod::TrackAssoc const& trackIndices,
984+
aod::Cascades const&,
985+
aod::V0s const&,
986+
TracksExt const&,
987+
aod::BCsWithTimestamps const&)
988+
{
989+
fillTable<CentralityEstimator::FT0M, TracksExt>(collisions, trackedCascades, trackIndices);
990+
}
991+
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataFT0M, "Process data (FT0M centrality)", false);
953992

954-
// No centrality selection
955-
void processDataNocent(Collisions const& collisions,
956-
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
957-
aod::TrackAssoc const& trackIndices,
958-
aod::Cascades const&,
959-
aod::V0s const&,
960-
TracksExt const&,
961-
aod::BCsWithTimestamps const&)
962-
{
963-
fillTable<CentralityEstimator::None, TracksExt>(collisions, trackedCascades, trackIndices);
964-
}
965-
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataNocent, "Process data (No centrality)", true);
966-
967-
// FT0C centrality selection
968-
void processDataFT0C(CollisionsFT0C const& collisions,
969-
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
970-
aod::TrackAssoc const& trackIndices,
971-
aod::Cascades const&,
972-
aod::V0s const&,
973-
TracksExt const&,
974-
aod::BCsWithTimestamps const&)
975-
{
976-
fillTable<CentralityEstimator::FT0C, TracksExt>(collisions, trackedCascades, trackIndices);
977-
}
978-
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataFT0C, "Process data (FT0C centrality)", false);
979-
980-
// FT0M centrality selection
981-
void processDataFT0M(CollisionsFT0M const& collisions,
982-
soa::SmallGroups<aod::AssignedTrackedCascades> const& trackedCascades,
983-
aod::TrackAssoc const& trackIndices,
984-
aod::Cascades const&,
985-
aod::V0s const&,
986-
TracksExt const&,
987-
aod::BCsWithTimestamps const&)
988-
{
989-
fillTable<CentralityEstimator::FT0M, TracksExt>(collisions, trackedCascades, trackIndices);
990-
}
991-
PROCESS_SWITCH(HfTreeCreatorOmegacSt, processDataFT0M, "Process data (FT0M centrality)", false);
992993

993994
// MC reco: No centrality selection
994995
void processMcRecNocent(Collisions const& collisions,

0 commit comments

Comments
 (0)