Skip to content
Closed
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: 4 additions & 5 deletions PWGJE/TableProducer/mcOutlierRejector.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/mcOutlierRejector.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 @@ -62,7 +62,7 @@
bool isTrueOutlier = true;
float maxSelectionObjectPt = 0.0;
if constexpr (std::is_same_v<std::decay_t<T>, aod::JetTracksMCD> || std::is_same_v<std::decay_t<T>, aod::JetParticles>) {
for (auto selectionObject : selectionObjects) {

Check failure on line 65 in PWGJE/TableProducer/mcOutlierRejector.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 (selectionObject.pt() > maxSelectionObjectPt) {
maxSelectionObjectPt = selectionObject.pt();
// may be slow - could save only MC particle then check difference only for tracks IDd as outliers?
Expand All @@ -70,14 +70,14 @@
auto& mcCollisions = mcCollisionsOpt.value().get();
auto mcParticle = selectionObject.template mcParticle_as<soa::Join<aod::JetParticles, aod::JMcParticlePIs>>();
auto mcCollision = mcCollisions.sliceBy(perColParticle, mcParticle.mcCollisionId());
else {
else
{
int subGenID = mcCollision.begin().subGeneratorId();
int diffCollisionID = mcParticle.mcCollisionId() - mcCollisionId;
if (subGenID == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap &&
diffCollisionID != 0) {
diffCollisionID != 0) {
isTrueOutlier = true;
}
else {
} else {
isTrueOutlier = false;
}
}
Expand All @@ -88,7 +88,6 @@
maxSelectionObjectPt = selectionObjects.iteratorAt(0).pt();
}


if (maxSelectionObjectPt > ptHatMax * ptHard && isTrueOutlier) {
flagArray[collisionIndex] = true; // Currently if running multiple different jet finders, then a single type of jet can veto an event for others. Decide if this is the best way
}
Expand Down Expand Up @@ -159,4 +158,4 @@
PROCESS_SWITCH(McOutlierRejectorTask, processStoreMcCollisionDecision, "write out decision of rejecting mcCollision", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<McOutlierRejectorTask>(cfgc, TaskName{"mc-outlier-rejector"})}; }

Check failure on line 161 in PWGJE/TableProducer/mcOutlierRejector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name mc-outlier-rejector produces device name mc-outlier-rejector which does not match the device name mc-outlier-rejector-task from the struct name McOutlierRejectorTask. (Matching struct name McOutlierRejector)
Loading