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
9 changes: 9 additions & 0 deletions PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -80,6 +80,12 @@
Configurable<float> rMax{"rMax", 0.24, "maximum distance of subtraction"};
Configurable<float> eventEtaMax{"eventEtaMax", 0.9, "maximum pseudorapidity of event"};
Configurable<bool> doRhoMassSub{"doRhoMassSub", true, "perfom mass subtraction as well"};
Configurable<double> ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"};
Configurable<int> ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"};
Configurable<double> ghostArea{"ghostArea", 0.005, "Area per ghost"};
Configurable<double> ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"};
Configurable<double> ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"};
Configurable<double> ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"};

JetBkgSubUtils eventWiseConstituentSubtractor;
std::vector<fastjet::PseudoJet> inputParticles;
Expand All @@ -98,9 +104,12 @@
eventWiseConstituentSubtractor.setDoRhoMassSub(doRhoMassSub);
eventWiseConstituentSubtractor.setConstSubAlphaRMax(alpha, rMax);
eventWiseConstituentSubtractor.setMaxEtaEvent(eventEtaMax);
fastjet::GhostedAreaSpec ghostAreaSpec(ghostRapMax, ghostRepeat, ghostArea,
ghostGridScatter, ghostKtScatter, ghostMeanPt);
eventWiseConstituentSubtractor.setGhostAreaSpec(ghostAreaSpec);

if (applyTrackingEfficiency) {
if (trackingEfficiencyPtBinning->size() < 2) {

Check failure on line 112 in PWGJE/TableProducer/eventwiseConstituentSubtractor.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.
LOGP(fatal, "eventWiseConstituentSubtractor workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges");
}
if (trackingEfficiency->size() + 1 != trackingEfficiencyPtBinning->size()) {
Expand All @@ -115,7 +124,7 @@
template <typename T, typename U, typename V>
void analyseHF(T const& tracks, U const& candidates, V& trackSubTable)
{
for (auto& candidate : candidates) {

Check failure on line 127 in PWGJE/TableProducer/eventwiseConstituentSubtractor.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.
inputParticles.clear();
tracksSubtracted.clear();
jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, applyTrackingEfficiency, trackingEfficiency, trackingEfficiencyPtBinning, &candidate);
Expand All @@ -130,7 +139,7 @@
template <typename T, typename U, typename V>
void analyseHFMc(T const& particles, U const& candidates, V& particleSubTable)
{
for (auto& candidate : candidates) {

Check failure on line 142 in PWGJE/TableProducer/eventwiseConstituentSubtractor.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.
inputParticles.clear();
tracksSubtracted.clear();
jetfindingutilities::analyseParticles<true>(inputParticles, particleSelection, 1, particles, pdgDatabase, &candidate); // currently only works for charged analyses
Expand Down Expand Up @@ -285,4 +294,4 @@
PROCESS_SWITCH(eventWiseConstituentSubtractorTask, processDielectronMcCollisions, "Fill table of subtracted tracks for collisions with Dielectron MCP candidates", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<eventWiseConstituentSubtractorTask>(cfgc, TaskName{"subtractor-eventwiseconstituent"})}; }

Check failure on line 297 in PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name subtractor-eventwiseconstituent produces device name subtractor-eventwiseconstituent which does not match the device name event-wise-constituent-subtractor-task from the struct name eventWiseConstituentSubtractorTask. (Matching struct name SubtractorEventwiseconstituent)
15 changes: 13 additions & 2 deletions PWGJE/TableProducer/rhoEstimator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,15 @@
Configurable<float> bkgjetR{"bkgjetR", 0.2, "jet resolution parameter for determining background density"};
Configurable<float> bkgEtaMin{"bkgEtaMin", -0.7, "minimim pseudorapidity for determining background density"};
Configurable<float> bkgEtaMax{"bkgEtaMax", 0.7, "maximum pseudorapidity for determining background density"};
Configurable<float> bkgPhiMin{"bkgPhiMin", -99., "minimim phi for determining background density"};
Configurable<float> bkgPhiMax{"bkgPhiMax", 99., "maximum phi for determining background density"};
Configurable<float> bkgPhiMin{"bkgPhiMin", -6.283, "minimim phi for determining background density"};
Configurable<float> bkgPhiMax{"bkgPhiMax", 6.283, "maximum phi for determining background density"};
Configurable<bool> doSparse{"doSparse", false, "perfom sparse estimation"};
Configurable<double> ghostRapMax{"ghostRapMax", 0.9, "Ghost rapidity max"};
Configurable<int> ghostRepeat{"ghostRepeat", 1, "Ghost tiling repeats"};
Configurable<double> ghostArea{"ghostArea", 0.005, "Area per ghost"};
Configurable<double> ghostGridScatter{"ghostGridScatter", 1.0, "Grid scatter"};
Configurable<double> ghostKtScatter{"ghostKtScatter", 0.1, "kT scatter"};
Configurable<double> ghostMeanPt{"ghostMeanPt", 1e-100, "Mean ghost pT"};

Configurable<float> thresholdTriggerTrackPtMin{"thresholdTriggerTrackPtMin", 0.0, "Minimum trigger track pt to accept event"};
Configurable<float> thresholdClusterEnergyMin{"thresholdClusterEnergyMin", 0.0, "Minimum cluster energy to accept event"};
Expand Down Expand Up @@ -134,6 +140,11 @@
bkgPhiMin_ = -2.0 * M_PI;
}
bkgSub.setPhiMinMax(bkgPhiMin_, bkgPhiMax_);

fastjet::GhostedAreaSpec ghostAreaSpec(config.ghostRapMax, config.ghostRepeat, config.ghostArea,
config.ghostGridScatter, config.ghostKtScatter, config.ghostMeanPt);
bkgSub.setGhostAreaSpec(ghostAreaSpec);

eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(config.eventSelections));
triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(config.triggerMasks);

Expand Down Expand Up @@ -241,7 +252,7 @@

void processD0Collisions(aod::JetCollision const& collision, soa::Filtered<aod::JetTracks> const& tracks, aod::CandidatesD0Data const& candidates)
{
for (auto& candidate : candidates) {

Check failure on line 255 in PWGJE/TableProducer/rhoEstimator.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.
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || collision.centFT0M() < config.centralityMin || collision.centFT0M() >= config.centralityMax || collision.trackOccupancyInTimeRange() > config.trackOccupancyInTimeRangeMax || std::abs(collision.posZ()) > config.vertexZCut) {
rhoD0Table(0.0, 0.0);
continue;
Expand All @@ -257,7 +268,7 @@

void processD0McCollisions(aod::JetMcCollision const&, soa::Filtered<aod::JetParticles> const& particles, aod::CandidatesD0MCP const& candidates)
{
for (auto& candidate : candidates) {

Check failure on line 271 in PWGJE/TableProducer/rhoEstimator.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.
inputParticles.clear();
jetfindingutilities::analyseParticles<true>(inputParticles, particleSelection, 1, particles, pdgDatabase, &candidate);

Expand All @@ -269,7 +280,7 @@

void processDplusCollisions(aod::JetCollision const& collision, soa::Filtered<aod::JetTracks> const& tracks, aod::CandidatesDplusData const& candidates)
{
for (auto& candidate : candidates) {

Check failure on line 283 in PWGJE/TableProducer/rhoEstimator.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.
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || collision.centFT0M() < config.centralityMin || collision.centFT0M() >= config.centralityMax || collision.trackOccupancyInTimeRange() > config.trackOccupancyInTimeRangeMax || std::abs(collision.posZ()) > config.vertexZCut) {
rhoDplusTable(0.0, 0.0);
continue;
Expand All @@ -285,7 +296,7 @@

void processDplusMcCollisions(aod::JetMcCollision const&, soa::Filtered<aod::JetParticles> const& particles, aod::CandidatesDplusMCP const& candidates)
{
for (auto& candidate : candidates) {

Check failure on line 299 in PWGJE/TableProducer/rhoEstimator.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.
inputParticles.clear();
jetfindingutilities::analyseParticles<true>(inputParticles, particleSelection, 1, particles, pdgDatabase, &candidate);

Expand Down
5 changes: 3 additions & 2 deletions PWGJE/Tasks/jetTutorial.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ struct JetTutorialTask {

using JetMCPTable = soa::Filtered<soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetConstituents, aod::ChargedMCParticleLevelJetsMatchedToChargedMCDetectorLevelJets>>;
void processMCMatchedCharged(soa::Filtered<aod::JetCollisionsMCD>::iterator const& collision,
aod::JetMcCollisions const&,
soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents, aod::ChargedMCDetectorLevelJetsMatchedToChargedMCParticleLevelJets>> const& mcdjets,
JetMCPTable const&,
aod::JetTracks const&,
Expand All @@ -226,8 +227,8 @@ struct JetTutorialTask {
for (const auto& mcdjet : mcdjets) {
for (auto& mcpjet : mcdjet.template matchedJetGeo_as<JetMCPTable>()) {
registry.fill(HIST("h_matched_jets_pt"), mcpjet.pt(), mcdjet.pt(), collision.mcCollision().weight());
registry.fill(HIST("h_matched_jets_pt"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight());
registry.fill(HIST("h_matched_jets_pt"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight());
registry.fill(HIST("h_matched_jets_phi"), mcpjet.phi(), mcdjet.phi(), collision.mcCollision().weight());
registry.fill(HIST("h_matched_jets_eta"), mcpjet.eta(), mcdjet.eta(), collision.mcCollision().weight());
}
}
}
Expand Down
Loading