Skip to content

Conversation

@smaff92
Copy link
Collaborator

@smaff92 smaff92 commented Feb 17, 2025

Update of stat prompt photon code to incorporate raw data-level analysis

smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 17, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 17, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 17, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 17, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 17, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
@smaff92 smaff92 enabled auto-merge (squash) February 17, 2025 06:49
@alibuild
Copy link
Collaborator

Error while checking build/O2Physics/o2 for 27cc197 at 2025-02-17 08:10:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:702:14: error: unused variable 'nodoublecount' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:703:16: error: unused variable 'etaT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:704:16: error: unused variable 'etaC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:705:16: error: unused variable 'phiT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:706:16: error: unused variable 'phiC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:778:14: error: variable 'phitrigger' set but not used [-Werror=unused-but-set-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:779:16: error: unused variable 'ptT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:41: error: 'const struct o2::soa::Table<o2::aod::Hash<519320931>, o2::aod::Hash<1837103245>, o2::aod::Hash<519320931>, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > >::TableIteratorBase<o2::soa::FilteredIndexPolicy, o2::soa::Filtered<o2::soa::JoinFull<o2::aod::Hash<1837103245>, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > > >, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > >' has no member named 'mcParticle_as'; did you mean 'mcParticles_as'?
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:72: error: expected primary-expression before '>' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:74: error: expected primary-expression before ')' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:924:79: error: expected primary-expression before '>' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:924:81: error: expected primary-expression before ')' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:823:16: error: unused variable 'etaP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:824:16: error: unused variable 'etaC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:825:16: error: unused variable 'phiP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:826:16: error: unused variable 'phiC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:827:16: error: unused variable 'ptP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:660:14: error: unused variable 'photonPt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1033:14: error: unused variable 'pt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:597:209: error: unused parameter 'caltracks' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1178:14: error: unused variable 'nodoublecount' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1073:205: error: unused parameter 'caltracks' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild
Copy link
Collaborator

Error while checking build/O2Physics/o2 for 80805f0 at 2025-02-17 08:17:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:702:14: error: unused variable 'nodoublecount' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:703:16: error: unused variable 'etaT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:704:16: error: unused variable 'etaC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:705:16: error: unused variable 'phiT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:706:16: error: unused variable 'phiC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:778:14: error: variable 'phitrigger' set but not used [-Werror=unused-but-set-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:779:16: error: unused variable 'ptT' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:41: error: 'const struct o2::soa::Table<o2::aod::Hash<519320931>, o2::aod::Hash<1837103245>, o2::aod::Hash<519320931>, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > >::TableIteratorBase<o2::soa::FilteredIndexPolicy, o2::soa::Filtered<o2::soa::JoinFull<o2::aod::Hash<1837103245>, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > > >, o2::soa::Table<o2::aod::Hash<4272352899>, o2::aod::Hash<2347553950>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<3714612535>, o2::aod::Hash<845977645>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<563166164>, o2::aod::Hash<609318300>, o2::aod::Hash<2286545062> > >' has no member named 'mcParticle_as'; did you mean 'mcParticles_as'?
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:72: error: expected primary-expression before '>' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:817:74: error: expected primary-expression before ')' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:924:79: error: expected primary-expression before '>' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:924:81: error: expected primary-expression before ')' token
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:823:16: error: unused variable 'etaP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:824:16: error: unused variable 'etaC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:825:16: error: unused variable 'phiP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:826:16: error: unused variable 'phiC' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:827:16: error: unused variable 'ptP' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:660:14: error: unused variable 'photonPt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1033:14: error: unused variable 'pt' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:597:209: error: unused parameter 'caltracks' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1178:14: error: unused variable 'nodoublecount' [-Werror=unused-variable]
/sw/SOURCES/O2Physics/9999-slc9_x86-64/0/PWGJE/Tasks/statPromptPhoton.cxx:1073:205: error: unused parameter 'caltracks' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

Copy link
Collaborator

@fjonasALICE fjonasALICE left a comment

Choose a reason for hiding this comment

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

Hi,
I left some comments for your consideration. After they are implemented it should be okay for a first approval @nzardosh should check as well.
Best,
Florian

using MCClusters = o2::soa::Join<o2::aod::EMCALMCClusters, o2::aod::EMCALClusters>;
using selectedCollisions = soa::Join<aod::Collisions, aod::EvSels>;
using selectedMCCollisions = aod::McCollisions;
using Clusters = o2::aod::EMCALMCClusters;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@nzardosh is this one the correct one to use for derived JE data? Not sure but we so far anyways do not have derived data for MC? so should be fine?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am currently anyway not utilizing these non-JE derived classes, so it should be fine if I also remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These non-JE cluster classes are now removed

} // 3rd photon loop
} // 2nd photon check

std::cout << "We have a GEN prompt photon" << std::endl;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you probably do not want to havethese debug messages for every photon when running on hyperloop

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

}
} // first photon loop

if (std::fabs(mompdg1) < 40 && std::fabs(mompdg1) > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you explain the loop logic? it is not fully clear to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to check where the photon originates from, whether it is a "direct" prompt photon, originating from the hardest process, or is produced is subsequent showers. The statement simply ensures that the photon originates from something on the lower section of PDG codes (i.e., not form hadrons)

if (!trackSelection(ogtrack)) {
continue;
}
if (!ogtrack.isGlobalTrack()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

since you are in any case using derived data, I suggest to use the track selection from the jeutilities and make the type of track you want to filter on a configurable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would prefer not to do this. I prefer the flexibility to also be able to run over non-derived data.
Furthermore, I find this solution better when later on doing systematics on track quality, instead of using a magnitude of several restricted filters

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 i would agree with Florian. If the only reason you need the original track table is track selection then you should instead use the je utilities and remove the subscription to the original tracks. Unless there is a type of track selection you need which we dont have (we can also add that to the JE framework). Using the JE utilities doesnt mean you are limited to the derived data, as you can still run over the original aod but it means you have the possibility of running over the derived too. If you keep the original tracks table you cant run over derived data

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now, I have to insist on using the original track table.

I've already found that this analysis is extremely sensitive to the track selection used, (geometrical TPC cut is required, and the sensitivity of this cut is correlated to TPC crossed-rows etc) and I need more statistics to do proper QA in order to investigate which configuration of cuts work best.

It would at this point be inefficient use of my time to transfer to the je utilities, as I at this point don't know what kind of selection I would like to have, which would mean that I have to add 20-30 track selections to the je utilities that might be redundant in a couple of weeks.

Once the "golden cuts" + suitable systematic variations are found for the analysis, I will migrate to the je utilities and add any required track selection to the JE framework (as well as adding a flag for a built-in geometric TPC cut)

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we can set a time, lets say a month where you can find the correct tracking cuts and then move to je utilities i think that is fine. But it would be quite important to do so as soon as possible, particularly before any analysis level long trains

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, one month would be more than enough, I would essentially need like 10-20 or so subwagons running over the small apass7 dataset + small Jet-Jet anchored MC to estimate this. So one month would be fine for me.

histos.fill(HIST("REC_Track_v_Cluster_Phi_Eta_C"), phidiff, etadiff);
} else {
if (etatrigger && chargetrigger) {
std::cout << "????????????????????" << std::endl;
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove cout

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

if (!trackSelection(ogtrack)) {
continue;
}
if (!ogtrack.isGlobalTrack()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

see previous comment about track selection

{

nEventsData++;
if ((nEventsData + 1) % 10000 == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove debug output, not needed when on hyperloop

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

if (!trackSelection(ogtrack)) {
continue;
}
if (!ogtrack.isGlobalTrack()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

see previous comment about track selection

double phidiff = TVector2::Phi_mpi_pi(cluster.phi() - ogtrack.phi());
double etadiff = cluster.eta() - ogtrack.eta();

if (fabs(etaT - etaC) < (0.010 + pow(ptT + 4.07, -2.5))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion: make configurable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do

if (fabs(TVector2::Phi_mpi_pi(phiT - phiC)) < (0.015 + pow(ptT + 3.65, -2.0))) {
phitrigger = true;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

E/p veto for track matching missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, E/p veto for track matching is later down the code (1213-1223)

[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
smaff92 added a commit to smaff92/O2Physics that referenced this pull request Feb 18, 2025
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
[PWGJE] Please consider the following formatting changes to AliceO2Group#9999
@nzardosh
Copy link
Collaborator

Florian let me know when you are happy with the PR

@fjonasALICE
Copy link
Collaborator

@nzardosh happy with the changes, you can approve!

@nzardosh nzardosh changed the title [PWGJE] - Wipe of remote branch + updating stat prompt photon [PWGJE] - updating stat prompt photon Feb 18, 2025
@nzardosh nzardosh disabled auto-merge February 18, 2025 12:36
@nzardosh nzardosh enabled auto-merge (squash) February 18, 2025 12:36
@nzardosh nzardosh dismissed fjonasALICE’s stale review February 18, 2025 12:37

Dismissing since changes were adhered to

@nzardosh nzardosh merged commit 17babbb into AliceO2Group:master Feb 18, 2025
17 of 18 checks passed
alibuild added a commit to alibuild/O2Physics that referenced this pull request Aug 11, 2025
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
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