Skip to content

Commit 1e3a9f2

Browse files
authored
[PWGUD] Adding new task to study vector meson production per ROF (#16750)
1 parent 8ced40f commit 1e3a9f2

5 files changed

Lines changed: 753 additions & 42 deletions

File tree

PWGUD/Tasks/CMakeLists.txt

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ o2physics_add_dpl_workflow(upc-polarisation-jpsi-incoh
1414
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
1515
COMPONENT_NAME Analysis)
1616

17-
o2physics_add_dpl_workflow(upc
17+
o2physics_add_dpl_workflow(upc-analysis
1818
SOURCES upcAnalysis.cxx
1919
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
2020
COMPONENT_NAME Analysis)
@@ -99,17 +99,17 @@ o2physics_add_dpl_workflow(diff-qa
9999
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGCutparHolder
100100
COMPONENT_NAME Analysis)
101101

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

107-
o2physics_add_dpl_workflow(upccand-analyzer
107+
o2physics_add_dpl_workflow(upc-cand-analyzer
108108
SOURCES upcCandidateAnalyzer.cxx
109109
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
110110
COMPONENT_NAME Analysis)
111111

112-
o2physics_add_dpl_workflow(upccand-producer-qa
112+
o2physics_add_dpl_workflow(upc-cand-producer-qa
113113
SOURCES upcCandidateProducerQa.cpp
114114
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
115115
COMPONENT_NAME Analysis)
@@ -119,7 +119,7 @@ o2physics_add_dpl_workflow(upc-mft
119119
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::ReconstructionDataFormats O2::DetectorsBase O2::DetectorsCommonDataFormats
120120
COMPONENT_NAME Analysis)
121121

122-
o2physics_add_dpl_workflow(upc-veto
122+
o2physics_add_dpl_workflow(upc-veto-analysis
123123
SOURCES upcVetoAnalysis.cxx
124124
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
125125
COMPONENT_NAME Analysis)
@@ -214,8 +214,8 @@ o2physics_add_dpl_workflow(upc-semi-fwd-jpsi-rl
214214
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::DGPIDSelector
215215
COMPONENT_NAME Analysis)
216216

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

@@ -244,8 +244,8 @@ o2physics_add_dpl_workflow(upc-quarkonia-central-barrel
244244
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
245245
COMPONENT_NAME Analysis)
246246

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

@@ -289,12 +289,17 @@ o2physics_add_dpl_workflow(sg-exclusive-jpsi-midrapidity
289289
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
290290
COMPONENT_NAME Analysis)
291291

292-
o2physics_add_dpl_workflow(fitbit-mapping
293-
SOURCES upcTestFITBitMapping.cxx
294-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
295-
COMPONENT_NAME Analysis)
292+
o2physics_add_dpl_workflow(upc-vm-rof
293+
SOURCES upcVmRof.cxx
294+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
295+
COMPONENT_NAME Analysis)
296+
297+
o2physics_add_dpl_workflow(upc-test-fit-bit-mapping
298+
SOURCES upcTestFitBitMapping.cxx
299+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
300+
COMPONENT_NAME Analysis)
296301

297302
o2physics_add_dpl_workflow(pt-spectra-inclusive-upc
298-
SOURCES ptSpectraInclusiveUpc.cxx
299-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
300-
COMPONENT_NAME Analysis)
303+
SOURCES ptSpectraInclusiveUpc.cxx
304+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
305+
COMPONENT_NAME Analysis)
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

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

54-
struct UpcEventITSROFcounter {
54+
struct UpcEventItsRofCounter {
5555
Service<o2::ccdb::BasicCCDBManager> ccdb;
5656
SGSelector sgSelector;
5757

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

60+
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)
61+
static constexpr int DoubleGapSide = 2; // SGSelector convention: 0=A-gap, 1=C-gap, 2=double-gap
62+
6063
Configurable<int> nTracksForUPCevent{"nTracksForUPCevent", 16, {"Maximum of tracks defining a UPC collision"}};
6164

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

161-
for (int ncol = 0; ncol < 12; ncol++) {
164+
for (int ncol = 0; ncol < NCollFillCount; ncol++) {
162165
histos.get<TH1>(HIST("Events/hCountCollisionsInROFborderMatching"))->Fill(ncol, arrAllColls[ncol]);
163166
histos.get<TH1>(HIST("Events/hCountUPCcollisionsInROFborderMatching"))->Fill(ncol, arrUPCcolls[ncol]);
164167
}
@@ -198,7 +201,7 @@ struct UpcEventITSROFcounter {
198201
}
199202

200203
if (coll.flags() == 0) {
201-
if (gapSide == 2) {
204+
if (gapSide == DoubleGapSide) {
202205
histos.get<TH1>(HIST("Runs/hStdModeCollDG"))->Fill(coll.runNumber());
203206
} else if (gapSide == 1) {
204207
histos.get<TH1>(HIST("Runs/hStdModeCollSG1"))->Fill(coll.runNumber());
@@ -208,7 +211,7 @@ struct UpcEventITSROFcounter {
208211
histos.get<TH1>(HIST("Runs/hStdModeCollNG"))->Fill(coll.runNumber());
209212
}
210213
} else {
211-
if (gapSide == 2) {
214+
if (gapSide == DoubleGapSide) {
212215
histos.get<TH1>(HIST("Runs/hUpcModeCollDG"))->Fill(coll.runNumber());
213216
} else if (gapSide == 1) {
214217
histos.get<TH1>(HIST("Runs/hUpcModeCollSG1"))->Fill(coll.runNumber());
@@ -220,12 +223,12 @@ struct UpcEventITSROFcounter {
220223
}
221224
}
222225

223-
PROCESS_SWITCH(UpcEventITSROFcounter, processCounterPerITSROF, "Counts number of collisions per ITSROF", false);
224-
PROCESS_SWITCH(UpcEventITSROFcounter, processCounterPerRun, "Counts number of whatever per RUN", true);
226+
PROCESS_SWITCH(UpcEventItsRofCounter, processCounterPerITSROF, "Counts number of collisions per ITSROF", false);
227+
PROCESS_SWITCH(UpcEventItsRofCounter, processCounterPerRun, "Counts number of whatever per RUN", true);
225228
};
226229

227230
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
228231
{
229232
return WorkflowSpec{
230-
adaptAnalysisTask<UpcEventITSROFcounter>(cfgc)};
233+
adaptAnalysisTask<UpcEventItsRofCounter>(cfgc)};
231234
}
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12-
// \FIT bits to phi, eta mapping
13-
// \author Sandor Lokos, sandor.lokos@cern.ch
14-
// \since March 2026
12+
13+
/// \file upcTestFitBitMapping.cxx
14+
/// \brief FIT bits to phi, eta mapping
15+
/// \author Sandor Lokos, sandor.lokos@cern.ch
16+
/// \since March 2026
1517

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

19-
#include <FT0Base/Geometry.h> // o2::ft0::Geometry
21+
#include <CommonConstants/MathConstants.h> // o2::constants::math::TwoPI
22+
#include <FT0Base/Geometry.h> // o2::ft0::Geometry
2023
#include <Framework/AnalysisTask.h>
2124
#include <Framework/Configurable.h>
2225
#include <Framework/HistogramRegistry.h>
@@ -25,15 +28,14 @@
2528
#include <Framework/runDataProcessing.h>
2629

2730
#include <array>
28-
#include <cmath>
2931
#include <cstdint>
3032

31-
#include <math.h>
32-
3333
using namespace o2;
3434
using namespace o2::framework;
3535

36-
struct UpcTestFITBitMapping {
36+
struct UpcTestFitBitMapping {
37+
static constexpr int Thr2Selector = 2; // value of whichThr that selects the Thr2 bit set
38+
3739
Configurable<int> whichThr{"whichThr", 1, "Use 1=Thr1 bits or 2=Thr2 bits"};
3840
Configurable<int> maxEvents{"maxEvents", -1, "Process at most this many rows (-1 = all)"};
3941

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

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

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

8183
// Use udhelpers' canonical packed type + builder
8284
udhelpers::Bits256 w{};
83-
if (whichThr == 2) {
85+
if (whichThr == Thr2Selector) {
8486
w = udhelpers::makeBits256(row.thr2W0(), row.thr2W1(), row.thr2W2(), row.thr2W3());
8587
} else {
8688
w = udhelpers::makeBits256(row.thr1W0(), row.thr1W1(), row.thr1W2(), row.thr1W3());
@@ -115,5 +117,5 @@ struct UpcTestFITBitMapping {
115117
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
116118
{
117119
return WorkflowSpec{
118-
adaptAnalysisTask<UpcTestFITBitMapping>(cfgc, TaskName{"fitbit-mapping"})};
120+
adaptAnalysisTask<UpcTestFitBitMapping>(cfgc)};
119121
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12-
/// \file testMcStdTabsRl.cxx
12+
/// \file upcTestMcStdTabsRl.cxx
1313
/// \brief task to test the Monte Carlo UD production generatorIDs on hyperloop
1414
///
1515
/// \author Roman Lavicka <roman.lavicka@cern.ch>, Austrian Academy of Sciences & SMI
@@ -41,7 +41,7 @@ using namespace o2::framework;
4141
using namespace o2::framework::expressions;
4242
using namespace o2::constants::physics;
4343

44-
struct TestMcStdTabsRl {
44+
struct UpcTestMcStdTabsRl {
4545

4646
// Global varialbes
4747
Service<o2::framework::O2DatabasePDG> pdg;
@@ -103,11 +103,11 @@ struct TestMcStdTabsRl {
103103

104104
} // end processMCgenDG
105105

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

109109
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
110110
{
111111
return WorkflowSpec{
112-
adaptAnalysisTask<TestMcStdTabsRl>(cfgc)};
112+
adaptAnalysisTask<UpcTestMcStdTabsRl>(cfgc)};
113113
}

0 commit comments

Comments
 (0)