@@ -138,7 +138,15 @@ struct TaskD0MC {
138138 {" hPtvsYRecSigNonPrompt_RecoHFFlag" , " 2-prong candidates (RecoHFFlag - matched, non-prompt);#it{p}_{T}^{rec.}; #it{y}" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {100 , -2 ., 2 .}}}},
139139 {" hPtvsYGen" , " 2-prong candidates (matched);#it{p}_{T}^{gen.}; #it{y}" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {100 , -2 ., 2 .}}}},
140140 {" hPtvsYGenPrompt" , " 2-prong candidates (matched, prompt);#it{p}_{T}^{gen.}; #it{y}" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {100 , -2 ., 2 .}}}},
141- {" hPtvsYGenNonPrompt" , " 2-prong candidates (matched, non-prompt);#it{p}_{T}^{gen.}; #it{y}" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {100 , -2 ., 2 .}}}}}};
141+ {" hPtvsYGenNonPrompt" , " 2-prong candidates (matched, non-prompt);#it{p}_{T}^{gen.}; #it{y}" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {100 , -2 ., 2 .}}}},
142+ {" hMassSigD0" , " 2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
143+ {" hMassBkgD0" , " 2-prong candidates (checked);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
144+ {" hMassReflBkgD0" , " 2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
145+ {" hMassSigBkgD0" , " 2-prong candidates (not checked);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
146+ {" hMassSigD0bar" , " 2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
147+ {" hMassBkgD0bar" , " 2-prong candidates (checked);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
148+ {" hMassReflBkgD0bar" , " 2-prong candidates (matched);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}},
149+ {" hMassSigBkgD0bar" , " 2-prong candidates (not checked);#it{m}_{inv} (GeV/#it{c}^{2}); #it{p}_{T}; #it{y}" , {HistType::kTH3F , {{120 , 1.5848 , 2.1848 }, {500 , 0 ., 50 .}, {500 , -5 ., 5 .}}}}}};
142150
143151 Configurable<int > d_selectionFlagD0{" d_selectionFlagD0" , 1 , " Selection Flag for D0" };
144152 Configurable<int > d_selectionFlagD0bar{" d_selectionFlagD0bar" , 1 , " Selection Flag for D0bar" };
@@ -220,6 +228,32 @@ struct TaskD0MC {
220228 registry.fill (HIST (" hCPARecBg" ), candidate.cpa ());
221229 registry.fill (HIST (" hEtaRecBg" ), candidate.eta ());
222230 }
231+ auto massD0 = InvMassD0 (candidate);
232+ auto massD0bar = InvMassD0bar (candidate);
233+ auto ptCandidate = candidate.pt ();
234+ auto rapidityCandidate = YD0 (candidate);
235+ if (candidate.isSelD0 () >= d_selectionFlagD0) {
236+ registry.fill (HIST (" hMassSigBkgD0" ), massD0, ptCandidate, rapidityCandidate);
237+ if (candidate.flagMCMatchRec () == (1 << DecayType::D0ToPiK)) {
238+ registry.fill (HIST (" hMassSigD0" ), massD0, ptCandidate, rapidityCandidate);
239+ } else {
240+ registry.fill (HIST (" hMassBkgD0" ), massD0, ptCandidate, rapidityCandidate);
241+ if (candidate.flagMCMatchRec () == -(1 << DecayType::D0ToPiK)) {
242+ registry.fill (HIST (" hMassReflBkgD0" ), massD0, ptCandidate, rapidityCandidate);
243+ }
244+ }
245+ }
246+ if (candidate.isSelD0bar () >= d_selectionFlagD0) {
247+ registry.fill (HIST (" hMassSigBkgD0bar" ), massD0bar, ptCandidate, rapidityCandidate);
248+ if (candidate.flagMCMatchRec () == -(1 << DecayType::D0ToPiK)) {
249+ registry.fill (HIST (" hMassSigD0bar" ), massD0bar, ptCandidate, rapidityCandidate);
250+ } else {
251+ registry.fill (HIST (" hMassBkgD0bar" ), massD0bar, ptCandidate, rapidityCandidate);
252+ if (candidate.flagMCMatchRec () == (1 << DecayType::D0ToPiK)) {
253+ registry.fill (HIST (" hMassReflBkgD0bar" ), massD0bar, ptCandidate, rapidityCandidate);
254+ }
255+ }
256+ }
223257 }
224258 // MC gen.
225259 // Printf("MC Particles: %d", particlesMC.size());
0 commit comments