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
1 change: 1 addition & 0 deletions ALICE3/TableProducer/alice3-correlatorDDbar.cxx
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 ALICE3/TableProducer/alice3-correlatorDDbar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in ALICE3/TableProducer/alice3-correlatorDDbar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/file-cpp]

Use lowerCamelCase or UpperCamelCase for names of C++ files. See the O2 naming conventions for details.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -27,6 +27,7 @@
#include "ALICE3/DataModel/A3DecayFinderTables.h"

#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/Core/SelectorCuts.h"
#include "PWGHF/HFC/DataModel/CorrelationTables.h"
// #include "PWGHF/DataModel/CandidateReconstructionTables.h"
// #include "PWGHF/DataModel/CandidateSelectionTables.h"
Expand Down Expand Up @@ -54,7 +55,7 @@

const int npTBinsMassAndEfficiency = o2::analysis::hf_cuts_d0_to_pi_k::NBinsPt;
const double efficiencyDmesonDefault[npTBinsMassAndEfficiency] = {};
auto efficiencyDmeson_v = std::vector<double>{efficiencyDmesonDefault, efficiencyDmesonDefault + npTBinsMassAndEfficiency};

Check failure on line 58 in ALICE3/TableProducer/alice3-correlatorDDbar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

// histogram binning definition
const int massAxisBins = 120;
Expand All @@ -70,7 +71,7 @@
const double ptDAxisMin = 0.;
const double ptDAxisMax = 36.;

struct alice3correlatorddbar {

Check failure on line 74 in ALICE3/TableProducer/alice3-correlatorDDbar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.
SliceCache cache;
Preslice<aod::Alice3D0Meson> perCol = aod::a3D0meson::collisionId;
Produces<aod::DDbarPair> entryD0D0barPair;
Expand Down Expand Up @@ -228,14 +229,14 @@
if (candidate1.isSelD0() >= selectionFlagD0) { // only reco as D0
if (candidate1.mcTruthInfo() == 1) { // also matched as D0
registry.fill(HIST("hMassD0MCRecSig"), candidate1.m(), candidate1.pt(), efficiencyWeight); // here m is univoque, since a given candidate passes the selection with only a single mass option
} else if (candidate1.mcTruthInfo() == 2) {

Check failure on line 232 in ALICE3/TableProducer/alice3-correlatorDDbar.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.
registry.fill(HIST("hMassD0MCRecRefl"), candidate1.m(), candidate1.pt(), efficiencyWeight);
} else {
registry.fill(HIST("hMassD0MCRecBkg"), candidate1.m(), candidate1.pt(), efficiencyWeight);
}
}
if (candidate1.isSelD0bar() >= selectionFlagD0bar) { // only reco as D0bar
if (candidate1.mcTruthInfo() == 2) { // also matched as D0bar

Check failure on line 239 in ALICE3/TableProducer/alice3-correlatorDDbar.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.
registry.fill(HIST("hMassD0barMCRecSig"), candidate1.m(), candidate1.pt(), efficiencyWeight); // here m is univoque, since a given candidate passes the selection with only a single mass option
} else if (candidate1.mcTruthInfo() == 1) {
registry.fill(HIST("hMassD0barMCRecRefl"), candidate1.m(), candidate1.pt(), efficiencyWeight);
Expand All @@ -251,13 +252,13 @@
}

flagD0Signal = candidate1.mcTruthInfo() == 1; // flagD0Signal 'true' if candidate1 matched to D0 (particle)
flagD0Reflection = candidate1.mcTruthInfo() == 2; // flagD0Reflection 'true' if candidate1, selected as D0 (particle), is matched to D0bar (antiparticle)

Check failure on line 255 in ALICE3/TableProducer/alice3-correlatorDDbar.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.

for (const auto& candidate2 : selectedCandidatesGroupedMC) {
if (candidate2.isSelD0bar() < selectionFlagD0bar) { // discard candidates not selected as D0bar in inner loop
continue;
}
flagD0barSignal = candidate2.mcTruthInfo() == 2; // flagD0barSignal 'true' if candidate2 matched to D0bar (antiparticle)

Check failure on line 261 in ALICE3/TableProducer/alice3-correlatorDDbar.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.
flagD0barReflection = candidate2.mcTruthInfo() == 1; // flagD0barReflection 'true' if candidate2, selected as D0bar (antiparticle), is matched to D0 (particle)

// Excluding trigger self-correlations (possible in case of both mass hypotheses of the same real particle, reconstructed as candidate1 for D0 and candidate2 for D0bar)
Expand Down
1 change: 1 addition & 0 deletions ALICE3/Tasks/alice3-taskcorrelationDDbar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// \file taskCorrelationDDbar.cxx
/// \brief D0-D0bar correlation analysis task - data-like and MC-reco analysis performance on ALICE 3 detector.
///
/// \author Fabio Colamaria <fabio.colamaria@ba.infn.it>, INFN Bari

Check failure on line 15 in ALICE3/Tasks/alice3-taskcorrelationDDbar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <vector>

Expand All @@ -20,6 +20,7 @@
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"

#include "PWGHF/Core/SelectorCuts.h"
#include "PWGHF/Utils/utilsAnalysis.h"
#include "PWGHF/HFC/DataModel/CorrelationTables.h"
// #include "PWGHF/DataModel/CandidateReconstructionTables.h"
Expand Down Expand Up @@ -158,7 +159,7 @@
int nBinspTaxis = binsPtCorrelations->size() - 1;
const double* valuespTaxis = binsPtCorrelations->data();

for (int i = 2; i <= 3; i++) {

Check failure on line 162 in ALICE3/Tasks/alice3-taskcorrelationDDbar.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.
registry.get<THnSparse>(HIST("hMass2DCorrelationPairs"))->GetAxis(i)->Set(nBinspTaxis, valuespTaxis);
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegion"))->GetAxis(i)->Set(nBinspTaxis, valuespTaxis);
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebands"))->GetAxis(i)->Set(nBinspTaxis, valuespTaxis);
Expand Down
Loading