Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a7c276c
add dcaxy pt-dep
EmilGorm Jul 24, 2025
ba4d0cf
Please consider the following formatting changes
alibuild Jul 24, 2025
3db874c
Merge pull request #26 from alibuild/alibot-cleanup-12222
EmilGorm Jul 24, 2025
33362f0
[PWGHF] Fix filling of MC collision info in OmegaC creator (#12208)
fcatalan92 Jul 24, 2025
d38bcd9
[PWGHF] Fix misleading histogram in event selection utils (#12215)
fcatalan92 Jul 24, 2025
1367ef2
[PWGCF] flowTask: small fix; diHadron: add PID (#12216)
Luzhiyongg Jul 24, 2025
adbc62f
[Common] Update centrality task with run dependant histograms (#12209)
jesgum Jul 24, 2025
5a54590
[PWGJE] Added process function for inc particles (#12172)
arvindkhuntia Jul 24, 2025
34941c9
[PWGJE] Jet Fragmentation & V0 QA (#12170)
GijsvWeelden Jul 24, 2025
3a4fab3
[PWGLF] Add changes in track selection (#12217)
gbencedi Jul 24, 2025
1d642b0
[PWGHF] D2H fitter: Add possibility to set fixed manual mean and seco…
saganatt Jul 24, 2025
91a11c4
[PWGLF] fixing bb implementation and adding cfg for tof mass cut (#12…
mherzer28 Jul 24, 2025
18e1288
[PWGLF] Add rotational bkg and configurables for secondary selections…
SuJeong-Ji Jul 24, 2025
d1e9eb4
[PWGLF] To add Charged K* production task without ResoInitializer, wi…
navneetkumar231295 Jul 24, 2025
a127c43
[PWGLF] Switch from THnD to THnSparse (#12228)
romainschotter Jul 24, 2025
a72bce2
[PWGLF] Fix MC info resetting in decay3bodybuilder (#12219)
creetz16 Jul 24, 2025
ef01a4b
[Common] Add disabling of track propagation if not needed (#12160)
ddobrigk Jul 25, 2025
17ea070
[PWGLF] Add flag to use T0M or V0A-based Nch rejection (#12232)
omvazque Jul 25, 2025
c650ea1
[PWGLF] Added new process function for rotational method (#12164)
hkoley Jul 25, 2025
4709074
[PWGLF] Added the part of same event of KstarInOO.cxx (#12197)
JimunLee Jul 25, 2025
8fffea0
[PWGLF] Update in track and event selection cuts (#12227)
tutripat Jul 25, 2025
10d1a06
[PWGLF] Added configurable for event selection (#12235)
gbencedi Jul 25, 2025
2006b96
[PWGHF] D0 reflection removal (#11926)
samrangy Jul 25, 2025
2c87750
[PWGUD] Removed filters for Event and track counts (#12146)
ananthapadmanabhan18 Jul 25, 2025
67ad209
extend mult axes
EmilGorm Jul 25, 2025
8d397bf
Please consider the following formatting changes
alibuild Jul 25, 2025
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
1 change: 1 addition & 0 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT
mult::MFTNalltracks, mult::MFTNtracks);
using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;
using Mults = soa::Join<BarrelMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
using MultsRun3 = soa::Join<TPCMults, PVMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
using FT0Mult = FT0Mults::iterator;
using MFTMult = MFTMults::iterator;
using Mult = Mults::iterator;
Expand Down
191 changes: 163 additions & 28 deletions Common/Tasks/centralityStudy.cxx

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion Common/Tools/TrackPropagationModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or submit itself to any jurisdiction.

/// \file TrackPropagationModule.h
/// \brief track propagation module functionality to be used in tasks
/// \brief track propagation module functionality to be used in core services
/// \author ALICE

#ifndef COMMON_TOOLS_TRACKPROPAGATIONMODULE_H_
Expand Down Expand Up @@ -73,6 +73,7 @@ class TrackPropagationModule
}

// controls behaviour
bool fillTracks = false;
bool fillTracksCov = false;
bool fillTracksDCA = false;
bool fillTracksDCACov = false;
Expand All @@ -93,10 +94,15 @@ class TrackPropagationModule
void init(TConfigurableGroup const& cGroup, THistoRegistry& registry, TInitContext& initContext)
{
// Checking if the tables are requested in the workflow and enabling them
fillTracks = isTableRequiredInWorkflow(initContext, "Tracks");
fillTracksCov = isTableRequiredInWorkflow(initContext, "TracksCov");
fillTracksDCA = isTableRequiredInWorkflow(initContext, "TracksDCA");
fillTracksDCACov = isTableRequiredInWorkflow(initContext, "TracksDCACov");

if (!fillTracks) {
LOGF(info, "Track propagation to PV not required. Suppressing all further processing and logs.");
}

/// TrackTuner initialization
if (cGroup.useTrackTuner.value) {
std::string outputStringParams = "";
Expand Down Expand Up @@ -129,6 +135,10 @@ class TrackPropagationModule
template <bool isMc, typename TConfigurableGroup, typename TCCDBLoader, typename TCollisions, typename TTracks, typename TOutputGroup, typename THistoRegistry>
void fillTrackTables(TConfigurableGroup const& cGroup, TCCDBLoader const& ccdbLoader, TCollisions const& collisions, TTracks const& tracks, TOutputGroup& cursors, THistoRegistry& registry)
{
if (!fillTracks) {
return; // suppress everything
}

if (fillTracksCov) {
cursors.tracksParCovPropagated.reserve(tracks.size());
cursors.tracksParCovExtensionPropagated.reserve(tracks.size());
Expand Down
45 changes: 29 additions & 16 deletions PWGCF/Flow/Tasks/flowPtEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,32 @@
/// \since Jun/08/2023
/// \brief a task to calculate the pt efficiency

#include <CCDB/BasicCCDBManager.h>
#include <vector>
#include <string>
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/HistogramRegistry.h"
#include "FlowContainer.h"
#include "GFW.h"
#include "GFWCumulant.h"
#include "GFWPowerArray.h"
#include "GFWWeights.h"

#include "Common/Core/RecoDecay.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/TrackSelectionDefaults.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "GFWPowerArray.h"
#include "GFW.h"
#include "GFWCumulant.h"
#include "GFWWeights.h"
#include "FlowContainer.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/runDataProcessing.h"
#include <CCDB/BasicCCDBManager.h>

#include <TF1.h>
#include <TPDGCode.h>
#include <TProfile.h>
#include <TRandom3.h>
#include <TPDGCode.h>

#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -57,6 +60,8 @@ struct FlowPtEfficiency {
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
O2_DEFINE_CONFIGURABLE(cfgCutTPCcrossedrows, float, 70.0f, "minimum TPC crossed rows")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 0.2f, "DCAxy cut for tracks")
O2_DEFINE_CONFIGURABLE(cfgDCAxyNSigma, float, 7, "Cut on number of sigma deviations from expected DCA in the transverse direction");
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunction, std::string, "(0.0015+0.005/(x^1.1))", "Functional form of pt-dependent DCAxy cut");
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "DCAz cut for tracks")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxyppPass3Enabled, bool, false, "switch of ppPass3 DCAxy pt dependent cut")
O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut")
Expand Down Expand Up @@ -128,6 +133,7 @@ struct FlowPtEfficiency {
std::vector<GFW::CorrConfig> corrconfigsTruth;
std::vector<GFW::CorrConfig> corrconfigsReco;
TRandom3* fRndm = new TRandom3(0);
TF1* fPtDepDCAxy = nullptr;

bool isStable(int pdg)
{
Expand Down Expand Up @@ -230,7 +236,14 @@ struct FlowPtEfficiency {
if (cfgCutDCAxyppPass3Enabled) {
myTrackSel.SetMaxDcaXYPtDep([](float pt) { return 0.004f + 0.013f / pt; });
} else {
myTrackSel.SetMaxDcaXY(cfgCutDCAxy);
if (cfgCutDCAxy != 0.0) {
myTrackSel.SetMaxDcaXY(cfgCutDCAxy);
} else {
fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgDCAxyFunction->c_str()), 0.001, 100);
fPtDepDCAxy->SetParameter(0, cfgDCAxyNSigma);
LOGF(info, "DCAxy pt-dependence function: %s", Form("[0]*%s", cfgDCAxyFunction->c_str()));
myTrackSel.SetMaxDcaXYPtDep([fPtDepDCAxy = this->fPtDepDCAxy](float pt) { return fPtDepDCAxy->Eval(pt); });
}
}
myTrackSel.SetMinNClustersTPC(cfgCutTPCclu);
myTrackSel.SetMinNCrossedRowsTPC(cfgCutTPCcrossedrows);
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Flow/Tasks/flowTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ struct FlowTask {
corrconfigs.push_back(fGFW->GetCorrelatorConfig(userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str(), kFALSE));
}
}
fGFW->CreateRegions();

gfwConfigs.SetCorrs(cfgUserPtVnCorrConfig->GetCorrs());
gfwConfigs.SetHeads(cfgUserPtVnCorrConfig->GetHeads());
Expand All @@ -447,6 +446,7 @@ struct FlowTask {
for (auto i = 0; i < gfwConfigs.GetSize(); ++i) {
corrconfigsPtVn.push_back(fGFW->GetCorrelatorConfig(gfwConfigs.GetCorrs()[i], gfwConfigs.GetHeads()[i], gfwConfigs.GetpTDifs()[i]));
}
fGFW->CreateRegions();

if (cfgUseAdditionalEventCut) {
fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100);
Expand Down
5 changes: 3 additions & 2 deletions PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ struct FlowGfwLightIons {
});
AxisSpec bAxis = {bbinning, "#it{b}"};
AxisSpec t0cAxis = {1000, 0, 10000, "N_{ch} (T0C)"};
AxisSpec t0aAxis = {500, 0, 500, "N_{ch} (T0A)"};
AxisSpec v0aAxis = {500, 0, 500, "N_{ch} (V0A)"};
AxisSpec t0aAxis = {300, 0, 30000, "N_{ch} (T0A)"};
AxisSpec v0aAxis = {800, 0, 80000, "N_{ch} (V0A)"};
AxisSpec multpvAxis = {600, 0, 600, "N_{ch} (PV)"};
AxisSpec dcaZAXis = {200, -2, 2, "DCA_{z} (cm)"};
AxisSpec dcaXYAXis = {200, -0.5, 0.5, "DCA_{xy} (cm)"};
Expand Down Expand Up @@ -1199,6 +1199,7 @@ struct FlowGfwLightIons {
for (const auto& collision : collisions) {
centrality = getCentrality(collision);
}

std::vector<int> numberOfTracks;
for (auto const& collision : collisions) {
auto groupedTracks = tracks.sliceBy(perCollision, collision.globalIndex());
Expand Down
129 changes: 103 additions & 26 deletions PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,44 @@
/// \author Zhiyong Lu (zhiyong.lu@cern.ch)
/// \since May/03/2025

#include <CCDB/BasicCCDBManager.h>
#include "TRandom3.h"
#include "TF1.h"
#include <vector>
#include <string>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/StepTHn.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/RunningWorkflowInfo.h"
#include "CommonConstants/MathConstants.h"
#include "Common/Core/RecoDecay.h"

#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/Centrality.h"
#include "PWGCF/DataModel/CorrelationsDerived.h"
#include "Common/DataModel/CollisionAssociationTables.h"
#include "Common/DataModel/PIDResponse.h"
#include "PWGCF/Core/CorrelationContainer.h"
#include "PWGCF/Core/PairCuts.h"
#include "PWGCF/GenericFramework/Core/GFWPowerArray.h"
#include "PWGCF/DataModel/CorrelationsDerived.h"
#include "PWGCF/GenericFramework/Core/GFW.h"
#include "PWGCF/GenericFramework/Core/GFWCumulant.h"
#include "PWGCF/GenericFramework/Core/GFWPowerArray.h"
#include "PWGCF/GenericFramework/Core/GFWWeights.h"
#include "DataFormatsParameters/GRPObject.h"

#include "Common/Core/RecoDecay.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/CollisionAssociationTables.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseITS.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "CommonConstants/MathConstants.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/StepTHn.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/PID.h"
#include "ReconstructionDataFormats/Track.h"
#include <CCDB/BasicCCDBManager.h>

#include "TF1.h"
#include "TRandom3.h"
#include <TPDGCode.h>

#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
Expand Down Expand Up @@ -98,6 +103,9 @@ struct DiHadronCor {
O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event")
O2_DEFINE_CONFIGURABLE(cfgUsePtOrder, bool, true, "enable trigger pT < associated pT cut")
O2_DEFINE_CONFIGURABLE(cfgUsePtOrderInMixEvent, bool, true, "enable trigger pT < associated pT cut in mixed event")
O2_DEFINE_CONFIGURABLE(cfgPIDUseITSPID, bool, true, "Use ITS PID for particle identification")
O2_DEFINE_CONFIGURABLE(cfgPIDTofPtCut, float, 0.5f, "Minimum pt to use TOF N-sigma")
O2_DEFINE_CONFIGURABLE(cfgPIDParticle, int, 0, "1 = pion, 2 = kaon, 3 = proton, 0 for no PID")

SliceCache cache;

Expand All @@ -112,6 +120,9 @@ struct DiHadronCor {
ConfigurableAxis axisVtxMix{"axisVtxMix", {VARIABLE_WIDTH, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "vertex axis for mixed event histograms"};
ConfigurableAxis axisMultMix{"axisMultMix", {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260}, "multiplicity / centrality axis for mixed event histograms"};
ConfigurableAxis axisSample{"axisSample", {cfgSampleSize, 0, cfgSampleSize}, "sample axis for histograms"};
Configurable<std::vector<double>> pidTofNsigmaCut{"pidTofNsigmaCut", std::vector<double>{1.5, 1.5, 1.5, -1.5, -1.5, -1.5}, "TOF n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"};
Configurable<std::vector<double>> pidItsNsigmaCut{"pidItsNsigmaCut", std::vector<double>{3, 3, 3, -3, -3, -3}, "ITS n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"};
Configurable<std::vector<double>> pidTpcNsigmaCut{"pidTpcNsigmaCut", std::vector<double>{10, 10, 10, -10, -10, -10}, "TOF n-sigma cut for pions_posNsigma, kaons_posNsigma, protons_posNsigma, pions_negNsigma, kaons_negNsigma, protons_negNsigma"};

ConfigurableAxis axisVertexEfficiency{"axisVertexEfficiency", {10, -10, 10}, "vertex axis for efficiency histograms"};
ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", {20, -1.0, 1.0}, "eta axis for efficiency histograms"};
Expand All @@ -121,7 +132,7 @@ struct DiHadronCor {
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFbeta, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>>;
using FilteredTracksWithMCLabels = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>>;

// Filter for MCParticle
Expand Down Expand Up @@ -160,6 +171,15 @@ struct DiHadronCor {
SameEvent = 1,
MixedEvent = 3
};
std::vector<double> tofNsigmaCut;
std::vector<double> itsNsigmaCut;
std::vector<double> tpcNsigmaCut;
o2::aod::ITSResponse itsResponse;
enum Particles {
PIONS,
KAONS,
PROTONS
};

// persistent caches
std::vector<float> efficiencyAssociatedCache;
Expand Down Expand Up @@ -290,6 +310,10 @@ struct DiHadronCor {
same.setObject(new CorrelationContainer("sameEvent", "sameEvent", corrAxis, effAxis, userAxis));
mixed.setObject(new CorrelationContainer("mixedEvent", "mixedEvent", corrAxis, effAxis, userAxis));

tofNsigmaCut = pidTofNsigmaCut;
itsNsigmaCut = pidItsNsigmaCut;
tpcNsigmaCut = pidTpcNsigmaCut;

LOGF(info, "End of init");
}

Expand Down Expand Up @@ -334,6 +358,9 @@ struct DiHadronCor {
template <typename TTrack>
bool trackSelected(TTrack track)
{
if (cfgPIDParticle && getNsigmaPID(track) != cfgPIDParticle) {
return false;
}
return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu));
}

Expand Down Expand Up @@ -962,6 +989,56 @@ struct DiHadronCor {
}
}
PROCESS_SWITCH(DiHadronCor, processOntheflyMixed, "Process on-the-fly mixed events", false);

template <typename TTrack>
int getNsigmaPID(TTrack track)
{
// Computing Nsigma arrays for pion, kaon, and protons
std::array<float, 3> nSigmaTPC = {track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr()};
std::array<float, 3> nSigmaTOF = {track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr()};
std::array<float, 3> nSigmaITS = {itsResponse.nSigmaITS<o2::track::PID::Pion>(track), itsResponse.nSigmaITS<o2::track::PID::Kaon>(track), itsResponse.nSigmaITS<o2::track::PID::Proton>(track)};
int pid = -1;

std::array<float, 3> nSigmaToUse = cfgPIDUseITSPID ? nSigmaITS : nSigmaTPC; // Choose which nSigma to use: TPC or ITS
std::vector<double> detectorNsigmaCut = cfgPIDUseITSPID ? itsNsigmaCut : tpcNsigmaCut; // Choose which nSigma to use: TPC or ITS

bool isPion, isKaon, isProton;
bool isDetectedPion = nSigmaToUse[0] < detectorNsigmaCut[0] && nSigmaToUse[0] > detectorNsigmaCut[0 + 3];
bool isDetectedKaon = nSigmaToUse[1] < detectorNsigmaCut[1] && nSigmaToUse[1] > detectorNsigmaCut[1 + 3];
bool isDetectedProton = nSigmaToUse[2] < detectorNsigmaCut[2] && nSigmaToUse[2] > detectorNsigmaCut[2 + 3];

bool isTofPion = nSigmaTOF[0] < tofNsigmaCut[0] && nSigmaTOF[0] > tofNsigmaCut[0 + 3];
bool isTofKaon = nSigmaTOF[1] < tofNsigmaCut[1] && nSigmaTOF[1] > tofNsigmaCut[1 + 3];
bool isTofProton = nSigmaTOF[2] < tofNsigmaCut[2] && nSigmaTOF[2] > tofNsigmaCut[2 + 3];

if (track.pt() > cfgPIDTofPtCut && !track.hasTOF()) {
return 0;
} else if (track.pt() > cfgPIDTofPtCut && track.hasTOF()) {
isPion = isTofPion && isDetectedPion;
isKaon = isTofKaon && isDetectedKaon;
isProton = isTofProton && isDetectedProton;
} else {
isPion = isDetectedPion;
isKaon = isDetectedKaon;
isProton = isDetectedProton;
}

if ((isPion && isKaon) || (isPion && isProton) || (isKaon && isProton)) {
return 0; // more than one particle satisfy the criteria
}

if (isPion) {
pid = PIONS;
} else if (isKaon) {
pid = KAONS;
} else if (isProton) {
pid = PROTONS;
} else {
return 0; // no particle satisfies the criteria
}

return pid + 1; // shift the pid by 1, 1 = pion, 2 = kaon, 3 = proton
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
19 changes: 17 additions & 2 deletions PWGHF/D2H/Macros/HFInvMassFitter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,16 @@ void HFInvMassFitter::drawFit(TVirtualPad* pad, Int_t writeFitInfo)
} else {
textInfoRight->AddText(Form("mean(free) = %.3f #pm %.3f", mRooMeanSgn->getVal(), mRooMeanSgn->getError()));
}
if (mFixedSigma) {
if (mTypeOfSgnPdf == DoubleGaus) {
auto const& baseSigmaSgn = mWorkspace->var("sigma");
if (mFixedSigmaDoubleGaus) {
textInfoRight->AddText(Form("sigma(fixed) = %.3f #pm %.3f", baseSigmaSgn->getVal(), baseSigmaSgn->getError()));
textInfoRight->AddText(Form("sigma 2(fixed) = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
} else {
textInfoRight->AddText(Form("sigma(free) = %.3f #pm %.3f", baseSigmaSgn->getVal(), baseSigmaSgn->getError()));
textInfoRight->AddText(Form("sigma 2(free) = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
}
} else if (mFixedSigma) {
textInfoRight->AddText(Form("sigma(fixed) = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
} else {
textInfoRight->AddText(Form("sigma(free) = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
Expand Down Expand Up @@ -619,7 +628,13 @@ void HFInvMassFitter::drawResidual(TVirtualPad* pad)
textInfo->AddText(Form("S = %.0f #pm %.0f ", mRawYield, mRawYieldErr));
textInfo->AddText(Form("S_{count} = %.0f #pm %.0f ", mRawYieldCounted, mRawYieldCountedErr));
textInfo->AddText(Form("mean = %.3f #pm %.3f", mRooMeanSgn->getVal(), mRooMeanSgn->getError()));
textInfo->AddText(Form("sigma = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
if (mTypeOfSgnPdf == DoubleGaus) {
auto const& baseSigmaSgn = mWorkspace->var("sigma");
textInfo->AddText(Form("sigma = %.3f #pm %.3f", baseSigmaSgn->getVal(), baseSigmaSgn->getError()));
textInfo->AddText(Form("sigma 2 = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
} else {
textInfo->AddText(Form("sigma = %.3f #pm %.3f", mRooSigmaSgn->getVal(), mRooSigmaSgn->getError()));
}
mResidualFrame->addObject(textInfo);
mResidualFrame->Draw();
highlightPeakRegion(mResidualFrame);
Expand Down
Loading
Loading