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
22 changes: 11 additions & 11 deletions PWGHF/TableProducer/trackIndexSkimCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,51 +164,51 @@

/// Event selection with trigger and FT0A centrality selection
void processTrigAndCentFT0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0As>::iterator const& collision,
aod::EvSels, aod::CentFT0As>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0A>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0ASel, "Use trigger and centrality selection with FT0A", false);

/// Event selection with trigger and FT0C centrality selection
void processTrigAndCentFT0CSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Cs>::iterator const& collision,
void processTrigAndCentFT0CSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Cs>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0C>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0CSel, "Use trigger and centrality selection with FT0C", false);

/// Event selection with trigger and FT0M centrality selection
void processTrigAndCentFT0MSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Ms>::iterator const& collision,
void processTrigAndCentFT0MSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Ms>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0M>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0MSel, "Use trigger and centrality selection with FT0M", false);

/// Event selection with trigger and FV0A centrality selection
void processTrigAndCentFV0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFV0As>::iterator const& collision,
void processTrigAndCentFV0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFV0As>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FV0A>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFV0ASel, "Use trigger and centrality selection with FV0A", false);

/// Event selection with trigger selection
void processTrigSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
void processTrigSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::None>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigSel, "Use trigger selection", false);

/// Event selection without trigger selection
void processNoTrigSel(aod::Collision const& collision,
void processNoTrigSel(aod::Collision const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<false, false, CentralityEstimator::None>(collision, bcs);
Expand All @@ -217,7 +217,7 @@

/// Event selection with UPC
void processUpcSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
aod::EvSels>::iterator const& collision,
aod::BcFullInfos const& bcs,
aod::FT0s const& /*ft0s*/,
aod::FV0As const& /*fv0as*/,
Expand Down Expand Up @@ -332,19 +332,19 @@

cutsSingleTrack = {config.cutsTrack2Prong, config.cutsTrack3Prong, config.cutsTrackBach, config.cutsTrackDstar, config.cutsTrackBachLfCasc};

if (config.etaMinTrack2Prong == -99999.) {

Check failure on line 335 in PWGHF/TableProducer/trackIndexSkimCreator.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.
config.etaMinTrack2Prong.value = -config.etaMaxTrack2Prong;
}
if (config.etaMinTrack3Prong == -99999.) {

Check failure on line 338 in PWGHF/TableProducer/trackIndexSkimCreator.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.
config.etaMinTrack3Prong.value = -config.etaMaxTrack3Prong;
}
if (config.etaMinTrackBach == -99999.) {

Check failure on line 341 in PWGHF/TableProducer/trackIndexSkimCreator.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.
config.etaMinTrackBach.value = -config.etaMaxTrackBach;
}
if (config.etaMinSoftPionForDstar == -99999.) {

Check failure on line 344 in PWGHF/TableProducer/trackIndexSkimCreator.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.
config.etaMinSoftPionForDstar.value = -config.etaMaxSoftPionForDstar;
}
if (config.etaMinTrackBachLfCasc == -99999.) {

Check failure on line 347 in PWGHF/TableProducer/trackIndexSkimCreator.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.
config.etaMinTrackBachLfCasc.value = -config.etaMaxTrackBachLfCasc;
}

Expand Down Expand Up @@ -576,7 +576,7 @@
hasGoodQuality = false;
}
} else {
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 579 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(hfTrack.tpcNClsFound() >= config.tpcNClsFoundMin.value && // is this the number of TPC clusters? It should not be used
TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) &&
(TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
Expand Down Expand Up @@ -612,7 +612,7 @@
hasGoodQuality = false;
}
} else { // selections for Run2 converted data
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 615 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) && (TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
hasGoodQuality = false;
}
Expand Down Expand Up @@ -641,7 +641,7 @@
hasGoodQuality = false;
}
} else { // selections for Run2 converted data
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 644 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) && (TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
hasGoodQuality = false;
}
Expand Down Expand Up @@ -2244,7 +2244,7 @@
nCandContr--;
isTrackSecondContr = false;
}
if (nCandContr == 2) {

Check failure on line 2247 in PWGHF/TableProducer/trackIndexSkimCreator.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.
/// Both the daughter tracks were used for the original PV refit, let's refit it after excluding them
if (config.debugPvRefit) {
LOG(info) << "### [2 Prong] Calling performPvRefitCandProngs for HF 2 prong candidate";
Expand Down Expand Up @@ -2369,7 +2369,7 @@
}

// if the cut on the decay length of 3-prongs computed with the first two tracks is enabled and the vertex was not computed for the D0, we compute it now
if (config.do3Prong == 1 && is2ProngCandidateGoodFor3Prong && (config.minTwoTrackDecayLengthFor3Prongs > 0.f || config.maxTwoTrackChi2PcaFor3Prongs < 1.e9f) && nVtxFrom2ProngFitter == 0) {

Check failure on line 2372 in PWGHF/TableProducer/trackIndexSkimCreator.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.
try {
nVtxFrom2ProngFitter = df2.process(trackParVarPos1, trackParVarNeg1);
} catch (...) {
Expand Down
33 changes: 17 additions & 16 deletions PWGHF/Utils/utilsEvSelHf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,32 @@
#ifndef PWGHF_UTILS_UTILSEVSELHF_H_
#define PWGHF_UTILS_UTILSEVSELHF_H_

#include <fairlogger/Logger.h>
#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGUD/Core/SGSelector.h"

#include <Rtypes.h>
#include <TH1.h>
#include <TH2.h>
#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/DeviceSpec.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>

#include <cstdint>
#include <TH1.h>
#include <TH2.h>

#include <fairlogger/Logger.h>

#include <Rtypes.h>

#include <cstddef>
#include <cstdint>
#include <memory> // std::shared_ptr
#include <string> // std::string

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGUD/Core/SGSelector.h"

namespace o2::hf_occupancy
{
// centrality selection estimators
Expand Down Expand Up @@ -114,7 +115,7 @@ enum EventRejection {
};

o2::framework::AxisSpec axisEvents = {EventRejection::NEventRejection, -0.5f, +EventRejection::NEventRejection - 0.5f, ""};
o2::framework::AxisSpec axisUpcEvents = { o2::aod::sgselector::DoubleGap + 1, -0.5f, +o2::aod::sgselector::DoubleGap + 0.5f, ""};
o2::framework::AxisSpec axisUpcEvents = {o2::aod::sgselector::DoubleGap + 1, -0.5f, +o2::aod::sgselector::DoubleGap + 0.5f, ""};

/// \brief Function to put labels on monitoring histogram
/// \param hRejection monitoring histogram
Expand Down Expand Up @@ -228,7 +229,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
hPosYAfterEvSel = registry.add<TH1>(NameHistPosYAfterEvSel, "selected events;#it{y}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{200, -0.5, 0.5}}});
hNumPvContributorsAfterSel = registry.add<TH1>(NameHistNumPvContributorsAfterSel, "selected events;#it{y}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{500, -0.5, 499.5}}});
setEventRejectionLabels(hCollisions, softwareTrigger);
hUpCollisions = registry.add<TH1>(NameHistUpCollisions, "HF UPC counter;;# of UPC events", {o2::framework::HistType::kTH1D, {axisUpcEvents}});
hUpCollisions = registry.add<TH1>(NameHistUpCollisions, "HF UPC counter;;# of UPC events", {o2::framework::HistType::kTH1D, {axisUpcEvents}});
const o2::framework::AxisSpec th2AxisCent{th2ConfigAxisCent, "Centrality"};
const o2::framework::AxisSpec th2AxisOccupancy{th2ConfigAxisOccupancy, "Occupancy"};
hCollisionsCentOcc = registry.add<TH2>(NameHistCollisionsCentOcc, "selected events;Centrality; Occupancy", {o2::framework::HistType::kTH2D, {th2AxisCent, th2AxisOccupancy}});
Expand Down Expand Up @@ -378,7 +379,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
if (upcEventType > o2::aod::sgselector::DoubleGap) {
SETBIT(rejectionMaskWithUpc, EventRejection::UpcEventCut);
} else {
hUpCollisions->Fill(upcEventType);
hUpCollisions->Fill(upcEventType);
}
}

Expand Down
Loading