Skip to content
Merged
Changes from 4 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
120 changes: 114 additions & 6 deletions PWGJE/Tasks/fullJetSpectraPP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
/// \author Archita Rani Dash <archita.rani.dash@cern.ch>
#include <vector>
#include <iostream>

Check failure on line 17 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <utility>

#include "CommonConstants/PhysicsConstants.h"
Expand Down Expand Up @@ -116,7 +116,7 @@
// Add Collision Histograms' Bin Labels for clarity
void labelCollisionHistograms(HistogramRegistry& registry)
{
if (doprocessTracks) {
if (doprocessDataTracks || doprocessMCTracks) {
auto h_collisions_unweighted = registry.get<TH1>(HIST("h_collisions_unweighted"));
h_collisions_unweighted->GetXaxis()->SetBinLabel(1, "AllUnweightedDetColl");
h_collisions_unweighted->GetXaxis()->SetBinLabel(2, "UnweightedCollWithVertexZ");
Expand Down Expand Up @@ -173,7 +173,7 @@
}

// Track QA histograms
if (doprocessTracks || doprocessTracksWeighted) {
if (doprocessDataTracks || doprocessMCTracks || doprocessTracksWeighted) {
registry.add("h_collisions_unweighted", "event status; event status;entries", {HistType::kTH1F, {{12, 0., 12.0}}});

registry.add("h_track_pt", "track pT;#it{p}_{T,track} (GeV/#it{c});entries", {HistType::kTH1F, {{350, 0., 350.}}});
Expand Down Expand Up @@ -291,7 +291,7 @@
registry.add("h_full_jet_ResponseMatrix", "Full Jets Response Matrix; p_{T,det} (GeV/c); p_{T,part} (GeV/c)", {HistType::kTH2F, {{350, 0., 350.}, {350, 0., 350.}}});
}

if (doprocessCollisionsWeightedWithMultiplicity || doprocessMBCollisionsWithMultiplicity) {
if (doprocessCollisionsWeightedWithMultiplicity || doprocessMBCollisionsWithMultiplicity || doprocessMBCollisionsDATAWithMultiplicity) {
registry.add("h_FT0Mults_occupancy", "", {HistType::kTH1F, {{3500, 0., 3500.}}});
registry.add("h2_full_jet_FT0Amplitude", "; FT0C Amplitude; Counts", {HistType::kTH1F, {{3500, 0., 3500.}}});
registry.add("h2_full_jet_jetpTDetVsFT0Mults", "; p_{T,det} (GeV/c); FT0C Multiplicity", {HistType::kTH2F, {{350, 0., 350.}, {3500, 0., 3500.}}});
Expand Down Expand Up @@ -544,7 +544,7 @@
bool eventAccepted = false;
registry.fill(HIST("h_Detcollision_counter"), 0.5);

if (fabs(collision.posZ()) > VertexZCut) {

Check failure on line 547 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Detcollision_counter"), 1.5);
Expand Down Expand Up @@ -596,7 +596,7 @@
bool eventAccepted = false;

registry.fill(HIST("h_Detcollision_counter"), 0.5);
if (fabs(collision.posZ()) > VertexZCut) {

Check failure on line 599 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Detcollision_counter"), 1.5);
Expand Down Expand Up @@ -648,7 +648,7 @@
bool eventAccepted = false;

registry.fill(HIST("h_Detcollision_counter"), 0.5);
if (fabs(collision.posZ()) > VertexZCut) {

Check failure on line 651 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Detcollision_counter"), 1.5);
Expand Down Expand Up @@ -709,7 +709,7 @@
bool eventAccepted = false;

registry.fill(HIST("h_Partcollision_counter"), 0.5);
if (fabs(mccollision.posZ()) > VertexZCut) {

Check failure on line 712 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Partcollision_counter"), 1.5);
Expand Down Expand Up @@ -767,7 +767,7 @@
bool eventAccepted = false;

registry.fill(HIST("h_Partcollision_counter"), 0.5);
if (fabs(mccollision.posZ()) > VertexZCut) {

Check failure on line 770 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Partcollision_counter"), 1.5);
Expand Down Expand Up @@ -832,7 +832,7 @@

registry.fill(HIST("h_Matchedcollision_counter"), 0.5);

if (fabs(collision.posZ()) > VertexZCut) { // making double sure this condition is satisfied

Check failure on line 835 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Matchedcollision_counter"), 1.5);
Expand Down Expand Up @@ -890,7 +890,7 @@
float eventWeight = collision.mcCollision().weight();

registry.fill(HIST("h_Matchedcollision_counter"), 0.5);
if (fabs(collision.posZ()) > VertexZCut) { // making double sure this condition is satisfied

Check failure on line 893 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_Matchedcollision_counter"), 1.5);
Expand Down Expand Up @@ -960,12 +960,12 @@
}
PROCESS_SWITCH(FullJetSpectrapp, processJetsMCPMCDMatchedWeighted, "Full Jet finder MCP matched to MCD on weighted events", false);

void processTracks(soa::Filtered<EMCCollisionsMCD>::iterator const& collision, soa::Filtered<aod::JetTracks> const& tracks, soa::Filtered<aod::JetClusters> const& clusters)
void processDataTracks(soa::Filtered<EMCCollisionsData>::iterator const& collision, soa::Filtered<aod::JetTracks> const& tracks, soa::Filtered<aod::JetClusters> const& clusters)
{
bool eventAccepted = false;

registry.fill(HIST("h_collisions_unweighted"), 0.5);
if (fabs(collision.posZ()) > VertexZCut) {

Check failure on line 968 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_collisions_unweighted"), 1.5);
Expand Down Expand Up @@ -1015,7 +1015,56 @@
}
registry.fill(HIST("h_collisions_unweighted"), 3.5);
}
PROCESS_SWITCH(FullJetSpectrapp, processTracks, "Full Jet tracks", false);
PROCESS_SWITCH(FullJetSpectrapp, processDataTracks, "Full Jet tracks for Data", false);

void processMCTracks(soa::Filtered<EMCCollisionsMCD>::iterator const& collision, soa::Filtered<aod::JetTracks> const& tracks, soa::Filtered<aod::JetClusters> const& clusters)
{
bool eventAccepted = false;

registry.fill(HIST("h_collisions_unweighted"), 0.5);
if (fabs(collision.posZ()) > VertexZCut) {

Check failure on line 1025 in PWGJE/Tasks/fullJetSpectraPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
}
registry.fill(HIST("h_collisions_unweighted"), 1.5);
if (doMBGapTrigger && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
return;
}
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, doMBGapTrigger)) {
return;
}

if (doEMCALEventWorkaround) {
if (collision.isEmcalReadout() && !collision.isAmbiguous()) { // i.e. EMCAL has a cell content
eventAccepted = true;
if (collision.alias_bit(kTVXinEMC)) {
registry.fill(HIST("h_collisions_unweighted"), 4.0); // Tracks with kTVXinEMC
registry.fill(HIST("h_Detcollision_counter"), 1.0);
}
}
} else {
if (!collision.isAmbiguous() && jetderiveddatautilities::eventEMCAL(collision) && collision.alias_bit(kTVXinEMC)) {
eventAccepted = true;
registry.fill(HIST("h_collisions_unweighted"), 4.0); // Tracks with kTVXinEMC
registry.fill(HIST("h_Detcollision_counter"), 1.0);
}
}

if (!eventAccepted) {
registry.fill(HIST("h_collisions_unweighted"), 8.0); // Tracks w/o kTVXinEMC
return;
}
registry.fill(HIST("h_collisions_unweighted"), 2.5);

for (auto const& track : tracks) {
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
continue;
}
// Fill Accepted events histos
fillTrackHistograms(tracks, clusters, 1.0);
}
registry.fill(HIST("h_collisions_unweighted"), 3.5);
}
PROCESS_SWITCH(FullJetSpectrapp, processMCTracks, "Full Jet tracks for MC", false);

void processTracksWeighted(soa::Filtered<EMCCollisionsMCD>::iterator const& collision,
aod::JMcCollisions const&,
Expand Down Expand Up @@ -1201,7 +1250,66 @@
registry.fill(HIST("h3_full_jet_jetpTDet_FT0Mults_NEF"), mcdjet.pt(), collision.multiplicity(), NEF, 1.0);
}
}
PROCESS_SWITCH(FullJetSpectrapp, processMBCollisionsWithMultiplicity, "MB Collisions for Full Jets Multiplicity Studies", false);
PROCESS_SWITCH(FullJetSpectrapp, processMBCollisionsWithMultiplicity, "MB MCD Collisions for Full Jets Multiplicity Studies", false);

void processMBCollisionsDATAWithMultiplicity(soa::Filtered<soa::Join<EMCCollisionsData, aod::FT0Mults>>::iterator const& collision, FullJetTableDataJoined const& jets, soa::Filtered<aod::JetTracks> const& tracks, soa::Filtered<aod::JetClusters> const& clusters)
{
bool eventAccepted = false;
float neutralEnergy = 0.0;

if (fabs(collision.posZ()) > VertexZCut) {
return;
}
if (doMBGapTrigger && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
return;
}
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, doMBGapTrigger)) {
return;
}

if (doEMCALEventWorkaround) {
if (collision.isEmcalReadout() && !collision.isAmbiguous()) { // i.e. EMCAL has a cell content
eventAccepted = true;
fillTrackHistograms(tracks, clusters, 1.0);
if (collision.alias_bit(kTVXinEMC)) {
}
}
} else {
if (!collision.isAmbiguous() && jetderiveddatautilities::eventEMCAL(collision) && collision.alias_bit(kTVXinEMC)) {
eventAccepted = true;
}
}

if (!eventAccepted) {
return;
}
for (auto const& track : tracks) {
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
continue;
}
}
registry.fill(HIST("h_FT0Mults_occupancy"), collision.multiplicity());

for (auto const& jet : jets) {
if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
continue;
}
if (jet.phi() < jetPhiMin || jet.phi() > jetPhiMax) {
continue;
}
if (!isAcceptedJet<aod::JetTracks>(jet)) {
continue;
}
registry.fill(HIST("h2_full_jet_jetpTDetVsFT0Mults"), jet.pt(), collision.multiplicity(), 1.0);

for (auto const& cluster : clusters) {
neutralEnergy += cluster.energy();
}
auto NEF = neutralEnergy / jet.energy();
registry.fill(HIST("h3_full_jet_jetpTDet_FT0Mults_NEF"), jet.pt(), collision.multiplicity(), NEF, 1.0);
}
}
PROCESS_SWITCH(FullJetSpectrapp, processMBCollisionsDATAWithMultiplicity, "MB DATA Collisions for Full Jets Multiplicity Studies", false);
}; // struct

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading