Skip to content
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

[Common] add outer FV0A multiplicity for mult/cent calibs #9115

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// 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.
#ifndef COMMON_DATAMODEL_MULTIPLICITY_H_

Check warning on line 11 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
#define COMMON_DATAMODEL_MULTIPLICITY_H_

#include "Framework/AnalysisDataModel.h"
Expand All @@ -18,19 +18,20 @@
{
namespace mult
{
DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //!
DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //!
DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //!
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //!
DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //!
DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //!
DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //!
DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //!
DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //!
DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //!
DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //!
DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //!
DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //!
DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //!
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //!
DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //!
DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //!
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //!
DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //!
DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //!
DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //!
DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //!
DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //!
DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //!
DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //!
DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //!
DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //!
[](float multFV0A, float multFV0C) -> float { return multFV0A + multFV0C; });
DECLARE_SOA_DYNAMIC_COLUMN(MultFT0M, multFT0M, //!
[](float multFT0A, float multFT0C) -> float { return multFT0A + multFT0C; });
Expand All @@ -47,8 +48,8 @@
[](int multPveta1) -> bool { return multPveta1 > 1; });

// forward track counters
DECLARE_SOA_COLUMN(MFTNalltracks, mftNalltracks, int); //! overall counter, uses AO2D coll assoc

Check warning on line 51 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MFTNtracks, mftNtracks, int); //! reassigned, uses mult group software

Check warning on line 52 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// MC
DECLARE_SOA_COLUMN(MultMCFT0A, multMCFT0A, int); //!
Expand Down Expand Up @@ -95,6 +96,8 @@
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
mult::MultFV0A, mult::MultFV0C,
mult::MultFV0M<mult::MultFV0A, mult::MultFV0C>);
DECLARE_SOA_TABLE(FV0AOuterMults, "AOD", "FVOAOUTERMULT", //! FV0 without innermost ring
mult::MultFV0AOuter);
DECLARE_SOA_TABLE(FT0Mults, "AOD", "FT0MULT", //! Multiplicity with the FT0 detector
mult::MultFT0A, mult::MultFT0C,
mult::MultFT0M<mult::MultFT0A, mult::MultFT0C>);
Expand Down Expand Up @@ -194,7 +197,7 @@
DECLARE_SOA_TABLE(Mult2MCExtras, "AOD", "Mult2MCEXTRA", //! Relate reco mult entry to MC extras entry
o2::soa::Index<>, mult::MultMCExtraId);

namespace multZeq

Check warning on line 200 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/namespace]

Use snake_case for names of namespaces. Double underscores are not allowed.
{
DECLARE_SOA_COLUMN(MultZeqFV0A, multZeqFV0A, float); //! Multiplicity equalized for the vertex position with the FV0A detector
DECLARE_SOA_COLUMN(MultZeqFT0A, multZeqFT0A, float); //! Multiplicity equalized for the vertex position with the FT0A detector
Expand Down Expand Up @@ -258,9 +261,9 @@
{
DECLARE_SOA_INDEX_COLUMN(MultBC, multBC);
}
namespace multBC

Check warning on line 264 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/namespace]

Use snake_case for names of namespaces. Double underscores are not allowed.
{
DECLARE_SOA_INDEX_COLUMN(FT0Mult, ft0Mult);

Check warning on line 266 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
}

// for QA purposes
Expand Down
12 changes: 11 additions & 1 deletion Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
struct MultiplicityTable {
SliceCache cache;
Produces<aod::FV0Mults> tableFV0; // 0
Produces<aod::FV0AOuterMults> tableFV0AOuter; // 0-bis (produced with FV0)
Produces<aod::FT0Mults> tableFT0; // 1
Produces<aod::FDDMults> tableFDD; // 2
Produces<aod::ZDCMults> tableZDC; // 3
Expand Down Expand Up @@ -307,6 +308,7 @@
switch (i) {
case kFV0Mults: // FV0
tableFV0.reserve(collisions.size());
tableFV0AOuter.reserve(collisions.size());
break;
case kFT0Mults: // FT0
tableFT0.reserve(collisions.size());
Expand Down Expand Up @@ -354,6 +356,7 @@

// Initializing multiplicity values
float multFV0A = 0.f;
float multFV0AOuter = 0.f;
float multFV0C = 0.f;
float multFT0A = 0.f;
float multFT0C = 0.f;
Expand Down Expand Up @@ -429,18 +432,25 @@
case kFV0Mults: // FV0
{
multFV0A = 0.f;
multFV0AOuter = 0.f;
multFV0C = 0.f;
// using FV0 row index from event selection task
if (collision.has_foundFV0()) {
const auto& fv0 = collision.foundFV0();
for (auto amplitude : fv0.amplitude()) {
for (size_t ii = 0; ii < fv0.amplitude().size(); ii++) {
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
multFV0A += amplitude;
if (channel > 7) {
multFV0AOuter += amplitude;
}
}
} else {
multFV0A = -999.f;
multFV0C = -999.f;
}
tableFV0(multFV0A, multFV0C);
tableFV0AOuter(multFV0AOuter);
LOGF(debug, "multFV0A=%5.0f multFV0C=%5.0f", multFV0A, multFV0C);
} break;
case kFT0Mults: // FT0
Expand Down Expand Up @@ -587,7 +597,7 @@
} break;
case kFV0MultZeqs: // Z equalized FV0
{
if (fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check warning on line 600 in Common/TableProducer/multiplicityTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
multZeqFV0A = hVtxZFV0A->Interpolate(0.0) * multFV0A / hVtxZFV0A->Interpolate(collision.posZ());
}
tableFV0Zeqs(multZeqFV0A);
Expand Down
Loading