5454#include " DataFormatsParameters/GRPMagField.h"
5555#include " CCDB/BasicCCDBManager.h"
5656#include " PWGLF/DataModel/LFStrangenessTables.h"
57+ #include " Common/DataModel/PIDResponseITS.h"
5758
5859using namespace o2 ;
5960using 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
0 commit comments