@@ -35,6 +35,7 @@ struct perfK0sResolution {
3535 ConfigurableAxis mBins {" mBins" , {200 , 0 .4f , 0 .6f }, " Mass binning" };
3636 ConfigurableAxis pTBins{" pTBins" , {200 , 0 .f , 10 .f }, " pT binning" };
3737 ConfigurableAxis pTResBins{" pTResBins" , {200 , -1 .2f , 1 .2f }, " pT resolution binning" };
38+ ConfigurableAxis invpTResBins{" invpTResBins" , {200 , -1 .2f , 1 .2f }, " inv pT resolution binning" };
3839 ConfigurableAxis etaBins{" etaBins" , {2 , -1 .f , 1 .f }, " eta binning" };
3940 ConfigurableAxis etaBinsDauthers{" etaBinsDauthers" , {2 , -1 .f , 1 .f }, " eta binning" };
4041 ConfigurableAxis phiBins{" phiBins" , {4 , 0 .f , 6 .28f }, " phi binning" };
@@ -46,10 +47,12 @@ struct perfK0sResolution {
4647 const AxisSpec mAxis {mBins , " #it{m} (GeV/#it{c}^{2})" };
4748 const AxisSpec pTAxis{pTBins, " #it{p}_{T} (GeV/#it{c})" };
4849 const AxisSpec pTResAxis{pTResBins, " #Delta#it{p}_{T} (GeV/#it{c})" };
50+ const AxisSpec invpTResAxis{pTResBins, " #Delta#it{p}_{T} (GeV/#it{c})" };
4951 const AxisSpec etaAxis{etaBins, " #eta" };
5052 const AxisSpec etaAxisPosD{etaBinsDauthers, " #eta pos." };
5153 const AxisSpec etaAxisNegD{etaBinsDauthers, " #eta neg." };
5254 const AxisSpec phiAxis{phiBins, " #phi" };
55+ const AxisSpec trueK0Axis{2 , -0.5 , 1.5 , " True K0" };
5356
5457 int nProc = 0 ;
5558 if (doprocessData) {
@@ -70,7 +73,7 @@ struct perfK0sResolution {
7073 rK0sResolution.add (" h2_massphi" , " h2_massphi" , {HistType::kTH2F , {mAxis , phiAxis}});
7174 if (useMultidimHisto) {
7275 if (doprocessMC) {
73- rK0sResolution.add (" thn_mass" , " thn_mass" , kTHnSparseF , {mAxis , pTAxis, etaAxis, phiAxis, etaAxisPosD, etaAxisNegD, pTResAxis, pTResAxis });
76+ rK0sResolution.add (" thn_mass" , " thn_mass" , kTHnSparseF , {mAxis , pTAxis, etaAxis, phiAxis, etaAxisPosD, etaAxisNegD, invpTResAxis, invpTResAxis, trueK0Axis });
7477 } else {
7578 rK0sResolution.add (" thn_mass" , " thn_mass" , kTHnSparseF , {mAxis , pTAxis, etaAxis, phiAxis, etaAxisPosD, etaAxisNegD});
7679 }
@@ -220,7 +223,8 @@ struct perfK0sResolution {
220223 }
221224 PROCESS_SWITCH (perfK0sResolution, processData, " Process data" , true );
222225
223- void processMC (soa::Filtered<SelectedCollisions>::iterator const & collision, soa::Filtered<aod::V0Datas> const & fullV0s, soa::Join<PIDTracks, aod::McTrackLabels> const & tracks, aod::McParticles const &)
226+ void processMC (soa::Filtered<SelectedCollisions>::iterator const & collision, soa::Filtered<soa::Join<aod::V0Datas, aod::McV0Labels>> const & fullV0s,
227+ soa::Join<PIDTracks, aod::McTrackLabels> const & tracks, aod::McParticles const &)
224228 {
225229 for (auto & v0 : fullV0s) {
226230 const auto & posTrack = v0.posTrack_as <soa::Join<PIDTracks, aod::McTrackLabels>>();
@@ -236,16 +240,17 @@ struct perfK0sResolution {
236240 if (posTrack.mcParticle ().pdgCode () != 211 || negTrack.mcParticle ().pdgCode () != -211 ) {
237241 continue ;
238242 }
239-
240- rK0sResolution.fill (HIST (" h2_massPosPtRes" ), v0.mK0Short (), posTrack. pt () - posTrack.mcParticle ().pt ());
241- rK0sResolution.fill (HIST (" h2_massNegPtRes" ), v0.mK0Short (), negTrack. pt () - negTrack.mcParticle ().pt ());
243+ const bool isTrueK0s = (v0. has_mcParticle () && v0. mcParticle (). pdgCode () == 310 );
244+ rK0sResolution.fill (HIST (" h2_massPosPtRes" ), v0.mK0Short (), v0. PositivePt () - posTrack.mcParticle ().pt ());
245+ rK0sResolution.fill (HIST (" h2_massNegPtRes" ), v0.mK0Short (), v0. NegativePt () - negTrack.mcParticle ().pt ());
242246 rK0sResolution.fill (HIST (" h2_masspT" ), v0.mK0Short (), v0.pt ());
243247 rK0sResolution.fill (HIST (" h2_masseta" ), v0.mK0Short (), v0.eta ());
244248 rK0sResolution.fill (HIST (" h2_massphi" ), v0.mK0Short (), v0.phi ());
245249 if (useMultidimHisto) {
246250 rK0sResolution.fill (HIST (" thn_mass" ), v0.mK0Short (), v0.pt (), v0.eta (), v0.phi (), posTrack.eta (), negTrack.eta (),
247- posTrack.pt () - posTrack.mcParticle ().pt (),
248- negTrack.pt () - negTrack.mcParticle ().pt ());
251+ 1 ./v0.PositivePt () - 1 ./posTrack.mcParticle ().pt (),
252+ 1 ./v0.NegativePt () - 1 ./negTrack.mcParticle ().pt (),
253+ isTrueK0s);
249254 }
250255 }
251256 }
0 commit comments