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
41 changes: 41 additions & 0 deletions PWGUD/DataModel/UDTruegapsideTables.h
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really a service, it is just a table definition. Put this header to PWGUD/DataModel and change the name appropriatelly, that is xxxxTables.h. Also, be specific in \brief

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// 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.

/// \file UDTruegapsideTables.h
/// \author Zhiyong Lu (zhiyong.lu@cern.ch)
/// \since Apr/7/2026
/// \brief header defines truegapside outputs

#ifndef PWGUD_DATAMODEL_UDTRUEGAPSIDETABLES_H_
#define PWGUD_DATAMODEL_UDTRUEGAPSIDETABLES_H_

#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/BinningPolicy.h>
#include <Framework/Configurable.h>
#include <Framework/GroupedCombinations.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/runDataProcessing.h>

namespace o2::aod
{
namespace upcservice
{
DECLARE_SOA_COLUMN(Truegapside, truegapside, int);
} // namespace upcservice
DECLARE_SOA_TABLE(Truegapside, "AOD", "TRUEGAPSIDE", upcservice::Truegapside);
} // namespace o2::aod

#endif // PWGUD_DATAMODEL_UDTRUEGAPSIDETABLES_H_
5 changes: 5 additions & 0 deletions PWGUD/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 PWGUD/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 @@ -16,17 +16,17 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGCutparHolder O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(sgcand-producer

Check failure on line 19 in PWGUD/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name sgcand-producer does not match its file name SGCandProducer.cxx. (Matches sgcandProducer.cxx.)
SOURCES SGCandProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::SGCutParHolder O2Physics::AnalysisCCDB O2Physics::FITCutParHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(dgbccand-producer

Check failure on line 24 in PWGUD/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name dgbccand-producer does not match its file name DGBCCandProducer.cxx. (Matches dgbccandProducer.cxx.)
SOURCES DGBCCandProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGCutparHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upccand-producer

Check failure on line 29 in PWGUD/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name upccand-producer does not match its file name UPCCandidateProducer.cxx. (Matches upccandProducer.cxx.)
SOURCES UPCCandidateProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::UPCCutparHolder
COMPONENT_NAME Analysis)
Expand All @@ -46,12 +46,12 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::GlobalTracking
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(udmcparticles-to-udtracks

Check failure on line 49 in PWGUD/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name udmcparticles-to-udtracks does not match its file name udMcParticles2udTracks.cxx. (Matches udmcparticlesToUdtracks.cxx.)
SOURCES udMcParticles2udTracks.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(udmccollisions-to-udcollisions

Check failure on line 54 in PWGUD/TableProducer/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name udmccollisions-to-udcollisions does not match its file name udMcCollisions2udCollisions.cxx. (Matches udmccollisionsToUdcollisions.cxx.)
SOURCES udMcCollisions2udCollisions.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -66,6 +66,11 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::UPCCutparHolder O2::GlobalTracking
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(true-gap-producer
SOURCES trueGapProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc-cand-producer-global-muon
SOURCES upcCandProducerGlobalMuon.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::UPCCutparHolder O2::GlobalTracking
Expand Down
73 changes: 73 additions & 0 deletions PWGUD/TableProducer/trueGapProducer.cxx
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this only produces one desired table. Put the file to PWGUD/TableProducer. Change the appropriately, that is xxxxProducer.cxx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. I will do that

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// 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.

/// \file trueGapProducer.cxx
/// \author Zhiyong Lu (zhiyong.lu@cern.ch)
/// \since Apr/7/2026
/// \brief task producing truegap

#include "PWGUD/Core/SGSelector.h"
#include "PWGUD/DataModel/UDTables.h"
#include "PWGUD/DataModel/UDTruegapsideTables.h"

#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/BinningPolicy.h>
#include <Framework/Configurable.h>
#include <Framework/GroupedCombinations.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/runDataProcessing.h>

#include <vector>

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

#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};

struct TrueGapProducer {
SGSelector sgSelector;
Configurable<float> cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"};
Configurable<float> cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"};
Configurable<float> cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"};
Configurable<float> cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"};

using UDCollisionsFull = soa::Join<aod::UDCollisions, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced, aod::UDCollisionSelExtras>;

Produces<aod::Truegapside> truegapside;
HistogramRegistry registry{"registry"};

void init(InitContext&)
{
std::vector<double> binEdges = {-1.5, -0.5, 0.5, 1.5, 2.5, 3.5};
AxisSpec axisgap = {binEdges, "true gap side"};
registry.add("truegap", "truegap", {HistType::kTH1D, {axisgap}});
}

void process(UDCollisionsFull::iterator const& collision)
{
auto truegap = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
truegapside(truegap);
registry.fill(HIST("truegap"), truegap);
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<TrueGapProducer>(cfgc),
};
}
5 changes: 5 additions & 0 deletions PWGUD/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(upc

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name upc does not match its file name upcAnalysis.cxx. (Matches upc.cxx.)
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)
Expand Down Expand Up @@ -259,6 +259,11 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(flow-long-range-corr-upc
SOURCES flowLongRangeCorrUpc.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGCFCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(analysis-mc-dpm-jet-sg-v3
SOURCES analysisMCDPMJetSGv3.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
Expand Down
Loading
Loading