Skip to content
Closed
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
16 changes: 7 additions & 9 deletions PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMCASCADESELECTION_H_
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMCASCADESELECTION_H_

#include <iostream>

Check warning on line 25 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Including iostream is discouraged. Use O2 logging instead.
#include <string>
#include <vector>

#include <TDatabasePDG.h> // FIXME

Check warning on line 29 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Direct use of TDatabasePDG is not allowed. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG>.

#include "PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h"
#include "PWGCF/FemtoDream/Core/femtoDreamSelection.h"
Expand All @@ -36,7 +36,7 @@
#include "Framework/HistogramRegistry.h"
#include "ReconstructionDataFormats/PID.h"

using namespace o2::framework;

Check warning on line 39 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Using directives are not allowed in headers.

namespace o2::analysis::femtoDream
{
Expand Down Expand Up @@ -275,7 +275,7 @@
int nCascadeTranRadMin;
int nCascadeTranRadMax;
int nCascadeDecVtxMax;

int nCascadeV0DCADaughMax;
int nCascadeV0CPAMin;
int nCascadeV0TranRadMin;
Expand All @@ -291,7 +291,7 @@
float fCascadeTranRadMin;
float fCascadeTranRadMax;
float fCascadeDecVtxMax;

float fCascadeV0DCADaughMax;
float fCascadeV0CPAMin;
float fCascadeV0TranRadMin;
Expand All @@ -313,9 +313,9 @@

// float nSigmaPIDOffsetTPC;

FemtoDreamTrackSelection PosDaughTrack;

Check warning on line 316 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
FemtoDreamTrackSelection NegDaughTrack;

Check warning on line 317 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
FemtoDreamTrackSelection BachDaugTrack;

Check warning on line 318 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

static constexpr int kNcascadeSelection = 16;

Expand Down Expand Up @@ -344,7 +344,6 @@
}; ///< Map to match a variable with
///< its type


static constexpr std::string_view mSelectionHelper[kNcascadeSelection] = {
"Cascade particle sign (+1 or -1)",
"Minimum pT (GeV/c)",
Expand Down Expand Up @@ -385,7 +384,7 @@
AxisSpec ptAxis = {100, 0.0f, 10.0f, "#it{p}_{T} (GeV/#it{c})"};
AxisSpec etaAxis = {100, -2.0f, 2.0f, "#it{#eta}"};
AxisSpec phiAxis = {100, 0.0f, 6.0f, "#it{#phi}"};
AxisSpec DCADaughAxis = {1000, 0.0f, 2.0f, "DCA (cm)"};

Check warning on line 387 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
AxisSpec CPAAxis = {1000, 0.95f, 1.0f, "#it{cos #theta_{p}}"};
AxisSpec tranRadAxis = {1000, 0.0f, 100.0f, "#it{r}_{xy} (cm)"};
AxisSpec decVtxAxis = {2000, 0, 200, "#it{Vtx}_{z} (cm)"};
Expand All @@ -409,7 +408,7 @@
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hSign").c_str(), "; Sign of the Cascade ; Entries", kTH1I, {{3, -1, 2}});
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{1000, 0, 10}});
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{1000, -1, 1}});
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hPhi").c_str(), "; #phi; Entries", kTH1F, {{1000, 0, 2. * M_PI}});

Check warning on line 411 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

Check warning on line 411 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Consider using multiples/fractions of PI defined in o2::constants::math.
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hDCADaugh").c_str(), "; daughters DCA; Entries", kTH1F, {DCADaughAxis});
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hCPA").c_str(), "; Cos PA; Entries", kTH1F, {CPAAxis});
mQAHistogramRegistry->add((folderName + "/" + static_cast<std::string>(mCutStage[istage]) + "/hTranRad").c_str(), "; Transverse Radius; Entries", kTH1F, {tranRadAxis});
Expand Down Expand Up @@ -456,7 +455,6 @@
nCascadeV0DCAToPVMin = getNSelections(femtoDreamCascadeSelection::kCascadeV0DCAtoPVMin);
nCascadeV0DCAToPVMax = getNSelections(femtoDreamCascadeSelection::kCascadeV0DCAtoPVMax);


fCascadePtMin = getMinimalSelection(femtoDreamCascadeSelection::kCascadePtMin,
femtoDreamSelection::kLowerLimit);
fCascadePtMax = getMinimalSelection(femtoDreamCascadeSelection::kCascadePtMax,
Expand Down Expand Up @@ -508,7 +506,7 @@
const float invMass = isCascOmega ? cascade.mOmega() : cascade.mXi();
// const float invMass = cascade.mXi();

//LOGF(info, "GG producer: Charge %i", cascade.sign());
// LOGF(info, "GG producer: Charge %i", cascade.sign());
if (invMassLambda < fV0InvMassLowLimit || invMassLambda > fV0InvMassUpLimit) {
return false;
}
Expand Down Expand Up @@ -599,10 +597,10 @@
size_t counter = 0;

float sign = 0.;
if (casc.sign()<0){
sign = -1.;
}else{
sign = 1.;
if (casc.sign() < 0) {
sign = -1.;
} else {
sign = 1.;
}

const auto cpaCasc = casc.casccosPA(col.posX(), col.posY(), col.posZ());
Expand All @@ -612,7 +610,7 @@

// LOGF(info, "GG producer: New dcatoPV: %f", dcav0topv);
float observable = 0.;
for (auto& sel : mSelections) {

Check warning on line 613 in PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

const auto selVariable = sel.getSelectionVariable();
switch (selVariable) {
Expand Down
Loading