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
45 changes: 26 additions & 19 deletions PWGLF/DataModel/LFHStrangeCorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,33 @@ DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN_FULL(Track, track, int, Tracks, "_Assoc"); //!
} // namespace assocPions
DECLARE_SOA_TABLE(AssocPions, "AOD", "ASSOCPIONS", o2::soa::Index<>, assocPions::CollisionId, assocPions::TrackId);

namespace assocHadrons
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN_FULL(Track, track, int, Tracks, "_Assoc"); //!
} // namespace assocHadrons
DECLARE_SOA_TABLE(AssocHadrons, "AOD", "ASSOCHADRONS", o2::soa::Index<>, assocHadrons::CollisionId, assocHadrons::TrackId);
/// _________________________________________
/// Table for storing associated V0 indices
namespace assocV0s
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN(V0Core, v0Core); //!
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN(V0Core, v0Core); //!

// dEdx compatibility is done via encoded integer: 0: passes loose; 1: passes normal, 2: passes tight; definition of loose/normal/tight is in hStrangeCorrelationFilter
DECLARE_SOA_COLUMN(CompatibleK0Short, compatibleK0Short, int); // compatible with K0Short dEdx, encoded syst checks
DECLARE_SOA_COLUMN(CompatibleLambda, compatibleLambda, int); // compatible with Lambda dEdx, encoded syst checks
DECLARE_SOA_COLUMN(CompatibleAntiLambda, compatibleAntiLambda, int); // compatible with AntiLambda dEdx, encoded syst checks

DECLARE_SOA_COLUMN(MCTrueK0Short, mcTrueK0Short, bool); // true K0Short in MC
DECLARE_SOA_COLUMN(MCTrueLambda, mcTrueLambda, bool); // true Lambda in MC
DECLARE_SOA_COLUMN(MCTrueAntiLambda, mcTrueAntiLambda, bool); // true AntiLambda in MC
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // true physical primary flag
DECLARE_SOA_COLUMN(NSigmaMassK0Short, nSigmaMassK0Short, float); //
DECLARE_SOA_COLUMN(NSigmaMassLambda, nSigmaMassLambda, float); //
DECLARE_SOA_COLUMN(MCTrueK0Short, mcTrueK0Short, bool); // true K0Short in MC
DECLARE_SOA_COLUMN(MCTrueLambda, mcTrueLambda, bool); // true Lambda in MC
DECLARE_SOA_COLUMN(MCTrueAntiLambda, mcTrueAntiLambda, bool); // true AntiLambda in MC
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // true physical primary flag
DECLARE_SOA_COLUMN(NSigmaMassK0Short, nSigmaMassK0Short, float); //
DECLARE_SOA_COLUMN(NSigmaMassLambda, nSigmaMassLambda, float); //
DECLARE_SOA_COLUMN(NSigmaMassAntiLambda, nSigmaMassAntiLambda, float); //
DECLARE_SOA_DYNAMIC_COLUMN(Compatible, compatible, //! check compatibility with a hypothesis of a certain number (0 - K0, 1 - L, 2 - Lbar)
DECLARE_SOA_DYNAMIC_COLUMN(Compatible, compatible, //! check compatibility with a hypothesis of a certain number (0 - K0, 1 - L, 2 - Lbar)
[](int cK0Short, int cLambda, int cAntiLambda, int value, int compatibilityLevel) -> bool {
if (value == 0 && bitcheck(cK0Short, compatibilityLevel))
return true;
Expand Down Expand Up @@ -119,23 +126,23 @@ DECLARE_SOA_TABLE(AssocV0s, "AOD", "ASSOCV0S", o2::soa::Index<>,
/// Table for storing associated casc indices
namespace assocCascades
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN(CascData, cascData); //!
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN(CascData, cascData); //!

// dEdx compatibility is done via encoded integer: 0: passes loose; 1: passes normal, 2: passes tight; definition of loose/normal/tight is in hStrangeCorrelationFilter
DECLARE_SOA_COLUMN(CompatibleXiMinus, compatibleXiMinus, int); // compatible with XiMinus
DECLARE_SOA_COLUMN(CompatibleXiPlus, compatibleXiPlus, int); // compatible with XiPlus
DECLARE_SOA_COLUMN(CompatibleOmegaMinus, compatibleOmegaMinus, int); // compatible with OmegaMinus
DECLARE_SOA_COLUMN(CompatibleOmegaPlus, compatibleOmegaPlus, int); // compatible with OmegaPlus

DECLARE_SOA_COLUMN(MCTrueXiMinus, mcTrueXiMinus, bool); // true XiMinus in mc
DECLARE_SOA_COLUMN(MCTrueXiPlus, mcTrueXiPlus, bool); // true XiPlus in mc
DECLARE_SOA_COLUMN(MCTrueOmegaMinus, mcTrueOmegaMinus, bool); // true OmegaMinus in mc
DECLARE_SOA_COLUMN(MCTrueOmegaPlus, mcTrueOmegaPlus, bool); // true OmegaPlus in mc
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // physical primary in MC
DECLARE_SOA_COLUMN(NSigmaMassXi, nSigmaMassXi, float); //
DECLARE_SOA_COLUMN(NSigmaMassOmega, nSigmaMassOmega, float); //
DECLARE_SOA_DYNAMIC_COLUMN(Compatible, compatible, //! check compatibility with a hypothesis of a certain number (0 - K0, 1 - L, 2 - Lbar)
DECLARE_SOA_COLUMN(MCTrueXiMinus, mcTrueXiMinus, bool); // true XiMinus in mc
DECLARE_SOA_COLUMN(MCTrueXiPlus, mcTrueXiPlus, bool); // true XiPlus in mc
DECLARE_SOA_COLUMN(MCTrueOmegaMinus, mcTrueOmegaMinus, bool); // true OmegaMinus in mc
DECLARE_SOA_COLUMN(MCTrueOmegaPlus, mcTrueOmegaPlus, bool); // true OmegaPlus in mc
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // physical primary in MC
DECLARE_SOA_COLUMN(NSigmaMassXi, nSigmaMassXi, float); //
DECLARE_SOA_COLUMN(NSigmaMassOmega, nSigmaMassOmega, float); //
DECLARE_SOA_DYNAMIC_COLUMN(Compatible, compatible, //! check compatibility with a hypothesis of a certain number (0 - K0, 1 - L, 2 - Lbar)
[](int cXiMinus, int cXiPlus, int cOmegaMinus, int cOmegaPlus, int value, int compatibilityLevel) -> bool {
if (value == 0 && bitcheck(cXiMinus, compatibilityLevel))
return true;
Expand Down
38 changes: 37 additions & 1 deletion PWGLF/TableProducer/Strangeness/hStrangeCorrelationFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ struct hstrangecorrelationfilter {
Produces<aod::AssocPions> assocPion;
Produces<aod::AssocV0s> assocV0;
Produces<aod::AssocCascades> assocCascades;
Produces<aod::AssocHadrons> assocHadrons;

TF1* fK0Mean = new TF1("fK0Mean", "[0]+[1]*x+[2]*TMath::Exp(-[3]*x)");
TF1* fK0Width = new TF1("fK0Width", "[0]+[1]*x+[2]*TMath::Exp(-[3]*x)");
Expand Down Expand Up @@ -314,7 +315,41 @@ struct hstrangecorrelationfilter {
continue;
}

assocPion(
assocHadrons(
track.collisionId(),
track.globalIndex());
}
}

void processAssocHadrons(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA>> const& tracks)
{
// Perform basic event selection
if (!collision.sel8()) {
return;
}
// No need to correlate stuff that's in far collisions
if (TMath::Abs(collision.posZ()) > 10.0) {
return;
}

/// _________________________________________________
/// Step 1: Populate table with trigger tracks
for (auto const& track : tracks) {
if (track.eta() > assocEtaMax || track.eta() < assocEtaMin) {
continue;
}
// if (track.sign()= 1 ) {continue;}
if (track.pt() > assocPtCutMax || track.pt() < assocPtCutMin) {
continue;
}
if (track.tpcNClsCrossedRows() < minTPCNCrossedRows) {
continue; // crossed rows
}
if (!track.hasITS() && triggerRequireITS) {
continue; // skip, doesn't have ITS signal (skips lots of TPC-only!)
}

assocHadrons(
track.collisionId(),
track.globalIndex());
}
Expand Down Expand Up @@ -494,6 +529,7 @@ struct hstrangecorrelationfilter {
PROCESS_SWITCH(hstrangecorrelationfilter, processV0s, "Produce associated V0 tables", true);
PROCESS_SWITCH(hstrangecorrelationfilter, processAssocPions, "Produce associated Pion tables", true);
PROCESS_SWITCH(hstrangecorrelationfilter, processCascades, "Produce associated cascade tables", true);
PROCESS_SWITCH(hstrangecorrelationfilter, processAssocHadrons, "Produce associated Hadron tables", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading
Loading