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
8 changes: 4 additions & 4 deletions PWGJE/JetFinders/jetFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
o2::framework::Configurable<std::string> particleSelections{"particleSelections", "PhysicalPrimary", "set particle selections"};

// cluster level configurables
o2::framework::Configurable<std::string> clusterDefinitionS{"clusterDefinition", "kV3Default", "cluster definition to be selected, e.g. V3Default"};

Check failure on line 82 in PWGJE/JetFinders/jetFinder.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
o2::framework::Configurable<float> clusterEtaMin{"clusterEtaMin", -0.71, "minimum cluster eta"}; // For ECMAL: |eta| < 0.7, phi = 1.40 - 3.26
o2::framework::Configurable<float> clusterEtaMax{"clusterEtaMax", 0.71, "maximum cluster eta"}; // For ECMAL: |eta| < 0.7, phi = 1.40 - 3.26
o2::framework::Configurable<float> clusterPhiMin{"clusterPhiMin", 1.39, "minimum cluster phi"};
Expand All @@ -104,7 +104,7 @@
o2::framework::Configurable<int> jetRecombScheme{"jetRecombScheme", 0, "jet recombination scheme. 0 = E-scheme, 1 = pT-scheme, 2 = pT2-scheme"};
o2::framework::Configurable<float> jetGhostArea{"jetGhostArea", 0.005, "jet ghost area"};
o2::framework::Configurable<int> ghostRepeat{"ghostRepeat", 1, "set to 0 to gain speed if you dont need area calculation"};
o2::framework::Configurable<bool> DoTriggering{"DoTriggering", false, "used for the charged jet trigger to remove the eta constraint on the jet axis"};

Check failure on line 107 in PWGJE/JetFinders/jetFinder.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
o2::framework::Configurable<float> jetAreaFractionMin{"jetAreaFractionMin", -99.0, "used to make a cut on the jet areas"};
o2::framework::Configurable<int> jetPtBinWidth{"jetPtBinWidth", 5, "used to define the width of the jetPt bins for the THnSparse"};
o2::framework::Configurable<bool> fillTHnSparse{"fillTHnSparse", false, "switch to fill the THnSparse"};
Expand All @@ -131,7 +131,7 @@
jetFinder.etaMax = trackEtaMax;
jetFinder.jetEtaMin = jetEtaMin;
jetFinder.jetEtaMax = jetEtaMax;
if (jetEtaMin < -98.0) {

Check failure on line 134 in PWGJE/JetFinders/jetFinder.h

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.
jetFinder.jetEtaDefault = true;
}
jetFinder.algorithm = static_cast<fastjet::JetAlgorithm>(static_cast<int>(jetAlgorithm));
Expand Down Expand Up @@ -165,7 +165,7 @@
}

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

Check failure on line 168 in PWGJE/JetFinders/jetFinder.h

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, "jetFinder workflow: trackingEfficiencyPtBinning configurable should have at least two bin edges");
}
if (trackingEfficiency->size() + 1 != trackingEfficiencyPtBinning->size()) {
Expand Down Expand Up @@ -210,7 +210,7 @@
void processNeutralJets(o2::soa::Filtered<o2::aod::JetCollisions>::iterator const& collision,
o2::soa::Filtered<o2::aod::JetClusters> const& clusters)
{
if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL(collision)) || !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL(collision)) || !jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections, "CBT_calo") || !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
return;
}
inputParticles.clear();
Expand All @@ -223,7 +223,7 @@
o2::soa::Filtered<o2::aod::JetTracks> const& tracks,
o2::soa::Filtered<o2::aod::JetClusters> const& clusters)
{
if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL(collision)) || !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL(collision)) || !jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections, "CBT_calo") || !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
return;
}
inputParticles.clear();
Expand Down Expand Up @@ -257,7 +257,7 @@

void processParticleLevelNeutralJets(o2::soa::Filtered<o2::aod::JetMcCollisions>::iterator const& mcCollision, o2::soa::Filtered<o2::aod::JetParticles> const& particles)
{
if (!jetderiveddatautilities::selectMcCollision(mcCollision, skipMBGapEvents, applyRCTSelections)) {
if (!jetderiveddatautilities::selectMcCollision(mcCollision, skipMBGapEvents, applyRCTSelections, "CBT_calo")) {
return;
}
inputParticles.clear();
Expand All @@ -268,7 +268,7 @@

void processParticleLevelFullJets(o2::soa::Filtered<o2::aod::JetMcCollisions>::iterator const& mcCollision, o2::soa::Filtered<o2::aod::JetParticles> const& particles)
{
if (!jetderiveddatautilities::selectMcCollision(mcCollision, skipMBGapEvents, applyRCTSelections)) {
if (!jetderiveddatautilities::selectMcCollision(mcCollision, skipMBGapEvents, applyRCTSelections, "CBT_calo")) {
return;
}
inputParticles.clear();
Expand Down
27 changes: 22 additions & 5 deletions PWGJE/TableProducer/derivedDataSelector.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/derivedDataSelector.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/derivedDataSelector.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 @@ -90,9 +90,11 @@
Configurable<float> centralityMin{"centralityMin", -999.0, "minimum centrality"};
Configurable<float> centralityMax{"centralityMax", 999.0, "maximum centrality"};
Configurable<int> trackOccupancyInTimeRangeMax{"trackOccupancyInTimeRangeMax", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
Configurable<std::string> eventSelections{"eventSelections", "", "choose event selection"};
Configurable<std::string> eventSelectionsCharged{"eventSelectionsCharged", "", "choose charged event selection"};
Configurable<std::string> eventSelectionsFull{"eventSelectionsFull", "", "choose full event selection"};
Configurable<bool> skipMBGapEvents{"skipMBGapEvents", true, "decide to run over MB gap events or not"};
Configurable<bool> applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"};
Configurable<bool> applyRCTSelectionsCharged{"applyRCTSelectionsCharged", true, "decide to apply RCT selections"};
Configurable<bool> applyRCTSelectionsFull{"applyRCTSelectionsFull", true, "decide to apply RCT selections to full analyses"};
Configurable<bool> performTrackSelection{"performTrackSelection", true, "only save tracks that pass one of the track selections"};
Configurable<float> trackPtSelectionMin{"trackPtSelectionMin", 0.15, "only save tracks that have a pT larger than this pT"};
Configurable<float> trackEtaSelectionMax{"trackEtaSelectionMax", 0.9, "only save tracks that have an eta smaller than this eta"};
Expand All @@ -105,11 +107,13 @@

TRandom3 randomNumber;

std::vector<int> eventSelectionBits;
std::vector<int> eventSelectionBitsCharged;
std::vector<int> eventSelectionBitsFull;
std::vector<int> triggerMaskBits;
void init(InitContext&)
{
eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(config.eventSelections));
eventSelectionBitsCharged = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(config.eventSelectionsCharged));
eventSelectionBitsFull = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(config.eventSelectionsFull));
randomNumber.SetSeed(0);
triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(config.triggerMasks);
}
Expand Down Expand Up @@ -148,9 +152,9 @@
}

void processSetupAllCollisionsWithDownscaling(aod::JCollisions const& collisions)
{

Check failure on line 155 in PWGJE/TableProducer/derivedDataSelector.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.
collisionFlag.clear();
collisionFlag.resize(collisions.size(), false);

Check failure on line 157 in PWGJE/TableProducer/derivedDataSelector.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.
for (const auto& collision : collisions) {
if (randomNumber.Integer(config.downscaleFactor) == 0) {
collisionFlag[collision.globalIndex()] = true;
Expand Down Expand Up @@ -195,7 +199,20 @@

void processDoCollisionSelections(aod::JetCollision const& collision)
{ // can also add event selection like sel8 but goes a little against the derived data idea
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, config.skipMBGapEvents, config.applyRCTSelections) || collision.centFT0M() < config.centralityMin || collision.centFT0M() >= config.centralityMax || collision.trackOccupancyInTimeRange() > config.trackOccupancyInTimeRangeMax || std::abs(collision.posZ()) > config.vertexZCut) {
if (collision.centFT0M() < config.centralityMin || collision.centFT0M() >= config.centralityMax || collision.trackOccupancyInTimeRange() > config.trackOccupancyInTimeRangeMax || std::abs(collision.posZ()) > config.vertexZCut) {
collisionFlag[collision.globalIndex()] = false;
}
bool barrelRCTFlagSelection = false;
bool emcalRCTFlagSelection = false;
if (jetderiveddatautilities::selectCollision(collision, eventSelectionBitsCharged, config.skipMBGapEvents, config.applyRCTSelectionsCharged)) {
barrelRCTFlagSelection = true;
}
if (doprocessSelectingNeutralJets || doprocessSelectingNeutralMCDJets || doprocessSelectingNeutralMCPJets || doprocessSelectingFullJets || doprocessSelectingFullMCDJets || doprocessSelectingFullMCPJets || doprocessSelectingClusters) {
if (jetderiveddatautilities::selectCollision(collision, eventSelectionBitsFull, config.skipMBGapEvents, config.applyRCTSelectionsFull, "CBT_calo")) {
emcalRCTFlagSelection = true;
}
}
if (!barrelRCTFlagSelection && !emcalRCTFlagSelection) {
collisionFlag[collision.globalIndex()] = false;
}
}
Expand Down
Loading