Skip to content

Commit d17d2ec

Browse files
ddobrigkalibuild
andauthored
Pb-Pb 2023 studies: adjusting (#3598)
* Pb-Pb 2023 studies: adjusting * Please consider the following formatting changes (#177) --------- Co-authored-by: David Dobrigkeit Chinellato <david.dobrigkeit.chinellato.cern.ch> Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent a83e063 commit d17d2ec

File tree

5 files changed

+98
-31
lines changed

5 files changed

+98
-31
lines changed

Common/DataModel/Multiplicity.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,21 @@ DECLARE_SOA_TABLE(MultZeqs, "AOD", "MULTZEQ", //!
107107
multZeq::MultZeqNTracksPV);
108108
using MultZeq = MultZeqs::iterator;
109109

110-
namespace multDebug
110+
namespace multBC
111111
{
112-
DECLARE_SOA_COLUMN(MultDebugFT0A, multDebugFT0A, float); //!
113-
DECLARE_SOA_COLUMN(MultDebugFT0C, multDebugFT0C, float); //!
112+
DECLARE_SOA_COLUMN(MultBCFT0A, multBCFT0A, float); //!
113+
DECLARE_SOA_COLUMN(MultBCFT0C, multBCFT0C, float); //!
114+
DECLARE_SOA_COLUMN(MultBCFV0A, multBCFV0A, float); //!
115+
DECLARE_SOA_COLUMN(MultBCTVX, multBCTVX, bool); //!
116+
DECLARE_SOA_COLUMN(MultBCFV0OrA, multBCFV0OrA, bool); //!
114117
} // namespace multDebug
115-
DECLARE_SOA_TABLE(MultsDebug, "AOD", "MULTDEBUG", //!
116-
multDebug::MultDebugFT0A,
117-
multDebug::MultDebugFT0C);
118-
using MultDebug = MultsDebug::iterator;
118+
DECLARE_SOA_TABLE(MultsBC, "AOD", "MULTBC", //!
119+
multBC::MultBCFT0A,
120+
multBC::MultBCFT0C,
121+
multBC::MultBCFV0A,
122+
multBC::MultBCTVX,
123+
multBC::MultBCFV0OrA);
124+
using MultBC = MultsBC::iterator;
119125

120126
} // namespace o2::aod
121127

Common/TableProducer/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ o2physics_add_dpl_workflow(multiplicity-table
3131
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3232
COMPONENT_NAME Analysis)
3333

34+
o2physics_add_dpl_workflow(multiplicity-extra-table
35+
SOURCES multiplicityExtraTable.cxx
36+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
37+
COMPONENT_NAME Analysis)
38+
3439
o2physics_add_dpl_workflow(centrality-table
3540
SOURCES centralityTable.cxx
3641
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
#include "Framework/ConfigParamSpec.h"
12+
13+
using namespace o2;
14+
using namespace o2::framework;
15+
16+
#include "Framework/runDataProcessing.h"
17+
#include "Framework/AnalysisTask.h"
18+
#include "Framework/AnalysisDataModel.h"
19+
#include <CCDB/BasicCCDBManager.h>
20+
#include "Common/DataModel/EventSelection.h"
21+
#include "Common/DataModel/Multiplicity.h"
22+
#include "DataFormatsFIT/Triggers.h"
23+
#include "TableHelper.h"
24+
#include "iostream"
25+
26+
struct MultiplicityExtraTable {
27+
Produces<aod::MultsBC> multBC;
28+
29+
unsigned int randomSeed = 0;
30+
void init(InitContext& context)
31+
{
32+
// empty for now
33+
}
34+
35+
using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;
36+
37+
void process(BCsWithRun3Matchings::iterator const& bc, aod::FV0As const&, aod::FT0s const& ft0s, aod::FDDs const&)
38+
{
39+
bool Tvx = false;
40+
bool isFV0OrA = false;
41+
float multFT0C = 0.f;
42+
float multFT0A = 0.f;
43+
float multFV0A = 0.f;
44+
45+
if (bc.has_ft0()) {
46+
auto ft0 = bc.ft0();
47+
std::bitset<8> triggers = ft0.triggerMask();
48+
Tvx = triggers[o2::fit::Triggers::bitVertex];
49+
50+
// calculate T0 charge
51+
for (auto amplitude : ft0.amplitudeA()) {
52+
multFT0A += amplitude;
53+
}
54+
for (auto amplitude : ft0.amplitudeC()) {
55+
multFT0C += amplitude;
56+
}
57+
58+
if (bc.has_fv0a()) {
59+
auto fv0 = bc.fv0a();
60+
std::bitset<8> fV0Triggers = fv0.triggerMask();
61+
62+
for (auto amplitude : fv0.amplitude()) {
63+
multFV0A += amplitude;
64+
}
65+
isFV0OrA = fV0Triggers[o2::fit::Triggers::bitA];
66+
} // fv0
67+
}
68+
69+
multBC(multFT0A, multFT0C, multFV0A, Tvx, isFV0OrA);
70+
}
71+
};
72+
73+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
74+
{
75+
return WorkflowSpec{adaptAnalysisTask<MultiplicityExtraTable>(cfgc, TaskName{"multiplicity-extra-table"})};
76+
}

Common/TableProducer/multiplicityTable.cxx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ struct MultiplicityTableTaskIndexed {
3333
Produces<aod::BarrelMults> multBarrel;
3434
Produces<aod::MultsExtra> multExtra;
3535
Produces<aod::MultZeqs> multzeq;
36-
Produces<aod::MultsDebug> multDebug;
3736

3837
// For vertex-Z corrections in calibration
3938
Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -320,25 +319,6 @@ struct MultiplicityTableTaskIndexed {
320319
}
321320
}
322321
PROCESS_SWITCH(MultiplicityTableTaskIndexed, processRun3, "Produce Run 3 multiplicity tables", true);
323-
324-
void processFT0(aod::FT0s const& ft0s)
325-
{
326-
// process function to acquire FT0A/C derived table for posterior study
327-
for (auto const& ft0 : ft0s) {
328-
if (bitcheck(ft0.triggerMask(), 4)) {
329-
float multFT0A = 0, multFT0C = 0;
330-
for (auto amplitude : ft0.amplitudeA()) {
331-
multFT0A += amplitude;
332-
}
333-
for (auto amplitude : ft0.amplitudeC()) {
334-
multFT0C += amplitude;
335-
}
336-
337-
multDebug(multFT0A, multFT0C);
338-
}
339-
}
340-
}
341-
PROCESS_SWITCH(MultiplicityTableTaskIndexed, processFT0, "Produce Run 3 MultsDebug table", false);
342322
};
343323

344324
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

Common/Tasks/multiplicityQa.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,12 @@ struct MultiplicityQa {
402402
histos.fill(HIST("multiplicityQa/h2dFT0MVsNchT0M"), nchFT0, biggestFT0);
403403
}
404404

405-
void processFIT(aod::MultsDebug const& multsdebug)
405+
void processFIT(aod::MultsBC const& multsdebug)
406406
{
407407
for (auto& mult : multsdebug) {
408-
histos.fill(HIST("multiplicityQa/hIsolatedFT0A"), mult.multDebugFT0A());
409-
histos.fill(HIST("multiplicityQa/hIsolatedFT0C"), mult.multDebugFT0C());
410-
histos.fill(HIST("multiplicityQa/hIsolatedFT0M"), mult.multDebugFT0A() + mult.multDebugFT0C());
408+
histos.fill(HIST("multiplicityQa/hIsolatedFT0A"), mult.multBCFT0A());
409+
histos.fill(HIST("multiplicityQa/hIsolatedFT0C"), mult.multBCFT0C());
410+
histos.fill(HIST("multiplicityQa/hIsolatedFT0M"), mult.multBCFT0A() + mult.multBCFT0C());
411411
}
412412
}
413413

0 commit comments

Comments
 (0)