@@ -50,6 +50,8 @@ struct JetShapeTask {
5050 Configurable<int > nBinsPForBeta{" nBinsPForBeta" , 500 , " Number of pT bins" };
5151 Configurable<int > nBinsTpcDedx{" nBinsTpcDedx" , 500 , " Number of DEdx bins" };
5252 Configurable<int > nBinsTofBeta{" nBinsTofBeta" , 350 , " Number of Beta bins" };
53+ Configurable<float > dcaxyMin{" dcaxyMin" , -1 .0f , " Min value of dcaXY" };
54+ Configurable<float > dcaxyMax{" dcaxyMax" , 1 .0f , " Max value of dcaXY" };
5355 Configurable<float > pMax{" pMax" , 8 .0f , " Max value of p" };
5456 Configurable<float > ptMax{" ptMax" , 6 .0f , " Max value of pT" };
5557 Configurable<float > jetPtMinForCut{" jetPtMinForCut" , 0 .0f , " Minimum value of jet pT cut" };
@@ -58,8 +60,11 @@ struct JetShapeTask {
5860 Configurable<float > centralityMaxForCut{" centralityMaxForCut" , 100 .0f , " Maximum value of the jet pT cut" };
5961 Configurable<float > jetShapeFuncMax{" jetShapeFuncMax" , 300 , " Maximum value of JetShapeFunction" };
6062 Configurable<int > nBinsJetShapeFunc{" nBinsJetShapeFunc" , 900 , " Number of JetShapeFunction bins" };
61- Configurable<int > nBinsP{" nBinsP" , 80 , " Number of p bins" };
62- Configurable<int > nBinsPt{" nBinsPt" , 60 , " Number of pT bins" };
63+ Configurable<int > nBinsDcaxyForData{" nBinsDcaxyForData" , 400 , " Number of DcaXY bins for data" };
64+ Configurable<int > nBinsDcaxyForMc{" nBinsDcaxyForMc" , 400 , " Number of DcaXY bins for mc data" };
65+ Configurable<int > nBinsP{" nBinsP" , 40 , " Number of p bins" };
66+ Configurable<int > nBinsPt{" nBinsPt" , 30 , " Number of pT bins" };
67+ Configurable<int > nBinsPtForDca{" nBinsPtForDca" , 15 , " Number of pT bins for dcaXY" };
6368 Configurable<int > nBinsJetPt{" nBinsJetPt" , 10 , " Number of jet pT bins" };
6469 Configurable<int > nBinsPForCut{" nBinsPForCut" , 30 , " Number of p track bins" };
6570 Configurable<int > nBinsCentrality{" nBinsCentrality" , 10 , " Number of centrality bins" };
@@ -106,6 +111,10 @@ struct JetShapeTask {
106111 {" jetpVsPtForPi" , " jetpVsPtPi" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
107112 {" pVsPtForPrOutOfJet" , " pVsPtForPrOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
108113 {" pVsPtForPiOutOfJet" , " pVsPtPionOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
114+ {" jetDcaPr" , " jetDcaPr" , {HistType::kTHnSparseD , {{nBinsPtForDca, 0 , ptMax}, {nBinsDcaxyForData, dcaxyMin, dcaxyMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
115+ {" jetDcaPi" , " jetDcaPi" , {HistType::kTHnSparseD , {{nBinsPtForDca, 0 , ptMax}, {nBinsDcaxyForData, dcaxyMin, dcaxyMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
116+ {" dcaPrOutOfJet" , " dcaPrOutOfJet" , {HistType::kTHnSparseD , {{nBinsPtForDca, 0 , ptMax}, {nBinsDcaxyForData, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
117+ {" dcaPiOutOfJet" , " dcaPiOutOfJet" , {HistType::kTHnSparseD , {{nBinsPtForDca, 0 , ptMax}, {nBinsDcaxyForData, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
109118 {" jetPt" , " jet pT;#it{p}_{T,jet} (GeV/#it{c});entries" , {HistType::kTH1F , {{200 , 0 ., 200 .}}}},
110119 {" jetEta" , " jet #eta;#eta_{jet};entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}},
111120 {" jetPhi" , " jet #phi;#phi_{jet};entries" , {HistType::kTH1F , {{80 , -1.0 , 7 .}}}},
@@ -118,7 +127,10 @@ struct JetShapeTask {
118127 {" ptSumBg1" , " ptSumBg1" , {HistType::kTHnSparseD , {{14 , 0 , 0.7 }, {nBinsJetShapeFunc, 0 , jetShapeFuncMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
119128 {" ptSumBg2" , " ptSumBg2" , {HistType::kTHnSparseD , {{14 , 0 , 0.7 }, {nBinsJetShapeFunc, 0 , jetShapeFuncMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
120129 {" event/vertexz" , " ;Vtx_{z} (cm);Entries" , {HistType::kTH1F , {{100 , -20 , 20 }}}},
121- {" eventCounter" , " eventCounter" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
130+ {" eventCounterJetShape" , " eventCounterJetShape" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
131+ {" eventCounterJet" , " eventCounterJet" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
132+ {" eventCounterInc" , " eventCounterInc" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
133+ {" eventCounterMc" , " eventCounterMc" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
122134 {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}},
123135 {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
124136 {" mcCentralityReco" , " mcCentralityReco" , {HistType::kTH1F , {{100 , 0 , 100 }}}},
@@ -129,6 +141,10 @@ struct JetShapeTask {
129141 {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
130142 {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
131143 {" ptHistogramProtonTof" , " ptHistogramProtonTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
144+ {" dcaDecayPion" , " dcaDecayPion" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsDcaxyForMc, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
145+ {" dcaDecayProton" , " dcaDecayProton" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsDcaxyForMc, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
146+ {" dcaMaterialPion" , " dcaMaterialPion" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsDcaxyForMc, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
147+ {" dcaMaterialProton" , " dcaMaterialProton" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsDcaxyForMc, dcaxyMin, dcaxyMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
132148 {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
133149 {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
134150 {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}}}};
@@ -151,7 +167,7 @@ struct JetShapeTask {
151167
152168 // for ppi production
153169 Configurable<float > etaTrUp{" etaTrUp" , 0 .7f , " maximum track eta" };
154- Configurable<float > dcaxyMax{ " dcaxyMax " , 2 .0f , " maximum DCA xy" };
170+ Configurable<float > dcaxyCutMax{ " dcaxyCutMax " , 2 .0f , " maximum DCA xy" };
155171 Configurable<float > chi2ItsMax{" chi2ItsMax" , 15 .0f , " its chi2 cut" };
156172 Configurable<float > chi2TpcMax{" chi2TpcMax" , 4 .0f , " tpc chi2 cut" };
157173 Configurable<float > nclItsMin{" nclItsMin" , 2 .0f , " its # of cluster cut" };
@@ -160,6 +176,7 @@ struct JetShapeTask {
160176 Configurable<float > mcRapidityMax{" mcRapidityMax" , 0 .5f , " maximum mctrack y" };
161177 Configurable<double > epsilon{" epsilon" , 1e-6 , " standard for aboid division of zero" };
162178 Configurable<float > maxDeltaEtaSafe{" maxDeltaEtaSafe" , 0 .9f , " maximum track eta for cut" };
179+ Configurable<float > nSigmaMaxForDcaxy{" nSigmaMaxForDcaxy" , 4 .0f , " maximum nSigma for DCAxy" };
163180
164181 Configurable<std::string> triggerMasks{" triggerMasks" , " " , " possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL" };
165182
@@ -233,6 +250,8 @@ struct JetShapeTask {
233250 return ;
234251 }
235252
253+ registry.fill (HIST (" eventCounterJetShape" ), 0.5 );
254+
236255 size_t nBins = distanceCategory->size () - 1 ;
237256
238257 float maxDistance = distanceCategory->at (nBins);
@@ -378,7 +397,7 @@ struct JetShapeTask {
378397 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
379398 return ;
380399 }
381-
400+ registry. fill ( HIST ( " eventCounterJet " ), 0.5 );
382401 registry.fill (HIST (" event/vertexz" ), collision.posZ ());
383402
384403 float rho = collision.rho ();
@@ -419,7 +438,7 @@ struct JetShapeTask {
419438 continue ;
420439 if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
421440 continue ;
422- if (std::abs (track.dcaXY ()) > dcaxyMax )
441+ if (std::abs (track.dcaXY ()) > dcaxyCutMax )
423442 continue ;
424443 if (track.itsChi2NCl () > chi2ItsMax)
425444 continue ;
@@ -453,6 +472,9 @@ struct JetShapeTask {
453472 bool isTpcPiRange = (tpcPi > tpcNSigmaPiMin && tpcPi < tpcNSigmaPiMax);
454473 bool isTpcPrRange = (tpcPr > tpcNSigmaPrMin && tpcPr < tpcNSigmaPrMax);
455474
475+ float nSigmaSqPr = tpcPr * tpcPr + tofPr * tofPr;
476+ float nSigmaSqPi = tpcPi * tpcPi + tofPi * tofPi;
477+
456478 for (const auto & jet : cachedJets) {
457479
458480 float dEta = trkEta - jet.eta ;
@@ -472,6 +494,17 @@ struct JetShapeTask {
472494 if (distBg1 < distanceMax || distBg2 < distanceMax) {
473495 registry.fill (HIST (" tpcDedxOutOfJet" ), trkP, tpcSig);
474496
497+ // dcaXY
498+ if (track.hasTOF ()) {
499+ if (nSigmaSqPr < nSigmaMaxForDcaxy) {
500+ registry.fill (HIST (" dcaPrOutOfJet" ), trkPt, track.dcaXY (), jet.ptCorr , centrality);
501+ }
502+
503+ if (nSigmaSqPi < nSigmaMaxForDcaxy) {
504+ registry.fill (HIST (" dcaPiOutOfJet" ), trkPt, track.dcaXY (), jet.ptCorr , centrality);
505+ }
506+ }
507+
475508 if (hasTofPi) {
476509 registry.fill (HIST (" tpcTofPiOutOfJet" ), trkP, tpcPi, jet.ptCorr , centrality);
477510 if (isTpcPiRange) {
@@ -491,6 +524,17 @@ struct JetShapeTask {
491524 registry.fill (HIST (" jetTpcDedx" ), trkP, tpcSig, distance);
492525 registry.fill (HIST (" jetTofBeta" ), trkP, beta);
493526
527+ // dcaXY
528+ if (track.hasTOF ()) {
529+ if (nSigmaSqPr < nSigmaMaxForDcaxy) {
530+ registry.fill (HIST (" jetDcaPr" ), trkPt, track.dcaXY (), distance, jet.ptCorr , centrality);
531+ }
532+
533+ if (nSigmaSqPi < nSigmaMaxForDcaxy) {
534+ registry.fill (HIST (" jetDcaPi" ), trkPt, track.dcaXY (), distance, jet.ptCorr , centrality);
535+ }
536+ }
537+
494538 if (hasTofPr) {
495539 registry.fill (HIST (" jetTpcTofPr" ), trkP, tpcPr, distance, jet.ptCorr , centrality);
496540 if (isTpcPrRange) {
@@ -514,7 +558,7 @@ struct JetShapeTask {
514558 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
515559 return ;
516560 }
517-
561+ registry. fill ( HIST ( " eventCounterJet " ), 0.5 );
518562 // tracks conditions
519563 for (const auto & jetTrack : tracks) {
520564
@@ -537,7 +581,7 @@ struct JetShapeTask {
537581 continue ;
538582 if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
539583 continue ;
540- if (std::abs (track.dcaXY ()) > dcaxyMax )
584+ if (std::abs (track.dcaXY ()) > dcaxyCutMax )
541585 continue ;
542586 if (track.itsChi2NCl () > chi2ItsMax)
543587 continue ;
@@ -582,11 +626,10 @@ struct JetShapeTask {
582626
583627 (void )mcParticles;
584628
585- registry.fill (HIST (" eventCounter" ), 0.5 );
586-
587629 float centrality = collision.centFT0M ();
588630 float rho = collision.rho ();
589631
632+ registry.fill (HIST (" eventCounterMc" ), 0.5 );
590633 registry.fill (HIST (" mcCentralityReco" ), centrality);
591634
592635 struct CachedJet {
@@ -599,12 +642,12 @@ struct JetShapeTask {
599642 cachedJets.reserve (jets.size ());
600643
601644 for (const auto & jet : jets) {
602- registry.fill (HIST (" jetPt" ), jet.pt ());
603-
604645 float mcdPtCorr = jet.pt () - rho * jet.area ();
605646 cachedJets.push_back ({jet.pt (), jet.eta (), jet.phi (), mcdPtCorr});
647+ registry.fill (HIST (" jetPt" ), jet.pt ());
606648 }
607649
650+ // reco track loop
608651 for (const auto & track : tracks) {
609652
610653 if (!jetderiveddatautilities::selectTrack (track, trackSelection)) {
@@ -618,7 +661,7 @@ struct JetShapeTask {
618661 continue ;
619662 if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
620663 continue ;
621- if (std::abs (track.dcaXY ()) > dcaxyMax )
664+ if (std::abs (track.dcaXY ()) > dcaxyCutMax )
622665 continue ;
623666 if (track.itsChi2NCl () > chi2ItsMax)
624667 continue ;
@@ -632,9 +675,15 @@ struct JetShapeTask {
632675 auto mcParticle = track.mcParticle ();
633676 registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
634677
635- if (!mcParticle. isPhysicalPrimary () || std::fabs (mcParticle.y ()) >= mcRapidityMax)
678+ if (std::fabs (mcParticle.y ()) >= mcRapidityMax)
636679 continue ;
637680
681+ const int producedByDecay = 4 ;
682+
683+ bool isPrimary = mcParticle.isPhysicalPrimary ();
684+ bool isSecondDecay = !isPrimary && (mcParticle.getProcess () == producedByDecay);
685+ bool isSecondMaterial = !isPrimary && !isSecondDecay;
686+
638687 int pdg = std::abs (mcParticle.pdgCode ());
639688 bool isPion = (pdg == PDG_t::kPiPlus );
640689 bool isKaon = (pdg == PDG_t::kKPlus );
@@ -663,38 +712,57 @@ struct JetShapeTask {
663712 if (deltaR > distanceMax)
664713 continue ;
665714
666- // TPC (All matched)
667- if (isPion)
668- registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt (), jet.ptCorr , centrality);
669- else if (isKaon)
670- registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt (), jet.ptCorr , centrality);
671- else if (isProton)
672- registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt (), jet.ptCorr , centrality);
673-
674- // TOF (Required)
675- if (hasTof) {
715+ if (isPrimary) {
716+ // Tracking
676717 if (isPion)
677- registry.fill (HIST (" ptHistogramPionTof " ), mcParticle.pt (), jet.ptCorr , centrality);
718+ registry.fill (HIST (" ptHistogramPion " ), mcParticle.pt (), jet.ptCorr , centrality);
678719 else if (isKaon)
679- registry.fill (HIST (" ptHistogramKaonTof " ), mcParticle.pt (), jet.ptCorr , centrality);
720+ registry.fill (HIST (" ptHistogramKaon " ), mcParticle.pt (), jet.ptCorr , centrality);
680721 else if (isProton)
681- registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt (), jet.ptCorr , centrality);
722+ registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt (), jet.ptCorr , centrality);
723+
724+ // TOF matched
725+ if (hasTof) {
726+ if (isPion)
727+ registry.fill (HIST (" ptHistogramPionTof" ), mcParticle.pt (), jet.ptCorr , centrality);
728+ else if (isKaon)
729+ registry.fill (HIST (" ptHistogramKaonTof" ), mcParticle.pt (), jet.ptCorr , centrality);
730+ else if (isProton)
731+ registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt (), jet.ptCorr , centrality);
732+ }
733+ } else { // Secondary
734+ if (isSecondDecay) {
735+ // from Decay
736+ if (isPion)
737+ registry.fill (HIST (" dcaDecayPion" ), mcParticle.pt (), track.dcaXY (), jet.ptCorr , centrality);
738+ else if (isProton)
739+ registry.fill (HIST (" dcaDecayProton" ), mcParticle.pt (), track.dcaXY (), jet.ptCorr , centrality);
740+ } else if (isSecondMaterial) {
741+ // from Material
742+ if (isPion)
743+ registry.fill (HIST (" dcaMaterialPion" ), mcParticle.pt (), track.dcaXY (), jet.ptCorr , centrality);
744+ else if (isProton)
745+ registry.fill (HIST (" dcaMaterialProton" ), mcParticle.pt (), track.dcaXY (), jet.ptCorr , centrality);
746+ }
682747 }
683748 }
684749 }
685750 }
686751 PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed simulation information" , true );
687752
688- void processSim (aod::JetMcCollisions::iterator const & mcCollision, aod::ChargedMCParticleLevelJets const & mcpjets, aod::JetParticles const & mcParticles)
753+ void processSim (aod::JetMcCollisions::iterator const & mcCollision, soa::SmallGroups<aod::JetCollisionsMCD> const & collisions, aod::ChargedMCParticleLevelJets const & mcpjets, aod::JetParticles const & mcParticles)
689754 {
690755 if (std::abs (mcCollision.posZ ()) > vertexZCut) {
691756 return ;
692757 }
693758
759+ if (collisions.size () == 0 ) {
760+ return ;
761+ }
762+
694763 // --- centrality ---
695- float centrality = mcCollision .centFT0M ();
764+ float centrality = collisions. begin () .centFT0M ();
696765 registry.fill (HIST (" mcCentralitySim" ), centrality);
697-
698766 const float maxR2 = distanceMax * distanceMax;
699767
700768 // --- loop over MC particles only once ---
0 commit comments