Skip to content
Open
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
20 changes: 15 additions & 5 deletions PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,25 @@
#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "CommonConstants/MathConstants.h"
#include "MathUtils/BetheBlochAleph.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"
#include "MathUtils/BetheBlochAleph.h"
#include <Framework/Configurable.h>

#include <Math/GenVector/Boost.h>
#include <Math/Vector4D.h>
#include <TDatabasePDG.h> // FIXME

Check failure on line 43 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TMath.h>
#include <TPDGCode.h> // FIXME

#include <fairlogger/Logger.h>

#include <iostream>

Check failure on line 49 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <map>
#include <string>
#include <vector>

Expand All @@ -69,8 +70,14 @@
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

// Configs for events
Configurable<bool> ConfEvtSelectZvtx{"ConfEvtSelectZvtx", true, "Event selection includes max. z-Vertex"};
Configurable<float> ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"};

/// Event selection
struct : ConfigurableGroup {
std::string prefix = std::string("EventSel");
Configurable<bool> ConfEvtSelectZvtx{"ConfEvtSelectZvtx", true, "Event selection includes max. z-Vertex"};
Configurable<float> ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"};
Configurable<bool> ConfEvtSel8{"ConfEvtSel8", true, "Event selection sel8"};
} EventSel;

// event spherocity calculation
Configurable<int> trackSphDef{"trackSphDef", 0, "Spherocity Definition: |pT| = 1 -> 0, otherwise -> 1"};
Expand Down Expand Up @@ -184,7 +191,10 @@
template <typename T>
bool isSelectedEvent(T const& col)
{
if (ConfEvtSelectZvtx && std::abs(col.posZ()) > ConfEvtZvtx) {
if (EventSel.ConfEvtSelectZvtx && std::abs(col.posZ()) > EventSel.ConfEvtZvtx) {
return false;
}
if (EventSel.ConfEvtSel8 && !col.sel8()) {
return false;
}
return true;
Expand Down Expand Up @@ -341,7 +351,7 @@
template <typename Collision, typename V0>
bool SelectionV0(Collision const& collision, V0 const& candidate)
{
if (fabs(candidate.dcav0topv()) > cMaxV0DCA) {

Check failure on line 354 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}

Expand All @@ -351,8 +361,8 @@
const float dcaDaughv0 = candidate.dcaV0daughters();
const float cpav0 = candidate.v0cosPA();

float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); // FIXME: Get from the common header

Check failure on line 364 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
float lowmasscutks0 = 0.497 - 2.0 * cSigmaMassKs0;

Check failure on line 365 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
float highmasscutks0 = 0.497 + 2.0 * cSigmaMassKs0;

if (pT < ConfV0PtMin) {
Expand All @@ -375,7 +385,7 @@
return false;
}
}
if (fabs(CtauK0s) > cMaxV0LifeTime || candidate.mK0Short() < lowmasscutks0 || candidate.mK0Short() > highmasscutks0) {

Check failure on line 388 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
return true;
Expand Down Expand Up @@ -478,10 +488,10 @@

std::vector<double> BBProton, BBAntiproton, BBPion, BBAntipion, BBKaon, BBAntikaon;
ROOT::Math::PtEtaPhiMVector F1Vector, F1VectorDummy, F1d1dummy, F1d2dummy, F1d3dummy, KKs0Vector, ProtonVectorDummy, ProtonVectorDummy2;
double massPi = TDatabasePDG::Instance()->GetParticle(kPiPlus)->Mass(); // FIXME: Get from the common header

Check failure on line 491 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massKa = TDatabasePDG::Instance()->GetParticle(kKPlus)->Mass(); // FIXME: Get from the common header

Check failure on line 492 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massPr = TDatabasePDG::Instance()->GetParticle(kProton)->Mass(); // FIXME: Get from the common header

Check failure on line 493 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); // FIXME: Get from the common header

Check failure on line 494 in PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.

double massF1{0.};
double masskKs0{0.};
Expand All @@ -497,7 +507,7 @@
Filter dcaFilter = nabs(aod::track::dcaXY) < ConfTrkDCAxyMaxF1Proton && nabs(aod::track::dcaZ) < ConfTrkDCAzMaxF1Proton;

// using EventCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::Mults>;
using EventCandidates = aod::Collisions;
using EventCandidates = soa::Join<aod::Collisions, aod::EvSels>;
using ResoV0s = aod::V0Datas;
using PrimaryTrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection,
aod::pidTPCFullPi, aod::pidTOFFullPi,
Expand Down
8 changes: 4 additions & 4 deletions PWGLF/Tasks/Resonances/f1protoncorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ struct f1protoncorrelation {
const AxisSpec thnAxisMultiplicity{CfgMultBins, "Multiplicity"};

// register histograms
histos.add("hPhaseSpaceProtonKaonSame", "hPhaseSpaceProtonKaonSame", kTH3F, {{40, -2.0f, 2.0f}, {180, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}, {100, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonPionSame", "hPhaseSpaceProtonPionSame", kTH3F, {{40, -2.0f, 2.0f}, {180, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}, {100, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonKaonMix", "hPhaseSpaceProtonKaonMix", kTH3F, {{40, -2.0f, 2.0f}, {180, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}, {100, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonPionMix", "hPhaseSpaceProtonPionMix", kTH3F, {{40, -2.0f, 2.0f}, {180, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}, {100, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonKaonSame", "hPhaseSpaceProtonKaonSame", kTH3F, {{100, -0.3f, 0.3f}, {100, -0.3, 0.3}, {10, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonPionSame", "hPhaseSpaceProtonPionSame", kTH3F, {{100, -0.3f, 0.3f}, {100, -0.3, 0.3}, {10, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonKaonMix", "hPhaseSpaceProtonKaonMix", kTH3F, {{100, -0.3f, 0.3f}, {100, -0.3, 0.3}, {10, 0.0, 1.0}});
histos.add("hPhaseSpaceProtonPionMix", "hPhaseSpaceProtonPionMix", kTH3F, {{100, -0.3f, 0.3f}, {100, -0.3, 0.3}, {10, 0.0, 1.0}});

histos.add("hNsigmaProtonTPC", "Nsigma Proton TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}});
histos.add("hNsigmaKaonTPC", "Nsigma Kaon TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}});
Expand Down
Loading