Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGLF] Refinements and Enhancements in Resonance Initialization and Module Setup #8974

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
6 changes: 2 additions & 4 deletions PWGLF/TableProducer/Resonances/resonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ struct ResonanceInitializer {

// Pre-filters for efficient process
// Filter tofPIDFilter = aod::track::tofExpMom < 0.f || ((aod::track::tofExpMom > 0.f) && ((nabs(aod::pidtof::tofNSigmaPi) < pidnSigmaPreSelectionCut) || (nabs(aod::pidtof::tofNSigmaKa) < pidnSigmaPreSelectionCut) || (nabs(aod::pidtof::tofNSigmaPr) < pidnSigmaPreSelectionCut))); // TOF
// Filter tpcPIDFilter = nabs(aod::pidtpc::tpcNSigmaPi) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaKa) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaPr) < pidnSigmaPreSelectionCut; // TPC
Filter trackFilter = (trackSelection.node() == 0) || // from tpcSkimsTableCreator
((trackSelection.node() == 1) && requireGlobalTrackInFilter()) ||
((trackSelection.node() == 2) && requireGlobalTrackWoPtEtaInFilter()) ||
((trackSelection.node() == 3) && requireGlobalTrackWoDCAInFilter()) ||
((trackSelection.node() == 4) && requireQualityTracksInFilter()) ||
((trackSelection.node() == 5) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks));
Filter tpcPIDFilter = nabs(aod::pidtpc::tpcNSigmaPi) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaKa) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaPr) < pidnSigmaPreSelectionCut; // TPC
Filter trackEtaFilter = nabs(aod::track::eta) < cfgCutEta; // Eta cut
Filter trackEtaFilter = nabs(aod::track::eta) < cfgCutEta; // Eta cut

EventPlaneHelper helperEP;

Expand Down Expand Up @@ -1297,7 +1297,6 @@ struct ResonanceInitializer {
// Loop over tracks
fillTracks<true>(collision, tracks);
fillV0s<true>(collision, V0s, tracks);
fillV0s<true>(collision, V0s, tracks);
fillCascades<true>(collision, Cascades, tracks);

// Loop over all MC particles
Expand All @@ -1321,7 +1320,6 @@ struct ResonanceInitializer {
// Loop over tracks
fillTracks<true>(collision, tracks);
fillV0s<true>(collision, V0s, tracks);
fillV0s<true>(collision, V0s, tracks);
fillCascades<true>(collision, Cascades, tracks);

// Loop over all MC particles
Expand Down
44 changes: 37 additions & 7 deletions PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ struct ResonanceModuleInitializer {
Service<o2::framework::O2DatabasePDG> pdg; ///< PDG database service
EventPlaneHelper helperEP; ///< Helper for event plane calculations

Produces<aod::ResoCollisions> resoCollisions; ///< Output table for resonance collisions
Produces<aod::ResoMCCollisions> resoMCCollisions; ///< Output table for MC resonance collisions
Produces<aod::ResoCollisions> resoCollisions; ///< Output table for resonance collisions
Produces<aod::ResoMCCollisions> resoMCCollisions; ///< Output table for MC resonance collisions
Produces<aod::ResoSpheroCollisions> resoSpheroCollisions; ///< Output table for spherocity
Produces<aod::ResoEvtPlCollisions> resoEvtPlCollisions; ///< Output table for event plane

// CCDB options
Configurable<std::string> ccdbURL{"ccdbURL", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -102,8 +104,11 @@ struct ResonanceModuleInitializer {
Configurable<bool> cfgEvtPileupRejection{"cfgEvtPileupRejection", false, "Evt sel: apply pileup rejection"};
Configurable<bool> cfgEvtNoITSROBorderCut{"cfgEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"};

// Spherocity configuration
Configurable<int> cfgTrackSphMin{"cfgTrackSphMin", 10, "Number of tracks for Spherocity Calculation"};
Configurable<int> cfgTrackSphDef{"cfgTrackSphDef", 0, "Spherocity Definition: |pT| = 1 -> 0, otherwise -> 1"};

// Qvector configuration
Configurable<bool> cfgBypassQvec{"cfgBypassQvec", true, "Bypass for qvector task"};
Configurable<int> cfgEvtPl{"cfgEvtPl", 40500, "Configuration of three subsystems for the event plane and its resolution, 10000*RefA + 100*RefB + S, where FT0C:0, FT0A:1, FT0M:2, FV0A:3, BPos:5, BNeg:6"};

int evtPlRefAId = static_cast<int>(cfgEvtPl / 10000);
Expand Down Expand Up @@ -582,6 +587,31 @@ struct ResonanceModuleInitializer {
fillMCCollision<true>(collision, mcParticles);
}
PROCESS_SWITCH(ResonanceModuleInitializer, processRun2MC, "process MC for RUN2", false);

/**
* @brief Processes Spherocity
*
* @param collision Collision data
* @param tracks Track data
*/
void processSpherocity(soa::Filtered<aod::ResoCollisionCandidates>::iterator const& collision, aod::ResoTrackCandidates const& tracks)
{
float spherocity = computeSpherocity(tracks, cfgTrackSphMin, cfgTrackSphDef);
resoSpheroCollisions(collision.globalIndex(), spherocity);
}
PROCESS_SWITCH(ResonanceModuleInitializer, processSpherocity, "process Spherocity", false);

/**
* @brief Processes Event Plane
*
* @param collision Collision data with Qvectors
* @param tracks Track data
*/
void processEventPlane(soa::Filtered<soa::Join<aod::ResoCollisionCandidates, aod::Qvectors>>::iterator const& collision)
{
resoEvtPlCollisions(collision.globalIndex(), getEvtPl(collision), getEvtPlRes(collision, evtPlDetId, evtPlRefAId), getEvtPlRes(collision, evtPlDetId, evtPlRefBId), getEvtPlRes(collision, evtPlRefAId, evtPlRefBId));
}
PROCESS_SWITCH(ResonanceModuleInitializer, processEventPlane, "process Event Plane", false);
};

/**
Expand Down Expand Up @@ -1203,7 +1233,7 @@ struct ResonanceDaughterInitializer {
* @param v0s V0 data
* @param tracks Track data
*/
void processV0Data(aod::ResoCollision const& collision, soa::Filtered<aod::ResoV0Candidates> const& v0s, aod::ResoTrackCandidates const& tracks)
void processV0Data(aod::ResoCollision const& collision, aod::ResoV0Candidates const& v0s, aod::ResoTrackCandidates const& tracks)
{
fillV0s<false>(collision, v0s, tracks);
}
Expand All @@ -1216,7 +1246,7 @@ struct ResonanceDaughterInitializer {
* @param v0s V0 data
* @param tracks Track data
*/
void processV0MC(aod::ResoCollision const& collision, soa::Filtered<aod::ResoV0CandidatesMC> const& v0s, aod::ResoTrackCandidatesMC const& tracks)
void processV0MC(aod::ResoCollision const& collision, aod::ResoV0CandidatesMC const& v0s, aod::ResoTrackCandidatesMC const& tracks)
{
fillV0s<true>(collision, v0s, tracks);
}
Expand All @@ -1229,7 +1259,7 @@ struct ResonanceDaughterInitializer {
* @param cascades Cascade data
* @param tracks Track data
*/
void processCascData(aod::ResoCollision const& collision, soa::Filtered<aod::ResoCascadesCandidates> const& cascades, aod::ResoTrackCandidates const& tracks)
void processCascData(aod::ResoCollision const& collision, aod::ResoCascadesCandidates const& cascades, aod::ResoTrackCandidates const& tracks)
{
fillCascades<false>(collision, cascades, tracks);
}
Expand All @@ -1242,7 +1272,7 @@ struct ResonanceDaughterInitializer {
* @param cascades Cascade data
* @param tracks Track data
*/
void processCascMC(aod::ResoCollision const& collision, soa::Filtered<aod::ResoCascadesCandidatesMC> const& cascades, aod::ResoTrackCandidatesMC const& tracks)
void processCascMC(aod::ResoCollision const& collision, aod::ResoCascadesCandidatesMC const& cascades, aod::ResoTrackCandidatesMC const& tracks)
{
fillCascades<true>(collision, cascades, tracks);
}
Expand Down
Loading