Skip to content
Open
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
37 changes: 21 additions & 16 deletions PWGUD/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc
o2physics_add_dpl_workflow(upc-analysis
SOURCES upcAnalysis.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-spectra

Check failure on line 22 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-spectra does not match its file name sgSpectraAnalyzer.cxx. (Matches sgSpectra.cxx.)
SOURCES sgSpectraAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-pid-spectra-table

Check failure on line 27 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-pid-spectra-table does not match its file name sgPIDSpectraTable.cxx. (Matches sgPidSpectraTable.cxx.)
SOURCES sgPIDSpectraTable.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-pid-analyzer

Check failure on line 32 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-pid-analyzer does not match its file name sgPIDAnalyzer.cxx. (Matches sgPidAnalyzer.cxx.)
SOURCES sgPIDAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-pid-spectra

Check failure on line 37 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-pid-spectra does not match its file name sgPIDSpectra.cxx. (Matches sgPidSpectra.cxx.)
SOURCES sgPIDSpectra.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)
Expand All @@ -49,32 +49,32 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-excl-universe

Check failure on line 52 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-excl-universe does not match its file name sgExcUniverse.cxx. (Matches sgExclUniverse.cxx.)
SOURCES sgExcUniverse.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-fourpi

Check failure on line 57 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-fourpi does not match its file name sgFourPiAnalyzer.cxx. (Matches sgFourpi.cxx.)
SOURCES sgFourPiAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-sixpi

Check failure on line 62 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-sixpi does not match its file name sgSixPiAnalyzer.cxx. (Matches sgSixpi.cxx.)
SOURCES sgSixPiAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-twopi

Check failure on line 67 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-twopi does not match its file name sgTwoPiAnalyzer.cxx. (Matches sgTwopi.cxx.)
SOURCES sgTwoPiAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-d0

Check failure on line 72 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-d0 does not match its file name sgD0Analyzer.cxx. (Matches sgD0.cxx.)
SOURCES sgD0Analyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sg-fit

Check failure on line 77 in PWGUD/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sg-fit does not match its file name sgFITAnalyzer.cxx. (Matches sgFit.cxx.)
SOURCES sgFITAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)
Expand All @@ -99,17 +99,17 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGCutparHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(dgcand-analyzer
o2physics_add_dpl_workflow(dg-cand-analyzer
SOURCES dgCandAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGCutparHolder O2Physics::UDGoodRunSelector O2Physics::DGPIDSelector O2Physics::UDFSParser
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upccand-analyzer
o2physics_add_dpl_workflow(upc-cand-analyzer
SOURCES upcCandidateAnalyzer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upccand-producer-qa
o2physics_add_dpl_workflow(upc-cand-producer-qa
SOURCES upcCandidateProducerQa.cpp
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)
Expand All @@ -119,7 +119,7 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::ReconstructionDataFormats O2::DetectorsBase O2::DetectorsCommonDataFormats
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc-veto
o2physics_add_dpl_workflow(upc-veto-analysis
SOURCES upcVetoAnalysis.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)
Expand Down Expand Up @@ -214,8 +214,8 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGPIDSelector
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc-event-itsrof-counter
SOURCES upcEventITSROFcounter.cxx
o2physics_add_dpl_workflow(upc-event-its-rof-counter
SOURCES upcEventItsRofCounter.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)

Expand Down Expand Up @@ -244,8 +244,8 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(test-mc-std-tabs-rl
SOURCES testMcStdTabsRl.cxx
o2physics_add_dpl_workflow(upc-test-mc-std-tabs-rl
SOURCES upcTestMcStdTabsRl.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::ReconstructionDataFormats O2::DetectorsBase O2::DetectorsCommonDataFormats
COMPONENT_NAME Analysis)

Expand Down Expand Up @@ -289,12 +289,17 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(fitbit-mapping
SOURCES upcTestFITBitMapping.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
o2physics_add_dpl_workflow(upc-vm-rof
SOURCES upcVmRof.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc-test-fit-bit-mapping
SOURCES upcTestFitBitMapping.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pt-spectra-inclusive-upc
SOURCES ptSpectraInclusiveUpc.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
SOURCES ptSpectraInclusiveUpc.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file upcEventITSROFcounter.cxx
/// \file upcEventItsRofCounter.cxx
/// \brief Personal task to analyze tau events from UPC collisions
///
/// \author Roman Lavicka <roman.lavicka@cern.ch>, Austrian Academy of Sciences & SMI
Expand Down Expand Up @@ -51,12 +51,15 @@ using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3Match
using CCs = soa::Join<aod::Collisions, aod::EvSels>;
using FullSGUDCollision = soa::Join<aod::UDCollisions, aod::UDCollisionsSels, aod::SGCollisions, aod::UDZdcsReduced>::iterator;

struct UpcEventITSROFcounter {
struct UpcEventItsRofCounter {
Service<o2::ccdb::BasicCCDBManager> ccdb;
SGSelector sgSelector;

HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

static constexpr int NCollFillCount = 12; // upper bound of collision-count loop filling the per-ROF histograms (last value goes to overflow of 11-bin histos)
static constexpr int DoubleGapSide = 2; // SGSelector convention: 0=A-gap, 1=C-gap, 2=double-gap

Configurable<int> nTracksForUPCevent{"nTracksForUPCevent", 16, {"Maximum of tracks defining a UPC collision"}};

Configurable<bool> useTrueGap{"useTrueGap", true, {"Calculate gapSide for a given FV0/FT0/ZDC thresholds"}};
Expand Down Expand Up @@ -158,7 +161,7 @@ struct UpcEventITSROFcounter {
arrUPCcolls[nUpcCollsInROF]++;
} // end loop over ITSROFs

for (int ncol = 0; ncol < 12; ncol++) {
for (int ncol = 0; ncol < NCollFillCount; ncol++) {
histos.get<TH1>(HIST("Events/hCountCollisionsInROFborderMatching"))->Fill(ncol, arrAllColls[ncol]);
histos.get<TH1>(HIST("Events/hCountUPCcollisionsInROFborderMatching"))->Fill(ncol, arrUPCcolls[ncol]);
}
Expand Down Expand Up @@ -198,7 +201,7 @@ struct UpcEventITSROFcounter {
}

if (coll.flags() == 0) {
if (gapSide == 2) {
if (gapSide == DoubleGapSide) {
histos.get<TH1>(HIST("Runs/hStdModeCollDG"))->Fill(coll.runNumber());
} else if (gapSide == 1) {
histos.get<TH1>(HIST("Runs/hStdModeCollSG1"))->Fill(coll.runNumber());
Expand All @@ -208,7 +211,7 @@ struct UpcEventITSROFcounter {
histos.get<TH1>(HIST("Runs/hStdModeCollNG"))->Fill(coll.runNumber());
}
} else {
if (gapSide == 2) {
if (gapSide == DoubleGapSide) {
histos.get<TH1>(HIST("Runs/hUpcModeCollDG"))->Fill(coll.runNumber());
} else if (gapSide == 1) {
histos.get<TH1>(HIST("Runs/hUpcModeCollSG1"))->Fill(coll.runNumber());
Expand All @@ -220,12 +223,12 @@ struct UpcEventITSROFcounter {
}
}

PROCESS_SWITCH(UpcEventITSROFcounter, processCounterPerITSROF, "Counts number of collisions per ITSROF", false);
PROCESS_SWITCH(UpcEventITSROFcounter, processCounterPerRun, "Counts number of whatever per RUN", true);
PROCESS_SWITCH(UpcEventItsRofCounter, processCounterPerITSROF, "Counts number of collisions per ITSROF", false);
PROCESS_SWITCH(UpcEventItsRofCounter, processCounterPerRun, "Counts number of whatever per RUN", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<UpcEventITSROFcounter>(cfgc)};
adaptAnalysisTask<UpcEventItsRofCounter>(cfgc)};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//
// \FIT bits to phi, eta mapping
// \author Sandor Lokos, sandor.lokos@cern.ch
// \since March 2026

/// \file upcTestFitBitMapping.cxx
/// \brief FIT bits to phi, eta mapping
/// \author Sandor Lokos, sandor.lokos@cern.ch
/// \since March 2026

#include "PWGUD/Core/UDHelpers.h" // udhelpers::Bits256, makeBits256, testBit, getPhiEtaFromFitBit
#include "PWGUD/DataModel/UDTables.h" // aod::UDCollisionFITBits

#include <FT0Base/Geometry.h> // o2::ft0::Geometry
#include <CommonConstants/MathConstants.h> // o2::constants::math::TwoPI
#include <FT0Base/Geometry.h> // o2::ft0::Geometry
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
Expand All @@ -25,15 +28,14 @@
#include <Framework/runDataProcessing.h>

#include <array>
#include <cmath>
#include <cstdint>

#include <math.h>

using namespace o2;
using namespace o2::framework;

struct UpcTestFITBitMapping {
struct UpcTestFitBitMapping {
static constexpr int Thr2Selector = 2; // value of whichThr that selects the Thr2 bit set

Configurable<int> whichThr{"whichThr", 1, "Use 1=Thr1 bits or 2=Thr2 bits"};
Configurable<int> maxEvents{"maxEvents", -1, "Process at most this many rows (-1 = all)"};

Expand All @@ -53,13 +55,13 @@ struct UpcTestFITBitMapping {
HistogramRegistry registry{
"registry",
{
{"hPhiA", "FT0A #varphi;#varphi;counts", {HistType::kTH1F, {{18, 0.0, 2. * M_PI}}}},
{"hPhiA", "FT0A #varphi;#varphi;counts", {HistType::kTH1F, {{18, 0.0, o2::constants::math::TwoPI}}}},
{"hEtaA", "FT0A #eta;#eta;counts", {HistType::kTH1F, {{8, 3.5, 5.0}}}},
{"hEtaPhiA", "FT0A #eta vs #varphi;#eta;#varphi", {HistType::kTH2F, {{8, 3.5, 5.0}, {18, 0.0, 2. * M_PI}}}},
{"hEtaPhiA", "FT0A #eta vs #varphi;#eta;#varphi", {HistType::kTH2F, {{8, 3.5, 5.0}, {18, 0.0, o2::constants::math::TwoPI}}}},

{"hPhiC", "FT0C #varphi;#varphi;counts", {HistType::kTH1F, {{18, 0.0, 2. * M_PI}}}},
{"hPhiC", "FT0C #varphi;#varphi;counts", {HistType::kTH1F, {{18, 0.0, o2::constants::math::TwoPI}}}},
{"hEtaC", "FT0C #eta;#eta;counts", {HistType::kTH1F, {{8, -3.5, -2.0}}}},
{"hEtaPhiC", "FT0C #eta vs #varphi;#eta;#varphi", {HistType::kTH2F, {{8, -3.5, -2.0}, {18, 0.0, 2. * M_PI}}}},
{"hEtaPhiC", "FT0C #eta vs #varphi;#eta;#varphi", {HistType::kTH2F, {{8, -3.5, -2.0}, {18, 0.0, o2::constants::math::TwoPI}}}},
}};

void init(InitContext&)
Expand All @@ -80,7 +82,7 @@ struct UpcTestFITBitMapping {

// Use udhelpers' canonical packed type + builder
udhelpers::Bits256 w{};
if (whichThr == 2) {
if (whichThr == Thr2Selector) {
w = udhelpers::makeBits256(row.thr2W0(), row.thr2W1(), row.thr2W2(), row.thr2W3());
} else {
w = udhelpers::makeBits256(row.thr1W0(), row.thr1W1(), row.thr1W2(), row.thr1W3());
Expand Down Expand Up @@ -115,5 +117,5 @@ struct UpcTestFITBitMapping {
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<UpcTestFITBitMapping>(cfgc, TaskName{"fitbit-mapping"})};
adaptAnalysisTask<UpcTestFitBitMapping>(cfgc)};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//
/// \file testMcStdTabsRl.cxx
/// \file upcTestMcStdTabsRl.cxx
/// \brief task to test the Monte Carlo UD production generatorIDs on hyperloop
///
/// \author Roman Lavicka <roman.lavicka@cern.ch>, Austrian Academy of Sciences & SMI
Expand Down Expand Up @@ -41,7 +41,7 @@ using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace o2::constants::physics;

struct TestMcStdTabsRl {
struct UpcTestMcStdTabsRl {

// Global varialbes
Service<o2::framework::O2DatabasePDG> pdg;
Expand Down Expand Up @@ -103,11 +103,11 @@ struct TestMcStdTabsRl {

} // end processMCgenDG

PROCESS_SWITCH(TestMcStdTabsRl, processMCgen, "Iterate Monte Carlo UD tables with truth data.", true);
PROCESS_SWITCH(UpcTestMcStdTabsRl, processMCgen, "Iterate Monte Carlo UD tables with truth data.", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<TestMcStdTabsRl>(cfgc)};
adaptAnalysisTask<UpcTestMcStdTabsRl>(cfgc)};
}
Loading
Loading