Skip to content

Commit e691fd3

Browse files
fmazzascFrancesco Mazzaschi
andauthored
[PWGLF] Fix process function (#12993)
Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent 3cc06fd commit e691fd3

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

PWGLF/Tasks/Strangeness/xiLambdaCorr.cxx

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,15 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#include "PWGLF/DataModel/LFDoubleCascTables.h"
12+
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
1313
#include "PWGLF/DataModel/LFStrangenessTables.h"
1414

15-
#include "Common/Core/PID/TPCPIDResponse.h"
1615
#include "Common/Core/RecoDecay.h"
17-
#include "Common/Core/trackUtilities.h"
18-
#include "Common/DataModel/Centrality.h"
19-
#include "Common/DataModel/EventSelection.h"
20-
#include "Common/DataModel/Multiplicity.h"
21-
#include "Common/DataModel/PIDResponse.h"
22-
#include "Common/DataModel/TrackSelectionTables.h"
23-
24-
#include "DataFormatsParameters/GRPMagField.h"
25-
#include "DataFormatsParameters/GRPObject.h"
26-
#include "DetectorsBase/GeometryManager.h"
27-
#include "DetectorsBase/Propagator.h"
16+
2817
#include "Framework/ASoAHelpers.h"
2918
#include "Framework/AnalysisDataModel.h"
3019
#include "Framework/AnalysisTask.h"
3120
#include "Framework/runDataProcessing.h"
32-
#include "ReconstructionDataFormats/Track.h"
3321

3422
#include "TDatabasePDG.h"
3523
#include <Math/Vector4D.h>
@@ -42,21 +30,22 @@ using namespace o2;
4230
using namespace o2::framework;
4331
using namespace o2::framework::expressions;
4432

45-
using Collisions = soa::Join<aod::Collisions, aod::EvSels, aod::MultZeqs, aod::FT0Mults>::iterator;
46-
using FullCascades = aod::CascDataExt;
47-
using FullV0s = aod::V0Datas;
48-
using TracksFull = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCPi, aod::pidTPCPr, aod::pidTPCKa>;
33+
using Collisions = soa::Join<aod::StraCollisions, aod::StraCents, aod::StraEvSels, aod::StraStamps>::iterator;
34+
using FullV0s = soa::Join<aod::V0CollRefs, aod::V0Cores, aod::V0Extras>;
35+
using FullCascades = soa::Join<aod::CascCollRefs, aod::CascCores, aod::CascExtras, aod::CascBBs>;
36+
using TracksFull = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>;
37+
4938
struct xiLambdaCorr {
50-
ConfigurableAxis centAxis{"centAxis", {106, 0, 106}, "binning for the centrality"};
5139
ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"};
5240
// binning of (anti)lambda mass QA histograms
53-
ConfigurableAxis massLambdaAxis{"massLambdaAxis", {200, o2::constants::physics::MassLambda - 0.05f, o2::constants::physics::MassLambda + 0.05f}, "binning for the lambda invariant-mass"};
54-
ConfigurableAxis massXiAxis{"massXiAxis", {200, o2::constants::physics::MassXiMinus - 0.05f, o2::constants::physics::MassXiMinus + 0.05f}, "binning for the Xi invariant-mass"};
41+
ConfigurableAxis massLambdaAxis{"massLambdaAxis", {100, o2::constants::physics::MassLambda - 0.05f, o2::constants::physics::MassLambda + 0.05f}, "binning for the lambda invariant-mass"};
42+
ConfigurableAxis massXiAxis{"massXiAxis", {100, o2::constants::physics::MassXiMinus - 0.05f, o2::constants::physics::MassXiMinus + 0.05f}, "binning for the Xi invariant-mass"};
5543
ConfigurableAxis massXiLambdaAxis{"massXiLambdaAxis", {200, o2::constants::physics::MassXiMinus + o2::constants::physics::MassLambda, o2::constants::physics::MassXiMinus + o2::constants::physics::MassLambda + 0.1f}, "binning for the Xi+Lambda invariant-mass"};
44+
ConfigurableAxis cosPAxis{"cosPAxis", {10, 0.99f, 1.f}, "binning for the cosine of the pointing angle"};
5645

5746
Configurable<float> zVtxMax{"zVtxMax", 10.0f, "maximum z position of the primary vertex"};
5847
Configurable<float> etaMax{"etaMax", 0.9f, "maximum eta"};
59-
ConfigurableAxis momAxis{"momAxisFine", {5.e2, 0.f, 5.f}, "momentum axis binning"};
48+
ConfigurableAxis momAxis{"momAxisFine", {50, 0.f, 10.f}, "momentum axis binning"};
6049
ConfigurableAxis mixTypeAxis{"mixTypeAxis", {4, -0.5f, 3.5f}, "mixing type axis"}; // xi - lambda , xi - anti-lambda, anti-xi - lambda, anti-xi - anti-lambda
6150

6251
Configurable<float> cascPtMin{"cascPtMin", 1.f, "minimum (anti)casc pT (GeV/c)"};
@@ -83,9 +72,6 @@ struct xiLambdaCorr {
8372
template <class T>
8473
bool selectTrack(T const& track)
8574
{
86-
if (std::abs(track.eta()) > etaMax) {
87-
return false;
88-
}
8975
if (track.tpcNClsFound() < minNTPCClus) {
9076
return false;
9177
}
@@ -98,16 +84,20 @@ struct xiLambdaCorr {
9884
histos.add<TH1>("QA/zVtx", ";#it{z}_{vtx} (cm);Entries", HistType::kTH1F, {zVtxAxis});
9985
histos.add<TH2>("QA/massLambda", ";#it{p}_{T} (GeV/#it{c});#it{m}_{#Lambda} (GeV/#it{c}^{2})", HistType::kTH2F, {momAxis, massLambdaAxis});
10086
histos.add<TH2>("QA/massXi", ";#it{p}_{T} (GeV/#it{c});#it{m}_{#Xi} (GeV/#it{c}^{2})", HistType::kTH2F, {momAxis, massXiAxis});
101-
histos.add("xiMinusLambda", "", {HistType::kTHnSparseF, {massXiLambdaAxis, momAxis, mixTypeAxis}});
87+
histos.add("xiMinusLambda", "", {HistType::kTHnSparseF, {massXiLambdaAxis, momAxis, massXiAxis, massLambdaAxis, cosPAxis, cosPAxis, mixTypeAxis}});
10288
}
10389

10490
template <class C, class T>
10591
bool isSelectedCasc(C const& collision, T const&, FullCascades::iterator const& casc)
10692
{
10793

108-
auto bachelor = casc.bachelor_as<T>();
109-
auto posDau = casc.posTrack_as<T>();
110-
auto negDau = casc.negTrack_as<T>();
94+
if (std::abs(casc.positiveeta()) > 0.9 || std::abs(casc.negativeeta()) > 0.9 || std::abs(casc.bacheloreta()) > 0.9) {
95+
return false;
96+
}
97+
98+
auto bachelor = casc.bachTrackExtra_as<T>();
99+
auto posDau = casc.posTrackExtra_as<T>();
100+
auto negDau = casc.negTrackExtra_as<T>();
111101

112102
if (!selectTrack(bachelor) || !selectTrack(posDau) || !selectTrack(negDau)) {
113103
return false;
@@ -138,6 +128,7 @@ struct xiLambdaCorr {
138128
if (casc.mXi() > o2::constants::physics::MassXiMinus - mXiWindow && casc.mXi() < o2::constants::physics::MassXiMinus + mXiWindow) {
139129
massInWindow = true;
140130
}
131+
141132
if (!massInWindow) {
142133
return false;
143134
}
@@ -148,8 +139,12 @@ struct xiLambdaCorr {
148139
template <class T>
149140
bool isSelectedLambda(T const&, FullV0s::iterator const& v0)
150141
{
151-
auto posDau = v0.posTrack_as<T>();
152-
auto negDau = v0.negTrack_as<T>();
142+
auto posDau = v0.posTrackExtra_as<T>();
143+
auto negDau = v0.negTrackExtra_as<T>();
144+
145+
if (std::abs(v0.positiveeta()) > 0.9 || std::abs(v0.negativeeta()) > 0.9) {
146+
return false;
147+
}
153148

154149
if (!selectTrack(posDau) || !selectTrack(negDau)) {
155150
return false;
@@ -198,7 +193,7 @@ struct xiLambdaCorr {
198193
if (!isSelectedLambda(tracks, v0)) {
199194
continue;
200195
}
201-
if (casc.posTrackId() == v0.posTrackId() || casc.posTrackId() == v0.negTrackId()) {
196+
if (casc.posTrackExtraId() == v0.posTrackExtraId() || casc.posTrackExtraId() == v0.negTrackExtraId()) {
202197
continue;
203198
}
204199

@@ -216,7 +211,11 @@ struct xiLambdaCorr {
216211
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>> cascMom4D(casc.px(), casc.py(), casc.pz(), o2::constants::physics::MassXiMinus);
217212
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>> lambdaMom4D{v0.px(), v0.py(), v0.pz(), o2::constants::physics::MassLambda};
218213
auto xiLambdaMom4D = cascMom4D + lambdaMom4D;
219-
histos.fill(HIST("xiMinusLambda"), xiLambdaMom4D.M(), xiLambdaMom4D.Pt(), mixType);
214+
float massLambda = v0.alpha() > 0 ? v0.mLambda() : v0.mAntiLambda();
215+
float massXi = casc.mXi();
216+
float cosPAxi = casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ());
217+
float cosPAlambda = v0.v0cosPA();
218+
histos.fill(HIST("xiMinusLambda"), xiLambdaMom4D.M(), xiLambdaMom4D.Pt(), massXi, massLambda, cosPAxi, cosPAlambda, mixType);
220219
}
221220
}
222221
};
@@ -236,6 +235,7 @@ struct xiLambdaCorr {
236235
histos.fill(HIST("QA/zVtx"), collision.posZ());
237236
fillXiLambda(collision, tracks, v0s, cascades);
238237
}
238+
PROCESS_SWITCH(xiLambdaCorr, processData, "Process data", true);
239239
};
240240

241241
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)