Skip to content

Commit 280b04a

Browse files
[PWGLF] minor changes in the K892 related task (#16763)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 6ac1256 commit 280b04a

2 files changed

Lines changed: 76 additions & 26 deletions

File tree

PWGLF/TableProducer/Strangeness/sigma0builder.cxx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12-
// This is a task that employs the standard V0 tables and attempts to combine
13-
// two V0s into a Sigma0 -> Lambda + gamma candidate.
14-
// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
15-
// Sigma0 builder task
16-
// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
17-
//
18-
// Comments, questions, complaints, suggestions?
19-
// Please write to:
20-
// gianni.shigeru.setoue.liveraro@cern.ch
21-
// oussama.benchikhi@cern.ch
22-
//
12+
13+
/// \file sigma0builder.cxx
14+
/// \brief This is a task that employs the standard V0 tables and attempts to combine two V0s into a Sigma0 -> Lambda + gamma candidate.
15+
/// \author Gianni Shigeru Setoue Liveraro
16+
/// \author Oussama Benchikhi
2317

2418
#include "PWGEM/PhotonMeson/Utils/MCUtilities.h"
2519
#include "PWGJE/DataModel/EMCALClusters.h"
@@ -286,6 +280,7 @@ struct sigma0builder {
286280
Configurable<bool> KShortRejectPosITSafterburner{"KShortRejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"};
287281
Configurable<bool> KShortRejectNegITSafterburner{"KShortRejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"};
288282
Configurable<float> KShortArmenterosCoefficient{"KShortArmenterosCoefficient", 0.2, "Armenteros-Podolanski coefficient to reject lambdas"};
283+
Configurable<float> KShortMaxTPCNSigmas{"KShortMaxTPCNSigmas", 1e+9, "Max |TPC NSigma| (pion hypothesis) for K0S daughters"};
289284
} kshortSelections;
290285

291286
// KStar criteria:
@@ -477,8 +472,9 @@ struct sigma0builder {
477472
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(9, "Z");
478473
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(10, "CosPA");
479474
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(11, "Phi");
480-
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR");
481-
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPC NSigma");
475+
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "Armenteros");
476+
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "TPCCR");
477+
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(14, "TPC NSigma");
482478

483479
if (doprocessPCMVsEMCalQA) {
484480
histos.add("EMCalPhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel});
@@ -545,6 +541,7 @@ struct sigma0builder {
545541
histos.get<TH1>(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(12, "TPCCR");
546542
histos.get<TH1>(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(13, "ITSNCls");
547543
histos.get<TH1>(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(14, "Lifetime");
544+
histos.get<TH1>(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(15, "TPC NSigma");
548545

549546
if (doprocessRealData || doprocessRealDataWithTOF || doprocessRealDataWithEMCal || doprocessMonteCarlo || doprocessMonteCarloWithTOF || doprocessMonteCarloWithEMCal) {
550547
histos.add("SigmaSel/hSigma0DauDeltaIndex", "hSigma0DauDeltaIndex", kTH1F, {{100, -49.5f, 50.5f}});
@@ -2206,6 +2203,11 @@ struct sigma0builder {
22062203
return false;
22072204

22082205
histos.fill(HIST("KShortSel/hSelectionStatistics"), 14.);
2206+
if (((TMath::Abs(posTrackKShort.tpcNSigmaPi()) > kshortSelections.KShortMaxTPCNSigmas) ||
2207+
(TMath::Abs(negTrackKShort.tpcNSigmaPi()) > kshortSelections.KShortMaxTPCNSigmas)))
2208+
return false;
2209+
2210+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 15.);
22092211
}
22102212
return true;
22112213
}

PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,10 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
//
12-
// This is a ask that computes the same-event rotational and the
13-
// mixed-event combinatorial backgrounds for the K*(892) -> K0S + gamma analysis.
14-
// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
15-
// K892 hadron-photon background task
16-
// *+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
17-
//
18-
// Comments, questions, complaints, suggestions?
19-
// Please write to:
20-
// oussama.benchikhi@cern.ch
21-
//
11+
12+
/// \file k892hadronphotonBkg.cxx
13+
/// \brief This is a ask that computes the same-event rotational and the mixed-event combinatorial backgrounds for the K*(892) -> K0S + gamma analysis.
14+
/// \author Oussama Benchikhi
2215

2316
#include "PWGLF/DataModel/LFStrangenessMLTables.h"
2417
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
@@ -62,6 +55,13 @@ using std::array;
6255
using dauTracks = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>;
6356
using V0StandardDerivedDatas = soa::Join<aod::V0Cores, aod::V0CollRefs, aod::V0Extras, aod::V0LambdaMLScores, aod::V0AntiLambdaMLScores, aod::V0GammaMLScores>;
6457

58+
static const std::vector<std::string> photonSels = {"No Sel", "Mass", "Y", "Neg Eta", "Pos Eta",
59+
"DCAToPV", "DCADau", "Radius", "Z", "CosPA",
60+
"Phi", "Qt", "Alpha", "TPCCR", "TPC NSigma"};
61+
static const std::vector<std::string> kshortSels = {"No Sel", "Mass", "Y", "Neg Eta", "Pos Eta",
62+
"DCAToPV", "Radius", "Z", "DCADau", "Armenteros",
63+
"CosPA", "TPCCR", "ITSNCls", "Lifetime", "TPC NSigma"};
64+
6565
struct k892hadronphotonBkg {
6666
Service<o2::ccdb::BasicCCDBManager> ccdb;
6767
ctpRateFetcher rateFetcher;
@@ -175,6 +175,7 @@ struct k892hadronphotonBkg {
175175
Configurable<bool> kshortRejectPosITSafterburner{"kshortRejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"};
176176
Configurable<bool> kshortRejectNegITSafterburner{"kshortRejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"};
177177
Configurable<float> kshortArmenterosCoefficient{"kshortArmenterosCoefficient", 0.2, "Armenteros-Podolanski coefficient to reject lambdas"};
178+
Configurable<float> kshortMaxTPCNSigmas{"kshortMaxTPCNSigmas", 1e+9, "Max |TPC NSigma| (pion hypothesis) for K0S daughters"};
178179
} kshortSelections;
179180

180181
struct : ConfigurableGroup {
@@ -184,6 +185,7 @@ struct k892hadronphotonBkg {
184185
ConfigurableAxis axisCentrality{"axisCentrality", {VARIABLE_WIDTH, 0.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.0f, 110.0f}, "Centrality"};
185186
ConfigurableAxis axisKStarMass{"axisKStarMass", {500, 0.6f, 1.6f}, "M_{K^{*}} (GeV/c^{2})"};
186187
ConfigurableAxis axisIRBinning{"axisIRBinning", {151, -10, 1500}, "Binning for the interaction rate (kHz)"};
188+
ConfigurableAxis axisCandSel{"axisCandSel", {15, 0.5f, +15.5f}, "Candidate Selection"};
187189
} axisConfig;
188190

189191
void init(InitContext const&)
@@ -230,6 +232,15 @@ struct k892hadronphotonBkg {
230232
}
231233
}
232234

235+
// Single-particle selection
236+
histos.add("PhotonSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel});
237+
for (size_t i = 0; i < photonSels.size(); ++i)
238+
histos.get<TH1>(HIST("PhotonSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(i + 1, photonSels[i].c_str());
239+
240+
histos.add("KShortSel/hSelectionStatistics", "hSelectionStatistics", kTH1D, {axisConfig.axisCandSel});
241+
for (size_t i = 0; i < kshortSels.size(); ++i)
242+
histos.get<TH1>(HIST("KShortSel/hSelectionStatistics"))->GetXaxis()->SetBinLabel(i + 1, kshortSels[i].c_str());
243+
233244
if (kstarBkgConfig.doSameEvtRotation || kstarBkgConfig.doEvtMixing) {
234245
histos.add("KStarBkg/hDeltaCollision", "hDeltaCollision", kTH1D, {{2000, -1000.f, 1000.f}});
235246
histos.add("KStarBkg/h2dCentralityCollPair", "h2dCentralityCollPair", kTH2D, {axisConfig.axisCentrality, axisConfig.axisCentrality});
@@ -385,7 +396,7 @@ struct k892hadronphotonBkg {
385396
}
386397

387398
//_______________________________________________
388-
// Process v0 photon candidate (data only, no QA fills)
399+
// Process v0 photon candidate
389400
template <typename TV0Object>
390401
bool processPhotonCandidate(TV0Object const& gamma)
391402
{
@@ -402,61 +413,77 @@ struct k892hadronphotonBkg {
402413
} else {
403414
// Standard selection
404415
// Gamma basic selection criteria:
416+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 1.);
405417
if ((gamma.mGamma() < 0) || (gamma.mGamma() > photonSelections.photonMaxMass))
406418
return false;
407419

420+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 2.);
408421
if ((photonY < photonSelections.photonMinRapidity) || (photonY > photonSelections.photonMaxRapidity))
409422
return false;
410423

424+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 3.);
411425
if (gamma.negativeeta() < photonSelections.photonDauEtaMin || gamma.negativeeta() > photonSelections.photonDauEtaMax)
412426
return false;
413427

428+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 4.);
414429
if (gamma.positiveeta() < photonSelections.photonDauEtaMin || gamma.positiveeta() > photonSelections.photonDauEtaMax)
415430
return false;
416431

432+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 5.);
417433
if ((TMath::Abs(gamma.dcapostopv()) < photonSelections.photonMinDCADauToPv) || (TMath::Abs(gamma.dcanegtopv()) < photonSelections.photonMinDCADauToPv))
418434
return false;
419435

436+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 6.);
420437
if (TMath::Abs(gamma.dcaV0daughters()) > photonSelections.photonMaxDCAV0Dau)
421438
return false;
422439

440+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 7.);
423441
if ((gamma.v0radius() < photonSelections.photonMinRadius) || (gamma.v0radius() > photonSelections.photonMaxRadius))
424442
return false;
425443

444+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 8.);
426445
if ((gamma.z() < photonSelections.photonMinZ) || (gamma.z() > photonSelections.photonMaxZ))
427446
return false;
428447

448+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 9.);
429449
if (gamma.v0cosPA() < photonSelections.photonMinV0cospa)
430450
return false;
431451

452+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 10.);
432453
float photonPhi = RecoDecay::phi(gamma.px(), gamma.py());
433454
if ((((photonPhi > photonSelections.photonPhiMin1) && (photonPhi < photonSelections.photonPhiMax1)) || ((photonPhi > photonSelections.photonPhiMin2) && (photonPhi < photonSelections.photonPhiMax2))) && ((photonSelections.photonPhiMin1 != -1) && (photonSelections.photonPhiMax1 != -1) && (photonSelections.photonPhiMin2 != -1) && (photonSelections.photonPhiMax2 != -1)))
434455
return false;
435456

457+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 11.);
436458
if (gamma.qtarm() > photonSelections.photonMaxQt)
437459
return false;
438460

461+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 12.);
439462
if (TMath::Abs(gamma.alpha()) > photonSelections.photonMaxAlpha)
440463
return false;
441464

442465
auto posTrackGamma = gamma.template posTrackExtra_as<dauTracks>();
443466
auto negTrackGamma = gamma.template negTrackExtra_as<dauTracks>();
444467

468+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 13.);
445469
if ((posTrackGamma.tpcCrossedRows() < photonSelections.photonMinTPCCrossedRows) || (negTrackGamma.tpcCrossedRows() < photonSelections.photonMinTPCCrossedRows))
446470
return false;
447471

472+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 14.);
448473
if (((posTrackGamma.tpcNSigmaEl() < photonSelections.photonMinTPCNSigmas) || (posTrackGamma.tpcNSigmaEl() > photonSelections.photonMaxTPCNSigmas)))
449474
return false;
450475

451476
if (((negTrackGamma.tpcNSigmaEl() < photonSelections.photonMinTPCNSigmas) || (negTrackGamma.tpcNSigmaEl() > photonSelections.photonMaxTPCNSigmas)))
452477
return false;
478+
479+
histos.fill(HIST("PhotonSel/hSelectionStatistics"), 15.);
453480
}
454481

455482
return true;
456483
}
457484

458485
//_______________________________________________
459-
// Process K0Short candidate (data only, no QA fills)
486+
// Process K0Short candidate
460487
template <typename TV0Object, typename TCollision>
461488
bool processKShortCandidate(TV0Object const& kshort, TCollision const& collision)
462489
{
@@ -470,54 +497,75 @@ struct k892hadronphotonBkg {
470497

471498
} else {
472499
// KShort basic selection criteria:
500+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 1.);
473501
if ((TMath::Abs(kshort.mK0Short() - o2::constants::physics::MassK0Short) > kshortSelections.kshortWindow) && kshortSelections.kshortWindow > 0)
474502
return false;
475503

504+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 2.);
476505
if ((kshort.yK0Short() < kshortSelections.kshortMinRapidity) || (kshort.yK0Short() > kshortSelections.kshortMaxRapidity))
477506
return false;
478507

508+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 3.);
479509
if ((kshort.negativeeta() < kshortSelections.kshortDauEtaMin) || (kshort.negativeeta() > kshortSelections.kshortDauEtaMax))
480510
return false;
481511

512+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 4.);
482513
if ((kshort.positiveeta() < kshortSelections.kshortDauEtaMin) || (kshort.positiveeta() > kshortSelections.kshortDauEtaMax))
483514
return false;
484515

516+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 5.);
485517
if ((TMath::Abs(kshort.dcapostopv()) < kshortSelections.kshortMinDCAPosToPv) || (TMath::Abs(kshort.dcanegtopv()) < kshortSelections.kshortMinDCANegToPv))
486518
return false;
487519

520+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 6.);
488521
if ((kshort.v0radius() < kshortSelections.kshortMinv0radius) || (kshort.v0radius() > kshortSelections.kshortMaxv0radius))
489522
return false;
490523

524+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 7.);
491525
if ((kshort.z() < kshortSelections.kshortMinZ) || (kshort.z() > kshortSelections.kshortMaxZ))
492526
return false;
493527

528+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 8.);
494529
if (TMath::Abs(kshort.dcaV0daughters()) > kshortSelections.kshortMaxDCAV0Dau)
495530
return false;
496531

532+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 9.);
497533
if (kshort.qtarm() < kshortSelections.kshortArmenterosCoefficient * TMath::Abs(kshort.alpha()))
498534
return false;
499535

536+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 10.);
500537
if (kshort.v0cosPA() < kshortSelections.kshortMinv0cospa)
501538
return false;
502539

503540
auto posTrackKShort = kshort.template posTrackExtra_as<dauTracks>();
504541
auto negTrackKShort = kshort.template negTrackExtra_as<dauTracks>();
505542

543+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 11.);
506544
if ((posTrackKShort.tpcCrossedRows() < kshortSelections.kshortMinTPCCrossedRows) || (negTrackKShort.tpcCrossedRows() < kshortSelections.kshortMinTPCCrossedRows))
507545
return false;
508546

509547
// MinITSCls
510548
bool posIsFromAfterburner = posTrackKShort.itsChi2PerNcl() < 0;
511549
bool negIsFromAfterburner = negTrackKShort.itsChi2PerNcl() < 0;
512550

551+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 12.);
513552
if (posTrackKShort.itsNCls() < kshortSelections.kshortMinITSclusters && (!kshortSelections.kshortRejectPosITSafterburner || posIsFromAfterburner))
514553
return false;
515554
if (negTrackKShort.itsNCls() < kshortSelections.kshortMinITSclusters && (!kshortSelections.kshortRejectNegITSafterburner || negIsFromAfterburner))
516555
return false;
517556

557+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 13.);
518558
float fKShortLifeTime = kshort.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short;
519559
if (fKShortLifeTime > kshortSelections.kshortMaxLifeTime)
520560
return false;
561+
562+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 14.);
563+
// TPC PID selection on the K0S pion daughters (same convention as posTrackKShort.tpcNSigmaPi())
564+
if (((TMath::Abs(posTrackKShort.tpcNSigmaPi()) > kshortSelections.kshortMaxTPCNSigmas) ||
565+
(TMath::Abs(negTrackKShort.tpcNSigmaPi()) > kshortSelections.kshortMaxTPCNSigmas)))
566+
return false;
567+
568+
histos.fill(HIST("KShortSel/hSelectionStatistics"), 15.);
521569
}
522570
return true;
523571
}

0 commit comments

Comments
 (0)