@@ -162,13 +162,16 @@ struct Phik0shortanalysis {
162162
163163 // Configurables on phi pT bins
164164 Configurable<std::vector<double >> binspTPhi{" binspTPhi" , {0.4 , 0.8 , 1.4 , 2.0 , 2.8 , 4.0 , 6.0 , 10.0 }, " pT bin limits for Phi" };
165- Configurable<float > minPhiPt{" minPhiPt" , 0 .4f , " Minimum pT for Phi" };
166- Configurable<float > maxPhiPt{" maxPhiPt" , 10 .0f , " Maximum pT for Phi" };
167165
168- // Configurables on phi mass
169- Configurable<int > nBinsMPhi{" nBinsMPhi" , 13 , " N bins in cfgmassPhiaxis" };
170- Configurable<float > lowMPhi{" lowMPhi" , 1 .0095f , " Upper limits on Phi mass for signal extraction" };
171- Configurable<float > upMPhi{" upMPhi" , 1 .029f , " Upper limits on Phi mass for signal extraction" };
166+ // Configurables on phi selection
167+ struct : ConfigurableGroup {
168+ Configurable<int > nBinsMPhi{" nBinsMPhi" , 13 , " N bins in cfgmassPhiaxis" };
169+ Configurable<float > lowMPhi{" lowMPhi" , 1 .0095f , " Upper limits on Phi mass for signal extraction" };
170+ Configurable<float > upMPhi{" upMPhi" , 1 .029f , " Upper limits on Phi mass for signal extraction" };
171+
172+ Configurable<float > minPhiPt{" minPhiPt" , 0 .4f , " Minimum pT for Phi" };
173+ Configurable<float > maxPhiPt{" maxPhiPt" , 10 .0f , " Maximum pT for Phi" };
174+ } phiConfigs;
172175
173176 // Configurables for V0 selection
174177 struct : ConfigurableGroup {
@@ -185,11 +188,10 @@ struct Phik0shortanalysis {
185188 Configurable<float > ctauK0s{" ctauK0s" , 20 .0f , " C tau K0s(cm)" };
186189 Configurable<float > paramArmenterosCut{" paramArmenterosCut" , 0 .2f , " parameter Armenteros Cut" };
187190 Configurable<float > v0rejK0s{" v0rejK0s" , 0 .005f , " V0 rej K0s" };
188- } v0Configs;
189191
190- // Configurables on K0S mass
191- Configurable<float > lowMK0S{ " lowMK0S " , 0 .48f , " Lower limit on K0Short mass" };
192- Configurable< float > upMK0S{ " upMK0S " , 0 . 52f , " Upper limit on K0Short mass " } ;
192+ Configurable< float > lowMK0S{ " lowMK0S " , 0 . 48f , " Lower limit on K0Short mass" };
193+ Configurable<float > upMK0S{ " upMK0S " , 0 .52f , " Upper limit on K0Short mass" };
194+ } v0Configs ;
193195
194196 // Configurable on K0S pT bins
195197 Configurable<std::vector<double >> binspTK0S{" binspTK0S" , {0.1 , 0.5 , 0.8 , 1.2 , 1.6 , 2.0 , 2.5 , 3.0 , 4.0 , 6.0 }, " pT bin limits for K0S" };
@@ -322,7 +324,7 @@ struct Phik0shortanalysis {
322324 {
323325 // Axes
324326 AxisSpec massPhiAxis = {200 , 0 .9f , 1 .2f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
325- AxisSpec sigmassPhiAxis = {nBinsMPhi, lowMPhi, upMPhi, " #it{M}_{inv} [GeV/#it{c}^{2}]" };
327+ AxisSpec sigmassPhiAxis = {phiConfigs. nBinsMPhi , phiConfigs. lowMPhi , phiConfigs. upMPhi , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
326328 AxisSpec massK0SAxis = {200 , 0 .45f , 0 .55f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
327329 AxisSpec nSigmaPiAxis = {100 , -10 .0f , 10 .0f , " N#sigma #pi" };
328330 AxisSpec vertexZAxis = {100 , -cutZVertex, cutZVertex, " vrtx_{Z} [cm]" };
@@ -957,9 +959,9 @@ struct Phik0shortanalysis {
957959 continue ; // condition to avoid double counting of pair
958960
959961 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
960- if (recPhi.Pt () < minPhiPt)
962+ if (recPhi.Pt () < phiConfigs. minPhiPt )
961963 continue ;
962- if (recPhi.M () < lowMPhi || recPhi.M () > upMPhi)
964+ if (recPhi.M () < phiConfigs. lowMPhi || recPhi.M () > phiConfigs. upMPhi )
963965 continue ;
964966 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
965967 continue ;
@@ -1024,7 +1026,7 @@ struct Phik0shortanalysis {
10241026
10251027 if (!isMCMotherPhi)
10261028 continue ;
1027- if (pTMother < minPhiPt || std::abs (yMother) > deltaYConfigs.cfgYAcceptance )
1029+ if (pTMother < phiConfigs. minPhiPt || std::abs (yMother) > deltaYConfigs.cfgYAcceptance )
10281030 continue ;
10291031
10301032 nPhi++;
@@ -1044,7 +1046,7 @@ struct Phik0shortanalysis {
10441046 for (const auto & mcParticle : mcParticles) {
10451047 if (mcParticle.pdgCode () != o2::constants::physics::Pdg::kPhi )
10461048 continue ;
1047- if (mcParticle.pt () < minPhiPt)
1049+ if (mcParticle.pt () < phiConfigs. minPhiPt )
10481050 continue ;
10491051 if (std::abs (mcParticle.y ()) > deltaYConfigs.cfgYAcceptance )
10501052 continue ;
@@ -1295,7 +1297,7 @@ struct Phik0shortanalysis {
12951297 continue ; // condition to avoid double counting of pair
12961298
12971299 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
1298- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
1300+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
12991301 continue ;
13001302 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
13011303 continue ;
@@ -1329,7 +1331,7 @@ struct Phik0shortanalysis {
13291331 dataK0SHist.fill (HIST (" hV0CosPA" ), v0.v0cosPA ());
13301332
13311333 // Filling the PID of the V0 daughters in the region of the K0 peak
1332- if (lowMK0S < v0.mK0Short () && v0.mK0Short () < upMK0S) {
1334+ if (v0Configs. lowMK0S < v0.mK0Short () && v0.mK0Short () < v0Configs. upMK0S ) {
13331335 dataK0SHist.fill (HIST (" hNSigmaPosPionFromK0S" ), posDaughterTrack.tpcInnerParam (), posDaughterTrack.tpcNSigmaPi ());
13341336 dataK0SHist.fill (HIST (" hNSigmaNegPionFromK0S" ), negDaughterTrack.tpcInnerParam (), negDaughterTrack.tpcNSigmaPi ());
13351337 }
@@ -1434,9 +1436,9 @@ struct Phik0shortanalysis {
14341436 continue ; // condition to avoid double counting of pair
14351437
14361438 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
1437- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
1439+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
14381440 continue ;
1439- if (recPhi.M () < lowMPhi || recPhi.M () > upMPhi)
1441+ if (recPhi.M () < phiConfigs. lowMPhi || recPhi.M () > phiConfigs. upMPhi )
14401442 continue ;
14411443 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
14421444 continue ;
@@ -1521,9 +1523,9 @@ struct Phik0shortanalysis {
15211523 continue ; // condition to avoid double counting of pair
15221524
15231525 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
1524- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
1526+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
15251527 continue ;
1526- if (recPhi.M () < lowMPhi || recPhi.M () > upMPhi)
1528+ if (recPhi.M () < phiConfigs. lowMPhi || recPhi.M () > phiConfigs. upMPhi )
15271529 continue ;
15281530 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
15291531 continue ;
@@ -1627,7 +1629,7 @@ struct Phik0shortanalysis {
16271629 continue ;
16281630
16291631 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
1630- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
1632+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
16311633 continue ;
16321634
16331635 mcPhiHist.fill (HIST (" h3PhiRapiditySmearing" ), genmultiplicity, recPhi.Rapidity (), mcMotherPhi.y ());
@@ -1769,7 +1771,7 @@ struct Phik0shortanalysis {
17691771 for (const auto & mcParticle : mcParticlesThisColl) {
17701772 if (mcParticle.pdgCode () != o2::constants::physics::Pdg::kPhi )
17711773 continue ;
1772- if (mcParticle.pt () < minPhiPt || mcParticle.pt () > maxPhiPt)
1774+ if (mcParticle.pt () < phiConfigs. minPhiPt || mcParticle.pt () > phiConfigs. maxPhiPt )
17731775 continue ;
17741776 if (std::abs (mcParticle.y ()) > deltaYConfigs.cfgYAcceptance )
17751777 continue ;
@@ -1847,7 +1849,7 @@ struct Phik0shortanalysis {
18471849 for (const auto & mcParticle : mcParticlesThisColl) {
18481850 if (mcParticle.pdgCode () != o2::constants::physics::Pdg::kPhi )
18491851 continue ;
1850- if (mcParticle.pt () < minPhiPt || mcParticle.pt () > maxPhiPt)
1852+ if (mcParticle.pt () < phiConfigs. minPhiPt || mcParticle.pt () > phiConfigs. maxPhiPt )
18511853 continue ;
18521854 if (std::abs (mcParticle.y ()) > deltaYConfigs.cfgYAcceptance )
18531855 continue ;
@@ -1875,7 +1877,7 @@ struct Phik0shortanalysis {
18751877 for (const auto & mcParticle : mcParticlesThisColl) {
18761878 if (mcParticle.pdgCode () != o2::constants::physics::Pdg::kPhi )
18771879 continue ;
1878- if (mcParticle.pt () < minPhiPt || mcParticle.pt () > maxPhiPt)
1880+ if (mcParticle.pt () < phiConfigs. minPhiPt || mcParticle.pt () > phiConfigs. maxPhiPt )
18791881 continue ;
18801882 if (std::abs (mcParticle.y ()) > deltaYConfigs.cfgYAcceptance )
18811883 continue ;
@@ -1936,7 +1938,7 @@ struct Phik0shortanalysis {
19361938 continue ; // condition to avoid double counting of pair
19371939
19381940 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
1939- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
1941+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
19401942 continue ;
19411943 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
19421944 continue ;
@@ -2112,9 +2114,9 @@ struct Phik0shortanalysis {
21122114 }
21132115
21142116 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
2115- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
2117+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
21162118 continue ;
2117- if (recPhi.M () < lowMPhi || recPhi.M () > upMPhi)
2119+ if (recPhi.M () < phiConfigs. lowMPhi || recPhi.M () > phiConfigs. upMPhi )
21182120 continue ;
21192121 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
21202122 continue ;
@@ -2234,9 +2236,9 @@ struct Phik0shortanalysis {
22342236 }
22352237
22362238 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
2237- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
2239+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
22382240 continue ;
2239- if (recPhi.M () < lowMPhi || recPhi.M () > upMPhi)
2241+ if (recPhi.M () < phiConfigs. lowMPhi || recPhi.M () > phiConfigs. upMPhi )
22402242 continue ;
22412243 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
22422244 continue ;
@@ -2452,7 +2454,7 @@ struct Phik0shortanalysis {
24522454 if (!isPosKaon || !isNegKaon)
24532455 continue ;
24542456 }
2455- if (mcParticle2.pt () < minPhiPt || mcParticle2.pt () > maxPhiPt)
2457+ if (mcParticle2.pt () < phiConfigs. minPhiPt || mcParticle2.pt () > phiConfigs. maxPhiPt )
24562458 continue ;
24572459 if (std::abs (mcParticle2.y ()) > deltaYConfigs.cfgYAcceptance )
24582460 continue ;
@@ -2529,7 +2531,7 @@ struct Phik0shortanalysis {
25292531 if (!isPosKaon || !isNegKaon)
25302532 continue ;
25312533 }
2532- if (mcParticle2.pt () < minPhiPt || mcParticle2.pt () > maxPhiPt)
2534+ if (mcParticle2.pt () < phiConfigs. minPhiPt || mcParticle2.pt () > phiConfigs. maxPhiPt )
25332535 continue ;
25342536 if (std::abs (mcParticle2.y ()) > deltaYConfigs.cfgYAcceptance )
25352537 continue ;
@@ -2649,8 +2651,6 @@ struct Phik0shortanalysis {
26492651
26502652 void processdNdetaWPhiMCGen (MCCollisions::iterator const & mcCollision, soa::SmallGroups<SimCollisions> const & collisions, FilteredMCTracks const & filteredMCTracks, aod::McParticles const & mcParticles)
26512653 {
2652- if (std::abs (mcCollision.posZ ()) > cutZVertex)
2653- return ;
26542654 if (!pwglf::isINELgtNmc (mcParticles, 0 , pdgDB))
26552655 return ;
26562656 if (filterOnMcPhi && !eventHasGenPhi (mcParticles))
@@ -2659,10 +2659,22 @@ struct Phik0shortanalysis {
26592659 uint64_t numberAssocColl = 0 ;
26602660 for (const auto & collision : collisions) {
26612661 if (acceptEventQA<true >(collision, false )) {
2662+ // mcEventHist.fill(HIST("hGenMCRecoMultiplicityPercent"), mcCollision.centFT0M());
2663+ // mcEventHist.fill(HIST("h2GenMCRecoVertexZvsMult"), collision.posZ(), mcCollision.centFT0M());
2664+
2665+ auto filteredMCTracksThisColl = filteredMCTracks.sliceBy (preslices.perColl , collision.globalIndex ());
2666+
2667+ Partition<FilteredMCTracks> posFiltMCTracks = aod::track::signed1Pt > trackConfigs.cfgCutCharge ;
2668+ posFiltMCTracks.bindTable (filteredMCTracksThisColl);
2669+ Partition<FilteredMCTracks> negFiltMCTracks = aod::track::signed1Pt < trackConfigs.cfgCutCharge ;
2670+ negFiltMCTracks.bindTable (filteredMCTracksThisColl);
2671+
2672+ if (!eventHasRecoPhiWPDG (posFiltMCTracks, negFiltMCTracks))
2673+ continue ;
2674+
26622675 mcEventHist.fill (HIST (" hGenMCRecoMultiplicityPercent" ), mcCollision.centFT0M ());
26632676 mcEventHist.fill (HIST (" h2GenMCRecoVertexZvsMult" ), collision.posZ (), mcCollision.centFT0M ());
26642677
2665- auto filteredMCTracksThisColl = filteredMCTracks.sliceBy (preslices.perColl , collision.globalIndex ());
26662678 for (const auto & track : filteredMCTracksThisColl) {
26672679 if (trackConfigs.applyExtraPhiCuts && ((track.phi () > trackConfigs.extraPhiCuts ->at (0 ) && track.phi () < trackConfigs.extraPhiCuts ->at (1 )) ||
26682680 track.phi () <= trackConfigs.extraPhiCuts ->at (2 ) || track.phi () >= trackConfigs.extraPhiCuts ->at (3 )))
@@ -2760,7 +2772,7 @@ struct Phik0shortanalysis {
27602772 continue ; // condition to avoid double counting of pair
27612773
27622774 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
2763- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
2775+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
27642776 continue ;
27652777 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
27662778 continue ;
@@ -2796,7 +2808,7 @@ struct Phik0shortanalysis {
27962808 dataK0SHist.fill (HIST (" hV0CosPA" ), v0.v0cosPA ());
27972809
27982810 // Filling the PID of the V0 daughters in the region of the K0 peak
2799- if (lowMK0S < v0.mK0Short () && v0.mK0Short () < upMK0S) {
2811+ if (v0Configs. lowMK0S < v0.mK0Short () && v0.mK0Short () < v0Configs. upMK0S ) {
28002812 dataK0SHist.fill (HIST (" hNSigmaPosPionFromK0S" ), posDaughterTrack.tpcInnerParam (), posDaughterTrack.tpcNSigmaPi ());
28012813 dataK0SHist.fill (HIST (" hNSigmaNegPionFromK0S" ), negDaughterTrack.tpcInnerParam (), negDaughterTrack.tpcNSigmaPi ());
28022814 }
@@ -2878,7 +2890,7 @@ struct Phik0shortanalysis {
28782890 continue ; // condition to avoid double counting of pair
28792891
28802892 ROOT::Math::PxPyPzMVector recPhi = recMother (track1, track2, massKa, massKa);
2881- if (recPhi.Pt () < minPhiPt || recPhi.Pt () > maxPhiPt)
2893+ if (recPhi.Pt () < phiConfigs. minPhiPt || recPhi.Pt () > phiConfigs. maxPhiPt )
28822894 continue ;
28832895 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
28842896 continue ;
@@ -3023,7 +3035,7 @@ struct Phik0shortanalysis {
30233035
30243036 if (!isMCMotherPhi)
30253037 continue ;
3026- if (pTMother < minPhiPt || std::abs (yMother) > deltaYConfigs.cfgYAcceptance )
3038+ if (pTMother < phiConfigs. minPhiPt || std::abs (yMother) > deltaYConfigs.cfgYAcceptance )
30273039 continue ;
30283040
30293041 mcPhiHist.fill (HIST (" h3PhiMCRecoNewProc" ), genmultiplicity, pTMother, yMother);
@@ -3094,7 +3106,7 @@ struct Phik0shortanalysis {
30943106 continue ;
30953107
30963108 // Phi selection
3097- if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= minPhiPt)
3109+ if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= phiConfigs. minPhiPt )
30983110 mcPhiHist.fill (HIST (" h3PhiMCGenRecoCheckNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
30993111
31003112 // K0S selection
@@ -3130,7 +3142,7 @@ struct Phik0shortanalysis {
31303142 continue ;
31313143
31323144 // Phi selection
3133- if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= minPhiPt)
3145+ if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= phiConfigs. minPhiPt )
31343146 mcPhiHist.fill (HIST (" h3PhiMCGenRecoNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
31353147
31363148 // K0S selection
@@ -3159,7 +3171,7 @@ struct Phik0shortanalysis {
31593171 continue ;
31603172
31613173 // Phi selection
3162- if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= minPhiPt) {
3174+ if (mcParticle.pdgCode () == o2::constants::physics::Pdg::kPhi && mcParticle.pt () >= phiConfigs. minPhiPt ) {
31633175 mcPhiHist.fill (HIST (" h3PhiMCGenNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
31643176 if (numberAssocColl > 0 )
31653177 mcPhiHist.fill (HIST (" h3PhiMCGenAssocRecoNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
@@ -3205,7 +3217,7 @@ struct Phik0shortanalysis {
32053217 continue ;
32063218
32073219 ROOT::Math::PxPyPzMVector recPhi = recMother (posTrack1, negTrack1, massKa, massKa);
3208- if (recPhi.Pt () < minPhiPt)
3220+ if (recPhi.Pt () < phiConfigs. minPhiPt )
32093221 continue ;
32103222 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
32113223 continue ;
@@ -3256,7 +3268,7 @@ struct Phik0shortanalysis {
32563268 continue ;
32573269
32583270 ROOT::Math::PxPyPzMVector recPhi = recMother (posTrack1, negTrack1, massKa, massKa);
3259- if (recPhi.Pt () < minPhiPt)
3271+ if (recPhi.Pt () < phiConfigs. minPhiPt )
32603272 continue ;
32613273 if (std::abs (recPhi.Rapidity ()) > deltaYConfigs.cfgYAcceptance )
32623274 continue ;
0 commit comments