@@ -179,6 +179,8 @@ struct JetHadronRecoil {
179179 registry.add (" hDeltaRpTReference" , " jet p_{T} vs #DeltaR;p_{T,jet};#DeltaR" , {HistType::kTH2F , {{500 , -100 , 400 }, dRAxis}}, doSumw);
180180 registry.add (" hDeltaRpTDPhiReference" , " jet p_{T} vs #DeltaR vs #Delta#phi;p_{T,jet};#Delta#phi;#DeltaR" , {HistType::kTH3F , {{500 , -100 , 400 }, {100 , 0 , o2::constants::math::TwoPI}, dRAxis}}, doSumw);
181181 registry.add (" hDeltaRpTDPhiReferenceShifts" , " testing shifts;p_{T,jet};#Delta#phi;#DeltaR;shifts" , {HistType::kTHnSparseD , {{500 , -100 , 400 }, {100 , 0 , o2::constants::math::TwoPI}, dRAxis, {20 , 0.0 , 2.0 }}}, doSumw);
182+ registry.add (" hPtTrackMatched" , " Track p_{T};p_{T};entries" , {HistType::kTH1F , {{200 , 0 , 200 }}}, doSumw);
183+ registry.add (" hPtTrackMatchedToCollisions" , " Track p_{T};p_{T};entries" , {HistType::kTH1F , {{200 , 0 , 200 }}}, doSumw);
182184 }
183185
184186 if (doprocessMCP || doprocessMCPWeighted || doprocessMCPWeightedWithMatchedTracks) {
@@ -210,7 +212,7 @@ struct JetHadronRecoil {
210212 }
211213
212214 template <typename T, typename U>
213- void fillHistograms (T const & jets, U const & tracks, float weight = 1.0 , float rho = 0.0 , float pTHat = 999.0 )
215+ void fillHistograms (T const & jets, U const & tracks, float weight = 1.0 , float rho = 0.0 , float pTHat = 999.0 , bool isMC = false )
214216 {
215217 bool isSigCol;
216218 std::vector<double > phiTTAr;
@@ -261,6 +263,14 @@ struct JetHadronRecoil {
261263 registry.fill (HIST (" hPhiTrack" ), track.phi (), weight);
262264 registry.fill (HIST (" hTrack3D" ), track.pt (), track.eta (), track.phi (), weight);
263265 registry.fill (HIST (" hPtTrackPtHard" ), track.pt () / pTHat, track.pt (), weight);
266+ if (isMC) {
267+ if (track.has_mcParticle ()) {
268+ registry.fill (HIST (" hPtTrackMatched" ), track.pt (), weight);
269+ auto particle = track.template mcParticle_as <U>();
270+ if (track.collisionId () == particle.collisionId ()) {
271+ registry.fill (HIST (" hPtTrackMatchedToCollisions" ), track.pt (), weight);
272+ }
273+ }
264274 }
265275
266276 if (nTT > 0 ) {
0 commit comments