Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ using namespace o2::framework::expressions;
using namespace o2::analysis::PWGCF;
using namespace boost;

#ifdef INCORPORATEBAYESIANPID
PIDSelectionConfigurable::PIDSelectionConfigurable(std::vector<std::string> pidtpcel, std::vector<std::string> pidtpcmu, std::vector<std::string> pidtpcpi, std::vector<std::string> pidtpcka, std::vector<std::string> pidtpcpr,
std::vector<std::string> pidtofel, std::vector<std::string> pidtofmu, std::vector<std::string> pidtofpi, std::vector<std::string> pidtofka, std::vector<std::string> pidtofpr,
std::vector<std::string> pidbayel, std::vector<std::string> pidbaymu, std::vector<std::string> pidbaypi, std::vector<std::string> pidbayka, std::vector<std::string> pidbaypr)
#else
PIDSelectionConfigurable::PIDSelectionConfigurable(std::vector<std::string> pidtpcel, std::vector<std::string> pidtpcmu, std::vector<std::string> pidtpcpi, std::vector<std::string> pidtpcka, std::vector<std::string> pidtpcpr,
std::vector<std::string> pidtofel, std::vector<std::string> pidtofmu, std::vector<std::string> pidtofpi, std::vector<std::string> pidtofka, std::vector<std::string> pidtofpr)
#endif
: mPidTpcSel_el{},
mPidTpcSel_mu{},
mPidTpcSel_pi{},
Expand Down Expand Up @@ -84,11 +89,13 @@ PIDSelectionConfigurable::PIDSelectionConfigurable(std::vector<std::string> pidt
mPidTofSel_pi = storeCutString(pidtofpi, "tofpi");
mPidTofSel_ka = storeCutString(pidtofka, "tofka");
mPidTofSel_pr = storeCutString(pidtofpr, "tofpr");
#ifdef INCORPORATEBAYESIANPID
mPidBaySel_el = storeCutString(pidbayel, "bayel");
mPidBaySel_mu = storeCutString(pidbaymu, "baymu");
mPidBaySel_pi = storeCutString(pidbaypi, "baypi");
mPidBaySel_ka = storeCutString(pidbayka, "bayka");
mPidBaySel_pr = storeCutString(pidbaypr, "baypr");
#endif
}

ClassImp(PIDSelectionFilterAndAnalysis);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "SkimmingConfigurableCuts.h"
#include "SelectionFilterAndAnalysis.h"

#undef INCORPORATEBAYESIANPID

namespace o2
{
namespace analysis
Expand All @@ -35,6 +37,7 @@ class PIDSelectionConfigurable
friend class PIDSelectionFilterAndAnalysis;

public:
#ifdef INCORPORATEBAYESIANPID
PIDSelectionConfigurable(std::string pidtpcel = "", std::string pidtpcmu = "", std::string pidtpcpi = "", std::string pidtpcka = "", std::string pidtpcpr = "",
std::string pidtofel = "", std::string pidtofmu = "", std::string pidtofpi = "", std::string pidtofka = "", std::string pidtofpr = "",
std::string pidbayel = "", std::string pidbaymu = "", std::string pidbaypi = "", std::string pidbayka = "", std::string pidbaypr = "")
Expand All @@ -44,6 +47,24 @@ class PIDSelectionConfigurable
PIDSelectionConfigurable(std::vector<std::string> pidtpcel, std::vector<std::string> pidtpcmu, std::vector<std::string> pidtpcpi, std::vector<std::string> pidtpcka, std::vector<std::string> pidtpcpr,
std::vector<std::string> pidtofel, std::vector<std::string> pidtofmu, std::vector<std::string> pidtofpi, std::vector<std::string> pidtofka, std::vector<std::string> pidtofpr,
std::vector<std::string> pidbayel, std::vector<std::string> pidbaymu, std::vector<std::string> pidbaypi, std::vector<std::string> pidbayka, std::vector<std::string> pidbaypr);
#else
PIDSelectionConfigurable(std::string pidtpcel = "", std::string pidtpcmu = "", std::string pidtpcpi = "", std::string pidtpcka = "", std::string pidtpcpr = "",
std::string pidtofel = "", std::string pidtofmu = "", std::string pidtofpi = "", std::string pidtofka = "", std::string pidtofpr = "")
: mPidTpcSel_el{pidtpcel},
mPidTpcSel_mu{pidtpcmu},
mPidTpcSel_pi{pidtpcpi},
mPidTpcSel_ka{pidtpcka},
mPidTpcSel_pr{pidtpcpr},
mPidTofSel_el{pidtofel},
mPidTofSel_mu{pidtofmu},
mPidTofSel_pi{pidtofpi},
mPidTofSel_ka{pidtofka},
mPidTofSel_pr{pidtofpr}
{
}
PIDSelectionConfigurable(std::vector<std::string> pidtpcel, std::vector<std::string> pidtpcmu, std::vector<std::string> pidtpcpi, std::vector<std::string> pidtpcka, std::vector<std::string> pidtpcpr,
std::vector<std::string> pidtofel, std::vector<std::string> pidtofmu, std::vector<std::string> pidtofpi, std::vector<std::string> pidtofka, std::vector<std::string> pidtofpr);
#endif

private:
std::string mPidTpcSel_el = "";
Expand Down Expand Up @@ -152,11 +173,13 @@ inline uint64_t PIDSelectionFilterAndAnalysis::Filter(TrackToFilter const& track
filterBrickValue(mCloseNsigmasTOF[kPion], track.tofNSigmaPi());
filterBrickValue(mCloseNsigmasTOF[kKaon], track.tofNSigmaKa());
filterBrickValue(mCloseNsigmasTOF[kProton], track.tofNSigmaPr());
#ifdef INCORPORATEBAYESIANPID
filterBrickValue(mBayesProbability[kElectron], track.bayesEl());
filterBrickValue(mBayesProbability[kMuon], track.bayesMu());
filterBrickValue(mBayesProbability[kPion], track.bayesPi());
filterBrickValue(mBayesProbability[kKaon], track.bayesKa());
filterBrickValue(mBayesProbability[kProton], track.bayesPr());
#endif

mSelectedMask = selectedMask;
return mSelectedMask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct : o2::framework::ConfigurableGroup {
o2::framework::Configurable<std::vector<std::string>> bfield{"evtflt_bfield", {"positive-yes", "negative-yes"}, "B filed polarity cut: both 'yes' default, anything else alternative"};
o2::framework::Configurable<std::vector<std::string>> zvtxsel{"evtflt_zvtx", {"rg{-7.0,7.0}-yes", "rg{-10.0,10.0}-no", "rg{-3.0,3.0}-no"}, "Z vertex cut: first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> centmultsel{"evtflt_centmult", {"mrg{V0M,0,5,10,20,30,40,50,60,70,80}-yes", "mrg{CL1,0,5,10,20,30,40,50,60,70,80}-no"}, "Centrality/Multiplicity cut: first, default, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> pileuprej{"evtflt_pileuprej", {"fnrg{V0M_TPCOUT=-0.5+3.7*x-0.14*x*x, 0.5-3.7*x+0.14*x*x}-yes", "fnrg{V0M_TRKLETS=-0.5+3.7*x-0.14*x*x, 0.5-3.7*x+0.14*x*x}-no"}, "Advanced pile-up rejection cut: first, default, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> pileuprej{"evtflt_pileuprej", {"fnrg{V0M_TPCOUT=-0.5+3.7*x-0.14*x*x,0.5-3.7*x+0.14*x*x}-yes", "fnrg{V0M_TRKLETS=-0.5+3.7*x-0.14*x*x,0.5-3.7*x+0.14*x*x}-no"}, "Advanced pile-up rejection cut: first, default, next, alternatives"};
} eventfilter;

struct : o2::framework::ConfigurableGroup {
Expand Down Expand Up @@ -50,13 +50,15 @@ struct : o2::framework::ConfigurableGroup {
o2::framework::Configurable<std::vector<std::string>> tpcka{"pidflt_tof_ka", {"rg{-3.0,3.0}-yes", "rg{-2.0,2.0}-no", "rg{-3.0,5.0}-no"}, "nsigmas to the tof kaon line, below/above: first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> tpcpr{"pidflt_tof_pr", {"rg{-3.0,3.0}-yes", "rg{-2.0,2.0}-no", "rg{-3.0,5.0}-no"}, "nsigmas to the tof proton line, below/above: first, default value, next, alternatives"};
} pidtoffilter;
#ifdef INCORPORATEBAYESIANPID
struct : ConfigurableGroup {
o2::framework::Configurable<std::vector<std::string>> bayel{"pidflt_bayes_el", {"th{80}-yes", "th{70}-no", "th{90}-no"}, "Bayesian probability for electron (%%): first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> baymu{"pidflt_bayes_mu", {"th{80}-yes", "th{70}-no", "th{90}-no"}, "Bayesian probability for muon (%%): first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> baypi{"pidflt_bayes_pi", {"th{80}-yes", "th{70}-no", "th{90}-no"}, "Bayesian probability for pion (%%): first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> bayka{"pidflt_bayes_ka", {"th{80}-yes", "th{70}-no", "th{90}-no"}, "Bayesian probability for kaon (%%): first, default value, next, alternatives"};
o2::framework::Configurable<std::vector<std::string>> baypr{"pidflt_bayes_pr", {"th{80}-yes", "th{70}-no", "th{90}-no"}, "Bayesian probability for proton (%%): first, default value, next, alternatives"};
} pidbayesfilter;
#endif
} pidfilter;

#endif // O2_ANALYSIS_CFSKIMMINGCONF_H
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "Framework/AnalysisTask.h"
#include "PWGCF/TwoParticleCorrelations/Core/EventSelectionFilterAndAnalysis.h"
#include "PWGCF/TwoParticleCorrelations/Core/TrackSelectionFilterAndAnalysis.h"
#include "PWGCF/TwoParticleCorrelations/Core/PIDSelectionFilterAndAnalysis.h"
#include "PWGCF/TwoParticleCorrelations/DataModel/TwoParticleCorrelationsSkimmed.h"
#include "PWGCF/TwoParticleCorrelations/DataModel/TwoParticleCorrelationsFiltered.h"
#include "Framework/runDataProcessing.h"
Expand Down Expand Up @@ -83,9 +84,14 @@ struct TwoParticleCorrelationsFilter {
PWGCF::TrackSelectionConfigurable trksel(trackfilter.ttype, trackfilter.nclstpc, trackfilter.nxrtpc, trackfilter.nclsits, trackfilter.chi2clustpc,
trackfilter.chi2clusits, trackfilter.xrofctpc, trackfilter.dcaxy, trackfilter.dcaz, trackfilter.ptrange, trackfilter.etarange);
fTrackFilter = new PWGCF::TrackSelectionFilterAndAnalysis(trksel, PWGCF::SelectionFilterAndAnalysis::kAnalysis);
#ifdef INCORPORATEBAYESIANPID
PWGCF::PIDSelectionConfigurable pidsel(pidfilter.pidtpcfilter.tpcel, pidfilter.pidtpcfilter.tpcmu, pidfilter.pidtpcfilter.tpcpi, pidfilter.pidtpcfilter.tpcka, pidfilter.pidtpcfilter.tpcpr,
pidfilter.pidtoffilter.tpcel, pidfilter.pidtoffilter.tpcmu, pidfilter.pidtoffilter.tpcpi, pidfilter.pidtoffilter.tpcka, pidfilter.pidtoffilter.tpcpr,
pidfilter.pidbayesfilter.bayel, pidfilter.pidbayesfilter.baymu, pidfilter.pidbayesfilter.baypi, pidfilter.pidbayesfilter.bayka, pidfilter.pidbayesfilter.baypr);
#else
PWGCF::PIDSelectionConfigurable pidsel(pidfilter.pidtpcfilter.tpcel, pidfilter.pidtpcfilter.tpcmu, pidfilter.pidtpcfilter.tpcpi, pidfilter.pidtpcfilter.tpcka, pidfilter.pidtpcfilter.tpcpr,
pidfilter.pidtoffilter.tpcel, pidfilter.pidtoffilter.tpcmu, pidfilter.pidtoffilter.tpcpi, pidfilter.pidtoffilter.tpcka, pidfilter.pidtoffilter.tpcpr);
#endif
fPIDFilter = new PWGCF::PIDSelectionFilterAndAnalysis(pidsel, PWGCF::SelectionFilterAndAnalysis::kAnalysis);

nReportedTracks = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ namespace o2::analysis::cfskim
{
#define LOGTRACKCOLLISIONS info
#define LOGTRACKTRACKS info

#ifdef INCORPORATEBAYESIANPID
using pidTables = soa::Join<aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr,
aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr,
aod::pidBayesEl, aod::pidBayesMu, aod::pidBayesPi, aod::pidBayesKa, aod::pidBayesPr>;
#else
using pidTables = soa::Join<aod::pidTPCEl, aod::pidTPCMu, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr,
aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr>;
#endif

PWGCF::TrackSelectionFilterAndAnalysis* fTrackFilter = nullptr;
PWGCF::EventSelectionFilterAndAnalysis* fEventFilter = nullptr;
Expand Down Expand Up @@ -136,9 +140,14 @@ struct TwoParticleCorrelationsSkimming {
PWGCF::TrackSelectionConfigurable trksel(trackfilter.ttype, trackfilter.nclstpc, trackfilter.nxrtpc, trackfilter.nclsits, trackfilter.chi2clustpc,
trackfilter.chi2clusits, trackfilter.xrofctpc, trackfilter.dcaxy, trackfilter.dcaz, trackfilter.ptrange, trackfilter.etarange);
fTrackFilter = new PWGCF::TrackSelectionFilterAndAnalysis(trksel, PWGCF::SelectionFilterAndAnalysis::kFilter);
#ifdef INCORPORATEBAYESIANPID
PWGCF::PIDSelectionConfigurable pidsel(pidfilter.pidtpcfilter.tpcel, pidfilter.pidtpcfilter.tpcmu, pidfilter.pidtpcfilter.tpcpi, pidfilter.pidtpcfilter.tpcka, pidfilter.pidtpcfilter.tpcpr,
pidfilter.pidtoffilter.tpcel, pidfilter.pidtoffilter.tpcmu, pidfilter.pidtoffilter.tpcpi, pidfilter.pidtoffilter.tpcka, pidfilter.pidtoffilter.tpcpr,
pidfilter.pidbayesfilter.bayel, pidfilter.pidbayesfilter.baymu, pidfilter.pidbayesfilter.baypi, pidfilter.pidbayesfilter.bayka, pidfilter.pidbayesfilter.baypr);
#else
PWGCF::PIDSelectionConfigurable pidsel(pidfilter.pidtpcfilter.tpcel, pidfilter.pidtpcfilter.tpcmu, pidfilter.pidtpcfilter.tpcpi, pidfilter.pidtpcfilter.tpcka, pidfilter.pidtpcfilter.tpcpr,
pidfilter.pidtoffilter.tpcel, pidfilter.pidtoffilter.tpcmu, pidfilter.pidtoffilter.tpcpi, pidfilter.pidtoffilter.tpcka, pidfilter.pidtoffilter.tpcpr);
#endif
fPIDFilter = new PWGCF::PIDSelectionFilterAndAnalysis(pidsel, PWGCF::SelectionFilterAndAnalysis::kFilter);
nReportedTracks = 0;

Expand Down