@@ -72,7 +72,15 @@ struct JetTutorial {
7272 {"h_recoil_jet_dphi", "hadron-jet #Delta#phi;#Delta#phi_{jet,trigger hadron};entries", {HistType::kTH1F, {{40, -2.0, 2.0}}}},
7373 {"h_matched_jets_pt", "#it{p}_{T,jet part}; #it{p}_{T,jet det}", {HistType::kTH2F, {{100, 0., 20.}, {100, 0., 20.0}}}},
7474 {"h_matched_jets_eta", "#eta_{jet part}; #eta_{jet det}", {HistType::kTH2F, {{100, -1.0, 1.0}, {100, -1.0, 1.0}}}},
75- {"h_matched_jets_phi", "#phi_{jet part}; #phi_{jet det}", {HistType::kTH2F, {{80, -1.0, 7.}, {80, -1.0, 7.}}}}}};
75+ {"h_matched_jets_phi", "#phi_{jet part}; #phi_{jet det}", {HistType::kTH2F, {{80, -1.0, 7.}, {80, -1.0, 7.}}}},
76+ {"h_jet_pt_embedding", "jets;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
77+ {"h_jet_pt_sub_embedding", "subtracted jets;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
78+ {"h_jet_pt_mcd_embedding", "detector-level jets;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
79+ {"h_jet_pt_mcp_embedding", "particle-level jets;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
80+ {"h_jet_detector_response", "detector response matrix;#it{p}_{T,jet} particle (GeV/#it{c});#it{p}_{T,jet} detector (GeV/#it{c})", {HistType::kTH2F, {{200, 0., 200.}, {200, 0., 200.}}}},
81+ {"h_jet_response", "response matrix;#it{p}_{T,jet} particle (GeV/#it{c});#it{p}_{T,jet} embedded subtracted (GeV/#it{c})", {HistType::kTH2F, {{200, 0., 200.}, {200, 0., 200.}}}},
82+ {"h_jet_background_response", "background response matrix;#it{p}_{T,jet} detector (GeV/#it{c});#it{p}_{T,jet} embedded (GeV/#it{c})", {HistType::kTH2F, {{200, 0., 200.}, {200, 0., 200.}}}},
83+ {"h_jet_backgroundfluctuations_response", "background fluctuations response matrix;#it{p}_{T,jet} embedded subtracted (GeV/#it{c});#it{p}_{T,jet} embedded (GeV/#it{c})", {HistType::kTH2F, {{200, 0., 200.}, {200, 0., 200.}}}}}};
7684
7785 Configurable<float> vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"};
7886
@@ -309,6 +317,12 @@ struct JetTutorial {
309317 double trackpTMin = 6.0;
310318 double trackpTMax = 10.0;
311319 for (const auto& track : tracks) {
320+ if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
321+ continue;
322+ }
323+ if (track.eta() > 0.9 || track.eta() < -0.9) {
324+ continue;
325+ }
312326 if (track.pt() > trackpTMin && track.pt() < trackpTMax) {
313327 if (track.pt() > leadingTrackpT) {
314328 leadingTrackpT = track.pt();
@@ -391,6 +405,37 @@ struct JetTutorial {
391405 }
392406 }
393407 PROCESS_SWITCH(JetTutorial, processDataTriggered, "jets triggered", false);
408+
409+ void processEmbedding(aod::ChargedJets const& jets, soa::Join<aod::ChargedEventWiseSubtractedJets, aod::ChargedEventWiseSubtractedJetsMatchedToChargedJets> const& subJets, soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetsMatchedToChargedEventWiseSubtractedJets> const& mcdJets, soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetsMatchedToChargedMCDetectorLevelJets> const& mcpJets)
410+ {
411+
412+ for (auto const& jet : jets) {
413+ registry.fill(HIST("h_jet_pt_embedding"), jet.pt());
414+ }
415+ for (auto const& jet : subJets) {
416+ registry.fill(HIST("h_jet_pt_sub_embedding"), jet.pt());
417+ }
418+ for (auto const& jet : mcdJets) {
419+ registry.fill(HIST("h_jet_pt_mcd_embedding"), jet.pt());
420+ }
421+ for (auto const& jet : mcpJets) {
422+ registry.fill(HIST("h_jet_pt_mcp_embedding"), jet.pt());
423+ }
424+
425+ for (auto const& mcpJet : mcpJets) {
426+ for (auto const& mcdJet : mcpJet.matchedJetGeo_as<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetsMatchedToChargedEventWiseSubtractedJets>>()) {
427+ registry.fill(HIST("h_jet_detector_response"), mcpJet.pt(), mcdJet.pt());
428+ for (auto const& subJet : mcdJet.matchedJetGeo_as<soa::Join<aod::ChargedEventWiseSubtractedJets, aod::ChargedEventWiseSubtractedJetsMatchedToChargedJets>>()) {
429+ registry.fill(HIST("h_jet_response"), mcpJet.pt(), subJet.pt());
430+ for (auto const& jet : subJet.matchedJetGeo_as<aod::ChargedJets>()) {
431+ registry.fill(HIST("h_jet_background_response"), mcdJet.pt(), jet.pt());
432+ registry.fill(HIST("h_jet_backgroundfluctuations_response"), subJet.pt(), jet.pt());
433+ }
434+ }
435+ }
436+ }
437+ }
438+ PROCESS_SWITCH(JetTutorial, processEmbedding, "embedding", false);
394439};
395440
396441WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<JetTutorial>(cfgc)}; }
0 commit comments