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
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/CMakeLists.txt
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 PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Use kebab-case for names of workflows and match the name of the workflow file.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
Expand All @@ -10,14 +10,14 @@
# or submit itself to any jurisdiction.


o2physics_add_dpl_workflow(tree-creator-electron-ml

Check failure on line 13 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name tree-creator-electron-ml does not match its file name treeCreatorElectronML.cxx. (Matches treeCreatorElectronMl.cxx.)
SOURCES treeCreatorElectronML.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(tree-creator-electron-ml-dda

Check failure on line 18 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name tree-creator-electron-ml-dda does not match its file name treeCreatorElectronMLDDA.cxx. (Matches treeCreatorElectronMlDda.cxx.)
SOURCES treeCreatorElectronMLDDA.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-primary-electron
Expand All @@ -25,7 +25,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::MLCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-primary-electron-qc

Check failure on line 28 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name skimmer-primary-electron-qc does not match its file name skimmerPrimaryElectronQC.cxx. (Matches skimmerPrimaryElectronQc.cxx.)
SOURCES skimmerPrimaryElectronQC.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::MLCore
COMPONENT_NAME Analysis)
Expand All @@ -40,17 +40,17 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(create-emevent-dilepton

Check failure on line 43 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name create-emevent-dilepton does not match its file name createEMEventDilepton.cxx. (Matches createEmeventDilepton.cxx.)
SOURCES createEMEventDilepton.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-ots

Check failure on line 48 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name skimmer-ots does not match its file name skimmerOTS.cxx. (Matches skimmerOts.cxx.)
SOURCES skimmerOTS.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(associate-mc-info-dilepton

Check failure on line 53 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name associate-mc-info-dilepton does not match its file name associateMCinfoDilepton.cxx. (Matches associateMcInfoDilepton.cxx.)
SOURCES associateMCinfoDilepton.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -60,7 +60,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(filter-eoi

Check failure on line 63 in PWGEM/Dilepton/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name filter-eoi does not match its file name filterEoI.cxx. (Matches filterEoi.cxx.)
SOURCES filterEoI.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand Down
30 changes: 27 additions & 3 deletions PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "EventFiltering/Zorro.h"

#include "CCDB/BasicCCDBManager.h"
#include "CommonConstants/PhysicsConstants.h"
Expand Down Expand Up @@ -75,7 +76,8 @@
HistogramRegistry registry{
"registry",
{
{"hEventCounter", "hEventCounter", {HistType::kTH1F, {{5, 0.5f, 5.5f}}}},
{"Event/hEventCounter", "hEventCounter", {HistType::kTH1F, {{5, 0.5f, 5.5f}}}},
{"Event/hNumContrib", "Number of contributors to PV;N_{contrib}^{PV};Entries", {HistType::kTH1F, {{65001, -0.5f, 65000.5f}}}},
{"V0/hAP", "Armenteros Podolanski", {HistType::kTH2F, {{200, -1.f, +1.f}, {250, 0, 0.25}}}},
{"V0/hXY_Gamma", "photon conversion point in XY;X (cm);Y (cm)", {HistType::kTH2F, {{400, -100, +100}, {400, -100, +100}}}},
{"V0/hMassGamma_Rxy", "V0 mass gamma", {HistType::kTH2F, {{200, 0, 100}, {100, 0, 0.1}}}},
Expand Down Expand Up @@ -123,6 +125,12 @@
Configurable<double> d_bz_input{"d_bz_input", -999, "bz field, -999 is automatic"};
Configurable<int> useMatCorrType{"useMatCorrType", 2, "0: none, 1: TGeo, 2: LUT"};

// for zorro
Configurable<std::string> cfg_swt_names{"cfg_swt_names", "fHighTrackMult,fHighFt0cFv0Mult", "comma-separated software trigger names"};
o2::framework::Configurable<std::string> ccdbPathSoftwareTrigger{"ccdbPathSoftwareTrigger", "EventFiltering/Zorro/", "ccdb path for ZORRO objects"};
Configurable<uint64_t> bcMarginForSoftwareTrigger{"bcMarginForSoftwareTrigger", 100, "Number of BCs of margin for software triggers"};
Configurable<bool> cfgUseZorro{"cfgUseZorro", false, "flag to analyze software-triggered data"};

Configurable<float> downscaling_electron_highP{"downscaling_electron_highP", 1.1, "down scaling factor to store electron at high p"};
Configurable<float> downscaling_pion_highP{"downscaling_pion_highP", 1.1, "down scaling factor to store pion at high p"};
Configurable<float> downscaling_kaon_highP{"downscaling_kaon_highP", 1.1, "down scaling factor to store kaon at high p"};
Expand Down Expand Up @@ -167,6 +175,8 @@
Configurable<bool> cfgRequireGoodITSLayer3{"cfgRequireGoodITSLayer3", false, "number of inactive chips on ITS layer 3 are below threshold "};
Configurable<bool> cfgRequireGoodITSLayer0123{"cfgRequireGoodITSLayer0123", false, "number of inactive chips on ITS layers 0-3 are below threshold "};
Configurable<bool> cfgRequireGoodITSLayersAll{"cfgRequireGoodITSLayersAll", false, "number of inactive chips on all ITS layers are below threshold "};
Configurable<uint16_t> cfgNumContribMin{"cfgNumContribMin", 0, "min. numContrib"};
Configurable<uint16_t> cfgNumContribMax{"cfgNumContribMax", 65000, "max. numContrib"};
} eventcuts;

struct : ConfigurableGroup {
Expand Down Expand Up @@ -287,6 +297,7 @@
o2::base::MatLayerCylSet* lut = nullptr;
o2::dataformats::DCA mDcaInfoCov;
o2::aod::rctsel::RCTFlagsChecker rctChecker;
Zorro zorro;

std::mt19937 engine;
std::uniform_real_distribution<float> dist01;
Expand All @@ -309,7 +320,7 @@
ccdb->get<TGeoManager>(geoPath);
}
}
if (useMatCorrType == 2) {

Check failure on line 323 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.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, "LUT correction requested, loading LUT");
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(lutPath));
}
Expand All @@ -325,6 +336,13 @@
return;
}

if (cfgUseZorro) {
zorro.setCCDBpath(ccdbPathSoftwareTrigger);
zorro.setBCtolerance(bcMarginForSoftwareTrigger); // this does nothing.
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), cfg_swt_names.value);
zorro.populateHistRegistry(registry, bc.runNumber());
}

// load matLUT for this timestamp
if (!lut) {
LOG(info) << "Loading material look-up table for timestamp: " << bc.timestamp();
Expand All @@ -334,7 +352,7 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

Check failure on line 355 in PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.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.
d_bz = d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {
Expand Down Expand Up @@ -762,6 +780,7 @@

Filter collisionFilter_track_occupancy = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax;
Filter collisionFilter_ft0c_occupancy = eventcuts.cfgFT0COccupancyMin <= o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax;
Filter collisionFilter_numContrib = eventcuts.cfgNumContribMin <= o2::aod::collision::numContrib && o2::aod::collision::numContrib < eventcuts.cfgNumContribMax;
Filter collisionFilter_common = nabs(o2::aod::collision::posZ) < 10.f && o2::aod::evsel::sel8 == true;
using filteredMyCollisions = soa::Filtered<MyCollisions>;

Expand All @@ -777,7 +796,7 @@
{
stored_trackIds.reserve(tracks.size());
for (const auto& collision : collisions) {
registry.fill(HIST("hEventCounter"), 1.0); // all
registry.fill(HIST("Event/hEventCounter"), 1.0); // all

auto bc = collision.template foundBC_as<aod::BCsWithTimestamps>();
initCCDB(bc);
Expand All @@ -786,10 +805,15 @@
continue;
}

if (cfgUseZorro && !zorro.isSelected(bc.globalBC(), bcMarginForSoftwareTrigger)) {
continue;
}

if (cfgRequireGoodRCT && !rctChecker.checkTable(collision)) {
continue;
}
registry.fill(HIST("hEventCounter"), 2.0); // selected
registry.fill(HIST("Event/hEventCounter"), 2.0); // selected
registry.fill(HIST("Event/hNumContrib"), collision.numContrib());

auto v0s_coll = v0s.sliceBy(perCollision_v0, collision.globalIndex());
for (const auto& v0 : v0s_coll) {
Expand Down
Loading