Skip to content

Commit 00f91f2

Browse files
authored
[PWGLF] Add ITS PID in resonance flow task (#9430)
1 parent 6e4f2de commit 00f91f2

File tree

3 files changed

+40
-76
lines changed

3 files changed

+40
-76
lines changed

PWGLF/TableProducer/Common/epvector.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct epvector {
114114

115115
void init(o2::framework::InitContext&)
116116
{
117-
std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
117+
std::vector<double> occupancyBinning = {-0.5, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
118118

119119
const AxisSpec centAxis{configAxisCentrality, "V0M (%)"};
120120
// AxisSpec centAxis = {8, 0, 80, "V0M (%)"};

PWGLF/Tasks/Resonances/highmasslambda.cxx

Lines changed: 21 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "DataFormatsParameters/GRPMagField.h"
5555
#include "CCDB/BasicCCDBManager.h"
5656
#include "PWGLF/DataModel/LFStrangenessTables.h"
57+
#include "Common/DataModel/PIDResponseITS.h"
5758

5859
using namespace o2;
5960
using namespace o2::framework;
@@ -66,7 +67,6 @@ struct highmasslambda {
6667
float d_bz;
6768
Service<o2::ccdb::BasicCCDBManager> ccdb;
6869
Service<o2::framework::O2DatabasePDG> pdg;
69-
7070
// CCDB options
7171
// Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
7272
// Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
@@ -92,7 +92,7 @@ struct highmasslambda {
9292
Configurable<bool> rejectPID{"rejectPID", true, "pion, kaon, electron rejection"};
9393
Configurable<float> cfgCutTOFBeta{"cfgCutTOFBeta", 0.0, "cut TOF beta"};
9494
Configurable<bool> ispTdifferentialDCA{"ispTdifferentialDCA", true, "is pT differential DCA"};
95-
Configurable<bool> isPVContributor{"isPVContributor", true, "is PV contributor"};
95+
Configurable<bool> useGlobalTrack{"useGlobalTrack", true, "use global track"};
9696
Configurable<float> confMinRot{"confMinRot", 5.0 * TMath::Pi() / 6.0, "Minimum of rotation"};
9797
Configurable<float> confMaxRot{"confMaxRot", 7.0 * TMath::Pi() / 6.0, "Maximum of rotation"};
9898
Configurable<float> confRapidity{"confRapidity", 0.8, "cut on Rapidity"};
@@ -172,7 +172,7 @@ struct highmasslambda {
172172

173173
void init(o2::framework::InitContext&)
174174
{
175-
std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
175+
std::vector<double> occupancyBinning = {-0.5, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
176176
// std::vector<double> dcaBinning = {0.0, 0.0005, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.012, 0.014, 0.016, 0.02, 0.03, 0.05, 0.1, 0.5, 1.0};
177177
std::vector<double> dcaBinning = {0.0, 0.0005, 0.001, 0.0012, 0.0014, 0.0016, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.008, 0.01, 0.015, 0.02, 0.04, 0.05, 0.06, 0.08, 0.1, 0.3, 1.0};
178178
std::vector<double> ptProtonBinning = {0.2, 0.3, 0.5, 0.6, 0.8, 1.2, 1.4, 1.6, 2.0, 3.0, 4.0, 6.0};
@@ -270,10 +270,10 @@ struct highmasslambda {
270270
template <typename T>
271271
bool selectionTrack(const T& candidate)
272272
{
273-
if (isPVContributor && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster && candidate.itsNClsInnerBarrel() >= 1)) {
273+
if (useGlobalTrack && !(candidate.isGlobalTrackWoDCA() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) {
274274
return false;
275275
}
276-
if (!isPVContributor && !(candidate.isGlobalTrackWoDCA() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster && candidate.itsNClsInnerBarrel() >= 1)) {
276+
if (!useGlobalTrack && !(candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) {
277277
return false;
278278
}
279279

@@ -386,82 +386,36 @@ struct highmasslambda {
386386
return true;
387387
}
388388

389-
// TPC TOF
389+
// TOF Veto
390390
template <typename T>
391391
bool selectionPID1(const T& candidate)
392392
{
393-
if (candidate.tpcInnerParam() < 0.85 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
394-
return true;
395-
}
396-
if (candidate.tpcInnerParam() >= 0.85) {
397-
if (candidate.hasTOF()) {
398-
if (candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
399-
return true;
400-
}
393+
if (candidate.hasTOF()) {
394+
if (candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -nsigmaCutTPC && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
395+
return true;
401396
}
402-
if (!candidate.hasTOF()) {
403-
if (candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
404-
return true;
405-
}
397+
}
398+
if (!candidate.hasTOF()) {
399+
if (candidate.tpcNSigmaPr() > -nsigmaCutTPC && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
400+
return true;
406401
}
407402
}
408403
return false;
409404
}
410405

411-
// TOF Veto
406+
// TPC TOF
412407
template <typename T>
413408
bool selectionPID2(const T& candidate)
414409
{
415-
if (candidate.tpcInnerParam() < 0.85 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
410+
if (candidate.tpcInnerParam() < 1.0 && candidate.tpcNSigmaPr() > -nsigmaCutTPC && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
416411
return true;
417412
}
418-
if (candidate.tpcInnerParam() >= 0.85 && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
413+
if (candidate.tpcInnerParam() >= 1.0 && candidate.tpcInnerParam() < 2.0 && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -nsigmaCutTPC && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
419414
return true;
420415
}
421-
return false;
422-
}
423-
424-
// TOF veto loose
425-
template <typename T>
426-
bool selectionPID3(const T& candidate)
427-
{
428-
if (candidate.tpcInnerParam() < 0.85 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
416+
if (candidate.tpcInnerParam() >= 2.0 && candidate.tpcNSigmaPr() > -nsigmaCutTPC && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
429417
return true;
430418
}
431-
if (candidate.tpcInnerParam() >= 0.85) {
432-
if (candidate.hasTOF()) {
433-
if (candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
434-
return true;
435-
}
436-
}
437-
if (!candidate.hasTOF()) {
438-
if (candidate.tpcInnerParam() < 1.5 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
439-
return true;
440-
}
441-
}
442-
}
443-
return false;
444-
}
445-
446-
// TOF veto very loose
447-
template <typename T>
448-
bool selectionPID4(const T& candidate)
449-
{
450-
if (candidate.tpcInnerParam() < 0.85 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
451-
return true;
452-
}
453-
if (candidate.tpcInnerParam() >= 0.85) {
454-
if (candidate.hasTOF()) {
455-
if (candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
456-
return true;
457-
}
458-
}
459-
if (!candidate.hasTOF()) {
460-
if (candidate.tpcInnerParam() < 1.8 && candidate.tpcNSigmaPr() > -2.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
461-
return true;
462-
}
463-
}
464-
}
465419
return false;
466420
}
467421

@@ -564,6 +518,7 @@ struct highmasslambda {
564518
if (!collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
565519
return;
566520
}
521+
o2::aod::ITSResponse itsResponse;
567522
auto centrality = collision.centFT0C();
568523
auto multTPC = collision.multNTracksPV();
569524
histos.fill(HIST("hFTOCvsTPCNoCut"), centrality, multTPC);
@@ -611,13 +566,9 @@ struct highmasslambda {
611566
if (PIDstrategy == 1 && !selectionPID2(track1)) {
612567
continue;
613568
}
614-
if (PIDstrategy == 2 && !selectionPID3(track1)) {
569+
if (track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < 2.5)) {
615570
continue;
616571
}
617-
if (PIDstrategy == 3 && !selectionPID4(track1)) {
618-
continue;
619-
}
620-
621572
if (track1.hasTOF()) {
622573
histos.fill(HIST("hNsigmaProtonTOFPre"), track1.tofNSigmaPr(), track1.pt());
623574
}
@@ -774,6 +725,7 @@ struct highmasslambda {
774725
if (!collision2.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
775726
continue;
776727
}
728+
o2::aod::ITSResponse itsResponse;
777729
auto centrality = collision1.centFT0C();
778730
auto psiFT0C = collision1.psiFT0C();
779731
auto QFT0C = collision1.qFT0C();
@@ -797,10 +749,7 @@ struct highmasslambda {
797749
if (PIDstrategy == 1 && !selectionPID2(track1)) {
798750
continue;
799751
}
800-
if (PIDstrategy == 2 && !selectionPID3(track1)) {
801-
continue;
802-
}
803-
if (PIDstrategy == 3 && !selectionPID4(track1)) {
752+
if (track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < 2.5)) {
804753
continue;
805754
}
806755

PWGLF/Tasks/Resonances/phipbpb.cxx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "DataFormatsParameters/GRPObject.h"
5555
#include "DataFormatsParameters/GRPMagField.h"
5656
#include "CCDB/BasicCCDBManager.h"
57+
#include "Common/DataModel/PIDResponseITS.h"
5758

5859
using namespace o2;
5960
using namespace o2::framework;
@@ -145,7 +146,7 @@ struct phipbpb {
145146
void init(o2::framework::InitContext&)
146147
{
147148
// std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 3000.0, 6000.0, 50000.0};
148-
std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
149+
std::vector<double> occupancyBinning = {-0.5, 500.0, 1000.0, 1500.0, 2000.0, 3000.0, 4000.0, 5000.0, 50000.0};
149150
const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"};
150151
const AxisSpec thnAxisPt{configThnAxisPt, "#it{p}_{T} (GeV/#it{c})"};
151152
const AxisSpec thnAxisCosThetaStar{configThnAxisCosThetaStar, "cos(#vartheta_{OP})"};
@@ -269,7 +270,7 @@ struct phipbpb {
269270
if (useGlobalTrack && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) {
270271
return false;
271272
}
272-
if (!useGlobalTrack && !(candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster)) {
273+
if (!useGlobalTrack && !(candidate.tpcNClsFound() > cfgTPCcluster)) {
273274
return false;
274275
}
275276
return true;
@@ -354,7 +355,7 @@ struct phipbpb {
354355
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for bin"};
355356
ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {20, 0, 100}, "multiplicity percentile for bin"};
356357
ConfigurableAxis axisEPAngle{"axisEPAngle", {6, -TMath::Pi() / 2, TMath::Pi() / 2}, "event plane angle"};
357-
ConfigurableAxis axisOccup{"axisOccup", {20, 0.0, 40000.0}, "occupancy axis"};
358+
ConfigurableAxis axisOccup{"axisOccup", {20, -0.5, 40000.0}, "occupancy axis"};
358359

359360
using BinningTypeVertexContributor = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0C, o2::aod::evsel::NumTracksInTimeRange>;
360361
ROOT::Math::PxPyPzMVector PhiMesonMother, KaonPlus, KaonMinus, fourVecDauCM;
@@ -381,6 +382,7 @@ struct phipbpb {
381382
auto QTPCR = collision.qTPCR();
382383
auto QTPCL = collision.qTPCL();
383384
int occupancy = collision.trackOccupancyInTimeRange();
385+
o2::aod::ITSResponse itsResponse;
384386
if (occupancy > cfgCutOccupancy) {
385387
return;
386388
}
@@ -427,6 +429,9 @@ struct phipbpb {
427429
if (!ispTdepPID && !selectionPID(track1)) {
428430
continue;
429431
}
432+
if (useGlobalTrack && track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) < 2.5)) {
433+
continue;
434+
}
430435
histos.fill(HIST("hTPCglobalmomcorr"), track1.p() / track1.sign(), track1.p() - track1.tpcInnerParam(), centrality);
431436
histos.fill(HIST("hEta"), track1.eta());
432437
histos.fill(HIST("hDcaxy"), track1.dcaXY());
@@ -462,6 +467,9 @@ struct phipbpb {
462467
if (removefaketrak && isFakeKaon(track2)) {
463468
continue;
464469
}
470+
if (useGlobalTrack && track2.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) < 2.5)) {
471+
continue;
472+
}
465473
KaonPlus = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa);
466474
KaonMinus = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa);
467475
PhiMesonMother = KaonPlus + KaonMinus;
@@ -511,6 +519,7 @@ struct phipbpb {
511519
if (collision1.bcId() == collision2.bcId()) {
512520
continue;
513521
}
522+
o2::aod::ITSResponse itsResponse;
514523
int occupancy1 = collision1.trackOccupancyInTimeRange();
515524
int occupancy2 = collision2.trackOccupancyInTimeRange();
516525
if (occupancy1 > cfgCutOccupancy) {
@@ -539,6 +548,12 @@ struct phipbpb {
539548
if (track1.sign() * track2.sign() > 0) {
540549
continue;
541550
}
551+
if (useGlobalTrack && track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) < 2.5)) {
552+
continue;
553+
}
554+
if (useGlobalTrack && track2.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) > -2.5 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) < 2.5)) {
555+
continue;
556+
}
542557
if (!selectionTrack(track1) || !selectionTrack(track2)) {
543558
continue;
544559
}

0 commit comments

Comments
 (0)