Skip to content

Commit b5842b6

Browse files
authored
[PWGCF] Update lambdaR2Correlation.cxx (#11825)
1 parent 39c3366 commit b5842b6

File tree

1 file changed

+53
-20
lines changed

1 file changed

+53
-20
lines changed

PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,25 @@
1313
/// \brief R2 correlation of Lambda baryons.
1414
/// \author Yash Patley <yash.patley@cern.ch>
1515

16-
#include <vector>
17-
#include <string>
16+
#include "PWGLF/DataModel/LFStrangenessTables.h"
1817

19-
#include "Common/DataModel/PIDResponse.h"
18+
#include "Common/Core/RecoDecay.h"
2019
#include "Common/DataModel/Centrality.h"
20+
#include "Common/DataModel/CollisionAssociationTables.h"
2121
#include "Common/DataModel/EventSelection.h"
22-
#include "Framework/AnalysisTask.h"
22+
#include "Common/DataModel/PIDResponse.h"
23+
24+
#include "CCDB/BasicCCDBManager.h"
25+
#include "CommonConstants/PhysicsConstants.h"
2326
#include "Framework/ASoAHelpers.h"
27+
#include "Framework/AnalysisTask.h"
2428
#include "Framework/runDataProcessing.h"
25-
#include "PWGLF/DataModel/LFStrangenessTables.h"
26-
#include "PWGLF/DataModel/mcCentrality.h"
27-
#include "CommonConstants/PhysicsConstants.h"
28-
#include "Common/Core/RecoDecay.h"
29-
#include "CCDB/BasicCCDBManager.h"
29+
3030
#include "TPDGCode.h"
3131

32+
#include <string>
33+
#include <vector>
34+
3235
using namespace o2;
3336
using namespace o2::framework;
3437
using namespace o2::framework::expressions;
@@ -152,8 +155,8 @@ enum TrackLabels {
152155
kPassV0KinCuts,
153156
kPassV0TopoSel,
154157
kAllSelPassed,
155-
kNotPrimaryLambda,
156-
kNotSecondaryLambda,
158+
kPrimaryLambda,
159+
kSecondaryLambda,
157160
kLambdaDauNotMcParticle,
158161
kLambdaNotPrPiMinus,
159162
kAntiLambdaNotAntiPrPiPlus,
@@ -242,14 +245,15 @@ struct LambdaTableProducer {
242245
Configurable<bool> cIsGoodITSLayers{"cIsGoodITSLayers", false, "Good ITS Layers All"};
243246

244247
// Tracks
245-
Configurable<float> cTrackMinPt{"cTrackMinPt", 0.16, "p_{T} minimum"};
246-
Configurable<float> cTrackMaxPt{"cTrackMaxPt", 999.0, "p_{T} minimum"};
248+
Configurable<float> cTrackMinPt{"cTrackMinPt", 0.15, "p_{T} minimum"};
249+
Configurable<float> cTrackMaxPt{"cTrackMaxPt", 999.0, "p_{T} maximum"};
247250
Configurable<float> cTrackEtaCut{"cTrackEtaCut", 0.8, "Pseudorapidity cut"};
248-
Configurable<int> cMinTpcCrossedRows{"cMinTpcCrossedRows", 80, "TPC Min Crossed Rows"};
251+
Configurable<int> cMinTpcCrossedRows{"cMinTpcCrossedRows", 70, "TPC Min Crossed Rows"};
249252
Configurable<float> cMinTpcCROverCls{"cMinTpcCROverCls", 0.8, "Tpc Min Crossed Rows Over Findable Clusters"};
250253
Configurable<float> cMaxTpcSharedClusters{"cMaxTpcSharedClusters", 0.4, "Tpc Max Shared Clusters"};
251254
Configurable<float> cMaxChi2Tpc{"cMaxChi2Tpc", 4, "Max Chi2 Tpc"};
252-
Configurable<double> cTpcNsigmaCut{"cTpcNsigmaCut", 5.0, "TPC NSigma Selection Cut"};
255+
Configurable<double> cTpcNsigmaCut{"cTpcNsigmaCut", 3.0, "TPC NSigma Selection Cut"};
256+
Configurable<bool> cRemoveAmbiguousTracks{"cRemoveAmbiguousTracks", false, "Remove Ambiguous Tracks"};
253257

254258
// V0s
255259
Configurable<double> cMinDcaProtonToPV{"cMinDcaProtonToPV", 0.02, "Minimum Proton DCAr to PV"};
@@ -436,8 +440,8 @@ struct LambdaTableProducer {
436440
histos.get<TH1>(HIST("McGen/h1f_collisions_info"))->GetXaxis()->SetBinLabel(CollisionLabels::kTotCol, "kTotCol");
437441
histos.get<TH1>(HIST("McGen/h1f_collisions_info"))->GetXaxis()->SetBinLabel(CollisionLabels::kPassSelCol, "kPassSelCol");
438442
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kTracksBeforeHasMcParticle, "kTracksBeforeHasMcParticle");
439-
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kNotPrimaryLambda, "kNotPrimaryLambda");
440-
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kNotSecondaryLambda, "kNotSecondaryLambda");
443+
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kPrimaryLambda, "kPrimaryLambda");
444+
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kSecondaryLambda, "kSecondaryLambda");
441445
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kLambdaDauNotMcParticle, "kLambdaDauNotMcParticle");
442446
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kLambdaNotPrPiMinus, "kLambdaNotPrPiMinus");
443447
histos.get<TH1>(HIST("Tracks/h1f_tracks_info"))->GetXaxis()->SetBinLabel(TrackLabels::kAntiLambdaNotAntiPrPiPlus, "kAntiLambdaNotAntiPrPiPlus");
@@ -736,19 +740,43 @@ struct LambdaTableProducer {
736740
return true;
737741
}
738742

743+
template <typename V, typename T>
744+
bool hasAmbiguousDaughters(V const& v0, T const&)
745+
{
746+
auto posTrack = v0.template posTrack_as<T>();
747+
auto negTrack = v0.template negTrack_as<T>();
748+
749+
auto posTrackCompCols = posTrack.compatibleCollIds();
750+
auto negTrackCompCols = negTrack.compatibleCollIds();
751+
752+
// Check if daughter tracks belongs to more than one collision (Ambiguous Tracks)
753+
if (posTrackCompCols.size() > 1 || negTrackCompCols.size() > 1) {
754+
return true;
755+
}
756+
757+
// Check if compatible collision index matches the track collision index
758+
if (((posTrackCompCols.size() != 0) && (posTrackCompCols[0] != posTrack.collisionId())) ||
759+
((negTrackCompCols.size() != 0) && (negTrackCompCols[0] != negTrack.collisionId()))) {
760+
return true;
761+
}
762+
763+
// Pass as not ambiguous
764+
return false;
765+
}
766+
739767
template <typename V>
740768
PrmScdType isPrimaryV0(V const& v0)
741769
{
742770
auto mcpart = v0.template mcParticle_as<aod::McParticles>();
743771

744772
// check for secondary lambda
745773
if (!mcpart.isPhysicalPrimary()) {
746-
histos.fill(HIST("Tracks/h1f_tracks_info"), kNotPrimaryLambda);
774+
histos.fill(HIST("Tracks/h1f_tracks_info"), kSecondaryLambda);
747775
bSecondaryLambdaFlag = true;
748776
return kSecondary;
749777
}
750778

751-
histos.fill(HIST("Tracks/h1f_tracks_info"), kNotSecondaryLambda);
779+
histos.fill(HIST("Tracks/h1f_tracks_info"), kPrimaryLambda);
752780
return kPrimary;
753781
}
754782

@@ -977,6 +1005,11 @@ struct LambdaTableProducer {
9771005
// we have v0 as lambda
9781006
histos.fill(HIST("Tracks/h1f_tracks_info"), kAllSelPassed);
9791007

1008+
// Remove lambda with ambiguous daughters
1009+
if (cRemoveAmbiguousTracks && hasAmbiguousDaughters(v0, tracks)) {
1010+
continue;
1011+
}
1012+
9801013
// Get Lambda mass and kinematic variables
9811014
mass = (v0Type == kLambda) ? v0.mLambda() : v0.mAntiLambda();
9821015
pt = v0.pt();
@@ -1172,7 +1205,7 @@ struct LambdaTableProducer {
11721205

11731206
using CollisionsRun3 = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
11741207
using CollisionsRun2 = soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms>;
1175-
using Tracks = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCPr>;
1208+
using Tracks = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCPr, aod::TrackCompColls>;
11761209
using McV0Tracks = soa::Join<aod::V0Datas, aod::McV0Labels>;
11771210
using TracksMC = soa::Join<Tracks, aod::McTrackLabels>;
11781211

0 commit comments

Comments
 (0)