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

[PWGJE] Task for the nuclei study with FastJet framework #7213

Merged
merged 18 commits into from
Aug 20, 2024

Conversation

arvindkhuntia
Copy link
Contributor

Dear @nzardosh,

Please have a look at the PR.

Many thanks in advance.

@alibuild
Copy link
Collaborator

alibuild commented Aug 7, 2024

Error while checking build/O2Physics/o2 for a81fd66 at 2024-08-08 00:19:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:924:136: error: unused parameter 'recoColls' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1053:134: error: unused parameter 'fulltracks' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1344:101: error: unused parameter 'recocolls' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1345:47: error: unused parameter 'mcdjets' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild
Copy link
Collaborator

alibuild commented Aug 7, 2024

Error while checking build/O2Physics/o2 for ed2cd19 at 2024-08-08 00:38:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:924:136: error: unused parameter 'recoColls' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1053:134: error: unused parameter 'fulltracks' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1344:101: error: unused parameter 'recocolls' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/7213-slc7_x86-64/0/PWGJE/Tasks/nucleiWithFastJet.cxx:1345:47: error: unused parameter 'mcdjets' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

Copy link
Collaborator

@nzardosh nzardosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks alot for making the PR and welcome to jet analyses! The code, particularly many of the histograms repeated for candidates can be simplified by using one higher dimensional histogram. I left comments in particular process functions but were appropriate those comments should be applied to all process functions.
Also at a later time I might consider adding some of the additional params you take from the full track table to the jet derived data format. But for now I think using the full track table is fine. I guess the pT cut you will use in the analysis is not so high?

// add pid later

bool jetFlag = false;
for (int iDJet = 0; iDJet < mcpJetPt.size(); iDJet++) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dont you just loop over the mcp jets here and her eta and phi directly from the object?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with the process function above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @nzardosh for the comments. Here, I loop over only the matched jets instead of looping over the all mcp jets.

continue;
if (fabs(fullTrack.eta()) > cfgtrkMaxEta)
continue;
if (!track.has_mcParticle())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also get these parameters from JParticles. Then you wouldnt need to subscribe to the aod::McParticles table

Copy link
Contributor Author

@arvindkhuntia arvindkhuntia Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now done.


if (R < cfgjetR) {
jetFlag = true;
// break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you not break here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

} // jet

if (track.mcParticle().pdgCode() == PDGProton) {
jetHist.fill(HIST("mcdJet/proton/pt/PtProton"), track.mcParticle().pt());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably replace all these histograms below and all the if conditions with just one 3D histogram with axes of pt, jetFlag and pdgCode where you use an enum to map the pdg codes yourself. Then you have 1 histogram and just one line like this

      jetHist.fill(HIST("mcdJet/pt/PtPatritcleType"), track.mcParticle().pt(), jetFlag, mapPDGCodes(track.mcParticle().pdgCode()));
      
      This also applies to the other process functions above as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I have now implemented a mapping for the hist in the MC process functions.

} else {
jetHist.fill(HIST("mcdJet/proton/pt/PtProton_outJet"), track.mcParticle().pt());
}
if (mapPDGToValue(mcTrack.pdgCode())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this line do? because it can be negative i am not sure how it works. Maybe instead you can have if (mapPDGToValue(mcTrack.pdgCode()) != 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nzardosh for the suggestion, with the current version the if statement is false only for 0 and true for any other value. For clarity, I have impemented your suggestion.

jetHist.add<TH2>("tracks/h2TOFbetaVsP", "TOF #beta vs #it{p}/Z; Signed #it{p} (GeV/#it{c}); TOF #beta", HistType::kTH2F, {{250, -5.f, 5.f}, {betaAxis}});

// TOF hist
jetHist.add<TH2>("tracks/proton/h2TOFmassProtonVsPt_jet", "h2TOFmassProtonVsPt_jet; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{80, 0.4, 4.}, {50, 0., 5.}});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the 2D histograms with particle species could also be changed to 3D ones with the new pdgcode switches you have

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would make the code much simpler i think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I plan to add the pt of the jet to the 2D histos in my next iteration. Therefore, I will keep this as it is and try to optimise it later.

@arvindkhuntia
Copy link
Contributor Author

Dear @nzardosh, could you please approve the PR if all the implementations are fine with you.

Thanks.

nzardosh
nzardosh previously approved these changes Aug 20, 2024
@nzardosh nzardosh enabled auto-merge (squash) August 20, 2024 15:10
@nzardosh nzardosh merged commit 96282a4 into AliceO2Group:master Aug 20, 2024
10 checks passed
joonsukbae pushed a commit to joonsukbae/O2Physics that referenced this pull request Aug 27, 2024
…p#7213)

* [PWGJE] Task for the nuclei study with FastJet framework

* Please consider the following formatting changes

* Megalinter fixes

* Megalinter fixes

* Update nucleiWithFastJet.cxx

* Please consider the following formatting changes

* Update nucleiWithFastJet.cxx

* Update nucleiWithFastJet.cxx

* Comments addressed

* Please consider the following formatting changes

* Comment addressed

* Please consider the following formatting changes

* Task and executable name changed

---------

Co-authored-by: Arvind Khuntia <[email protected]>
Co-authored-by: ALICE Action Bot <[email protected]>
fchinu pushed a commit to fchinu/O2Physics that referenced this pull request Sep 18, 2024
…p#7213)

* [PWGJE] Task for the nuclei study with FastJet framework

* Please consider the following formatting changes

* Megalinter fixes

* Megalinter fixes

* Update nucleiWithFastJet.cxx

* Please consider the following formatting changes

* Update nucleiWithFastJet.cxx

* Update nucleiWithFastJet.cxx

* Comments addressed

* Please consider the following formatting changes

* Comment addressed

* Please consider the following formatting changes

* Task and executable name changed

---------

Co-authored-by: Arvind Khuntia <[email protected]>
Co-authored-by: ALICE Action Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants