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 hadron-jet correlations in O-O collisions #8688

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KotliarovAr
Copy link
Contributor

A new task designed to study hadron-jet correlations in the upcoming OO collisions.

Dear @nzardosh,
Could you review the code? Also, I want to ask 2 questions:

  1. we discussed some time ago that the JE framework does not contain functionality to estimate rho background for particle level MC. Do we plan to add such functionality?

  2. when we want to get a weight for MC detector level simulations, we use auto weight = collision.mcCollision().weight(). There is a function that checks whether a collision has an associated MC collision: collision.has_mcCollision(). So, not all detector-level collisions have associated particle-level collisions? Are we protected from the output not being garbage due to the absence of the associated MC collision when calling collision.mcCollision().weight()? Should we also introduce a check (collision.has_mcCollision()) that discards the MC detector level collisions, which do not have associated MC particle level collisions?

bool skipEvent(const Collision& coll)
{
/// \TODO: Do need !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits) flag to skip an event?
return !coll.selection_bit(aod::evsel::kNoTimeFrameBorder) || !jetderiveddatautilities::selectCollision(coll, eventSelection);
Copy link
Collaborator

Choose a reason for hiding this comment

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

hi Artem, isnt the NoTimeFrameBorder cut already included in sel8?
For this one selection this means that you are not fully using the derived data and are instead relying on the evsels table which we should find a way of avoiding. If the timeframe border cut is not included we can add this as a selection in the jet framework that can be accessed with jetderiveddatautilities::selectCollision

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Nima,

It seems you are right, we should have the kNoTimeFrameBorder flag in the sel8 selection (slide 9: https://indico.cern.ch/event/1425820/contributions/6139628/attachments/2946808/5179269/2024Oct14_AnTutorial_AOT.pdf)

The same cut actually is used in the Trigger QA task. Is it a critical issue? Should I fix it immediately or in the next PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you could fix it now it would be great, because i think this way if you remove the need for it then you can remove the dependency on the Event selection tables and then you can run directly on the JE derived data

std::tuple<double, bool> isRecoilJet(const Jet& jet,
double phi_TT)
{
double dphi = fabs(TVector2::Phi_mpi_pi(jet.phi() - phi_TT));
Copy link
Collaborator

Choose a reason for hiding this comment

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

for this use the RecoDecay::constrainAngle function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added
Interesting to know why we should use RecoDecay::constrainAngle instead of TVector2::Phi_mpi_pi?

Copy link
Collaborator

Choose a reason for hiding this comment

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

recodecay is the official place where these operations are done so the recommendation from O2 is to use that where possible. @vkucera can comment more

Copy link
Collaborator

Choose a reason for hiding this comment

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

@KotliarovAr O2 is C++ code, not ROOT code. There is no reason to use ROOT features if equivalents exist in standard C++ or O2.

@alibuild
Copy link
Collaborator

alibuild commented Dec 4, 2024

Error while checking build/O2Physics/o2 for 06a4913 at 2024-12-05 07:30:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:51:90: error: wrong number of template arguments (2, should be 1)
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:463:28: error: 'filtered_Coll_PartLevel' has not been declared
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:472:37: error: 'filtered_Coll_PartLevel' has not been declared
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:467:45: error: request for member 'posZ' in 'collision', which is of non-class type 'const int'
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:468:22: error: no matching function for call to 'jetHadronRecoil_OO::fillMCPHistograms(const filtered_Jets_PartLevel&, const o2::aod::JetParticles&)'
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:476:29: error: request for member 'weight' in 'collision', which is of non-class type 'const int'
/sw/SOURCES/O2Physics/8688-slc9_x86-64/0/PWGJE/Tasks/jetHadronRecoil_OO.cxx:477:45: error: request for member 'posZ' in 'collision', which is of non-class type 'const int'
/sw/slc9_x86-64/O2/daily-20241205-0000-local1/include/Framework/AnalysisTask.h:261:46: error: no matching function for call to 'o2::framework::{anonymous}::AnalysisDataProcessorBuilder::extract<std::decay_t<const int&>, 0>(o2::framework::InputRecord&, std::vector<ExpressionInfo>&, const unsigned int&)'
/sw/slc9_x86-64/O2/daily-20241205-0000-local1/include/Framework/TableBuilder.h:596:33: error: call of overloaded 'policy()' is ambiguous
/sw/slc9_x86-64/O2/daily-20241205-0000-local1/include/Framework/AnalysisTask.h:198:286: error: call of overloaded 'Table(<brace-enclosed initializer list>)' is ambiguous
ninja: build stopped: subcommand failed.

Full log here.

@nzardosh nzardosh enabled auto-merge (squash) December 5, 2024 14:12
@nzardosh nzardosh disabled auto-merge December 5, 2024 14:12
@nzardosh
Copy link
Collaborator

nzardosh commented Dec 5, 2024

My final comment is, why do you call this task OO? In principle it can be used for any system right? It would be good to rename it

@KotliarovAr
Copy link
Contributor Author

My final comment is, why do you call this task OO? In principle it can be used for any system right? It would be good to rename it

You are right, the code can be also used for pp collisions. However, there is a similar code for h+jet analysis written by Danny and Jaime, which analyses in addition WTA jet axis. So, renaming could confuse.

@nzardosh
Copy link
Collaborator

My final comment is, why do you call this task OO? In principle it can be used for any system right? It would be good to rename it

You are right, the code can be also used for pp collisions. However, there is a similar code for h+jet analysis written by Danny and Jaime, which analyses in addition WTA jet axis. So, renaming could confuse.

It would be good if we could find a different name than OO though to make them distinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants