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

fix and plot z vertex selection #7603

Merged
merged 1 commit into from
Sep 7, 2024
Merged
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
14 changes: 12 additions & 2 deletions PWGJE/Tasks/jetHadronRecoil.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct hJetAnalysis {

HistogramRegistry registry{"registry",
{{"hNtrig", "number of triggers;trigger type;entries", {HistType::kTH1F, {{2, 0, 2}}}},
{"hZvtxSelected", "Z vertex position;Z_{vtx};entries", {HistType::kTH1F, {{80, -20, 20}}}},
{"hPtTrack", "Track p_{T};p_{T};entries", {HistType::kTH1F, {{200, 0, 200}}}},
{"hEtaTrack", "Track #eta;#eta;entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}},
{"hPhiTrack", "Track #phi;#phi;entries", {HistType::kTH1F, {{160, -1.0, 7.0}}}},
Expand Down Expand Up @@ -429,6 +430,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
fillHistograms(jets, jetsWTA, tracks);
}
PROCESS_SWITCH(hJetAnalysis, processData, "process data", true);
Expand All @@ -441,6 +443,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
fillHistograms(jets, jetsWTA, tracks);
}
PROCESS_SWITCH(hJetAnalysis, processMCD, "process MC detector level", false);
Expand All @@ -453,6 +456,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ(), collision.mcCollision().weight());
fillHistograms(jets, jetsWTA, tracks, collision.mcCollision().weight());
}
PROCESS_SWITCH(hJetAnalysis, processMCDWeighted, "process MC detector level with event weights", false);
Expand All @@ -462,9 +466,10 @@ struct hJetAnalysis {
soa::Filtered<soa::Join<aod::Charged1MCParticleLevelJets, aod::Charged1MCParticleLevelJetConstituents, aod::Charged1MCParticleLevelJetsMatchedToChargedMCParticleLevelJets>> const& jetsWTA,
JetParticles const& particles)
{
if (collision.posZ() < vertexZCut) { // For some reason declaring a filter doesnt work
if (std::abs(collision.posZ()) > vertexZCut) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
fillMCPHistograms(jets, jetsWTA, particles);
}
PROCESS_SWITCH(hJetAnalysis, processMCP, "process MC particle level", false);
Expand All @@ -474,9 +479,10 @@ struct hJetAnalysis {
soa::Filtered<soa::Join<aod::Charged1MCParticleLevelJets, aod::Charged1MCParticleLevelJetConstituents, aod::Charged1MCParticleLevelJetsMatchedToChargedMCParticleLevelJets>> const& jetsWTA,
JetParticles const& particles)
{
if (collision.posZ() < vertexZCut) {
if (std::abs(collision.posZ()) > vertexZCut) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ(), collision.weight());
fillMCPHistograms(jets, jetsWTA, particles, collision.weight());
}
PROCESS_SWITCH(hJetAnalysis, processMCPWeighted, "process MC particle level with event weights", false);
Expand All @@ -493,6 +499,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
const auto& mcpjetsWTACut = mcpjetsWTA.sliceBy(PartJetsPerCollision, collision.mcCollisionId());
for (const auto& mcdjet : mcdjets) {
fillMatchedHistograms(mcdjet, mcdjetsWTA, mcpjetsWTACut, mcpjets);
Expand All @@ -512,6 +519,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
const auto& mcpjetsWTACut = mcpjetsWTA.sliceBy(PartJetsPerCollision, collision.mcCollisionId());
for (const auto& mcdjet : mcdjets) {
fillMatchedHistograms(mcdjet, mcdjetsWTA, mcpjetsWTACut, mcpjets, mcdjet.eventWeight());
Expand All @@ -531,6 +539,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
const auto& mcpjetsWTACut = mcpjetsWTA.sliceBy(PartJetsPerCollision, collision.mcCollisionId());
bool ishJetEvent = false;
for (auto& track : tracks) {
Expand Down Expand Up @@ -559,6 +568,7 @@ struct hJetAnalysis {
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
return;
}
registry.fill(HIST("hZvtxSelected"), collision.posZ());
const auto& mcpjetsWTACut = mcpjetsWTA.sliceBy(PartJetsPerCollision, collision.mcCollisionId());
bool ishJetEvent = false;
for (auto& track : tracks) {
Expand Down
Loading