Skip to content
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
49 changes: 23 additions & 26 deletions PWGJE/Tasks/fullJetSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@
registry.add("h2_track_etaphi", "jet_track #eta vs jet_track #varphi; #eta_{track};#varphi_{track}", {HistType::kTH2F, {{500, -5., 5.}, {160, -1., 7.}}}, doSumw2);
registry.add("h2_jet_etaphi", "jet #eta vs jet #varphi; #eta_{jet};#varphi_{jet}", {HistType::kTH2F, {{100, -1., 1.}, {160, -1., 7.}}}, doSumw2);

//NEW: Jet constituent histograms for each hadronic correction mode
// NEW: Jet constituent histograms for each hadronic correction mode
registry.add("h_full_jet_neutralconstituents_energy_uncorr", "Jet neutral cluster energy (uncorr)", {HistType::kTH1F, {{400, 0., 400.}}}, doSumw2);
registry.add("h_full_jet_neutralconstituents_energy_corr_oneTrack100", "Jet neutral cluster energy (corr 1track100)", {HistType::kTH1F, {{400, 0., 400.}}}, doSumw2);
registry.add("h_full_jet_neutralconstituents_energy_corr_oneTrack70", "Jet neutral cluster energy (corr 1track70)", {HistType::kTH1F, {{400, 0., 400.}}}, doSumw2);
registry.add("h_full_jet_neutralconstituents_energy_corr_allTracks100", "Jet neutral cluster energy (corr alltracks100)", {HistType::kTH1F, {{400, 0., 400.}}}, doSumw2);
registry.add("h_full_jet_neutralconstituents_energy_corr_allTracks70", "Jet neutral cluster energy (corr alltracks70)", {HistType::kTH1F, {{400, 0., 400.}}}, doSumw2);
//Corrected NEF histograms for the corresponding correction mode
// Corrected NEF histograms for the corresponding correction mode
registry.add("h2_full_jet_nef_uncorr", "Jet pT vs NEF (uncorr); p_{T,jet}; NEF", {HistType::kTH2F, {{350, 0., 350.}, {100, 0., 1.}}}, doSumw2);
registry.add("h2_full_jet_nef_corr_oneTrack100", "Jet pT vs NEF (corr, 1track100); p_{T,jet}; NEF", {HistType::kTH2F, {{350, 0., 350.}, {100, 0., 1.}}}, doSumw2);
registry.add("h2_full_jet_nef_corr_oneTrack70", "Jet pT vs NEF (corr, 1track70); p_{T,jet}; NEF", {HistType::kTH2F, {{350, 0., 350.}, {100, 0., 1.}}}, doSumw2);
Expand Down Expand Up @@ -686,8 +686,8 @@
Filter trackCuts = (aod::jtrack::pt >= trackpTMin && aod::jtrack::pt < trackpTMax && aod::jtrack::eta > trackEtaMin && aod::jtrack::eta < trackEtaMax && aod::jtrack::phi >= trackPhiMin && aod::jtrack::phi <= trackPhiMax);
aod::EMCALClusterDefinition clusterDefinition = aod::emcalcluster::getClusterDefinitionFromString(clusterDefinitionS.value);
Filter clusterFilter = (aod::jcluster::definition == static_cast<int>(clusterDefinition) && aod::jcluster::eta > clusterEtaMin && aod::jcluster::eta < clusterEtaMax && aod::jcluster::phi >= clusterPhiMin && aod::jcluster::phi <= clusterPhiMax && aod::jcluster::energy >= clusterEnergyMin && aod::jcluster::time > clusterTimeMin && aod::jcluster::time < clusterTimeMax && (clusterRejectExotics && aod::jcluster::isExotic != true));
Preslice<jetMcpPerMcCollision> JetMCPPerMcCollision = aod::jet::mcCollisionId;

Check failure on line 689 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
PresliceUnsorted<soa::Filtered<aod::JetCollisionsMCD>> CollisionsPerMCPCollision = aod::jmccollisionlb::mcCollisionId;

Check failure on line 690 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
PresliceUnsorted<o2::soa::Join<o2::aod::Collisions, o2::aod::EvSels>> perFoundBC = aod::evsel::foundBCId;

template <typename T, typename S, typename U>
Expand Down Expand Up @@ -776,12 +776,12 @@
registry.fill(HIST("h_full_jet_phi"), jet.phi(), weight);
registry.fill(HIST("h2_jet_etaphi"), jet.eta(), jet.phi(), weight);

//Sums for each correction mode
// Sums for each correction mode
double neutralEnergy_uncorr = 0.0;

Check failure on line 780 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
double neutralEnergy_corr_oneTrack100 = 0.0;

Check failure on line 781 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
double neutralEnergy_corr_oneTrack70 = 0.0;

Check failure on line 782 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
double neutralEnergy_corr_allTracks100 = 0.0;

Check failure on line 783 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
double neutralEnergy_corr_allTracks70 = 0.0;

Check failure on line 784 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

for (const auto& cluster : jet.template clusters_as<ClusterWithCorrections>()) {
registry.fill(HIST("h2_full_jet_neutralconstituents"), jet.pt(), jet.clustersIds().size(), weight);
Expand Down Expand Up @@ -814,18 +814,17 @@
registry.fill(HIST("h_full_jet_neutralconstituents_energy_uncorr"), cluster.energy(), weight);

if (cluster.energyCorrectedOneTrack1()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_oneTrack100"), cluster.energyCorrectedOneTrack1(), weight);
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_oneTrack100"), cluster.energyCorrectedOneTrack1(), weight);
}
if (cluster.energyCorrectedOneTrack2()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_oneTrack70"), cluster.energyCorrectedOneTrack2(), weight);
if (cluster.energyCorrectedOneTrack2()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_oneTrack70"), cluster.energyCorrectedOneTrack2(), weight);
}
if (cluster.energyCorrectedAllTracks1()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_allTracks100"), cluster.energyCorrectedAllTracks1(), weight);
if (cluster.energyCorrectedAllTracks1()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_allTracks100"), cluster.energyCorrectedAllTracks1(), weight);
}
if (cluster.energyCorrectedAllTracks2()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_allTracks70"), cluster.energyCorrectedAllTracks2(), weight);
if (cluster.energyCorrectedAllTracks2()) {
registry.fill(HIST("h_full_jet_neutralconstituents_energy_corr_allTracks70"), cluster.energyCorrectedAllTracks2(), weight);
}

}
// auto nef = neutralEnergy / jet.energy();
// registry.fill(HIST("h2_full_jet_nef"), jet.pt(), nef, weight);
Expand Down Expand Up @@ -970,18 +969,18 @@
sumclusterE_corr_allTracks70 += cluster.energyCorrectedAllTracks2();

registry.fill(HIST("h_cluster_energy_uncorr"), cluster.energy(), weight);
if (cluster.energyCorrectedOneTrack1()) {
registry.fill(HIST("h_cluster_energy_corr_oneTrack100"), cluster.energyCorrectedOneTrack1(), weight);
}
if (cluster.energyCorrectedOneTrack2()) {
registry.fill(HIST("h_cluster_energy_corr_oneTrack70"), cluster.energyCorrectedOneTrack2(), weight);
}
if (cluster.energyCorrectedAllTracks1()) {
registry.fill(HIST("h_cluster_energy_corr_allTracks100"), cluster.energyCorrectedAllTracks1(), weight);
}
if (cluster.energyCorrectedAllTracks2()) {
registry.fill(HIST("h_cluster_energy_corr_allTracks70"), cluster.energyCorrectedAllTracks2(), weight);
}
if (cluster.energyCorrectedOneTrack1()) {
registry.fill(HIST("h_cluster_energy_corr_oneTrack100"), cluster.energyCorrectedOneTrack1(), weight);
}
if (cluster.energyCorrectedOneTrack2()) {
registry.fill(HIST("h_cluster_energy_corr_oneTrack70"), cluster.energyCorrectedOneTrack2(), weight);
}
if (cluster.energyCorrectedAllTracks1()) {
registry.fill(HIST("h_cluster_energy_corr_allTracks100"), cluster.energyCorrectedAllTracks1(), weight);
}
if (cluster.energyCorrectedAllTracks2()) {
registry.fill(HIST("h_cluster_energy_corr_allTracks70"), cluster.energyCorrectedAllTracks2(), weight);
}

registry.fill(HIST("h_clusterTime"), cluster.time(), weight);
registry.fill(HIST("h_cluster_pt"), clusterpt, weight);
Expand All @@ -992,7 +991,6 @@
registry.fill(HIST("h_cluster_energysum_corr_oneTrack70"), sumclusterE_corr_oneTrack70, weight);
registry.fill(HIST("h_cluster_energysum_corr_allTracks100"), sumclusterE_corr_allTracks100, weight);
registry.fill(HIST("h_cluster_energysum_corr_allTracks70"), sumclusterE_corr_allTracks70, weight);

}
}

Expand Down Expand Up @@ -1039,7 +1037,7 @@
if (bcs.size() == 0) {
return;
}
for (auto bc : bcs) {

Check failure on line 1040 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("hBCCounter"), 0.5); // All BC
if (bc.selection_bit(aod::evsel::kIsTriggerTVX)) {
registry.fill(HIST("hBCCounter"), 1.5); // BC+TVX
Expand All @@ -1051,7 +1049,7 @@
}
}
auto collisionsInBC = collisions.sliceBy(perFoundBC, bc.globalIndex());
for (auto collision : collisionsInBC) {

Check failure on line 1052 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("hBCCounter"), 4.5); // CollinBC
if (collision.sel8()) {
registry.fill(HIST("hBCCounter"), 5.5); // CollinBC+sel8
Expand Down Expand Up @@ -1884,7 +1882,7 @@
callCount++;

// Clean up cache every 50000 calls to prevent memory issues
if (doMcClosure && callCount % 50000 == 0 && mcCollisionRandomValues.size() > 20000) {

Check failure on line 1885 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGF(info, "Cleaning up MC collision random values cache (size: %zu)", mcCollisionRandomValues.size());
mcCollisionRandomValues.clear();

Expand All @@ -1903,7 +1901,7 @@
PROCESS_SWITCH(FullJetSpectra, processCleanup, "Periodic cleanup", true);
*/
void processDataTracks(soa::Filtered<EMCCollisionsData>::iterator const& collision, soa::Filtered<aod::JetTracks> const& tracks,
ClusterWithCorrections const& clusters) //replaced "soa::Filtered<aod::JetClusters>" with ClusterWithCorrections to include the hadcorr tables
ClusterWithCorrections const& clusters) // replaced "soa::Filtered<aod::JetClusters>" with ClusterWithCorrections to include the hadcorr tables
{
bool eventAccepted = false;

Expand Down Expand Up @@ -2215,7 +2213,6 @@
neutralEnergy_corr_oneTrack70 += jetcluster.energyCorrectedOneTrack2();
neutralEnergy_corr_allTracks100 += jetcluster.energyCorrectedAllTracks1();
neutralEnergy_corr_allTracks70 += jetcluster.energyCorrectedAllTracks2();

}
auto jetEnergy = jet.energy();

Expand Down
Loading