@@ -117,8 +117,8 @@ struct JetTaggerHFQA {
117117 AxisSpec SxyAxis = {binSxy, " S_{XY}" };
118118 AxisSpec LxyzAxis = {binLxyz, " L_{XYZ} [cm]" };
119119 AxisSpec SxyzAxis = {binSxyz, " S_{XYZ}" };
120- AxisSpec sigmaLxyAxis = {binSigmaLxy, " #simga_ {L_{XY}} [cm]" };
121- AxisSpec sigmaLxyzAxis = {binSigmaLxyz, " #simga_ {L_{XYZ}} [cm]" };
120+ AxisSpec sigmaLxyAxis = {binSigmaLxy, " #sigma_ {L_{XY}} [cm]" };
121+ AxisSpec sigmaLxyzAxis = {binSigmaLxyz, " #sigma_ {L_{XYZ}} [cm]" };
122122
123123 numberOfJetFlavourSpecies = static_cast <int >(numFlavourSpecies);
124124
@@ -233,7 +233,7 @@ struct JetTaggerHFQA {
233233 registry.add (" h3_jet_pt_JP_N3_flavour" , " jet pt jet probability flavour N3" , {HistType::kTH3F , {{jetPtAxis}, {JetProbabilityAxis}, {jetFlavourAxis}}});
234234 registry.add (" h3_jet_pt_neg_log_JP_N3_flavour" , " jet pt log jet probability flavour N3" , {HistType::kTH3F , {{jetPtAxis}, {JetProbabilityLogAxis}, {jetFlavourAxis}}});
235235 }
236- if (doprocessSV2ProngMCD ) {
236+ if (doprocessSV2ProngData ) {
237237 registry.add (" h_2prong_nprongs" , " " , {HistType::kTH1F , {{nprongsAxis}}});
238238 registry.add (" h2_jet_pt_2prong_Lxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {LxyAxis}}});
239239 registry.add (" h2_jet_pt_2prong_Sxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {SxyAxis}}});
@@ -246,9 +246,21 @@ struct JetTaggerHFQA {
246246 registry.add (" h2_jet_pt_2prong_sigmaLxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {sigmaLxyAxis}}});
247247 registry.add (" h2_jet_pt_2prong_sigmaLxyz" , " " , {HistType::kTH2F , {{jetPtAxis}, {sigmaLxyzAxis}}});
248248 }
249-
249+ if (doprocessSV3ProngData) {
250+ registry.add (" h_3prong_nprongs" , " " , {HistType::kTH1F , {{nprongsAxis}}});
251+ registry.add (" h2_jet_pt_3prong_Lxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {LxyAxis}}});
252+ registry.add (" h2_jet_pt_3prong_Sxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {SxyAxis}}});
253+ registry.add (" h2_jet_pt_3prong_Lxyz" , " " , {HistType::kTH2F , {{jetPtAxis}, {LxyzAxis}}});
254+ registry.add (" h2_jet_pt_3prong_Sxyz" , " " , {HistType::kTH2F , {{jetPtAxis}, {SxyzAxis}}});
255+ registry.add (" h2_jet_pt_3prong_Sxy_N1" , " " , {HistType::kTH2F , {{jetPtAxis}, {SxyAxis}}});
256+ registry.add (" h2_jet_pt_3prong_Sxyz_N1" , " " , {HistType::kTH2F , {{jetPtAxis}, {SxyzAxis}}});
257+ registry.add (" h2_3prong_Sxy_sigmaLxy" , " " , {HistType::kTH2F , {{SxyAxis}, {sigmaLxyAxis}}});
258+ registry.add (" h2_3prong_Sxyz_sigmaLxyz" , " " , {HistType::kTH2F , {{SxyzAxis}, {sigmaLxyzAxis}}});
259+ registry.add (" h2_jet_pt_3prong_sigmaLxy" , " " , {HistType::kTH2F , {{jetPtAxis}, {sigmaLxyAxis}}});
260+ registry.add (" h2_jet_pt_3prong_sigmaLxyz" , " " , {HistType::kTH2F , {{jetPtAxis}, {sigmaLxyzAxis}}});
261+ }
250262 if (doprocessSV2ProngMCD) {
251- registry.add (" h_2prong_nprongs " , " " , {HistType::kTH2F , {{nprongsAxis}, {jetFlavourAxis}}});
263+ registry.add (" h2_2prong_nprongs_flavour " , " " , {HistType::kTH2F , {{nprongsAxis}, {jetFlavourAxis}}});
252264 registry.add (" h3_jet_pt_2prong_Lxy_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {LxyAxis}, {jetFlavourAxis}}});
253265 registry.add (" h3_jet_pt_2prong_Sxy_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {SxyAxis}, {jetFlavourAxis}}});
254266 registry.add (" h3_jet_pt_2prong_Lxyz_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {LxyzAxis}, {jetFlavourAxis}}});
@@ -261,7 +273,7 @@ struct JetTaggerHFQA {
261273 registry.add (" h3_jet_pt_2prong_sigmaLxyz_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {sigmaLxyzAxis}, {jetFlavourAxis}}});
262274 }
263275 if (doprocessSV3ProngMCD) {
264- registry.add (" h_3prong_nprongs " , " " , {HistType::kTH1F , {{nprongsAxis}}});
276+ registry.add (" h2_3prong_nprongs_flavour " , " " , {HistType::kTH2F , {{nprongsAxis}, {jetFlavourAxis }}});
265277 registry.add (" h3_jet_pt_3prong_Lxy_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {LxyAxis}, {jetFlavourAxis}}});
266278 registry.add (" h3_jet_pt_3prong_Sxy_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {SxyAxis}, {jetFlavourAxis}}});
267279 registry.add (" h3_jet_pt_3prong_Lxyz_flavour" , " " , {HistType::kTH3F , {{jetPtAxis}, {LxyzAxis}, {jetFlavourAxis}}});
@@ -307,6 +319,32 @@ struct JetTaggerHFQA {
307319 return 1 ;
308320 }
309321
322+ template <typename V, typename JetType>
323+ double getMaxSxyForJet (const JetType& mcdjet)
324+ {
325+ double maxSxy = 0 ;
326+ for (const auto & prong : mcdjet.template secondaryVertices_as <V>()) {
327+ int Sxy = prong.decayLengthXY () / prong.errorDecayLengthXY ();
328+ if (maxSxy < Sxy) {
329+ maxSxy = Sxy;
330+ }
331+ }
332+ return maxSxy;
333+ }
334+
335+ template <typename V, typename JetType>
336+ double getMaxSxyzForJet (const JetType& mcdjet)
337+ {
338+ double maxSxyz = 0 ;
339+ for (const auto & prong : mcdjet.template secondaryVertices_as <V>()) {
340+ int Sxyz = prong.decayLength () / prong.errorDecayLength ();
341+ if (maxSxyz < Sxyz) {
342+ maxSxyz = Sxyz;
343+ }
344+ }
345+ return maxSxyz;
346+ }
347+
310348 template <typename T, typename U, typename V, typename W>
311349 void fillHistogramIPsData (T const & collision, U const & jets, V const & /* jtracks*/ , W const & /* tracks*/ )
312350 {
@@ -594,38 +632,77 @@ struct JetTaggerHFQA {
594632 template <typename T, typename U, typename V>
595633 void fillHistogramSV2ProngData (T const & collision, U const & jets, V const & prongs)
596634 {
597- LOG (info) << " 2Prong" ;
635+ for (const auto & jet : jets) {
636+ if (!jetfindingutilities::isInEtaAcceptance (jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
637+ continue ;
638+ }
639+ auto maxSxy = getMaxSxyForJet<V>(jet);
640+ auto maxSxyz = getMaxSxyzForJet<V>(jet);
641+ registry.fill (HIST (" h_2prong_nprongs" ), jet.template secondaryVertices_as <V>().size ());
642+ for (const auto & prong : jet.template secondaryVertices_as <V>()) {
643+ auto Lxy = prong.decayLengthXY ();
644+ auto Sxy = prong.decayLengthXY () / prong.errorDecayLengthXY ();
645+ auto Lxyz = prong.decayLength ();
646+ auto Sxyz = prong.decayLength () / prong.errorDecayLength ();
647+ registry.fill (HIST (" h2_jet_pt_2prong_Lxy" ), jet.pt (), Lxy);
648+ registry.fill (HIST (" h2_jet_pt_2prong_Sxy" ), jet.pt (), Sxy);
649+ registry.fill (HIST (" h2_jet_pt_2prong_Lxyz" ), jet.pt (), Lxyz);
650+ registry.fill (HIST (" h2_jet_pt_2prong_Sxyz" ), jet.pt (), Sxyz);
651+ registry.fill (HIST (" h2_2prong_Sxy_sigmaLxy" ), Sxy, prong.errorDecayLengthXY ());
652+ registry.fill (HIST (" h2_2prong_Sxyz_sigmaLxyz" ), Sxyz, prong.errorDecayLength ());
653+ registry.fill (HIST (" h2_jet_pt_2prong_sigmaLxy" ), jet.pt (), prong.errorDecayLengthXY ());
654+ registry.fill (HIST (" h2_jet_pt_2prong_sigmaLxyz" ), jet.pt (), prong.errorDecayLength ());
655+ }
656+ registry.fill (HIST (" h2_jet_pt_2prong_Sxy_N1" ), jet.pt (), maxSxy);
657+ registry.fill (HIST (" h2_jet_pt_2prong_Sxyz_N1" ), jet.pt (), maxSxyz);
658+ }
598659 }
599660
600661 template <typename T, typename U, typename V>
601662 void fillHistogramSV3ProngData (T const & collision, U const & jets, V const & prongs)
602663 {
603- LOG (info) << " 3Prong" ;
664+ for (const auto & jet : jets) {
665+ if (!jetfindingutilities::isInEtaAcceptance (jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
666+ continue ;
667+ }
668+ auto maxSxy = getMaxSxyForJet<V>(jet);
669+ auto maxSxyz = getMaxSxyzForJet<V>(jet);
670+ registry.fill (HIST (" h_3prong_nprongs" ), jet.template secondaryVertices_as <V>().size ());
671+ for (const auto & prong : jet.template secondaryVertices_as <V>()) {
672+ auto Lxy = prong.decayLengthXY ();
673+ auto Sxy = prong.decayLengthXY () / prong.errorDecayLengthXY ();
674+ auto Lxyz = prong.decayLength ();
675+ auto Sxyz = prong.decayLength () / prong.errorDecayLength ();
676+ registry.fill (HIST (" h2_jet_pt_3prong_Lxy" ), jet.pt (), Lxy);
677+ registry.fill (HIST (" h2_jet_pt_3prong_Sxy" ), jet.pt (), Sxy);
678+ registry.fill (HIST (" h2_jet_pt_3prong_Lxyz" ), jet.pt (), Lxyz);
679+ registry.fill (HIST (" h2_jet_pt_3prong_Sxyz" ), jet.pt (), Sxyz);
680+ registry.fill (HIST (" h2_3prong_Sxy_sigmaLxy" ), Sxy, prong.errorDecayLengthXY ());
681+ registry.fill (HIST (" h2_3prong_Sxyz_sigmaLxyz" ), Sxyz, prong.errorDecayLength ());
682+ registry.fill (HIST (" h2_jet_pt_3prong_sigmaLxy" ), jet.pt (), prong.errorDecayLengthXY ());
683+ registry.fill (HIST (" h2_jet_pt_3prong_sigmaLxyz" ), jet.pt (), prong.errorDecayLength ());
684+ }
685+ registry.fill (HIST (" h2_jet_pt_3prong_Sxy_N1" ), jet.pt (), maxSxy);
686+ registry.fill (HIST (" h2_jet_pt_3prong_Sxyz_N1" ), jet.pt (), maxSxyz);
687+ }
604688 }
605689
606-
607690 template <typename T, typename U, typename V>
608691 void fillHistogramSV2ProngMCD (T const & collision, U const & mcdjets, V const & prongs)
609692 {
610- int maxSxy = 0 ;
611- int maxSxyz = 0 ;
612693 for (const auto & mcdjet : mcdjets) {
613- int numOfSV = 0 ;
614694 if (!jetfindingutilities::isInEtaAcceptance (mcdjet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
615695 continue ;
616696 }
617697 auto origin = mcdjet.origin ();
618- registry.fill (HIST (" h_2prong_nprongs" ), mcdjet.template secondaryVertices_as <V>().size ());
698+ auto maxSxy = getMaxSxyForJet<V>(mcdjet);
699+ auto maxSxyz = getMaxSxyzForJet<V>(mcdjet);
700+ registry.fill (HIST (" h2_2prong_nprongs_flavour" ), mcdjet.template secondaryVertices_as <V>().size (), origin);
619701 for (const auto & prong : mcdjet.template secondaryVertices_as <V>()) {
620- numOfSV++;
621702 auto Lxy = prong.decayLengthXY ();
622703 auto Sxy = prong.decayLengthXY () / prong.errorDecayLengthXY ();
623704 auto Lxyz = prong.decayLength ();
624705 auto Sxyz = prong.decayLength () / prong.errorDecayLength ();
625- if (maxSxy < Sxy)
626- maxSxy = Sxy;
627- if (maxSxyz < Sxyz)
628- maxSxyz = Sxyz;
629706 registry.fill (HIST (" h3_jet_pt_2prong_Lxy_flavour" ), mcdjet.pt (), Lxy, origin);
630707 registry.fill (HIST (" h3_jet_pt_2prong_Sxy_flavour" ), mcdjet.pt (), Sxy, origin);
631708 registry.fill (HIST (" h3_jet_pt_2prong_Lxyz_flavour" ), mcdjet.pt (), Lxyz, origin);
@@ -637,31 +714,25 @@ struct JetTaggerHFQA {
637714 }
638715 registry.fill (HIST (" h3_jet_pt_2prong_Sxy_N1_flavour" ), mcdjet.pt (), maxSxy, origin);
639716 registry.fill (HIST (" h3_jet_pt_2prong_Sxyz_N1_flavour" ), mcdjet.pt (), maxSxyz, origin);
640- registry.fill (HIST (" h_2prong_nprongs" ), numOfSV);
641717 }
642718 }
643719
644720 template <typename T, typename U, typename V>
645721 void fillHistogramSV3ProngMCD (T const & collision, U const & mcdjets, V const & prongs)
646722 {
647- int numOfSV = 0 ;
648- int maxSxy = 0 ;
649- int maxSxyz = 0 ;
650723 for (const auto & mcdjet : mcdjets) {
651724 if (!jetfindingutilities::isInEtaAcceptance (mcdjet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) {
652725 continue ;
653726 }
654727 auto origin = mcdjet.origin ();
728+ auto maxSxy = getMaxSxyForJet<V>(mcdjet);
729+ auto maxSxyz = getMaxSxyzForJet<V>(mcdjet);
730+ registry.fill (HIST (" h2_3prong_nprongs_flavour" ), mcdjet.template secondaryVertices_as <V>().size (), origin);
655731 for (const auto & prong : mcdjet.template secondaryVertices_as <V>()) {
656- numOfSV++;
657732 auto Lxy = prong.decayLengthXY ();
658733 auto Sxy = prong.decayLengthXY () / prong.errorDecayLengthXY ();
659734 auto Lxyz = prong.decayLength ();
660735 auto Sxyz = prong.decayLength () / prong.errorDecayLength ();
661- if (maxSxy < Sxy)
662- maxSxy = Sxy;
663- if (maxSxyz < Sxyz)
664- maxSxyz = Sxyz;
665736 registry.fill (HIST (" h3_jet_pt_3prong_Lxy_flavour" ), mcdjet.pt (), Lxy, origin);
666737 registry.fill (HIST (" h3_jet_pt_3prong_Sxy_flavour" ), mcdjet.pt (), Sxy, origin);
667738 registry.fill (HIST (" h3_jet_pt_3prong_Lxyz_flavour" ), mcdjet.pt (), Lxyz, origin);
@@ -671,10 +742,9 @@ struct JetTaggerHFQA {
671742 registry.fill (HIST (" h3_jet_pt_3prong_sigmaLxy_flavour" ), mcdjet.pt (), prong.errorDecayLengthXY (), origin);
672743 registry.fill (HIST (" h3_jet_pt_3prong_sigmaLxyz_flavour" ), mcdjet.pt (), prong.errorDecayLength (), origin);
673744 }
674- registry.fill (HIST (" h3_jet_pt_2prong_Sxy_N1_flavour " ), mcdjet.pt (), maxSxy, origin);
675- registry.fill (HIST (" h3_jet_pt_2prong_Sxyz_N1_flavour " ), mcdjet.pt (), maxSxyz, origin);
745+ registry.fill (HIST (" h3_jet_pt_3prong_Sxy_N1_flavour " ), mcdjet.pt (), maxSxy, origin);
746+ registry.fill (HIST (" h3_jet_pt_3prong_Sxyz_N1_flavour " ), mcdjet.pt (), maxSxyz, origin);
676747 }
677- registry.fill (HIST (" h_3prong_nprongs" ), numOfSV);
678748 }
679749
680750 void processDummy (aod::Collision const &, aod::Tracks const &)
@@ -708,19 +778,19 @@ struct JetTaggerHFQA {
708778 registry.fill (HIST (" h_impact_parameter_xyz_significance" ), varImpXYZSig);
709779 }
710780 }
711- PROCESS_SWITCH (JetTaggerHFQA, processTracksDca, " Fill inclusive tracks' impormation for data" , false );
781+ PROCESS_SWITCH (JetTaggerHFQA, processTracksDca, " Fill inclusive tracks' imformation for data" , false );
712782
713783 void processIPsData (soa::Filtered<JetCollisions>::iterator const & jcollision, JetTagTableData const & jets, JetTagTracksData const & jtracks, OriTracksData const & tracks)
714784 {
715785 fillHistogramIPsData (jcollision, jets, jtracks, tracks);
716786 }
717- PROCESS_SWITCH (JetTaggerHFQA, processIPsData, " Fill impact parameter impormation for data jets" , false );
787+ PROCESS_SWITCH (JetTaggerHFQA, processIPsData, " Fill impact parameter imformation for data jets" , false );
718788
719789 void processIPsMCD (soa::Filtered<JetCollisions>::iterator const & jcollision, JetTagTableMCD const & mcdjets, JetTagTracksMCD const & jtracks, OriTracksMCD const & tracks, JetParticles&)
720790 {
721791 fillHistogramIPsMCD (jcollision, mcdjets, jtracks, tracks);
722792 }
723- PROCESS_SWITCH (JetTaggerHFQA, processIPsMCD, " Fill impact parameter impormation for mcd jets" , false );
793+ PROCESS_SWITCH (JetTaggerHFQA, processIPsMCD, " Fill impact parameter imformation for mcd jets" , false );
724794
725795 void processJPData (soa::Filtered<JetCollisions>::iterator const & jcollision, JetTagTableData const & jets, JetTagTracksData const &)
726796 {
@@ -736,27 +806,27 @@ struct JetTaggerHFQA {
736806
737807 void processSV2ProngData (soa::Filtered<JetCollisions>::iterator const & jcollision, soa::Join<JetTagTableData, aod::DataSecondaryVertex2ProngIndices> const & jets, aod::DataSecondaryVertex2Prongs const & prongs)
738808 {
739- fillHistogramSV2ProngMCD (jcollision, jets, prongs);
809+ fillHistogramSV2ProngData (jcollision, jets, prongs);
740810 }
741- PROCESS_SWITCH (JetTaggerHFQA, processSV2ProngData, " Fill 2prong impormation for data jets" , false );
811+ PROCESS_SWITCH (JetTaggerHFQA, processSV2ProngData, " Fill 2prong imformation for data jets" , false );
742812
743813 void processSV3ProngData (soa::Filtered<JetCollisions>::iterator const & jcollision, soa::Join<JetTagTableData, aod::DataSecondaryVertex3ProngIndices> const & jets, aod::DataSecondaryVertex3Prongs const & prongs)
744814 {
745- fillHistogramSV3ProngMCD (jcollision, jets, prongs);
815+ fillHistogramSV3ProngData (jcollision, jets, prongs);
746816 }
747- PROCESS_SWITCH (JetTaggerHFQA, processSV3ProngData, " Fill 3prong impormation for data jets" , false );
817+ PROCESS_SWITCH (JetTaggerHFQA, processSV3ProngData, " Fill 2prong imformation for data jets" , false );
748818
749819 void processSV2ProngMCD (soa::Filtered<JetCollisions>::iterator const & jcollision, soa::Join<JetTagTableMCD, aod::MCDSecondaryVertex2ProngIndices> const & mcdjets, aod::MCDSecondaryVertex2Prongs const & prongs)
750820 {
751821 fillHistogramSV2ProngMCD (jcollision, mcdjets, prongs);
752822 }
753- PROCESS_SWITCH (JetTaggerHFQA, processSV2ProngMCD, " Fill 2prong impormation for mcd jets" , false );
823+ PROCESS_SWITCH (JetTaggerHFQA, processSV2ProngMCD, " Fill 2prong imformation for mcd jets" , false );
754824
755825 void processSV3ProngMCD (soa::Filtered<JetCollisions>::iterator const & jcollision, soa::Join<JetTagTableMCD, aod::MCDSecondaryVertex3ProngIndices> const & mcdjets, aod::MCDSecondaryVertex3Prongs const & prongs)
756826 {
757827 fillHistogramSV3ProngMCD (jcollision, mcdjets, prongs);
758828 }
759- PROCESS_SWITCH (JetTaggerHFQA, processSV3ProngMCD, " Fill 3prong impormation for mcd jets" , false );
829+ PROCESS_SWITCH (JetTaggerHFQA, processSV3ProngMCD, " Fill 3prong imformation for mcd jets" , false );
760830};
761831
762832using JetTaggerQAChargedDataJets = soa::Join<aod::ChargedJets, aod::ChargedJetConstituents, aod::ChargedJetTags>;
0 commit comments