-
Notifications
You must be signed in to change notification settings - Fork 654
[PWGUD] add true gap service and TPC-FT0 correlations #16083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bece71e
f9dec36
86febfb
ebf4471
3db2bdd
aaf8aa8
1ac0f05
8004063
12f0276
d4c1f5d
b5c095c
12d8368
4775bfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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_ |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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), | ||
| }; | ||
| } |
There was a problem hiding this comment.
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