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
57 changes: 30 additions & 27 deletions EventFiltering/PWGJE/jetFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,17 @@ using namespace o2::framework::expressions;
static const std::vector<std::string> highPtObjectsNames{"JetChHighPt"};

struct jetFilter {
enum { kJetChHighPt = 0,
enum { kJetChLowPt = 0,
kJetChHighPt = 1,
kHighPtObjects };

// event selection cuts
Configurable<float> selectionJetChHighPt{
"selectionJetChHighPt", 33.,
"Minimum charged jet pT trigger threshold"}; // we want to keep all events
// having a charged jet with
// pT above this

Produces<aod::JetFilters> tags;

Configurable<float> cfgJetR{"cfgJetR", 0.6,
"jet resolution parameter"}; // jet cone radius
Configurable<float> cfgJetPtMin{
"cfgJetPtMin", 0.1,
"minimum jet pT constituent cut"}; // minimum jet constituent pT

Configurable<float> jetPtLowThreshold{"jetPtLowThreshold", 30.0, "threshold for low pT jet trigger"};
Configurable<float> jetPtHighThreshold{"jetPtHighThreshold", 50.0, "threshold for high pT jet trigger"};

HistogramRegistry spectra{
"spectra",
Expand All @@ -73,12 +67,20 @@ struct jetFilter {

spectra.add("fCollZpos", "collision z position", HistType::kTH1F,
{{200, -20., +20., "#it{z}_{vtx} position (cm)"}});
spectra.add("ptphiJetChSelected",
"pT of selected high pT charged jets vs phi", HistType::kTH2F,

spectra.add("ptphiJetChSelected_lowptjettrigger", "pT of selected low pT charged jet trigger vs phi", HistType::kTH2F,
{{150, 0., +150., "charged jet #it{p}_{T} (GeV/#it{c})"},
{60, 0, TMath::TwoPi()}});

spectra.add("ptphiJetChSelected_highptjettrigger", "pT of selected high pT charged jet trigger vs phi", HistType::kTH2F,
{{150, 0., +150., "charged jet #it{p}_{T} (GeV/#it{c})"},
{60, 0, TMath::TwoPi()}});
spectra.add("ptetaJetChSelected",
"pT of selected high pT charged jets vs eta", HistType::kTH2F,

spectra.add("ptetaJetChSelected_lowptjettrigger", "pT of selected low pT charged jet trigger vs eta", HistType::kTH2F,
{{150, 0., +150., "charged jet #it{p}_{T} (GeV/#it{c})"},
{40, -1.0, 1.0}});

spectra.add("ptetaJetChSelected_highptjettrigger", "pT of selected high pT charged jet trigger vs eta", HistType::kTH2F,
{{150, 0., +150., "charged jet #it{p}_{T} (GeV/#it{c})"},
{40, -1.0, 1.0}});

Expand All @@ -96,32 +98,33 @@ struct jetFilter {
Filter jetRadiusSelection = o2::aod::jet::r == nround(cfgJetR.node() * 100.0f);
using filteredJets = o2::soa::Filtered<o2::aod::ChargedJets>;

void
process(aod::JCollision const& collision, filteredJets const& jets)
void process(aod::JCollision const& collision, filteredJets const& jets)
{
// collision process loop
bool keepEvent[kHighPtObjects]{false};
//
spectra.fill(HIST("fCollZpos"), collision.posZ());

// Check whether there is a high pT charged jet
for (const auto& jet : jets) {
if (jet.pt() >= selectionJetChHighPt) {
spectra.fill(HIST("ptphiJetChSelected"), jet.pt(),
jet.phi()); // charged jet pT vs phi
spectra.fill(HIST("ptetaJetChSelected"), jet.pt(),
jet.eta()); // charged jet pT vs eta
for (const auto& jet : jets) { // jets are ordered by pT

if (jet.pt() >= jetPtLowThreshold) {
spectra.fill(HIST("ptphiJetChSelected_lowptjettrigger"), jet.pt(), jet.phi()); // charged jet pT vs phi
spectra.fill(HIST("ptetaJetChSelected_lowptjettrigger"), jet.pt(), jet.eta()); // charged jet pT vs eta
keepEvent[kJetChLowPt] = true;
}
if (jet.pt() >= jetPtHighThreshold) {
spectra.fill(HIST("ptphiJetChSelected_highptjettrigger"), jet.pt(), jet.phi()); // charged jet pT vs phi
spectra.fill(HIST("ptetaJetChSelected_highptjettrigger"), jet.pt(), jet.eta()); // charged jet pT vs eta
keepEvent[kJetChHighPt] = true;
break;
}
break; // only looks at the highest pT jet in the event
}

for (int iDecision{0}; iDecision < kHighPtObjects; ++iDecision) {
if (keepEvent[iDecision]) {
spectra.fill(HIST("fProcessedEvents"), iDecision);
}
}
tags(keepEvent[kJetChHighPt]);
tags(keepEvent[kJetChLowPt], keepEvent[kJetChHighPt]);
}
};

Expand Down
2 changes: 2 additions & 0 deletions EventFiltering/filterTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ DECLARE_SOA_COLUMN(PLL, hasPLL, bool); //! has p-L-L triplet
DECLARE_SOA_COLUMN(LLL, hasLLL, bool); //! has L-L-L tripletD

// jets
DECLARE_SOA_COLUMN(JetChLowPt, hasJetChLowPt, bool); //! low-pT charged jet
DECLARE_SOA_COLUMN(JetChHighPt, hasJetChHighPt, bool); //! high-pT charged jet

// full jets
Expand Down Expand Up @@ -160,6 +161,7 @@ using CfFilter = CFFilters::iterator;

// jets
DECLARE_SOA_TABLE(JetFilters, "AOD", "JetFilters", //!
filtering::JetChLowPt,
filtering::JetChHighPt);

using JetFilter = JetFilters::iterator;
Expand Down