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
8 changes: 4 additions & 4 deletions Common/DataModel/SelectionStudyTables.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/SelectionStudyTables.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 @@ -12,13 +12,13 @@
/// \file SelectionStudyTables
/// \brief tables meant to do event selection studies for O-O / light systems
///
/// \author ALICE

Check failure on line 15 in Common/DataModel/SelectionStudyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <vector>

#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"

#include <vector>

#ifndef COMMON_DATAMODEL_SELECTIONSTUDYTABLES_H_
#define COMMON_DATAMODEL_SELECTIONSTUDYTABLES_H_

Expand All @@ -29,7 +29,7 @@
DECLARE_SOA_COLUMN(PtPions, ptPions, std::vector<float>);
DECLARE_SOA_COLUMN(PtKaons, ptKaons, std::vector<float>);
DECLARE_SOA_COLUMN(PtProtons, ptProtons, std::vector<float>);
DECLARE_SOA_COLUMN(PtK0s, ptPK0s, std::vector<float>);

Check failure on line 32 in Common/DataModel/SelectionStudyTables.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(PtLambdas, ptLambdas, std::vector<float>);
DECLARE_SOA_COLUMN(PtXis, ptXis, std::vector<float>);
DECLARE_SOA_COLUMN(PtOmegas, ptOmegas, std::vector<float>);
Expand All @@ -40,8 +40,8 @@
DECLARE_SOA_COLUMN(PtJPsis, ptJPsis, std::vector<float>);
} // namespace selectionstudy

DECLARE_SOA_TABLE(PIDPts, "AOD", "PIDPTS", o2::soa::Index<>,
o2::aod::selectionstudy::PtPions,
DECLARE_SOA_TABLE(PIDPts, "AOD", "PIDPTS", o2::soa::Index<>,
o2::aod::selectionstudy::PtPions,
o2::aod::selectionstudy::PtKaons,
o2::aod::selectionstudy::PtProtons,
o2::aod::selectionstudy::PtK0s,
Expand Down
72 changes: 36 additions & 36 deletions Common/TableProducer/selectionStudyTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
/// \author ALICE
///

#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include "Common/DataModel/SelectionStudyTables.h"

#include "Framework/ConfigParamSpec.h"
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/ConfigParamSpec.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Common/DataModel/SelectionStudyTables.h"
#include "Framework/runDataProcessing.h"

#include <algorithm>
#include <map>
#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -39,18 +39,18 @@

// could be done in a vector of vectors
// left for future iteration
std::vector<float> ptpi;
std::vector<float> ptka;
std::vector<float> ptpr;
std::vector<float> ptk0;
std::vector<float> ptla;
std::vector<float> ptxi;
std::vector<float> ptom;
std::vector<float> ptph;
std::vector<float> ptks;
std::vector<float> ptd;
std::vector<float> ptlc;
std::vector<float> ptjp;
std::vector<float> ptpi;
std::vector<float> ptka;
std::vector<float> ptpr;
std::vector<float> ptk0;
std::vector<float> ptla;
std::vector<float> ptxi;
std::vector<float> ptom;
std::vector<float> ptph;
std::vector<float> ptks;
std::vector<float> ptd;
std::vector<float> ptlc;
std::vector<float> ptjp;

void init(InitContext&)
{
Expand All @@ -71,54 +71,54 @@
ptlc.clear();
ptjp.clear();
for (auto const& mcPart : mcParticles) {
if(std::fabs(mcPart.y())>0.5){
if (std::fabs(mcPart.y()) > 0.5) {
continue; // only do midrapidity particles
}

// handle resonances first to make sure phys prim crit does not reject them
if(mcPart.pdgCode()==333){
if (mcPart.pdgCode() == 333) {

Check failure on line 79 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptph.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==313){
if (std::abs(mcPart.pdgCode()) == 313) {

Check failure on line 82 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptks.push_back(mcPart.pt());
}

// resonances handled, move to primaries
if (!mcPart.isPhysicalPrimary()) {
continue;
}
if(std::abs(mcPart.pdgCode())==211){
if (std::abs(mcPart.pdgCode()) == 211) {

Check failure on line 90 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptpi.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==321){
if (std::abs(mcPart.pdgCode()) == 321) {

Check failure on line 93 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptka.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==2212){
if (std::abs(mcPart.pdgCode()) == 2212) {

Check failure on line 96 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptpr.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==310){
if (std::abs(mcPart.pdgCode()) == 310) {

Check failure on line 99 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptk0.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==3122){
if (std::abs(mcPart.pdgCode()) == 3122) {

Check failure on line 102 in Common/TableProducer/selectionStudyTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
ptla.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==3312){
if (std::abs(mcPart.pdgCode()) == 3312) {
ptxi.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==3334){
if (std::abs(mcPart.pdgCode()) == 3334) {
ptom.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==3334){
if (std::abs(mcPart.pdgCode()) == 3334) {
ptom.push_back(mcPart.pt());
}
// inclusive HF for now
if(std::abs(mcPart.pdgCode())==421){
// inclusive HF for now
if (std::abs(mcPart.pdgCode()) == 421) {
ptd.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==4122){
if (std::abs(mcPart.pdgCode()) == 4122) {
ptd.push_back(mcPart.pt());
}
if(std::abs(mcPart.pdgCode())==443){
if (std::abs(mcPart.pdgCode()) == 443) {
ptjp.push_back(mcPart.pt());
}
}
Expand Down
Loading