@@ -253,8 +253,8 @@ struct StrangenessInJets {
253253 registryQC.add (" sumPtUE" , " sumPtUE" , HistType::kTH1F , {{500 , 0 , 50 , " #it{p}_{T} (GeV/#it{c})" }});
254254 registryQC.add (" nJets_found" , " nJets_found" , HistType::kTH1F , {{10 , 0 , 10 , " #it{n}_{Jet}" }});
255255 registryQC.add (" nJets_selected" , " nJets_selected" , HistType::kTH1F , {{10 , 0 , 10 , " #it{n}_{Jet}" }});
256- // registryQC.add("dcaxy_vs_pt", "dcaxy_vs_pt", HistType::kTH2F, {{100, 0.0, 5.0, "#it{p}_{T} (GeV/#it{c})"}, {2000, -0.05, 0.05, "DCA_{xy} (cm)"}});
257- // registryQC.add("dcaz_vs_pt", "dcaz_vs_pt", HistType::kTH2F, {{100, 0.0, 5.0, "#it{p}_{T} (GeV/#it{c})"}, {2000, -0.05, 0.05, "DCA_{z} (cm)"}});
256+ // registryQC.add("dcaxy_vs_pt", "dcaxy_vs_pt", HistType::kTH2F, {{100, 0.0, 5.0, "#it{p}_{T} (GeV/#it{c})"}, {2000, -0.05, 0.05, "DCA_{xy} (cm)"}});
257+ // registryQC.add("dcaz_vs_pt", "dcaz_vs_pt", HistType::kTH2F, {{100, 0.0, 5.0, "#it{p}_{T} (GeV/#it{c})"}, {2000, -0.05, 0.05, "DCA_{z} (cm)"}});
258258 registryQC.add (" jet_jet_overlaps" , " jet_jet_overlaps" , HistType::kTH2F , {{20 , 0.0 , 20.0 , " #it{n}_{jet}" }, {200 , 0.0 , 200.0 , " #it{n}_{overlaps}" }});
259259 registryQC.add (" jet_ue_overlaps" , " jet_ue_overlaps" , HistType::kTH2F , {{20 , 0.0 , 20.0 , " #it{n}_{jet}" }, {200 , 0.0 , 200.0 , " #it{n}_{overlaps}" }});
260260 registryQC.add (" ue_ue_overlaps" , " ue_ue_overlaps" , HistType::kTH2F , {{20 , 0.0 , 20.0 , " #it{n}_{jet}" }, {200 , 0.0 , 200.0 , " #it{n}_{overlaps}" }});
@@ -390,12 +390,12 @@ struct StrangenessInJets {
390390 registryMC.add (" XiNeg_reconstructed_incl" , " XiNeg_reconstructed_incl" , HistType::kTH2F , {multBinning, ptAxis});
391391 registryMC.add (" OmegaPos_reconstructed_incl" , " OmegaPos_reconstructed_incl" , HistType::kTH2F , {multBinning, ptAxis});
392392 registryMC.add (" OmegaNeg_reconstructed_incl" , " OmegaNeg_reconstructed_incl" , HistType::kTH2F , {multBinning, ptAxis});
393-
393+
394394 // Histograms for secondary lambda in jet and UE
395- // registryMC.add("Secondary_Lambda_InJet", "Secondary_Lambda_InJet", HistType::kTH1F, {ptAxis});
396- // registryMC.add("Secondary_Lambda_Ue", "Secondary_Lambda_Ue", HistType::kTH1F, {ptAxis});
397- // registryMC.add("Secondary_AntiLambda_InJet", "Secondary_AntiLambda_InJet", HistType::kTH1F, {ptAxis});
398- // registryMC.add("Secondary_AntiLambda_Ue", "Secondary_AntiLambda_Ue", HistType::kTH1F, {ptAxis});
395+ // registryMC.add("Secondary_Lambda_InJet", "Secondary_Lambda_InJet", HistType::kTH1F, {ptAxis});
396+ // registryMC.add("Secondary_Lambda_Ue", "Secondary_Lambda_Ue", HistType::kTH1F, {ptAxis});
397+ // registryMC.add("Secondary_AntiLambda_InJet", "Secondary_AntiLambda_InJet", HistType::kTH1F, {ptAxis});
398+ // registryMC.add("Secondary_AntiLambda_Ue", "Secondary_AntiLambda_Ue", HistType::kTH1F, {ptAxis});
399399
400400 // Histograms for 2d reweighting (pion)
401401 registryMC.add (" mc_pi_plus_eta_pt/jet" , " " , HistType::kTH2F , {ptAxisPi, etaAxis});
@@ -1042,31 +1042,18 @@ struct StrangenessInJets {
10421042 get2DWeightHisto (histoNameWeightAntilambdaJet, twodWeightsAntilambdaJet);
10431043 get2DWeightHisto (histoNameWeightAntilambdaUe, twodWeightsAntilambdaUe);
10441044
1045- auto get2DWeightHisto = [&](Configurable<std::string> name, TH2F*& histo) {
1046- LOG (info) << " Looking for 2D weight histogram '" << name.value << " ' for " << name.name ;
1047- if (name.value == " " ) {
1048- LOG (info) << " -> Skipping" ;
1049- return ;
1050- }
1051- histo = static_cast <TH2F*>(l->FindObject (name.value .c_str ()));
1052- if (!histo) {
1053- LOG (error) << " Could not open histogram '" << name.value << " '" ;
1054- return ;
1055- }
1056- LOG (info) << " Opened histogram " << histo->ClassName () << " " << histo->GetName ();
1057- };
1058-
10591045 // Xi
10601046 get2DWeightHisto (histoNameWeightsXiInJet, twodWeightsXiInJet);
10611047 get2DWeightHisto (histoNameWeightsXiUe, twodWeightsXiUe);
10621048 get2DWeightHisto (histoNameWeightsAntiXiInJet, twodWeightsAntiXiInJet);
10631049 get2DWeightHisto (histoNameWeightsAntiXiUe, twodWeightsAntiXiUe);
1064-
1050+
10651051 // Omega
10661052 get2DWeightHisto (histoNameWeightsOmegaInJet, twodWeightsOmegaInJet);
10671053 get2DWeightHisto (histoNameWeightsOmegaUe, twodWeightsOmegaUe);
10681054 get2DWeightHisto (histoNameWeightsAntiOmegaInJet, twodWeightsAntiOmegaInJet);
10691055 get2DWeightHisto (histoNameWeightsAntiOmegaUe, twodWeightsAntiOmegaUe);
1056+
10701057 }
10711058
10721059 void processData (SelCollisions::iterator const & collision,
@@ -1535,7 +1522,7 @@ struct StrangenessInJets {
15351522 TVector3 momentumV0 = momentumPos + momentumNeg;
15361523
15371524 // Feed-down for lambda
1538- // if (passedLambdaSelection(v0, pos, neg) && pdgParent == kLambda0) {
1525+ // if (passedLambdaSelection(v0, pos, neg) && pdgParent == kLambda0) {
15391526 // if (!isPhysPrim) {
15401527 // double wSecLambdaInJet(1.0);
15411528 // double wSecLambdaUe(1.0);
@@ -1566,7 +1553,7 @@ struct StrangenessInJets {
15661553 // }
15671554
15681555 // Feed-down for antilambda
1569- // if (passedAntiLambdaSelection(v0, pos, neg) && pdgParent == kLambda0Bar) {
1556+ // if (passedAntiLambdaSelection(v0, pos, neg) && pdgParent == kLambda0Bar) {
15701557 // if (!isPhysPrim) {
15711558 // double wSecAntiLambdaInJet(1.0);
15721559 // double wSecAntiLambdaUe(1.0);
@@ -1687,12 +1674,20 @@ struct StrangenessInJets {
16871674 continue ;
16881675
16891676 pdgParent = particleMotherOfBach.pdgCode ();
1677+ isPhysPrim = particleMotherOfBach.isPhysicalPrimary ();
16901678 }
16911679 }
16921680 }
16931681 if (pdgParent == 0 )
16941682 continue ;
16951683
1684+ // Generated Momentum of casc
1685+ TVector3 momentumPos (posParticle.px (), posParticle.py (), posParticle.pz ());
1686+ TVector3 momentumNeg (negParticle.px (), negParticle.py (), negParticle.pz ());
1687+ TVector3 momentumBach (bachParticle.px (), bachParticle.py (), bachParticle.pz ());
1688+ TVector3 momentumV0 = momentumPos + momentumNeg;
1689+ TVector3 momentumCasc = momentumV0 + momentumBach;
1690+
16961691 // Xi+
16971692 if (passedXiSelection (casc, pos, neg, bach, collision) && pdgParent == kXiPlusBar ) {
16981693 registryMC.fill (HIST (" XiPos_reconstructed_incl" ), multiplicity, casc.pt ());
@@ -1709,28 +1704,28 @@ struct StrangenessInJets {
17091704 if (passedOmegaSelection (casc, pos, neg, bach, collision) && pdgParent == kOmegaMinus ) {
17101705 registryMC.fill (HIST (" OmegaNeg_reconstructed_incl" ), multiplicity, casc.pt ());
17111706 }
1712-
1707+
17131708 if (!isPhysPrim)
17141709 continue ;
1715-
1710+
17161711 double wXiPosJet (1.0 ), wXiPosUe (1.0 ), wXiNegJet (1.0 ), wXiNegUe (1.0 ), wOmegaPosJet (1.0 ), wOmegaPosUe (1.0 ), wOmegaNegJet (1.0 ), wOmegaNegUe (1.0 );
17171712 if (applyReweighting) {
1718- int ix = twodWeightsXiInJet->GetXaxis ()->FindBin (momentumV0 .Pt ());
1719- int iy = twodWeightsXiInJet->GetYaxis ()->FindBin (momentumV0 .Eta ());
1720- wXiPosJet = twodWeightsAntiXiInJet->GetBinContent (ix, iy);
1721- wXiPosUe = twodWeightsAntiXiUe->GetBinContent (ix, iy);
1722- wXiNegJet = twodWeightsXiInJet->GetBinContent (ix, iy);
1723- wXiNegUe = twodWeightsXiUe->GetBinContent (ix, iy);
1724- wOmegaPosJet = twodWeightsAntiOmegaInJet->GetBinContent (ix, iy);
1725- wOmegaPosUe = twodWeightsAntiOmegaUe->GetBinContent (ix, iy);
1726- wOmegaNegJet = twodWeightsOmegaInJet->GetBinContent (ix, iy);
1727- wOmegaNegUe = twodWeightsOmegaUe->GetBinContent (ix, iy);
1728-
1729- // protections
1730- if (ix == 0 || ix > twodWeightsXiInJet->GetNbinsX ()) {
1713+ int ix = twodWeightsXiInJet->GetXaxis ()->FindBin (momentumCasc .Pt ());
1714+ int iy = twodWeightsXiInJet->GetYaxis ()->FindBin (momentumCasc .Eta ());
1715+ wXiPosJet = twodWeightsAntiXiInJet->GetBinContent (ix, iy);
1716+ wXiPosUe = twodWeightsAntiXiUe->GetBinContent (ix, iy);
1717+ wXiNegJet = twodWeightsXiInJet->GetBinContent (ix, iy);
1718+ wXiNegUe = twodWeightsXiUe->GetBinContent (ix, iy);
1719+ wOmegaPosJet = twodWeightsAntiOmegaInJet->GetBinContent (ix, iy);
1720+ wOmegaPosUe = twodWeightsAntiOmegaUe->GetBinContent (ix, iy);
1721+ wOmegaNegJet = twodWeightsOmegaInJet->GetBinContent (ix, iy);
1722+ wOmegaNegUe = twodWeightsOmegaUe->GetBinContent (ix, iy);
1723+
1724+ // protections
1725+ if (ix == 0 || ix > twodWeightsXiInJet->GetNbinsX ()) {
17311726 wXiPosJet = 1.0 ;
17321727 wXiPosUe = 1.0 ;
1733- wXiNegJet = 1.0 ;
1728+ wXiNegJet = 1.0 ;
17341729 wXiNegUe = 1.0 ;
17351730 wOmegaPosJet = 1.0 ;
17361731 wOmegaPosUe = 1.0 ;
@@ -1740,15 +1735,15 @@ struct StrangenessInJets {
17401735 if (iy == 0 || iy > twodWeightsXiInJet->GetNbinsY ()) {
17411736 wXiPosJet = 1.0 ;
17421737 wXiPosUe = 1.0 ;
1743- wXiNegJet = 1.0 ;
1738+ wXiNegJet = 1.0 ;
17441739 wXiNegUe = 1.0 ;
17451740 wOmegaPosJet = 1.0 ;
17461741 wOmegaPosUe = 1.0 ;
17471742 wOmegaNegJet = 1.0 ;
17481743 wOmegaNegUe = 1.0 ;
17491744 }
17501745 }
1751-
1746+
17521747 // Xi+
17531748 if (passedXiSelection (casc, pos, neg, bach, collision) && pdgParent == kXiPlusBar ) {
17541749 registryMC.fill (HIST (" XiPos_reconstructed_jet" ), multiplicity, casc.pt (), wXiPosJet);
@@ -1769,7 +1764,9 @@ struct StrangenessInJets {
17691764 registryMC.fill (HIST (" OmegaNeg_reconstructed_jet" ), multiplicity, casc.pt (), wOmegaNegJet);
17701765 registryMC.fill (HIST (" OmegaNeg_reconstructed_ue" ), multiplicity, casc.pt (), wOmegaNegUe);
17711766 }
1772- }
1767+
1768+
1769+ }
17731770
17741771 /*
17751772 // Reconstructed Tracks
@@ -1944,25 +1941,25 @@ struct StrangenessInJets {
19441941 wAntilambdaUe = 1.0 ;
19451942 }
19461943 }
1947-
1944+
19481945 double wXiPosJet (1.0 ), wXiPosUe (1.0 ), wXiNegJet (1.0 ), wXiNegUe (1.0 ), wOmegaPosJet (1.0 ), wOmegaPosUe (1.0 ), wOmegaNegJet (1.0 ), wOmegaNegUe (1.0 );
19491946 if (applyReweighting) {
1950- int ix = twodWeightsXiInJet->GetXaxis ()->FindBin (mcParticle.pt ());
1951- int iy = twodWeightsXiInJet->GetYaxis ()->FindBin (mcParticle.eta ());
1952- wXiPosJet = twodWeightsAntiXiInJet->GetBinContent (ix, iy);
1953- wXiPosUe = twodWeightsAntiXiUe->GetBinContent (ix, iy);
1954- wXiNegJet = twodWeightsXiInJet->GetBinContent (ix, iy);
1955- wXiNegUe = twodWeightsXiUe->GetBinContent (ix, iy);
1956- wOmegaPosJet = twodWeightsAntiOmegaInJet->GetBinContent (ix, iy);
1957- wOmegaPosUe = twodWeightsAntiOmegaUe->GetBinContent (ix, iy);
1958- wOmegaNegJet = twodWeightsOmegaInJet->GetBinContent (ix, iy);
1959- wOmegaNegUe = twodWeightsOmegaUe->GetBinContent (ix, iy);
1960-
1961- // protections
1962- if (ix == 0 || ix > twodWeightsXiInJet->GetNbinsX ()) {
1947+ int ix = twodWeightsXiInJet->GetXaxis ()->FindBin (mcParticle.pt ());
1948+ int iy = twodWeightsXiInJet->GetYaxis ()->FindBin (mcParticle.eta ());
1949+ wXiPosJet = twodWeightsAntiXiInJet->GetBinContent (ix, iy);
1950+ wXiPosUe = twodWeightsAntiXiUe->GetBinContent (ix, iy);
1951+ wXiNegJet = twodWeightsXiInJet->GetBinContent (ix, iy);
1952+ wXiNegUe = twodWeightsXiUe->GetBinContent (ix, iy);
1953+ wOmegaPosJet = twodWeightsAntiOmegaInJet->GetBinContent (ix, iy);
1954+ wOmegaPosUe = twodWeightsAntiOmegaUe->GetBinContent (ix, iy);
1955+ wOmegaNegJet = twodWeightsOmegaInJet->GetBinContent (ix, iy);
1956+ wOmegaNegUe = twodWeightsOmegaUe->GetBinContent (ix, iy);
1957+
1958+ // protections
1959+ if (ix == 0 || ix > twodWeightsXiInJet->GetNbinsX ()) {
19631960 wXiPosJet = 1.0 ;
19641961 wXiPosUe = 1.0 ;
1965- wXiNegJet = 1.0 ;
1962+ wXiNegJet = 1.0 ;
19661963 wXiNegUe = 1.0 ;
19671964 wOmegaPosJet = 1.0 ;
19681965 wOmegaPosUe = 1.0 ;
@@ -1972,14 +1969,15 @@ struct StrangenessInJets {
19721969 if (iy == 0 || iy > twodWeightsXiInJet->GetNbinsY ()) {
19731970 wXiPosJet = 1.0 ;
19741971 wXiPosUe = 1.0 ;
1975- wXiNegJet = 1.0 ;
1972+ wXiNegJet = 1.0 ;
19761973 wXiNegUe = 1.0 ;
19771974 wOmegaPosJet = 1.0 ;
19781975 wOmegaPosUe = 1.0 ;
19791976 wOmegaNegJet = 1.0 ;
19801977 wOmegaNegUe = 1.0 ;
19811978 }
19821979 }
1980+
19831981
19841982 switch (mcParticle.pdgCode ()) {
19851983 /*
0 commit comments