Skip to content

Commit 2981696

Browse files
authored
Add files via upload
1 parent 1a15b2b commit 2981696

1 file changed

Lines changed: 39 additions & 62 deletions

File tree

PWGJE/Tasks/jetChargedV2.cxx

Lines changed: 39 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,19 @@ struct JetChargedV2 {
345345
registry.add("h2_phi_rholocal_absDelta", "#varphi vs #rho(#varphi)absDelta, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
346346
registry.add("h2_centrality_pT", "centrality vs p_{T}; p_{T}; centrality ", {HistType::kTH2F, {{210, -10.0, 200.0}, {100, 0., 100}}});
347347

348-
registry.add("h2_rholocal_cent", "#centrality vs #rho(#varphi); #centrality; #rho(#varphi) ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
349-
registry.add("h2_averagerho_cent", "#centrality vs #rho; #centrality; #rho ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
348+
registry.add("h2_rholocal_cent", "#centrality vs #rho(#varphi); #centrality; #rho(#varphi) ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
349+
registry.add("h2_averagerho_cent", "#centrality vs #rho; #centrality; #rho ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
350350

351-
registry.add("h2_rholocal_pt", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
352-
registry.add("h2_rholocal_raw_pt", "#varphi vs #it{p}_{T}; #it{p}_{T} - #rhoArea; #rho(#varphi) ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
353-
registry.add("h2_rholocal_pt_inplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
354-
registry.add("h2_rholocal_pt_outplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
351+
registry.add("h2_rholocal_pt", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
352+
registry.add("h2_rholocal_raw_pt", "#varphi vs #it{p}_{T}; #it{p}_{T} - #rhoArea; #rho(#varphi) ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
353+
registry.add("h2_rholocal_pt_inplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
354+
registry.add("h2_rholocal_pt_outplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; #rho(#varphi) ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
355355

356356
registry.add("h2_phi_averagerho_absDelta", "#varphi vs #rho(0)absDelta, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
357-
registry.add("h2_averagerho_pt", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
358-
registry.add("h2_averagerho_raw_pt", "#varphi vs #it{p}_{T}; #it{p}_{T} - <#rho>Area; <#rho> ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
359-
registry.add("h2_averagerho_pt_inplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
360-
registry.add("h2_averagerho_pt_outplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{100, 0., 100}, {210, -10.0, 200.0}}});
357+
registry.add("h2_averagerho_pt", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
358+
registry.add("h2_averagerho_raw_pt", "#varphi vs #it{p}_{T}; #it{p}_{T} - <#rho>Area; <#rho> ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
359+
registry.add("h2_averagerho_pt_inplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
360+
registry.add("h2_averagerho_pt_outplane", "#varphi vs #it{p}_{T}; #it{p}_{T}; <#rho> ", {HistType::kTH2F, {{110, -10., 100}, {210, -10.0, 200.0}}});
361361

362362
registry.add("h2_phi_rholocal_absDelta_low", "#varphi vs #rho(#varphi)absDeltaLow, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
363363
registry.add("h2_phi_rholocal_absDelta_medium", "#varphi vs #rho(#varphi)absDeltaMediun, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
@@ -370,6 +370,14 @@ struct JetChargedV2 {
370370
registry.add("h2_phi_rholocal_absDelta_low_outplane", "#varphi vs #rho(#varphi)absDeltaLow outplane, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
371371
registry.add("h2_phi_rholocal_absDelta_medium_outplane", "#varphi vs #rho(#varphi)absDeltaMediun outplane, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
372372
registry.add("h2_phi_rholocal_absDelta_high_outplane", "#varphi vs #rho(#varphi)absDeltahigh outplane, absDelta; #varphi - #Psi_{EP,2}; #rho(#varphi) ", {HistType::kTH2F, {{40, 0., o2::constants::math::TwoPI}, {210, -10.0, 200.0}}});
373+
374+
registry.add("h_good_bad_ugly", "local rho large than 0, less than 0 and total", {HistType::kTH1F, {{5, 0.0, 5.0}}});
375+
registry.get<TH1>(HIST("h_good_bad_ugly"))->GetXaxis()->SetBinLabel(1, "#rho_{local} > 0");
376+
registry.get<TH1>(HIST("h_good_bad_ugly"))->GetXaxis()->SetBinLabel(2, "#rho_{local} <= 0");
377+
registry.get<TH1>(HIST("h_good_bad_ugly"))->GetXaxis()->SetBinLabel(3, "#rho_{local} total");
378+
registry.add("h_jet_pt_badRhoLocal", "local rho info, Jet Pt", {HistType::kTH1F, {jetPtAxis}});
379+
registry.add("h_jet_phi_badRhoLocal", "local rho info, Jet #phi ", {HistType::kTH1F, {phiAxis}});
380+
registry.add("h_jet_eta_badRhoLocal", "local rho info, Jet #eta ", {HistType::kTH1F, {jetEtaAxis}});
373381
//< \sigma p_T at local rho test plot | end >
374382

375383
registry.add("h_jet_pt_inclusive_v2", "jet pT rhoareasubtracted;#it{p}_{T,jet} (GeV/#it{c}); entries", {HistType::kTH1F, {jetPtAxisRhoAreaSub}});
@@ -379,14 +387,15 @@ struct JetChargedV2 {
379387
registry.add("leadJetEta", "leadJet constituent #eta ", {HistType::kTH1F, {{100, -1.0, 1.0}}});
380388

381389
//< RC test plots >//
382-
registry.add("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
383390
registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphi", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
391+
registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphi_abs", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
384392

393+
registry.add("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
385394
registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
395+
registry.add("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet_abs", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}; #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
396+
registry.add("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet_abs", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
386397

387398
registry.add("h1_distribution_RC", "RC #phi-#Psi_{2}", {HistType::kTH1F, {{72, 0.0, o2::constants::math::TwoPI}}});
388-
registry.add("h1_distribution_random", "RC #phi-#Psi_{2}", {HistType::kTH1F, {{72, 0.0, o2::constants::math::TwoPI}}});
389-
registry.add("h3_randomizedPhi_check", "centrality; #it{p}_{T,random cone} - #it{area, random cone} * #it{rho}(#varphi); #Delta#varphi_{jet}", {HistType::kTH3F, {{100, 0.0, 100.0}, {400, -200.0, 200.0}, {100, 0., o2::constants::math::TwoPI}}});
390399

391400
//< bkg sub plot | end >//
392401
//< median rho >//
@@ -909,17 +918,14 @@ struct JetChargedV2 {
909918
fFitModulationV2v3P->SetParameter(1, 0.01);
910919
fFitModulationV2v3P->SetParameter(3, 0.01);
911920

912-
double ep2fix = 0.;
913-
double ep3fix = 0.;
914-
915921
if (ep2 < 0) {
916-
ep2fix = RecoDecay::constrainAngle(ep2);
922+
double ep2fix = RecoDecay::constrainAngle(ep2);
917923
fFitModulationV2v3P->FixParameter(2, ep2fix);
918924
} else {
919925
fFitModulationV2v3P->FixParameter(2, ep2);
920926
}
921927
if (ep3 < 0) {
922-
ep3fix = RecoDecay::constrainAngle(ep3);
928+
double ep3fix = RecoDecay::constrainAngle(ep3);
923929
fFitModulationV2v3P->FixParameter(4, ep3fix);
924930
} else {
925931
fFitModulationV2v3P->FixParameter(4, ep3);
@@ -1460,17 +1466,14 @@ struct JetChargedV2 {
14601466
fFitModulationV2v3->SetParameter(1, 0.01);
14611467
fFitModulationV2v3->SetParameter(3, 0.01);
14621468

1463-
double ep2fix = 0.;
1464-
double ep3fix = 0.;
1465-
14661469
if (ep2 < 0) {
1467-
ep2fix = RecoDecay::constrainAngle(ep2);
1470+
double ep2fix = RecoDecay::constrainAngle(ep2);
14681471
fFitModulationV2v3->FixParameter(2, ep2fix);
14691472
} else {
14701473
fFitModulationV2v3->FixParameter(2, ep2);
14711474
}
14721475
if (ep3 < 0) {
1473-
ep3fix = RecoDecay::constrainAngle(ep3);
1476+
double ep3fix = RecoDecay::constrainAngle(ep3);
14741477
fFitModulationV2v3->FixParameter(4, ep3fix);
14751478
} else {
14761479
fFitModulationV2v3->FixParameter(4, ep3);
@@ -1597,10 +1600,17 @@ struct JetChargedV2 {
15971600
double rholocal = 0.0;
15981601
if (integralValue <= 0) {
15991602
rholocal = collision.rho();
1603+
registry.fill(HIST("h_jet_pt_badRhoLocal"), jet.pt(), 1.0);
1604+
registry.fill(HIST("h_jet_phi_badRhoLocal"), jet.phi(), 1.0);
1605+
registry.fill(HIST("h_jet_eta_badRhoLocal"), jet.eta(), 1.0);
1606+
registry.fill(HIST("h_good_bad_ugly"), 1.5);
1607+
// LOGF(info, "integral rho_local got 0, checking jet info: pT=%.1f, eta=%.1f, phi=%.1f, integralValue=%.1f", jet.pt(), jet.eta(), jet.phi(), integralValue);
16001608
} else {
16011609
// integralValue = fFitModulationV2v3->Integral(phi - selectedJetsRadius, phi + selectedJetsRadius);
16021610
rholocal = collision.rho() / (2 * selectedJetsRadius * temppara[0]) * integralValue;
1611+
registry.fill(HIST("h_good_bad_ugly"), 0.5);
16031612
}
1613+
registry.fill(HIST("h_good_bad_ugly"), 2.5);
16041614

16051615
if (nmode == cfgNmodA) {
16061616
double phiMinusPsi2 = 0.0;
@@ -1700,61 +1710,32 @@ struct JetChargedV2 {
17001710
int nmode = cfgnMods->at(i);
17011711
if (nmode == cfgNmodA) {
17021712
double rcPhiPsi2 = 0.0;
1703-
double rcPhiPsi2Rand = 0.0;
1704-
1705-
// randomized φ check test
1706-
float randomPhiTest = randomNumber.Uniform(0.0, o2::constants::math::TwoPI);
1707-
float randomEtaTest = randomNumber.Uniform(trackEtaMin + randomConeR, trackEtaMax - randomConeR);
1708-
float randomConePtTest = 0.0;
1709-
// randomized φ check test end
1713+
// double rcPhiPsi2Rand = 0.0;
1714+
float absRcPhiPsi2 = 0.0;
17101715

17111716
// rcPhiPsi2 = randomConePhi - ep2;
17121717
rcPhiPsi2 = RecoDecay::constrainAngle(randomConePhi - ep2, -o2::constants::math::PI);
1713-
// if (rcPhiPsi2 < 0) rcPhiPsi2 += o2::constants::math::TwoPI;
1714-
if (rcPhiPsi2 < 0) {
1715-
rcPhiPsi2 = RecoDecay::constrainAngle(rcPhiPsi2, 0.0F);
1716-
}
1717-
1718-
rcPhiPsi2Rand = RecoDecay::constrainAngle(randomPhiTest - ep2, -o2::constants::math::PI);
1719-
// if (rcPhiPsi2Rand < 0) rcPhiPsi2Rand += o2::constants::math::TwoPI;
1720-
if (rcPhiPsi2Rand < 0) {
1721-
rcPhiPsi2Rand = RecoDecay::constrainAngle(rcPhiPsi2Rand, 0.0F);
1722-
}
1718+
absRcPhiPsi2 = std::abs(rcPhiPsi2);
17231719

17241720
for (auto const& track : tracks) {
17251721
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
1726-
// float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, -o2::constants::math::PI);
1727-
// float dEta = track.eta() - randomConeEta;
1728-
// if (std::sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
1729-
// randomConePt += track.pt();
1730-
// }
17311722
float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, -o2::constants::math::PI);
17321723
float dEta = track.eta() - randomConeEta;
17331724
if (std::sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
17341725
randomConePt += track.pt();
17351726
}
1736-
1737-
float dPhiTest = RecoDecay::constrainAngle(track.phi() - randomPhiTest, -o2::constants::math::PI);
1738-
float dEtaTest = track.eta() - randomEtaTest;
1739-
if (std::sqrt(dEtaTest * dEtaTest + dPhiTest * dPhiTest) < randomConeR) {
1740-
randomConePtTest += track.pt();
1741-
}
17421727
}
17431728
}
17441729
registry.fill(HIST("h1_distribution_RC"), rcPhiPsi2);
1745-
registry.fill(HIST("h1_distribution_random"), rcPhiPsi2Rand);
1746-
registry.fill(HIST("h3_randomizedPhi_check"), centrality, randomConePtTest - o2::constants::math::PI * randomConeR * randomConeR * collision.rho(), rcPhiPsi2Rand, 1.0);
17471730
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphi"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocalRC, rcPhiPsi2, 1.0);
1731+
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphi_abs"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocalRC, absRcPhiPsi2, 1.0);
17481732

17491733
// removing the leading jet from the random cone
17501734
if (jets.size() > 0) { // if there are no jets in the acceptance (from the jetfinder cuts) then there can be no leading jet
1751-
// float dPhiLeadingJet = RecoDecay::constrainAngle(jets.iteratorAt(0).phi() - randomConePhi, -o2::constants::math::PI);
1752-
// float dEtaLeadingJet = jets.iteratorAt(0).eta() - randomConeEta;
17531735
float dPhiLeadingJet = RecoDecay::constrainAngle(leadingJetPhi - randomConePhi, -o2::constants::math::PI);
17541736
float dEtaLeadingJet = leadingJetEta - randomConeEta;
17551737

17561738
bool jetWasInCone = false;
1757-
// while ((randomConeLeadJetDeltaR <= 0 && (std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < jets.iteratorAt(0).r() / 100.0 + randomConeR)) || (randomConeLeadJetDeltaR > 0 && (std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < randomConeLeadJetDeltaR))) {
17581739
while ((randomConeLeadJetDeltaR <= 0 && (std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < leadingJetR + randomConeR)) || (randomConeLeadJetDeltaR > 0 && (std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet) < randomConeLeadJetDeltaR))) {
17591740
jetWasInCone = true;
17601741
randomConeEta = randomNumber.Uniform(trackEtaMin + randomConeR, trackEtaMax - randomConeR);
@@ -1765,12 +1746,6 @@ struct JetChargedV2 {
17651746
if (jetWasInCone) {
17661747
randomConePt = 0.0;
17671748
for (auto const& track : tracks) {
1768-
// if (jetderiveddatautilities::selectTrack(track, trackSelection) && (std::fabs(track.eta() - leadingJetEta) > randomConeR)) { // if track selection is uniformTrack, dcaXY and dcaZ cuts need to be added as they aren't in the selection so that they can be studied here
1769-
// float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, -o2::constants::math::PI);
1770-
// float dEta = track.eta() - randomConeEta;
1771-
// if (std::sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
1772-
// randomConePt += track.pt();
1773-
// }
17741749
if (jetderiveddatautilities::selectTrack(track, trackSelection)) { // if track selection is uniformTrack, dcaXY and dcaZ cuts need to be added as they aren't in the selection so that they can be studied here
17751750
float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, -o2::constants::math::PI);
17761751
float dEta = track.eta() - randomConeEta;
@@ -1783,6 +1758,8 @@ struct JetChargedV2 {
17831758
}
17841759
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocalRC, rcPhiPsi2, 1.0);
17851760
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * collision.rho(), rcPhiPsi2, 1.0);
1761+
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_localrhovsphiwithoutleadingjet_abs"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * rholocalRC, absRcPhiPsi2, 1.0);
1762+
registry.fill(HIST("h3_centrality_deltapT_RandomCornPhi_rhorandomconewithoutleadingjet_abs"), centrality, randomConePt - o2::constants::math::PI * randomConeR * randomConeR * collision.rho(), absRcPhiPsi2, 1.0);
17861763
} else if (nmode == cfgNmodB) {
17871764
continue;
17881765
}

0 commit comments

Comments
 (0)