Skip to content

Commit dbf3c1f

Browse files
authored
[PWGJE] Fixing runtime issues and other minor bugs (#12970)
1 parent 5699df7 commit dbf3c1f

File tree

1 file changed

+36
-18
lines changed

1 file changed

+36
-18
lines changed

PWGJE/Tasks/jetHadronRecoil.cxx

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ struct JetHadronRecoil {
169169
registry.add("hTrack3D", "3D tracks histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}, doSumw);
170170
registry.add("hPtTrackPtHard", "Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}", {HistType::kTH2F, {{20, 0, 5}, {200, 0, 200}}}, doSumw);
171171
registry.add("hTracksvsJets", "comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}", {HistType::kTH3F, {{200, 0, 200}, {500, -100, 400}, {195, 5, 200}}}, doSumw);
172-
registry.add("hDeltaR", "#DeltaR;#DeltaR;#frac{dN_{jets}}{d#DeltaR}", {HistType::kTH1F, {dRAxis}}, doSumw);
173-
registry.add("hDeltaRpT", "jet p_{T} vs #DeltaR;p_{T,jet};#DeltaR", {HistType::kTH2F, {{500, -100, 400}, dRAxis}}, doSumw);
174172
registry.add("hRhoSignal", "Signal Rho bkg;#rho;entries", {HistType::kTH1F, {{220, 0, 220}}}, doSumw);
175173
registry.add("hRhoReference", "Reference Rho bkg;#rho;entries", {HistType::kTH1F, {{220, 0, 220}}}, doSumw);
176174
registry.add("hRhoReferenceShift", "Testing reference shifts;#rho;shift", {HistType::kTH2F, {{220, 0, 220}, {20, 0.0, 2.0}}}, doSumw);
@@ -190,8 +188,6 @@ struct JetHadronRecoil {
190188
registry.add("hPhiPart", "Particle #phi;#phi;entries", {HistType::kTH1F, {{100, 0.0, o2::constants::math::TwoPI}}}, doSumw);
191189
registry.add("hPart3D", "3D tracks histogram;p_{T};#eta;#phi", {HistType::kTH3F, {{200, 0, 200}, {100, -1.0, 1.0}, {100, 0.0, o2::constants::math::TwoPI}}}, doSumw);
192190
registry.add("hPtPartPtHard", "Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}", {HistType::kTH2F, {{200, 0, 200}, {20, 0, 5}}}, doSumw);
193-
registry.add("hDeltaRPart", "Particle #DeltaR;#DeltaR;#frac{1}{N_{jets}}#frac{dN_{jets}}{d#DeltaR}", {HistType::kTH1F, {dRAxis}}, doSumw);
194-
registry.add("hDeltaRpTPart", "Particle jet p_{T} vs #DeltaR;p_{T,jet};#DeltaR", {HistType::kTH2F, {{400, 0, 400}, dRAxis}}, doSumw);
195191
registry.add("hDeltaRSignalPart", "Particle #DeltaR;#DeltaR;#frac{1}{N_{jets}}#frac{dN_{jets}}{d#DeltaR}", {HistType::kTH1F, {dRAxis}}, doSumw);
196192
registry.add("hDeltaRpTSignalPart", "Particle jet p_{T} vs #DeltaR;p_{T,jet};#DeltaR", {HistType::kTH2F, {{400, 0, 400}, dRAxis}}, doSumw);
197193
registry.add("hDeltaRpTDPhiSignalPart", "Particle jet p_{T} vs #DeltaR vs #Delta#phi;p_{T,jet};#Delta#phi;#DeltaR", {HistType::kTH3F, {{400, 0, 400}, {100, 0, o2::constants::math::TwoPI}, dRAxis}}, doSumw);
@@ -312,14 +308,9 @@ struct JetHadronRecoil {
312308
registry.fill(HIST("hJetPhi"), jet.phi(), weight);
313309
registry.fill(HIST("hJet3D"), jet.pt() - (rho * jet.area()), jet.eta(), jet.phi(), weight);
314310

315-
double dR = getWTAaxisDifference(jet, tracks);
316-
317-
registry.fill(HIST("hDeltaR"), dR, weight);
318-
registry.fill(HIST("hDeltaRpT"), jet.pt() - (rho * jet.area()), dR, weight);
319-
// try with fjcontrib
320-
321311
if (nTT > 0) {
322312
float dphi = RecoDecay::constrainAngle(jet.phi() - phiTT);
313+
double dR = getWTAaxisDifference(jet, tracks);
323314
if (isSigCol) {
324315
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {
325316
registry.fill(HIST("hDeltaRpTSignal"), jet.pt() - (rho * jet.area()), dR, weight);
@@ -443,12 +434,9 @@ struct JetHadronRecoil {
443434
registry.fill(HIST("hJetPhi"), jet.phi(), weight);
444435
registry.fill(HIST("hJet3D"), jet.pt(), jet.eta(), jet.phi(), weight);
445436

446-
double dR = getWTAaxisDifference(jet, particles);
447-
448-
registry.fill(HIST("hDeltaRPart"), dR, weight);
449-
registry.fill(HIST("hDeltaRpTPart"), jet.pt(), dR, weight);
450437
if (nTT > 0) {
451438
float dphi = RecoDecay::constrainAngle(jet.phi() - phiTT);
439+
double dR = getWTAaxisDifference(jet, particles);
452440
if (isSigCol) {
453441
if (std::abs(dphi - o2::constants::math::PI) < 0.6) {
454442
registry.fill(HIST("hDeltaRpTSignalPart"), jet.pt(), dR, weight);
@@ -588,16 +576,16 @@ struct JetHadronRecoil {
588576

589577
float dphip = RecoDecay::constrainAngle(jetTag.phi() - phiTTPart);
590578
dRp = getWTAaxisDifference(jetTag, particles);
591-
registry.fill(HIST("hPtMatched"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), weight);
592579
registry.fill(HIST("hPhiMatched"), dphi, dphip, weight);
593-
registry.fill(HIST("hPtResolution"), jetTag.pt(), (jetTag.pt() - (jetBase.pt() - (rho * jetBase.area()))) / jetTag.pt(), weight);
594580
registry.fill(HIST("hPhiResolution"), jetTag.pt(), dphip - dphi, weight);
595-
registry.fill(HIST("hDeltaRMatched"), dR, dRp, weight);
596-
registry.fill(HIST("hDeltaRResolution"), jetTag.pt(), dRp - dR, weight);
597581
registry.fill(HIST("hFullMatching"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), dphi, dphip, dR, dRp, weight);
598582
if ((std::abs(dphi - o2::constants::math::PI) < 0.6) || (std::abs(dphip - o2::constants::math::PI) < 0.6)) {
599583
registry.fill(HIST("hPtMatched1d"), jetTag.pt(), weight);
600584
registry.fill(HIST("hDeltaRMatched1d"), dRp, weight);
585+
registry.fill(HIST("hPtMatched"), jetBase.pt() - (rho * jetBase.area()), jetTag.pt(), weight);
586+
registry.fill(HIST("hPtResolution"), jetTag.pt(), (jetTag.pt() - (jetBase.pt() - (rho * jetBase.area()))) / jetTag.pt(), weight);
587+
registry.fill(HIST("hDeltaRMatched"), dR, dRp, weight);
588+
registry.fill(HIST("hDeltaRResolution"), jetTag.pt(), dRp - dR, weight);
601589
}
602590
}
603591
}
@@ -648,6 +636,9 @@ struct JetHadronRecoil {
648636
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
649637
return;
650638
}
639+
if (collision.has_mcCollision()) {
640+
return;
641+
}
651642
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
652643
return;
653644
}
@@ -670,6 +661,9 @@ struct JetHadronRecoil {
670661
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
671662
return;
672663
}
664+
if (collision.has_mcCollision()) {
665+
return;
666+
}
673667
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
674668
return;
675669
}
@@ -692,6 +686,9 @@ struct JetHadronRecoil {
692686
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
693687
return;
694688
}
689+
if (collision.has_mcCollision()) {
690+
return;
691+
}
695692
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
696693
return;
697694
}
@@ -714,6 +711,9 @@ struct JetHadronRecoil {
714711
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
715712
return;
716713
}
714+
if (collision.has_mcCollision()) {
715+
return;
716+
}
717717
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
718718
return;
719719
}
@@ -771,6 +771,9 @@ struct JetHadronRecoil {
771771
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
772772
return;
773773
}
774+
if (collision.has_mcCollision()) {
775+
return;
776+
}
774777
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
775778
return;
776779
}
@@ -792,6 +795,9 @@ struct JetHadronRecoil {
792795
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
793796
return;
794797
}
798+
if (collision.has_mcCollision()) {
799+
return;
800+
}
795801
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
796802
return;
797803
}
@@ -813,6 +819,9 @@ struct JetHadronRecoil {
813819
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
814820
return;
815821
}
822+
if (collision.has_mcCollision()) {
823+
return;
824+
}
816825
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
817826
return;
818827
}
@@ -834,6 +843,9 @@ struct JetHadronRecoil {
834843
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
835844
return;
836845
}
846+
if (collision.has_mcCollision()) {
847+
return;
848+
}
837849
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
838850
return;
839851
}
@@ -855,6 +867,9 @@ struct JetHadronRecoil {
855867
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
856868
return;
857869
}
870+
if (collision.has_mcCollision()) {
871+
return;
872+
}
858873
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
859874
return;
860875
}
@@ -876,6 +891,9 @@ struct JetHadronRecoil {
876891
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
877892
return;
878893
}
894+
if (collision.has_mcCollision()) {
895+
return;
896+
}
879897
if (collision.mcCollision().ptHard() < pTHatMinEvent) {
880898
return;
881899
}

0 commit comments

Comments
 (0)