Skip to content

Commit

Permalink
Pb-Pb 2023 studies: adjusting (AliceO2Group#3598)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
ddobrigk and alibuild authored Oct 11, 2023
1 parent a83e063 commit d17d2ec
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 31 deletions.
20 changes: 13 additions & 7 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,21 @@ DECLARE_SOA_TABLE(MultZeqs, "AOD", "MULTZEQ", //!
multZeq::MultZeqNTracksPV);
using MultZeq = MultZeqs::iterator;

namespace multDebug
namespace multBC
{
DECLARE_SOA_COLUMN(MultDebugFT0A, multDebugFT0A, float); //!
DECLARE_SOA_COLUMN(MultDebugFT0C, multDebugFT0C, float); //!
DECLARE_SOA_COLUMN(MultBCFT0A, multBCFT0A, float); //!
DECLARE_SOA_COLUMN(MultBCFT0C, multBCFT0C, float); //!
DECLARE_SOA_COLUMN(MultBCFV0A, multBCFV0A, float); //!
DECLARE_SOA_COLUMN(MultBCTVX, multBCTVX, bool); //!
DECLARE_SOA_COLUMN(MultBCFV0OrA, multBCFV0OrA, bool); //!
} // namespace multDebug
DECLARE_SOA_TABLE(MultsDebug, "AOD", "MULTDEBUG", //!
multDebug::MultDebugFT0A,
multDebug::MultDebugFT0C);
using MultDebug = MultsDebug::iterator;
DECLARE_SOA_TABLE(MultsBC, "AOD", "MULTBC", //!
multBC::MultBCFT0A,
multBC::MultBCFT0C,
multBC::MultBCFV0A,
multBC::MultBCTVX,
multBC::MultBCFV0OrA);
using MultBC = MultsBC::iterator;

} // namespace o2::aod

Expand Down
5 changes: 5 additions & 0 deletions Common/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ o2physics_add_dpl_workflow(multiplicity-table
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(multiplicity-extra-table
SOURCES multiplicityExtraTable.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(centrality-table
SOURCES centralityTable.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
Expand Down
76 changes: 76 additions & 0 deletions Common/TableProducer/multiplicityExtraTable.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// 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.
#include "Framework/ConfigParamSpec.h"

using namespace o2;
using namespace o2::framework;

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include <CCDB/BasicCCDBManager.h>
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "DataFormatsFIT/Triggers.h"
#include "TableHelper.h"
#include "iostream"

struct MultiplicityExtraTable {
Produces<aod::MultsBC> multBC;

unsigned int randomSeed = 0;
void init(InitContext& context)
{
// empty for now
}

using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;

void process(BCsWithRun3Matchings::iterator const& bc, aod::FV0As const&, aod::FT0s const& ft0s, aod::FDDs const&)
{
bool Tvx = false;
bool isFV0OrA = false;
float multFT0C = 0.f;
float multFT0A = 0.f;
float multFV0A = 0.f;

if (bc.has_ft0()) {
auto ft0 = bc.ft0();
std::bitset<8> triggers = ft0.triggerMask();
Tvx = triggers[o2::fit::Triggers::bitVertex];

// calculate T0 charge
for (auto amplitude : ft0.amplitudeA()) {
multFT0A += amplitude;
}
for (auto amplitude : ft0.amplitudeC()) {
multFT0C += amplitude;
}

if (bc.has_fv0a()) {
auto fv0 = bc.fv0a();
std::bitset<8> fV0Triggers = fv0.triggerMask();

for (auto amplitude : fv0.amplitude()) {
multFV0A += amplitude;
}
isFV0OrA = fV0Triggers[o2::fit::Triggers::bitA];
} // fv0
}

multBC(multFT0A, multFT0C, multFV0A, Tvx, isFV0OrA);
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<MultiplicityExtraTable>(cfgc, TaskName{"multiplicity-extra-table"})};
}
20 changes: 0 additions & 20 deletions Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct MultiplicityTableTaskIndexed {
Produces<aod::BarrelMults> multBarrel;
Produces<aod::MultsExtra> multExtra;
Produces<aod::MultZeqs> multzeq;
Produces<aod::MultsDebug> multDebug;

// For vertex-Z corrections in calibration
Service<o2::ccdb::BasicCCDBManager> ccdb;
Expand Down Expand Up @@ -320,25 +319,6 @@ struct MultiplicityTableTaskIndexed {
}
}
PROCESS_SWITCH(MultiplicityTableTaskIndexed, processRun3, "Produce Run 3 multiplicity tables", true);

void processFT0(aod::FT0s const& ft0s)
{
// process function to acquire FT0A/C derived table for posterior study
for (auto const& ft0 : ft0s) {
if (bitcheck(ft0.triggerMask(), 4)) {
float multFT0A = 0, multFT0C = 0;
for (auto amplitude : ft0.amplitudeA()) {
multFT0A += amplitude;
}
for (auto amplitude : ft0.amplitudeC()) {
multFT0C += amplitude;
}

multDebug(multFT0A, multFT0C);
}
}
}
PROCESS_SWITCH(MultiplicityTableTaskIndexed, processFT0, "Produce Run 3 MultsDebug table", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
8 changes: 4 additions & 4 deletions Common/Tasks/multiplicityQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ struct MultiplicityQa {
histos.fill(HIST("multiplicityQa/h2dFT0MVsNchT0M"), nchFT0, biggestFT0);
}

void processFIT(aod::MultsDebug const& multsdebug)
void processFIT(aod::MultsBC const& multsdebug)
{
for (auto& mult : multsdebug) {
histos.fill(HIST("multiplicityQa/hIsolatedFT0A"), mult.multDebugFT0A());
histos.fill(HIST("multiplicityQa/hIsolatedFT0C"), mult.multDebugFT0C());
histos.fill(HIST("multiplicityQa/hIsolatedFT0M"), mult.multDebugFT0A() + mult.multDebugFT0C());
histos.fill(HIST("multiplicityQa/hIsolatedFT0A"), mult.multBCFT0A());
histos.fill(HIST("multiplicityQa/hIsolatedFT0C"), mult.multBCFT0C());
histos.fill(HIST("multiplicityQa/hIsolatedFT0M"), mult.multBCFT0A() + mult.multBCFT0C());
}
}

Expand Down

0 comments on commit d17d2ec

Please sign in to comment.