Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class VarManager : public TObject
kTripleCandidateToPKPi, // e.g. Lambda_c -> p K- pi+
kJpsiHadronMass, // using the real hadron mass
kJpsiPionMass, // treat the hadron as pion
kDsToKKPi, // e.g. Ds+ -> K+ K- pi+ or cc.
kNMaxCandidateTypes
};

Expand Down Expand Up @@ -5843,7 +5844,7 @@ void VarManager::FillDileptonTrackVertexing(C const& collision, T1 const& lepton

procCode = VarManager::fgFitterThreeProngFwd.process(pars1, pars2, pars3);
procCodeJpsi = VarManager::fgFitterTwoProngFwd.process(pars1, pars2);
} else if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi) && trackHasCov) {
} else if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi || candidateType == kDsToKKPi) && trackHasCov) {
if constexpr (candidateType == kBtoJpsiEEK) {
mlepton1 = o2::constants::physics::MassElectron;
mlepton2 = o2::constants::physics::MassElectron;
Expand All @@ -5852,6 +5853,10 @@ void VarManager::FillDileptonTrackVertexing(C const& collision, T1 const& lepton
mlepton1 = o2::constants::physics::MassKaonCharged;
mlepton2 = o2::constants::physics::MassPionCharged;
mtrack = o2::constants::physics::MassPionCharged;
} else if constexpr (candidateType == kDsToKKPi) {
mlepton1 = o2::constants::physics::MassKaonCharged;
mlepton2 = o2::constants::physics::MassKaonCharged;
mtrack = o2::constants::physics::MassPionCharged;
}
std::array<float, 5> lepton1pars = {lepton1.y(), lepton1.z(), lepton1.snp(), lepton1.tgl(), lepton1.signed1Pt()};
std::array<float, 15> lepton1covs = {lepton1.cYY(), lepton1.cZY(), lepton1.cZZ(), lepton1.cSnpY(), lepton1.cSnpZ(),
Expand Down Expand Up @@ -5927,7 +5932,7 @@ void VarManager::FillDileptonTrackVertexing(C const& collision, T1 const& lepton
o2::dataformats::VertexBase primaryVertex = {vtxXYZ, vtxCov};
auto covMatrixPV = primaryVertex.getCov();

if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi) && trackHasCov) {
if constexpr ((candidateType == kBtoJpsiEEK || candidateType == kDstarToD0KPiPi || candidateType == kDsToKKPi) && trackHasCov) {
secondaryVertex = fgFitterThreeProngBarrel.getPCACandidate();
covMatrixPCA = fgFitterThreeProngBarrel.calcPCACovMatrixFlat();
} else if constexpr (candidateType == kBcToThreeMuons && muonHasCov) {
Expand Down
35 changes: 34 additions & 1 deletion PWGDQ/Tasks/tableReader_withAssoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4226,9 +4226,10 @@ struct AnalysisDileptonTrack {

void init(o2::framework::InitContext& context)
{
bool isBarrel = context.mOptions.get<bool>("processBarrelSkimmed");
bool isBarrel = context.mOptions.get<bool>("processBarrelSkimmed") || context.mOptions.get<bool>("processDsToKKPi");
bool isBarrelME = context.mOptions.get<bool>("processBarrelMixedEvent");
bool isBarrelAsymmetric = context.mOptions.get<bool>("processDstarToD0Pi");
bool isDsToKKPi = context.mOptions.get<bool>("processDsToKKPi");
bool isMuon = context.mOptions.get<bool>("processMuonSkimmed");
bool isMuonME = context.mOptions.get<bool>("processMuonMixedEvent");

Expand Down Expand Up @@ -4631,6 +4632,18 @@ struct AnalysisDileptonTrack {
VarManager::FillDileptonHadron(dilepton, track, fValuesHadron);
VarManager::FillDileptonTrackVertexing<TCandidateType, TEventFillMap, TTrackFillMap>(event, lepton1, lepton2, track, fValuesHadron);
}
if constexpr (TCandidateType == VarManager::kDsToKKPi) {
trackSelection = (assoc.isBarrelSelected_raw() & fTrackCutBitMap);
if (trackSelection == 0) {
continue;
}
auto track = assoc.template reducedtrack_as<TTracks>();
if (track.globalIndex() == dilepton.index0Id() || track.globalIndex() == dilepton.index1Id()) {
continue;
}
VarManager::FillDileptonHadron(dilepton, track, fValuesHadron);
VarManager::FillDileptonTrackVertexing<TCandidateType, TEventFillMap, TTrackFillMap>(event, lepton1, lepton2, track, fValuesHadron);
}
Comment on lines +4635 to +4646

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You don't need to add this code, you can just add this case together with the kBtoJpsiEEK. In that same place, I suggest to add an if() statement so that the VarManager::FillEnergyCorrelatorTriple() is called only when the fConfigEnergycorrelator configurable is true. I also suggest to add a new configurable to switch on/off the writing of the "BmesonsTable".

if constexpr (TCandidateType == VarManager::kBcToThreeMuons) {
trackSelection = (assoc.isMuonSelected_raw() & fTrackCutBitMap);
if (trackSelection == 0) {
Expand Down Expand Up @@ -4734,6 +4747,25 @@ struct AnalysisDileptonTrack {
}
}

void processDsToKKPi(o2::soa::Filtered<MyEventsVtxCovSelected> const& events,
o2::soa::Filtered<o2::soa::Join<o2::aod::ReducedTracksAssoc, o2::aod::BarrelTrackCuts>> const& assocs,
MyBarrelTracksWithCov const& tracks,
o2::soa::Filtered<MyDielectronCandidates> const& dileptons)
{
if (events.size() == 0) {
return;
}
if (fCurrentRun != events.begin().runNumber()) {
initParamsFromCCDB(events.begin().timestamp());
fCurrentRun = events.begin().runNumber();
}
for (auto const& event : events) {
auto groupedBarrelAssocs = assocs.sliceBy(trackAssocsPerCollision, event.globalIndex());
auto groupedDielectrons = dileptons.sliceBy(dielectronsPerCollision, event.globalIndex());
runDileptonHadron<VarManager::kDsToKKPi, gkEventFillMapWithCov, gkTrackFillMapWithCov>(event, groupedBarrelAssocs, tracks, groupedDielectrons);
}
}

o2::framework::Preslice<o2::aod::ReducedMuonsAssoc> muonAssocsPerCollision = o2::aod::reducedtrack_association::reducedeventId;
o2::framework::Preslice<MyDimuonCandidates> dimuonsPerCollision = o2::aod::reducedpair::reducedeventId;

Expand Down Expand Up @@ -4910,6 +4942,7 @@ struct AnalysisDileptonTrack {

PROCESS_SWITCH(AnalysisDileptonTrack, processBarrelSkimmed, "Run barrel dilepton-track pairing, using skimmed data", false);
PROCESS_SWITCH(AnalysisDileptonTrack, processDstarToD0Pi, "Run barrel pairing of D0 daughters with pion candidate, using skimmed data", false);
PROCESS_SWITCH(AnalysisDileptonTrack, processDsToKKPi, "Run barrel pairing of K+K- pairs with pion candidate for Ds reconstruction", false);
PROCESS_SWITCH(AnalysisDileptonTrack, processMuonSkimmed, "Run muon dilepton-track pairing, using skimmed data", false);
PROCESS_SWITCH(AnalysisDileptonTrack, processBarrelMixedEvent, "Run barrel dilepton-hadron mixed event pairing", false);
PROCESS_SWITCH(AnalysisDileptonTrack, processMuonMixedEvent, "Run muon dilepton-hadron mixed event pairing", false);
Expand Down
Loading