Skip to content

Commit

Permalink
Common: changes to multiplicity study variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Oct 26, 2024
1 parent ae8d505 commit 9ba40c9
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
13 changes: 12 additions & 1 deletion Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,25 @@ using Mults = soa::Join<BarrelMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
using FT0Mult = FT0Mults::iterator;
using Mult = Mults::iterator;

DECLARE_SOA_TABLE(MultsExtra, "AOD", "MULTEXTRA", //!
DECLARE_SOA_TABLE(MultsExtra_000, "AOD", "MULTEXTRA", //!
mult::MultPVTotalContributors, mult::MultPVChi2, mult::MultCollisionTimeRes, mult::MultRunNumber, mult::MultPVz, mult::MultSel8,
mult::MultNTracksHasITS, mult::MultNTracksHasTPC, mult::MultNTracksHasTOF, mult::MultNTracksHasTRD,
mult::MultNTracksITSOnly, mult::MultNTracksTPCOnly, mult::MultNTracksITSTPC,
mult::MultAllTracksTPCOnly, mult::MultAllTracksITSTPC,
evsel::NumTracksInTimeRange,
collision::Flags);

DECLARE_SOA_TABLE_VERSIONED(MultsExtra_001, "AOD", "MULTEXTRA", 1, //! debug information
mult::MultPVTotalContributors, mult::MultPVChi2, mult::MultCollisionTimeRes, mult::MultRunNumber, mult::MultPVz, mult::MultSel8,
mult::MultNTracksHasITS, mult::MultNTracksHasTPC, mult::MultNTracksHasTOF, mult::MultNTracksHasTRD,
mult::MultNTracksITSOnly, mult::MultNTracksTPCOnly, mult::MultNTracksITSTPC,
mult::MultAllTracksTPCOnly, mult::MultAllTracksITSTPC,
evsel::NumTracksInTimeRange,
evsel::SumAmpFT0CInTimeRange,
collision::Flags);

using MultsExtra = MultsExtra_001;

DECLARE_SOA_TABLE(MultNeighs, "AOD", "MULTNEIGH", //!
mult::TimeToPrePrevious, mult::TimeToPrevious,
mult::TimeToNext, mult::TimeToNeNext);
Expand Down
5 changes: 5 additions & 0 deletions Common/TableProducer/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ o2physics_add_dpl_workflow(hmpid-converter
PUBLIC_LINK_LIBRARIES
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(multsextra-converter
SOURCES multsExtraConverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

43 changes: 43 additions & 0 deletions Common/TableProducer/Converters/multsExtraConverter.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Common/DataModel/Multiplicity.h"

using namespace o2;
using namespace o2::framework;

struct MultsExtraConverter {
Produces<aod::MultsExtra_001> multsExtra_001;
void process(aod::MultsExtra_000 const& multsExtra_000)
{
for (const auto& r : multsExtra_000) {
multsExtra_001(r.multPVTotalContributors(), r.multPVChi2(),

Check failure on line 25 in Common/TableProducer/Converters/multsExtraConverter.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
r.multCollisionTimeRes(), r.multRunNumber(), r.multPVz(), r.multSel8(),
r.multNTracksHasITS(), r.multNTracksHasTPC(), r.multNTracksHasTOF(),

Check failure on line 27 in Common/TableProducer/Converters/multsExtraConverter.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
r.multNTracksHasTRD(), r.multNTracksITSOnly(),

Check failure on line 28 in Common/TableProducer/Converters/multsExtraConverter.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
r.multNTracksTPCOnly(), r.multNTracksITSTPC(),
r.multAllTracksTPCOnly(), r.multAllTracksITSTPC(),
r.trackOccupancyInTimeRange(),
0.0f,
r.flags());
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<MultsExtraConverter>(cfgc)
};
}
5 changes: 4 additions & 1 deletion Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,10 @@ struct MultiplicityTable {
tableExtra(collision.numContrib(), collision.chi2(), collision.collisionTimeRes(),
mRunNumber, collision.posZ(), collision.sel8(),
nHasITS, nHasTPC, nHasTOF, nHasTRD, nITSonly, nTPConly, nITSTPC,
nAllTracksTPCOnly, nAllTracksITSTPC, collision.trackOccupancyInTimeRange(), collision.flags());
nAllTracksTPCOnly, nAllTracksITSTPC,

Check failure on line 571 in Common/TableProducer/multiplicityTable.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
collision.trackOccupancyInTimeRange(),

Check failure on line 572 in Common/TableProducer/multiplicityTable.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
collision.ft0cOccupancyInTimeRange(),
collision.flags());
} break;
case kMultSelections: // Multiplicity selections
{
Expand Down

0 comments on commit 9ba40c9

Please sign in to comment.