Skip to content
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
5 changes: 5 additions & 0 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 failure 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 failure 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.

Check failure 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 failure 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.
#define COMMON_DATAMODEL_MULTIPLICITY_H_

#include "Framework/AnalysisDataModel.h"
Expand Down Expand Up @@ -48,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 failure 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 failure 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 @@ -184,9 +184,14 @@
mult::IsInelGt1<mult::MultMCNParticlesEta10>,
o2::soa::Marker<1>);

DECLARE_SOA_TABLE(MultHepMCHIs, "AOD", "MULTHEPMCHI", //! complementary table for heavy-ion mc info (subset of HepMCHeavyIons)
o2::soa::Index<>, hepmcheavyion::McCollisionId, hepmcheavyion::NcollHard, hepmcheavyion::NpartProj, hepmcheavyion::NpartTarg,
hepmcheavyion::Ncoll, hepmcheavyion::ImpactParameter);

using MultMCExtras = MultMCExtras_001;
using MultMCExtra = MultMCExtras::iterator;
using MultsExtraMC = MultMCExtras; // for backwards compatibility with previous naming scheme
using MultHepMCHI = MultHepMCHIs::iterator;

// crosslinks
namespace mult
Expand All @@ -197,7 +202,7 @@
DECLARE_SOA_TABLE(Mult2MCExtras, "AOD", "Mult2MCEXTRA", //! Relate reco mult entry to MC extras entry
o2::soa::Index<>, mult::MultMCExtraId);

namespace multZeq

Check failure on line 205 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 @@ -261,9 +266,9 @@
{
DECLARE_SOA_INDEX_COLUMN(MultBC, multBC);
}
namespace multBC

Check failure on line 269 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 failure on line 271 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
14 changes: 14 additions & 0 deletions Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
Produces<aod::PVMultZeqs> tablePVZeqs; // 12
Produces<aod::MultMCExtras> tableExtraMc; // 13
Produces<aod::Mult2MCExtras> tableExtraMult2MCExtras;
Produces<aod::MultHepMCHIs> multHepMCHIs; // Not accounted for, produced using custom process function to avoid dependencies
Produces<aod::MFTMults> mftMults; // Not accounted for, produced using custom process function to avoid dependencies
Produces<aod::MultsGlobal> multsGlobal; // Not accounted for, produced based on process function processGlobalTrackingCounters

Expand All @@ -110,7 +111,7 @@
using Run2Tracks = soa::Join<aod::Tracks, aod::TracksExtra>;
Partition<Run2Tracks> run2tracklets = (aod::track::trackType == static_cast<uint8_t>(o2::aod::track::TrackTypeEnum::Run2Tracklet));
Partition<Run2Tracks> tracksWithTPC = (aod::track::tpcNClsFindable > (uint8_t)0);
Partition<Run2Tracks> pvContribTracks = (nabs(aod::track::eta) < 0.8f) && ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor));

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

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
Partition<Run2Tracks> pvContribTracksEta1 = (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor));
Preslice<aod::Tracks> perCol = aod::track::collisionId;
Preslice<aod::TracksIU> perColIU = aod::track::collisionId;
Expand Down Expand Up @@ -734,6 +735,18 @@
using Run3Tracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection>;
Partition<Run3Tracks> pvContribGlobalTracksEta1 = (minPtGlobalTrack < aod::track::pt && aod::track::pt < maxPtGlobalTrack) && (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor)) && requireQualityTracksInFilter();

void processHepMCHeavyIons(aod::HepMCHeavyIons const& hepmchis)
{
for (auto const& hepmchi : hepmchis) {
multHepMCHIs(hepmchi.mcCollisionId(),
hepmchi.ncollHard(),
hepmchi.npartProj(),
hepmchi.npartTarg(),
hepmchi.ncoll(),
hepmchi.impactParameter());
}
}

void processGlobalTrackingCounters(aod::Collision const& collision, soa::Join<Run3TracksIU, aod::TrackSelection, aod::TrackSelectionExtension> const& tracksIU, Run3Tracks const&)
{
// counter from Igor
Expand Down Expand Up @@ -808,6 +821,7 @@
PROCESS_SWITCH(MultiplicityTable, processGlobalTrackingCounters, "Produce Run 3 global counters", false);
PROCESS_SWITCH(MultiplicityTable, processMC, "Produce MC multiplicity tables", false);
PROCESS_SWITCH(MultiplicityTable, processMC2Mults, "Produce MC -> Mult map", false);
PROCESS_SWITCH(MultiplicityTable, processHepMCHeavyIons, "Produce MultHepMCHIs tables", false);
PROCESS_SWITCH(MultiplicityTable, processRun3MFT, "Produce MFT mult tables", false);
};

Expand Down
Loading