Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWGLF, AngularCorrelationsInJets.cxx: bug fix + TOF mass toggle #8158

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86d4eae
AngularCorrelationsInJets.cxx: bug fixes
ljoergen Aug 27, 2024
1d9a335
Merge branch 'AliceO2Group:master' into master
ljoergen Aug 27, 2024
0dfbf24
Please consider the following formatting changes
alibuild Aug 27, 2024
06c000c
Merge pull request #7 from alibuild/alibot-cleanup-7445
ljoergen Aug 27, 2024
b5e988a
Merge branch 'AliceO2Group:master' into master
ljoergen Aug 28, 2024
cd92d4e
Merge branch 'AliceO2Group:master' into master
ljoergen Aug 28, 2024
be0544c
Merge branch 'AliceO2Group:master' into master
ljoergen Sep 16, 2024
e44c1be
Merge branch 'AliceO2Group:master' into master
ljoergen Sep 18, 2024
8ce9c15
Merge branch 'AliceO2Group:master' into master
ljoergen Sep 19, 2024
999fc5e
Merge branch 'AliceO2Group:master' into master
ljoergen Sep 21, 2024
ea6ee5d
Merge branch 'AliceO2Group:master' into master
ljoergen Oct 15, 2024
1880f18
Merge branch 'AliceO2Group:master' into master
ljoergen Oct 23, 2024
eeeb6a7
Merge branch 'AliceO2Group:master' into master
ljoergen Oct 24, 2024
915eda6
Merge branch 'AliceO2Group:master' into pid-cuts
ljoergen Oct 25, 2024
f7e0028
basically rebase lol
ljoergen Oct 24, 2024
2b99cc5
moved ptdiff to qa
ljoergen Oct 25, 2024
412c474
Merge branch 'AliceO2Group:master' into pid-cuts
ljoergen Oct 25, 2024
6cfa5a7
added TOF mass toggle
ljoergen Oct 25, 2024
acb815c
corrected position of hNumberOfEvents
ljoergen Oct 27, 2024
a25f256
Merge branch 'pid-cuts' of https://github.com/ljoergen/O2Physics
ljoergen Oct 27, 2024
d27b13a
Please consider the following formatting changes
alibuild Oct 27, 2024
c6c360b
Merge pull request #11 from alibuild/alibot-cleanup-8158
ljoergen Oct 29, 2024
1d12168
added nsigma histos before nsigma cuts
ljoergen Oct 29, 2024
26d6d0e
Merge branch 'pid-cuts' of https://github.com/ljoergen/O2Physics
ljoergen Oct 29, 2024
77e2368
Please consider the following formatting changes
alibuild Oct 29, 2024
a7e8c0d
Merge pull request #12 from alibuild/alibot-cleanup-8158
ljoergen Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions PWGLF/Tasks/Nuspex/AngularCorrelationsInJets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ struct AngularCorrelationsInJets {
Configurable<float> fAntinucleiTOFnsigYield{"antinucleiTOFnsigmaHighPtYield", 4.0, "[antinuclei] min TOF nsigma with high pT for yield"};
Configurable<float> fAntinucleiTOFnsigCF{"antinucleiTOFnsigmaHighPtCF", 4.0, "[antinuclei] max TOF nsigma for CF"};
Configurable<bool> fDeuteronAnalysis{"deuteronAnalysis", true, "true [false]: analyse (anti)deuterons [(anti)helium-3]"};
Configurable<bool> fUseTOFMass{"useTOFmass", true, "use TOF mass instead of pion mass if available"};

Configurable<int> fBufferSize{"trackBufferSize", 2000, "Number of mixed-event tracks being stored"};

Expand Down Expand Up @@ -182,7 +183,6 @@ struct AngularCorrelationsInJets {
registryData.add("hPtJetNuclei", "p_{T} of nuclei", HistType::kTH1D, {axisSpecs.ptAxisPos});
registryData.add("hPtJetAntinuclei", "p_{T} of antinuclei", HistType::kTH1D, {axisSpecs.ptAxisPos});
registryData.add("hPtTotalJet", "p_{T} of entire jet;#it{p}_{T} [GeV/#it{c}]", HistType::kTH1F, {{2000, 0, 500}});
registryData.add("hPtDiff", "p_{T} difference PseudoJet/original track;#it{p}_{T} [GeV/#it{c}]", HistType::kTH1D, {{100, -5, 5}});
registryQA.add("hPtJetProton_15", "Proton p_{T} for jet p_{T} < 15 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos});
registryQA.add("hPtJetProton_20", "Proton p_{T} for jet p_{T} < 20 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos});
registryQA.add("hPtJetProton_30", "Proton p_{T} for jet p_{T} < 30 GeV", HistType::kTH1D, {axisSpecs.ptAxisPos});
Expand All @@ -203,6 +203,10 @@ struct AngularCorrelationsInJets {
// nSigma
registryData.add("hTPCsignal", "TPC signal", HistType::kTH2F, {{1000, 0, 100, "#it{p} [GeV/#it{c}]"}, {5000, 0, 5000, "d#it{E}/d#it{X} (a.u.)"}});
registryData.add("hTOFsignal", "TOF signal", HistType::kTH2F, {{1000, 0, 100, "#it{p} [GeV/#it{c}]"}, {550, 0, 1.1, "#beta (TOF)"}});
registryData.add("hTPCsignalProton", "TPC n#sigma for (anti)proton without cuts", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTOFsignalProton", "TOF n#sigma for (anti)proton without cuts", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTPCsignalNuclei", "TPC n#sigma for (anti)nuclei without cuts", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTOFsignalNuclei", "TOF n#sigma for (anti)nuclei without cuts", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTPCnsigmaProton", "TPC n#sigma for (anti)proton", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTOFnsigmaProton", "TOF n#sigma for (anti)proton", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
registryData.add("hTPCnsigmaNuclei", "TPC n#sigma for (anti)nuclei", HistType::kTH2F, {axisSpecs.nsigmapTAxis, axisSpecs.nsigmaAxis});
Expand Down Expand Up @@ -252,6 +256,7 @@ struct AngularCorrelationsInJets {
registryData.add("hDeltaPhiEtaMEAntinuclei", "#Delta#varphi vs #Delta#eta of antinuclei in mixed events", HistType::kTH2D, {axisSpecs.angDistPhiAxis, axisSpecs.angDistEtaAxis});

// QA
registryQA.add("hPtDiff", "p_{T} difference PseudoJet/original track;#it{p}_{T} [GeV/#it{c}]", HistType::kTH1D, {{100, -5, 5}});
registryQA.add("hJetConeRadius", "Jet Radius;#it{R}", HistType::kTH1F, {{100, 0, 1}});
registryQA.add("hMaxRadiusVsPt", "Max Cone Radius vs p_{T}", HistType::kTH2F, {{axisSpecs.ptAxisPos}, {100, 0, 1}});
registryQA.add("hRhoEstimatePerp", "Background #rho (perp)", HistType::kTH2F, {{axisSpecs.ptAxisPos}, {200, 0, 20}});
Expand Down Expand Up @@ -759,13 +764,13 @@ struct AngularCorrelationsInJets {
return jetCounter;
fastjet::PseudoJet subtractedJetPerp(0., 0., 0., 0.);
subtractedJetPerp = bkgSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp);
registryData.fill(HIST("hPtTotalSubJetPerp"), subtractedJetPerp.pt());
fastjet::PseudoJet subtractedJetArea(0., 0., 0., 0.);
subtractedJetArea = bkgSub.doRhoAreaSub(jet, rho, rhoM);
registryData.fill(HIST("hPtTotalSubJetArea"), subtractedJetArea.pt());

if (subtractedJetPerp.pt() < fMinJetPt) // cut on jet w/o bkg
return jetCounter;
registryData.fill(HIST("hPtTotalSubJetPerp"), subtractedJetPerp.pt());
registryData.fill(HIST("hPtTotalSubJetArea"), subtractedJetArea.pt());
registryQA.fill(HIST("hRhoEstimateArea"), jet.pt(), rho);
registryQA.fill(HIST("hRhoMEstimateArea"), jet.pt(), rhoM);
registryQA.fill(HIST("hRhoEstimatePerp"), jet.pt(), rhoPerp);
Expand Down Expand Up @@ -794,6 +799,8 @@ struct AngularCorrelationsInJets {
if (std::isnan(constituent.phi()) || std::isnan(jet.phi())) // geometric jet cone
continue;
double DeltaPhi = TVector2::Phi_0_2pi(constituent.phi() - jet.phi());
if (DeltaPhi > TMath::Pi())
DeltaPhi = DeltaPhi - 2 * TMath::Pi();
double DeltaEta = constituent.eta() - jet.eta();
double Delta = TMath::Sqrt(DeltaPhi * DeltaPhi + DeltaEta * DeltaEta);
registryQA.fill(HIST("hJetConeRadius"), Delta);
Expand Down Expand Up @@ -892,11 +899,22 @@ struct AngularCorrelationsInJets {
registryData.fill(HIST("hDCAxyFullJet"), jetParticle.pt() * jetParticle.sign(), jetParticle.dcaXY());
registryData.fill(HIST("hDCAzFullJet"), jetParticle.pt() * jetParticle.sign(), jetParticle.dcaZ());
registryData.fill(HIST("hTPCsignal"), jetParticle.pt() * jetParticle.sign(), jetParticle.tpcSignal());
if (jetParticle.hasTOF())
if (jetParticle.hasTOF()) {
registryData.fill(HIST("hTOFsignal"), jetParticle.pt() * jetParticle.sign(), jetParticle.beta());

registryData.fill(HIST("hTOFsignalProton"), jetParticle.pt() * jetParticle.sign(), jetParticle.tofNSigmaPr());
}
registryData.fill(HIST("hTPCsignalProton"), jetParticle.pt() * jetParticle.sign(), jetParticle.tpcNSigmaPr());
if (fDeuteronAnalysis) {
registryData.fill(HIST("hTPCsignalNuclei"), jetParticle.pt() * jetParticle.sign(), jetParticle.tpcNSigmaDe());
if (jetParticle.hasTOF())
registryData.fill(HIST("hTOFsignalNuclei"), jetParticle.pt() * jetParticle.sign(), jetParticle.tofNSigmaDe());
} else {
registryData.fill(HIST("hTPCsignalNuclei"), jetParticle.pt() * jetParticle.sign(), jetParticle.tpcNSigmaHe());
if (jetParticle.hasTOF())
registryData.fill(HIST("hTOFsignalNuclei"), jetParticle.pt() * jetParticle.sign(), jetParticle.tofNSigmaHe());
}
double ptDiff = pseudoParticle.pt() - jetParticle.pt();
registryData.fill(HIST("hPtDiff"), ptDiff);
registryQA.fill(HIST("hPtDiff"), ptDiff);

if (jetParticle.pt() < fMinJetParticlePt)
continue;
Expand Down Expand Up @@ -1056,15 +1074,18 @@ struct AngularCorrelationsInJets {
continue;

double mass;
if (track.hasTOF()) {
mass = track.mass(); // check reliability, maybe use only pion mass
registryQA.fill(HIST("hTOFmass"), track.pt(), track.mass());
registryData.fill(HIST("hTrackProtocol"), 1);
if (fUseTOFMass) {
if (track.hasTOF()) {
mass = track.mass(); // check reliability, maybe use only pion mass
registryQA.fill(HIST("hTOFmass"), track.pt(), track.mass());
registryData.fill(HIST("hTrackProtocol"), 1);
} else {
mass = 0.139; // pion mass as default, ~80% are pions
registryData.fill(HIST("hTrackProtocol"), 2);
}
} else {
mass = 0.139; // pion mass as default, ~80% are pions
registryData.fill(HIST("hTrackProtocol"), 2);
mass = 0.139;
}
// double mass = 0.139;

// if (track.pt() > fMinLeadingPt) {
// leadingID = track.globalIndex();
Expand Down Expand Up @@ -1124,7 +1145,7 @@ struct AngularCorrelationsInJets {
}
registryData.fill(HIST("hNumJetsInEvent"), jetCounter);

TVector3 hardestJetAxis(jets.at(0).px(), jets.at(0).py(), jets.at(0).pz());
TVector3 hardestJetAxis(jets.at(0).px(), jets.at(0).py(), jets.at(0).pz()); // for full event, use hardest jet as orientation
doCorrelations(particlesForCF, fBufferFull, fTempBufferFull, -1, hardestJetAxis);
setTrackBuffer(fTempBufferFull, fBufferFull);
}
Expand All @@ -1138,9 +1159,9 @@ struct AngularCorrelationsInJets {
initCCDB(bc);

registryData.fill(HIST("hEventProtocol"), 0);
registryData.fill(HIST("hNumberOfEvents"), 0);
if (!collision.alias_bit(kINT7))
continue;
registryData.fill(HIST("hNumberOfEvents"), 0);
registryData.fill(HIST("hEventProtocol"), 1);

auto slicedTracks = tracks.sliceBy(perCollisionFullTracksRun2, collision.globalIndex());
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/Tasks/Nuspex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ o2physics_add_dpl_workflow(angular-correlations-in-jets
SOURCES AngularCorrelationsInJets.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::PWGJECore FastJet::FastJet FastJet::Contrib
COMPONENT_NAME Analysis)
endif()
endif()
Loading