Skip to content

Commit

Permalink
[PWGDQ] Create a table with only standard PID information (#8953)
Browse files Browse the repository at this point in the history
Signed-off-by: Pengzhong Lu <pengzhong.lu@cern.ch>
Co-authored-by: Pengzhong Lu <pengzhong.lu@cern.ch>
  • Loading branch information
lupengzhong and Pengzhong Lu authored Dec 12, 2024
1 parent f640ac8 commit d671b4c
Showing 1 changed file with 41 additions and 11 deletions.
52 changes: 41 additions & 11 deletions PWGDQ/TableProducer/tableMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ using MyBarrelTracksWithCov = soa::Join<aod::Tracks, aod::TracksExtra, aod::Trac
aod::pidTPCFullKa, aod::pidTPCFullPr,
aod::pidTOFFullEl, aod::pidTOFFullMu, aod::pidTOFFullPi,
aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta>;
using MyBarrelTracksWithCovOnlyStdPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCov, aod::TracksDCA, aod::TrackSelection,
aod::pidTPCFullEl, aod::pidTPCFullPi,
aod::pidTPCFullKa, aod::pidTPCFullPr,
aod::pidTOFFullEl, aod::pidTOFFullPi,
aod::pidTOFFullKa, aod::pidTOFFullPr>;
using MyBarrelTracksWithV0Bits = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCov, aod::TracksDCA, aod::TrackSelection,
aod::pidTPCFullEl, aod::pidTPCFullMu, aod::pidTPCFullPi,
aod::pidTPCFullKa, aod::pidTPCFullPr,
Expand Down Expand Up @@ -123,6 +128,7 @@ constexpr static uint32_t gkEventFillMapWithCentAndMults = VarManager::ObjTypes:
// constexpr static uint32_t gkEventFillMapWithCentRun2 = VarManager::ObjTypes::BC | VarManager::ObjTypes::Collision | VarManager::ObjTypes::CollisionCentRun2; // Unused variable
constexpr static uint32_t gkTrackFillMap = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackPID | VarManager::ObjTypes::TrackPIDExtra;
constexpr static uint32_t gkTrackFillMapWithCov = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackCov | VarManager::ObjTypes::TrackPID | VarManager::ObjTypes::TrackPIDExtra;
constexpr static uint32_t gkTrackFillMapWithCovOnlyStdPID = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackCov | VarManager::ObjTypes::TrackPID;
constexpr static uint32_t gkTrackFillMapWithV0Bits = gkTrackFillMap | VarManager::ObjTypes::TrackV0Bits;
constexpr static uint32_t gkTrackFillMapWithV0BitsForMaps = VarManager::ObjTypes::Track | VarManager::ObjTypes::TrackExtra | VarManager::ObjTypes::TrackDCA | VarManager::ObjTypes::TrackV0Bits | VarManager::ObjTypes::TrackSelection | VarManager::ObjTypes::TrackTPCPID;
constexpr static uint32_t gkTrackFillMapWithDalitzBits = gkTrackFillMap | VarManager::ObjTypes::DalitzBits;
Expand Down Expand Up @@ -266,7 +272,7 @@ struct TableMaker {
context.mOptions.get<bool>("processFullWithCovMultsAndEventFilter") ||
context.mOptions.get<bool>("processBarrelOnly") || context.mOptions.get<bool>("processBarrelOnlyWithCent") || context.mOptions.get<bool>("processBarrelOnlyWithCovWithCent") ||
context.mOptions.get<bool>("processBarrelOnlyWithMults") || context.mOptions.get<bool>("processBarrelOnlyWithCentAndMults") || context.mOptions.get<bool>("processBarrelOnlyWithCovWithCentAndMults") ||
context.mOptions.get<bool>("processBarrelOnlyWithCov") || context.mOptions.get<bool>("processBarrelOnlyWithEventFilter") ||
context.mOptions.get<bool>("processBarrelOnlyWithCov") || context.mOptions.get<bool>("processBarrelOnlyWithCovOnlyStdPID") || context.mOptions.get<bool>("processBarrelOnlyWithEventFilter") ||
context.mOptions.get<bool>("processBarrelOnlyWithMultsAndEventFilter") || context.mOptions.get<bool>("processBarrelOnlyWithCovAndEventFilter") ||
context.mOptions.get<bool>("processBarrelOnlyWithDalitzBits") || context.mOptions.get<bool>("processBarrelOnlyWithV0Bits") || context.mOptions.get<bool>("processBarrelWithDalitzEvent") ||
context.mOptions.get<bool>("processBarrelOnlyWithV0BitsAndMaps") || context.mOptions.get<bool>("processAmbiguousBarrelOnly")) ||
Expand Down Expand Up @@ -612,11 +618,19 @@ struct TableMaker {
float nSigmaPi = (fConfigComputeTPCpostCalib ? VarManager::fgValues[VarManager::kTPCnSigmaPi_Corr] : track.tpcNSigmaPi());
float nSigmaKa = ((fConfigComputeTPCpostCalib && fConfigComputeTPCpostCalibKaon) ? VarManager::fgValues[VarManager::kTPCnSigmaKa_Corr] : track.tpcNSigmaKa());
float nSigmaPr = (fConfigComputeTPCpostCalib ? VarManager::fgValues[VarManager::kTPCnSigmaPr_Corr] : track.tpcNSigmaPr());
trackBarrelPID(track.tpcSignal(),
nSigmaEl, track.tpcNSigmaMu(), nSigmaPi, nSigmaKa, nSigmaPr,
track.beta(),
track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.trdSignal());
if constexpr (static_cast<bool>(TTrackFillMap & VarManager::ObjTypes::TrackPIDExtra)) {
trackBarrelPID(track.tpcSignal(),
nSigmaEl, track.tpcNSigmaMu(), nSigmaPi, nSigmaKa, nSigmaPr,
track.beta(),
track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.trdSignal());
} else {
trackBarrelPID(track.tpcSignal(),
nSigmaEl, -1, nSigmaPi, nSigmaKa, nSigmaPr,
-1,
track.tofNSigmaEl(), -1, track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
-1);
}
}
if constexpr (static_cast<bool>(TTrackFillMap & VarManager::ObjTypes::TrackTPCPID)) {
trackBarrelPID(track.tpcSignal(), track.tpcNSigmaEl(), -1, track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
Expand Down Expand Up @@ -1054,11 +1068,19 @@ struct TableMaker {
float nSigmaEl = (fConfigComputeTPCpostCalib ? VarManager::fgValues[VarManager::kTPCnSigmaEl_Corr] : track.tpcNSigmaEl());
float nSigmaPi = (fConfigComputeTPCpostCalib ? VarManager::fgValues[VarManager::kTPCnSigmaPi_Corr] : track.tpcNSigmaPi());
float nSigmaPr = (fConfigComputeTPCpostCalib ? VarManager::fgValues[VarManager::kTPCnSigmaPr_Corr] : track.tpcNSigmaPr());
trackBarrelPID(track.tpcSignal(),
nSigmaEl, track.tpcNSigmaMu(), nSigmaPi, track.tpcNSigmaKa(), nSigmaPr,
track.beta(),
track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.trdSignal());
if constexpr (static_cast<bool>(TTrackFillMap & VarManager::ObjTypes::TrackPIDExtra)) {
trackBarrelPID(track.tpcSignal(),
nSigmaEl, track.tpcNSigmaMu(), nSigmaPi, track.tpcNSigmaKa(), nSigmaPr,
track.beta(),
track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.trdSignal());
} else {
trackBarrelPID(track.tpcSignal(),
nSigmaEl, -1, nSigmaPi, track.tpcNSigmaKa(), nSigmaPr,
-1,
track.tofNSigmaEl(), -1, track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
-1);
}
}
if constexpr (static_cast<bool>(TTrackFillMap & VarManager::ObjTypes::TrackTPCPID)) {
trackBarrelPID(track.tpcSignal(), track.tpcNSigmaEl(), -1, track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
Expand Down Expand Up @@ -1517,6 +1539,13 @@ struct TableMaker {
fullSkimming<gkEventFillMapWithMult, gkTrackFillMapWithCov, 0u>(collision, bcs, tracksBarrel, nullptr, nullptr, nullptr);
}

// Produce barrel tables only, with track cov matrix , only std PID information used ----------------------------------------------------------------------------------------
void processBarrelOnlyWithCovOnlyStdPID(MyEventsWithMults::iterator const& collision, aod::BCsWithTimestamps const& bcs,
soa::Filtered<MyBarrelTracksWithCovOnlyStdPID> const& tracksBarrel)
{
fullSkimming<gkEventFillMapWithMult, gkTrackFillMapWithCovOnlyStdPID, 0u>(collision, bcs, tracksBarrel, nullptr, nullptr, nullptr);
}

// Produce barrel tables only ----------------------------------------------------------------------------------------------------------------
void processBarrelOnly(MyEvents::iterator const& collision, aod::BCsWithTimestamps const& bcs,
soa::Filtered<MyBarrelTracks> const& tracksBarrel)
Expand Down Expand Up @@ -1752,6 +1781,7 @@ struct TableMaker {
PROCESS_SWITCH(TableMaker, processBarrelOnlyWithCentAndMults, "Build barrel-only DQ skimmed data model, w/ centrality and multiplicities", false);
PROCESS_SWITCH(TableMaker, processBarrelOnlyWithCovWithCentAndMults, "Build barrel-only DQ skimmed data model, w/ centrality and multiplicities and w/ track covariance", false);
PROCESS_SWITCH(TableMaker, processBarrelOnlyWithCov, "Build barrel-only DQ skimmed data model, w/ track cov matrix", false);
PROCESS_SWITCH(TableMaker, processBarrelOnlyWithCovOnlyStdPID, "Build barrel-only DQ skimmed data model, w/ track cov matrix, only std PID information used", false);
PROCESS_SWITCH(TableMaker, processBarrelOnly, "Build barrel-only DQ skimmed data model, w/o centrality", false);
PROCESS_SWITCH(TableMaker, processMuonOnlyWithCovAndCent, "Build muon-only DQ skimmed data model, w/ centrality and muon cov matrix", false);
PROCESS_SWITCH(TableMaker, processMuonOnlyWithCov, "Build muon-only DQ skimmed data model, w/ muon cov matrix", false);
Expand Down

0 comments on commit d671b4c

Please sign in to comment.