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
30 changes: 17 additions & 13 deletions PWGLF/TableProducer/Strangeness/cascqaanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@
/// \brief Analysis of cascades in pp collisions
/// \author Roman Nepeivoda (roman.nepeivoda@cern.ch)

#include <algorithm>
#include <vector>
#include <TPDGCode.h>
#include <string>
#include "PWGLF/DataModel/cascqaanalysis.h"

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGLF/DataModel/mcCentrality.h"
#include "PWGLF/Utils/inelGt.h"

#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "PWGLF/DataModel/cascqaanalysis.h"
#include "TRandom2.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/AnalysisTask.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "PWGLF/Utils/inelGt.h"
#include "PWGLF/DataModel/mcCentrality.h"
#include "Framework/runDataProcessing.h"

#include "TRandom2.h"
#include <TPDGCode.h>

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

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -194,7 +198,7 @@
aod::cascdata::dcacascdaughters < dcacascdau);

Partition<DauTracks> pvContribTracksIUEta1 = (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));
Partition<DauTracks> globalTracksIUEta05 = (nabs(aod::track::eta) < 0.5f) && (requireGlobalTrackInFilter());

Check failure on line 201 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.

template <class TCascTracksTo, typename TCascade>
bool acceptCascCandidate(TCascade const& cascCand, float const& pvx, float const& pvy, float const& pvz)
Expand Down Expand Up @@ -234,7 +238,7 @@
if (pdgInfo->Charge() == 0) {
continue;
}
if (mcParticle.eta() < -3.3 || mcParticle.eta() > 4.9 || (mcParticle.eta() > -2.1 && mcParticle.eta() < 3.5)) {

Check failure on line 241 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.
continue; // select on T0M Nch region
}
nchFT0++; // increment
Expand All @@ -258,7 +262,7 @@
if (pdgInfo->Charge() == 0) {
continue;
}
if (mcParticle.eta() < 2.2 || mcParticle.eta() > 5.1) {

Check failure on line 265 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.
continue; // select on V0A Nch region
}
nchFV0A++; // increment
Expand Down Expand Up @@ -421,7 +425,7 @@

// ITS N hits
int posITSNhits = 0, negITSNhits = 0, bachITSNhits = 0;
for (unsigned int i = 0; i < 7; i++) {

Check failure on line 428 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.
if (posdau.itsClusterMap() & (1 << i)) {
posITSNhits++;
}
Expand Down Expand Up @@ -566,7 +570,7 @@

// ITS N hits
int posITSNhits = 0, negITSNhits = 0, bachITSNhits = 0;
for (unsigned int i = 0; i < 7; i++) {

Check failure on line 573 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.
if (posdau.itsClusterMap() & (1 << i)) {
posITSNhits++;
}
Expand Down Expand Up @@ -687,7 +691,7 @@

registry.fill(HIST("hNchFT0MNAssocMCCollisions"), nchFT0, nAssocColl, evType);

if (numberOfContributors.size() == 2) {

Check failure on line 694 in PWGLF/TableProducer/Strangeness/cascqaanalysis.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.
std::sort(numberOfContributors.begin(), numberOfContributors.end());
registry.fill(HIST("hNContributorsCorrelation"), numberOfContributors[0], numberOfContributors[1]);
}
Expand Down
49 changes: 26 additions & 23 deletions PWGLF/Tasks/Strangeness/derivedupcanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,38 @@
/// \brief Analysis of strangeness production in UPC collisions
/// \author Roman Nepeivoda (roman.nepeivoda@cern.ch)

#include <bitset>
#include <TFile.h>
#include <TH2F.h>
#include <TProfile.h>
#include <TPDGCode.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <limits>
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGLF/Utils/strangenessMasks.h"
#include "PWGUD/Core/SGSelector.h"

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "ReconstructionDataFormats/Track.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/trackUtilities.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/StaticFor.h"
#include "PWGUD/Core/SGSelector.h"
#include "PWGLF/Utils/strangenessMasks.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include <TFile.h>
#include <TH2F.h>
#include <TPDGCode.h>
#include <TProfile.h>

#include <algorithm>
#include <bitset>
#include <cmath>
#include <limits>
#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -306,7 +309,7 @@
template <int partID>
void addTopoHistograms(HistogramRegistry& histos)
{
const bool isCascade = (partID > 2.5) ? true : false;

Check failure on line 312 in PWGLF/Tasks/Strangeness/derivedupcanalysis.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.
if (isCascade) {
histos.add(Form("%s/hCascCosPA", kParticlenames[partID].data()), "hCascCosPA", kTH2F, {axisPtCoarse, {100, 0.9f, 1.0f}});
histos.add(Form("%s/hDCACascDaughters", kParticlenames[partID].data()), "hDCACascDaughters", kTH2F, {axisPtCoarse, {44, 0.0f, 2.2f}});
Expand Down Expand Up @@ -340,7 +343,7 @@
template <int partID>
void addTPCQAHistograms(HistogramRegistry& histos)
{
const bool isCascade = (partID > 2.5) ? true : false;

Check failure on line 346 in PWGLF/Tasks/Strangeness/derivedupcanalysis.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.
histos.add(Form("%s/h3dPosNsigmaTPC", kParticlenames[partID].data()), "h3dPosNsigmaTPC", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisNsigmaTPC});
histos.add(Form("%s/h3dNegNsigmaTPC", kParticlenames[partID].data()), "h3dNegNsigmaTPC", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisNsigmaTPC});
histos.add(Form("%s/h3dPosTPCsignal", kParticlenames[partID].data()), "h3dPosTPCsignal", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTPCsignal});
Expand Down Expand Up @@ -371,7 +374,7 @@
template <int partID>
void addTOFQAHistograms(HistogramRegistry& histos)
{
const bool isCascade = (partID > 2.5) ? true : false;

Check failure on line 377 in PWGLF/Tasks/Strangeness/derivedupcanalysis.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.
histos.add(Form("%s/h3dPosTOFdeltaT", kParticlenames[partID].data()), "h3dPosTOFdeltaT", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
histos.add(Form("%s/h3dNegTOFdeltaT", kParticlenames[partID].data()), "h3dNegTOFdeltaT", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
histos.add(Form("%s/h3dPosTOFdeltaTvsTrackPtot", kParticlenames[partID].data()), "h3dPosTOFdeltaTvsTrackPtot", kTH3F, {axisDetectors.axisFT0ampl, axisPtCoarse, axisTOFdeltaT});
Expand All @@ -388,7 +391,7 @@
template <int partID>
void addKinematicQAHistograms(HistogramRegistry& histos)
{
const bool isCascade = (partID > 2.5) ? true : false;

Check failure on line 394 in PWGLF/Tasks/Strangeness/derivedupcanalysis.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.
histos.add(Form("%s/h3dPosEtaPt", kParticlenames[partID].data()), "h3dPosEtaPt", kTH3F, {axisPtCoarse, axisEta, axisSelGap});
histos.add(Form("%s/h3dNegEtaPt", kParticlenames[partID].data()), "h3dNegEtaPt", kTH3F, {axisPtCoarse, axisEta, axisSelGap});
histos.add(Form("%s/h3dRapPt", kParticlenames[partID].data()), "h3dRapPt", kTH3F, {axisPtCoarse, axisRap, axisSelGap});
Expand Down
Loading