2323#include " Common/DataModel/Centrality.h"
2424#include " Common/DataModel/EventSelection.h"
2525#include " Common/DataModel/Multiplicity.h"
26- #include " Common/DataModel/PIDResponseTOF.h"
27- #include " Common/DataModel/PIDResponseTPC.h"
26+ #include " Common/DataModel/PIDResponse.h"
2827#include " Common/DataModel/Qvectors.h"
2928#include " Common/DataModel/TrackSelectionTables.h"
3029
@@ -151,7 +150,7 @@ struct Chk892Flow {
151150 ConfigurableAxis cfgBinsCent{" cfgBinsCent" , {VARIABLE_WIDTH, 0.0 , 1.0 , 5.0 , 10.0 , 20.0 , 30.0 , 40.0 , 50.0 , 60.0 , 70.0 , 80.0 , 90.0 , 100.0 , 110.0 }, " Binning of the centrality axis" };
152151 ConfigurableAxis cfgBinsVtxZ{" cfgBinsVtxZ" , {VARIABLE_WIDTH, -10.0 , -9.0 , -8.0 , -7.0 , -6.0 , -5.0 , -4.0 , -3.0 , -2.0 , -1.0 , 0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 }, " Binning of the z-vertex axis" };
153152 ConfigurableAxis binsImpactPar{" binsImpactPar" , {VARIABLE_WIDTH, 0.0 , 3.00065 , 4.28798 , 6.14552 , 7.6196 , 8.90942 , 10.0897 , 11.2002 , 12.2709 , 13.3167 , 14.4173 , 23.2518 }, " Binning of the impact parameter axis" };
154- ConfigurableAxis cfgBinsOccu{" cfgBinsOccu" , {VARIABLE_WIDTH, 0 , 500 , 1000 , 2500 , 9999 }, " Binning of the occupancy axis" };
153+ ConfigurableAxis cfgBinsOccu{" cfgBinsOccu" , {VARIABLE_WIDTH, 0 , 500 , 1000 , 2500 , 10000 , 999999 }, " Binning of the occupancy axis" };
155154 Configurable<int > cNbinsDiv{" cNbinsDiv" , 1 , " Integer to divide the number of bins" };
156155 Configurable<int > cNbinsDivQA{" cNbinsDivQA" , 1 , " Integer to divide the number of bins for QA" };
157156 ConfigurableAxis cfgAxisV2{" cfgAxisV2" , {200 , -1 , 1 }, " Binning of the v2 axis (+-1 for EP method)" };
@@ -164,6 +163,7 @@ struct Chk892Flow {
164163 Configurable<int > cfgCentEst{" cfgCentEst" , 1 , " Centrality estimator, 1: FT0C, 2: FT0M" };
165164 Configurable<bool > cfgFillAdditionalAxis{" cfgFillAdditionalAxis" , false , " Fill additional axis" };
166165 Configurable<bool > cfgUseScalProduct{" cfgUseScalProduct" , false , " Use scalar product method" };
166+ Configurable<bool > cfgFillOccupancy{" cfgFillOccupancy" , false , " Fill Occupancy" };
167167 } AnalysisConfig;
168168
169169 // Event cuts
@@ -199,11 +199,12 @@ struct Chk892Flow {
199199 Configurable<float > cfgMaxTOFnSigmaPion{" cfgMaxTOFnSigmaPion" , 3.0 , " TOF nSigma cut for Pion" }; // TOF
200200 Configurable<float > cfgNsigmaCutCombinedPion{" cfgNsigmaCutCombinedPion" , -999 , " Combined nSigma cut for Pion" }; // Combined
201201 Configurable<bool > cfgTOFVeto{" cfgTOFVeto" , true , " TOF Veto, if false, TOF is nessessary for PID selection" }; // TOF Veto
202+ Configurable<float > cfgTOFMinPt{" cfgTOFMinPt" , 0.6 , " Minimum TOF pT cut for Pion" }; // TOF pT cut
202203 } PIDCuts;
203204
204205 // Track selections
205206 struct : ConfigurableGroup {
206- Configurable<float > cfgMinPtcut{" cfgMinPtcut" , 0.6 , " Track minium pt cut" };
207+ Configurable<float > cfgMinPtcut{" cfgMinPtcut" , 0.15 , " Track minium pt cut" };
207208 Configurable<float > cfgMaxEtacut{" cfgMaxEtacut" , 0.8 , " Track maximum eta cut" };
208209 Configurable<bool > cfgPrimaryTrack{" cfgPrimaryTrack" , true , " Primary track selection" }; // kGoldenChi2 | kDCAxy | kDCAz
209210 Configurable<bool > cfgGlobalWoDCATrack{" cfgGlobalWoDCATrack" , true , " Global track selection without DCA" }; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange)
@@ -230,7 +231,7 @@ struct Chk892Flow {
230231 Configurable<bool > cfgReturnFlag{" cfgReturnFlag" , false , " Return Flag for debugging" };
231232 Configurable<bool > cfgSecondaryRequire{" cfgSecondaryRequire" , true , " Secondary cuts on/off" };
232233 Configurable<bool > cfgSecondaryArmenterosCut{" cfgSecondaryArmenterosCut" , true , " cut on Armenteros-Podolanski graph" };
233- Configurable<bool > cfgSecondaryCrossMassHypothesisCut{" cfgSecondaryCrossMassHypothesisCut" , true , " Apply cut based on the lambda mass hypothesis" };
234+ Configurable<bool > cfgSecondaryCrossMassHypothesisCut{" cfgSecondaryCrossMassHypothesisCut" , false , " Apply cut based on the lambda mass hypothesis" };
234235
235236 Configurable<bool > cfgByPassDauPIDSelection{" cfgByPassDauPIDSelection" , true , " Bypass Daughters PID selection" };
236237 Configurable<bool > cfgByPassDauRapiditySelection{" cfgByPassDauRapiditySelection" , false , " Bypass Daughters Rapidity selection" };
@@ -437,18 +438,36 @@ struct Chk892Flow {
437438
438439 // Invariant mass nSparse
439440 if (AnalysisConfig.cfgFillAdditionalAxis ) {
440- histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
441- histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, phiAxis, occuAxis});
442- if (doprocessMC) {
443- histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
444- histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
441+ if (AnalysisConfig.cfgFillOccupancy ) {
442+ histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
443+ histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, phiAxis, occuAxis});
444+ if (doprocessMC) {
445+ histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
446+ histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis, occuAxis});
447+ }
448+ } else {
449+ histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis});
450+ histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, phiAxis});
451+ if (doprocessMC) {
452+ histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis});
453+ histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisReso, v2Axis, phiAxis});
454+ }
445455 }
446456 } else {
447- histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, occuAxis});
448- histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, occuAxis});
449- if (doprocessMC) {
450- histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, occuAxis});
451- histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, occuAxis});
457+ if (AnalysisConfig.cfgFillOccupancy ) {
458+ histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, occuAxis});
459+ histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, occuAxis});
460+ if (doprocessMC) {
461+ histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis, occuAxis});
462+ histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis, occuAxis});
463+ }
464+ } else {
465+ histos.add (" hInvmass_Kstar" , " Invariant mass of unlike-sign chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis});
466+ histos.add (" hInvmass_K0s" , " Invariant mass of unlike-sign K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis});
467+ if (doprocessMC) {
468+ histos.add (" hInvmass_Kstar_MC" , " Invariant mass of unlike chK(892)" , HistType::kTHnSparseD , {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis});
469+ histos.add (" hInvmass_K0s_MC" , " Invariant mass of unlike K0s" , HistType::kTHnSparseD , {centAxis, ptAxis, invMassAxisK0s, v2Axis});
470+ }
452471 }
453472 }
454473
@@ -568,24 +587,23 @@ struct Chk892Flow {
568587 template <typename TrackType>
569588 bool selectionPIDPion (TrackType const & candidate)
570589 {
571- bool tpcPIDPassed = std::abs (candidate.tpcNSigmaPi ()) < PIDCuts.cfgMaxTPCnSigmaPion ;
572- bool tofPIDPassed = false ;
573-
574- if (PIDCuts. cfgTPConly ) {
575- return tpcPIDPassed;
576- }
590+ if ( std::abs (candidate.tpcNSigmaPi ()) >= PIDCuts.cfgMaxTPCnSigmaPion )
591+ return false ;
592+ if (PIDCuts. cfgTPConly )
593+ return true ;
594+ if (candidate. pt () <= PIDCuts. cfgTOFMinPt )
595+ return true ;
577596
578597 if (candidate.hasTOF ()) {
579- tofPIDPassed = std::abs (candidate.tofNSigmaPi ()) < PIDCuts.cfgMaxTOFnSigmaPion ||
580- (PIDCuts.cfgNsigmaCutCombinedPion > 0 &&
581- candidate.tpcNSigmaPi () * candidate.tpcNSigmaPi () +
582- candidate.tofNSigmaPi () * candidate.tofNSigmaPi () <
583- PIDCuts.cfgNsigmaCutCombinedPion * PIDCuts.cfgNsigmaCutCombinedPion );
598+ const bool tofPIDPassed = std::abs (candidate.tofNSigmaPi ()) < PIDCuts.cfgMaxTOFnSigmaPion ;
599+ const bool combo = (PIDCuts.cfgNsigmaCutCombinedPion > 0 ) &&
600+ (candidate.tpcNSigmaPi () * candidate.tpcNSigmaPi () +
601+ candidate.tofNSigmaPi () * candidate.tofNSigmaPi () <
602+ PIDCuts.cfgNsigmaCutCombinedPion * PIDCuts.cfgNsigmaCutCombinedPion );
603+ return tofPIDPassed || combo;
584604 } else {
585- tofPIDPassed = PIDCuts.cfgTOFVeto ;
605+ return PIDCuts.cfgTOFVeto ;
586606 }
587-
588- return tpcPIDPassed && tofPIDPassed;
589607 }
590608
591609 template <typename CollisionType, typename K0sType>
@@ -735,6 +753,7 @@ struct Chk892Flow {
735753 void fillHistograms (const CollisionType& collision, const TracksType& dTracks1, const TracksTypeK0s& dTracks2, int nmode)
736754 {
737755 histos.fill (HIST (" QA/before/CentDist" ), lCentrality);
756+ histos.fill (HIST (" QA/before/Occupancy" ), collision.trackOccupancyInTimeRange ());
738757
739758 lQvecDetInd = lDetId * 4 + 3 + (nmode - 2 ) * EventPlaneConfig.cfgNQvec * 4 ;
740759 lQvecRefAInd = lRefAId * 4 + 3 + (nmode - 2 ) * EventPlaneConfig.cfgNQvec * 4 ;
@@ -917,9 +936,17 @@ struct Chk892Flow {
917936
918937 histos.fill (HIST (" QA/after/k0sv2vsinvmass" ), lResoSecondary.M (), v2K0s);
919938 if (AnalysisConfig.cfgFillAdditionalAxis ) {
920- histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s, static_cast <float >(nmode) * lPhiMinusPsiK0s, collision.trackOccupancyInTimeRange ());
939+ if (AnalysisConfig.cfgFillOccupancy ) {
940+ histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s, static_cast <float >(nmode) * lPhiMinusPsiK0s, collision.trackOccupancyInTimeRange ());
941+ } else {
942+ histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s, static_cast <float >(nmode) * lPhiMinusPsiK0s);
943+ }
921944 } else {
922- histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s, collision.trackOccupancyInTimeRange ());
945+ if (AnalysisConfig.cfgFillOccupancy ) {
946+ histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s, collision.trackOccupancyInTimeRange ());
947+ } else {
948+ histos.fill (HIST (" hInvmass_K0s" ), lCentrality, lResoSecondary.Pt (), lResoSecondary.M (), v2K0s);
949+ }
923950 }
924951 }
925952 k0sIndicies.push_back (k0sCand.index ());
@@ -967,9 +994,17 @@ struct Chk892Flow {
967994 histos.fill (HIST (" QA/after/kstarv2vsinvmass" ), lResoKstar.M (), resoFlowValue);
968995 }
969996 if (AnalysisConfig.cfgFillAdditionalAxis ) {
970- histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar, collision.trackOccupancyInTimeRange ());
997+ if (AnalysisConfig.cfgFillOccupancy ) {
998+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar, collision.trackOccupancyInTimeRange ());
999+ } else {
1000+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar);
1001+ }
9711002 } else {
972- histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue, collision.trackOccupancyInTimeRange ());
1003+ if (AnalysisConfig.cfgFillOccupancy ) {
1004+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue, collision.trackOccupancyInTimeRange ());
1005+ } else {
1006+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResoKstar.Pt (), lResoKstar.M (), resoFlowValue);
1007+ }
9731008 }
9741009
9751010 if (BkgEstimationConfig.cfgFillRotBkg ) {
@@ -1001,9 +1036,17 @@ struct Chk892Flow {
10011036 }
10021037 typeKstar = bTrack.sign () > 0 ? BinType::kKstarP_Rot : BinType::kKstarN_Rot ;
10031038 if (AnalysisConfig.cfgFillAdditionalAxis ) {
1004- histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar, collision.trackOccupancyInTimeRange ());
1039+ if (AnalysisConfig.cfgFillOccupancy ) {
1040+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar, collision.trackOccupancyInTimeRange ());
1041+ } else {
1042+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue, static_cast <float >(nmode) * lPhiMinusPsiKstar);
1043+ }
10051044 } else {
1006- histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue, collision.trackOccupancyInTimeRange ());
1045+ if (AnalysisConfig.cfgFillOccupancy ) {
1046+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue, collision.trackOccupancyInTimeRange ());
1047+ } else {
1048+ histos.fill (HIST (" hInvmass_Kstar" ), typeKstar, lCentrality, lResonanceRot.Pt (), lResonanceRot.M (), resoFlowValue);
1049+ }
10071050 }
10081051 }
10091052 }
0 commit comments