Skip to content
Closed
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
2 changes: 2 additions & 0 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ DECLARE_SOA_TABLE_VERSIONED(MultMCExtras_001, "AOD", "MULTMCEXTRA", 1, //! Table
using MultMCExtras = MultMCExtras_001;
using MultMCExtra = MultMCExtras::iterator;
using MultsExtraMC = MultMCExtras; // for backwards compatibility with previous naming scheme
template <aod::is_origin_hash O>
using MultsExtraMCFrom = MultMCExtras_001From<O>;

// crosslinks
namespace mult
Expand Down
4 changes: 2 additions & 2 deletions PWGJE/Core/JetDerivedDataUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,12 @@ bool applyTrackKinematics(T const& track, float pTMin = 0.15, float pTMax = 100.
}

template <typename T>
bool selectTrack(T const& track, int trackSelection, bool isEmbedded = false)
bool selectTrack(T const& track, int trackSelection, bool rejectEmbedded = false)
{
if (!(track.trackSel() & (1ULL << JTrackSel::notBadMcTrack))) {
return false;
}
if (isEmbedded && !(track.trackSel() & (1ULL << JTrackSel::embeddedTrack))) { // will get rid of non embedded tracks
if (rejectEmbedded && !(track.trackSel() & (1ULL << JTrackSel::embeddedTrack))) { // will get rid of non embedded tracks
return false;
}
if (trackSelection == -1) {
Expand Down
12 changes: 6 additions & 6 deletions PWGJE/Core/JetFindingUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ constexpr bool isEMCALClusterTable()
*/

template <typename T, typename U>
bool isTrackSelected(T const& track, int trackSelection, const U* candidate = nullptr)
bool isTrackSelected(T const& track, int trackSelection, bool rejectEmbedded = false, const U* candidate = nullptr)
{

if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
if (!jetderiveddatautilities::selectTrack(track, trackSelection, rejectEmbedded)) {
return false;
}
if (candidate != nullptr) {
Expand All @@ -115,10 +115,10 @@ bool isTrackSelected(T const& track, int trackSelection, const U* candidate = nu
*/

template <typename T, typename U>
void analyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, const U* candidate = nullptr)
void analyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, bool rejectEmbedded = false, const U* candidate = nullptr)
{
for (auto& track : tracks) {
if (isTrackSelected(track, trackSelection, candidate)) {
if (isTrackSelected(track, trackSelection, rejectEmbedded, candidate)) {
fastjetutilities::fillTracks(track, inputParticles, track.globalIndex());
}
}
Expand All @@ -134,11 +134,11 @@ void analyseTracks(std::vector<fastjet::PseudoJet>& inputParticles, T const& tra
*/

template <typename T, typename U>
void analyseTracksMultipleCandidates(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, U const& candidates)
void analyseTracksMultipleCandidates(std::vector<fastjet::PseudoJet>& inputParticles, T const& tracks, int trackSelection, bool rejectEmbedded, U const& candidates)
{
for (auto& track : tracks) {
bool isSelected = true;
if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
if (!jetderiveddatautilities::selectTrack(track, trackSelection, rejectEmbedded)) {
continue;
}
for (auto& candidate : candidates) {
Expand Down
2 changes: 2 additions & 0 deletions PWGJE/DataModel/Jet.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! absolute p
DECLARE_JET_TABLES(JCollision, _jet_type_##EventWiseSubtracted, _subtracted_track_type_, _hfcand_type_, _shortname_ "EWSJET") \
DECLARE_JETMATCHING_TABLE(_jet_type_, _jet_type_##EventWiseSubtracted, _shortname_ "JET2EWS") \
DECLARE_JETMATCHING_TABLE(_jet_type_##EventWiseSubtracted, _jet_type_, _shortname_ "EWSJET2") \
DECLARE_JETMATCHING_TABLE(_jet_type_##MCDetectorLevel, _jet_type_##EventWiseSubtracted, _shortname_ "DJET2EWS") \
DECLARE_JETMATCHING_TABLE(_jet_type_##EventWiseSubtracted, _jet_type_##MCDetectorLevel, _shortname_ "EWSJET2D") \
DECLARE_JET_TABLES(JCollision, _jet_type_##MCDetectorLevelEventWiseSubtracted, _subtracted_track_type_, _hfcand_type_, _shortname_ "DEWSJET") \
DECLARE_MCEVENTWEIGHT_TABLE(_jet_type_##MCDetectorLevelEventWiseSubtracted, _jet_type_##MCDetectorLevelEventWiseSubtracted, _shortname_ "DJETEWSW") \
DECLARE_JETMATCHING_TABLE(_jet_type_##MCDetectorLevel, _jet_type_##MCDetectorLevelEventWiseSubtracted, _shortname_ "DJET2DEWS") \
Expand Down
7 changes: 4 additions & 3 deletions PWGJE/JetFinders/jetFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct JetFinderTask {
o2::framework::Configurable<std::string> triggerMasks{"triggerMasks", "", "possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL"};
o2::framework::Configurable<bool> skipMBGapEvents{"skipMBGapEvents", true, "decide to run over MB gap events or not"};
o2::framework::Configurable<bool> applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"};
o2::framework::Configurable<bool> isEmbedding{"isEmbedding", false, "running on an embedded dataset"};

// track level configurables
o2::framework::Configurable<float> trackPtMin{"trackPtMin", 0.15, "minimum track pT"};
Expand Down Expand Up @@ -207,7 +208,7 @@ struct JetFinderTask {
return;
}
inputParticles.clear();
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection);
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection, isEmbedding);
jetfindingutilities::findJets(jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get<THn>(HIST("hJet")) : std::shared_ptr<THn>(nullptr), fillTHnSparse);
}

Expand All @@ -220,7 +221,7 @@ struct JetFinderTask {
return;
}
inputParticles.clear();
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracksSub>, o2::soa::Filtered<o2::aod::JetTracksSub>::iterator>(inputParticles, tracks, trackSelection);
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracksSub>, o2::soa::Filtered<o2::aod::JetTracksSub>::iterator>(inputParticles, tracks, trackSelection, isEmbedding);
jetfindingutilities::findJets(jetFinder, inputParticles, jetEWSPtMin, jetEWSPtMax, jetRadius, jetAreaFractionMin, collision, jetsEvtWiseSubTable, constituentsEvtWiseSubTable, fillTHnSparse ? registry.get<THn>(HIST("hJetEWS")) : std::shared_ptr<THn>(nullptr), fillTHnSparse);
}

Expand Down Expand Up @@ -252,7 +253,7 @@ struct JetFinderTask {
for (auto const& clusterDefinition : clusterDefinitionsVec) {
for (auto const& hadronicCorrectionType : hadronicCorrectionTypesVec) {
inputParticles.clear();
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection);
jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection, isEmbedding);
jetfindingutilities::analyseClusters(inputParticles, clusters, clusterDefinition, hadronicCorrectionType);
jetfindingutilities::findJets(jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get<THn>(HIST("hJet")) : std::shared_ptr<THn>(nullptr), fillTHnSparse);
}
Expand Down
5 changes: 3 additions & 2 deletions PWGJE/JetFinders/jetFinderHF.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct JetFinderHFTask {
o2::framework::Configurable<std::string> triggerMasks{"triggerMasks", "", "possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL"};
o2::framework::Configurable<bool> skipMBGapEvents{"skipMBGapEvents", true, "decide to run over MB gap events or not"};
o2::framework::Configurable<bool> applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"};
o2::framework::Configurable<bool> isEmbedding{"isEmbedding", false, "running on an embedded dataset"};

// track level configurables
o2::framework::Configurable<float> trackPtMin{"trackPtMin", 0.15, "minimum track pT"};
Expand Down Expand Up @@ -239,9 +240,9 @@ struct JetFinderHFTask {
}
}
if constexpr (isEvtWiseSub) {
jetfindingutilities::analyseTracks<U, typename U::iterator>(inputParticles, tracks, trackSelection);
jetfindingutilities::analyseTracks<U, typename U::iterator>(inputParticles, tracks, trackSelection, isEmbedding);
} else {
jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, &candidate);
jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, isEmbedding, &candidate);
}
jetfindingutilities::findJets(jetFinder, inputParticles, minJetPt, maxJetPt, jetRadius, jetAreaFractionMin, collision, jetsTableInput, constituentsTableInput, registry.get<THn>(HIST("hJet")), fillTHnSparse, true);
}
Expand Down
3 changes: 2 additions & 1 deletion PWGJE/JetFinders/jetFinderHFHFBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct JetFinderHFHFBarTask {
o2::framework::Configurable<std::string> triggerMasks{"triggerMasks", "", "possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL"};
o2::framework::Configurable<bool> skipMBGapEvents{"skipMBGapEvents", true, "decide to run over MB gap events or not"};
o2::framework::Configurable<bool> applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"};
o2::framework::Configurable<bool> isEmbedding{"isEmbedding", false, "running on an embedded dataset"};

// track level configurables
o2::framework::Configurable<float> trackPtMin{"trackPtMin", 0.15, "minimum track pT"};
Expand Down Expand Up @@ -244,7 +245,7 @@ struct JetFinderHFHFBarTask {
return;
}
}
jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, &candidate);
jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, isEmbedding, &candidate);

jetfindingutilities::findJets(jetFinder, inputParticles, minJetPt, maxJetPt, jetRadius, jetAreaFractionMin, collision, jetsTableInput, constituentsTableInput, registry.get<THn>(HIST("hJet")), fillTHnSparse, true);
}
Expand Down
3 changes: 2 additions & 1 deletion PWGJE/JetFinders/jetFinderV0.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct JetFinderV0Task {
o2::framework::Configurable<std::string> triggerMasks{"triggerMasks", "", "possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL"};
o2::framework::Configurable<bool> skipMBGapEvents{"skipMBGapEvents", true, "decide to run over MB gap events or not"};
o2::framework::Configurable<bool> applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"};
o2::framework::Configurable<bool> isEmbedding{"isEmbedding", false, "running on an embedded dataset"};

// track level configurables
o2::framework::Configurable<float> trackPtMin{"trackPtMin", 0.15, "minimum track pT"};
Expand Down Expand Up @@ -208,7 +209,7 @@ struct JetFinderV0Task {
}
}
*/
jetfindingutilities::analyseTracksMultipleCandidates(inputParticles, tracks, trackSelection, candidates);
jetfindingutilities::analyseTracksMultipleCandidates(inputParticles, tracks, trackSelection, isEmbedding, candidates);

jetfindingutilities::findJets(jetFinder, inputParticles, minJetPt, maxJetPt, jetRadius, jetAreaFractionMin, collision, jetsTableInput, constituentsTableInput, registry.get<THn>(HIST("hJet")), fillTHnSparse, saveJetsWithCandidatesOnly);
}
Expand Down
5 changes: 5 additions & 0 deletions PWGJE/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ o2physics_add_dpl_workflow(jet-deriveddata-producer
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(jet-deriveddata-embedding-producer
SOURCES derivedDataProducerEmbedding.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(jet-deriveddata-trigger-producer
SOURCES derivedDataTriggerProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore
Expand Down
5 changes: 5 additions & 0 deletions PWGJE/TableProducer/Matching/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,9 @@ o2physics_add_dpl_workflow(jet-matching-sub-dielectron-ch
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(jet-matching-mcd-sub-ch
SOURCES jetMatchingMCDSubCharged.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport
COMPONENT_NAME Analysis)

endif()
45 changes: 45 additions & 0 deletions PWGJE/TableProducer/Matching/jetMatchingMCDSubCharged.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

// jet matching mcd subtracted charged task
//
/// \author Nima Zardoshti <nima.zardoshti@cern.ch>

#include "PWGJE/DataModel/Jet.h"
#include "PWGJE/DataModel/JetReducedData.h"
#include "PWGJE/DataModel/JetSubtraction.h"
#include "PWGJE/TableProducer/Matching/jetMatchingSub.h"

#include <Framework/ASoA.h>
#include <Framework/AnalysisTask.h>
#include <Framework/ConfigContext.h>
#include <Framework/DataProcessorSpec.h>
#include <Framework/runDataProcessing.h>

#include <vector>

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;

using ChargedJetMatchingSub = JetMatchingSub<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents>,
soa::Join<aod::ChargedEventWiseSubtractedJets, aod::ChargedEventWiseSubtractedJetConstituents>,
aod::ChargedMCDetectorLevelJetsMatchedToChargedEventWiseSubtractedJets,
aod::ChargedEventWiseSubtractedJetsMatchedToChargedMCDetectorLevelJets,
aod::JTrackSubs,
aod::JDummys>;

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
std::vector<o2::framework::DataProcessorSpec> tasks;
tasks.emplace_back(adaptAnalysisTask<ChargedJetMatchingSub>(cfgc, SetDefaultProcesses{}, TaskName{"jet-matching-mcd-sub-ch"}));
return WorkflowSpec{tasks};
}
5 changes: 2 additions & 3 deletions PWGJE/TableProducer/derivedDataProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ struct JetDerivedDataProducerTask {
}
PROCESS_SWITCH(JetDerivedDataProducerTask, processBunchCrossingsWithoutSels, "produces derived bunch crossing table with bunch crossing selections", false);

void processCollisions(soa::Join<aod::Collisions, aod::EvSels, aod::FV0Mults, aod::FT0Mults, aod::CentFV0As, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0Ms, aod::CentFT0CVariant1s>::iterator const& collision, soa::Join<aod::BCs, aod::BcSels, aod::Timestamps> const&, aod::FT0s const&, aod::FV0As const&, aod::FDDs const&)
void processCollisions(soa::Join<aod::Collisions, aod::EvSels, aod::FV0Mults, aod::FT0Mults, aod::CentFV0As, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0Ms, aod::CentFT0CVariant1s>::iterator const& collision, soa::Join<aod::BCs, aod::BcSels, aod::Timestamps> const&)
{
auto bc = collision.bc_as<soa::Join<aod::BCs, aod::BcSels, aod::Timestamps>>();
if (config.includeHadronicRate) {
Expand Down Expand Up @@ -342,9 +342,8 @@ struct JetDerivedDataProducerTask {
amplitudesFDDA.clear();
amplitudesFDDC.clear();
if (collision.has_foundBC()) {
auto const upcBC = collision.foundBC_as<soa::Join<aod::BCs, aod::BcSels, aod::Timestamps, aod::Run3MatchedToBCSparse>>();
auto const upcBCRange = udhelpers::compatibleBCs(collision, upcCuts.NDtcoll(), bcs, upcCuts.minNBCs());
auto const upcResult = upcSelector.IsSelected(upcCuts, collision, upcBCRange, upcBC, &amplitudesFV0, &amplitudesFT0A, &amplitudesFT0C, &amplitudesFDDA, &amplitudesFDDC);
auto const upcResult = upcSelector.IsSelected(upcCuts, collision, upcBCRange, bc, &amplitudesFV0, &amplitudesFT0A, &amplitudesFT0C, &amplitudesFDDA, &amplitudesFDDC);
upcGapResult = upcResult.value;
if (upcGapResult != o2::aod::sgselector::SingleGapA && upcGapResult != o2::aod::sgselector::SingleGapC && upcGapResult != o2::aod::sgselector::DoubleGap) {
amplitudesFV0.clear();
Expand Down
Loading
Loading