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

Updated Occupancies #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated Occupancies #147

wants to merge 1 commit into from

Conversation

GNiendorf
Copy link
Member

@GNiendorf GNiendorf commented Jan 24, 2025

Updated occupancies for all LST objects, and small updates to the notebook for printing them.

This PR Timing (0.8 GeV):
Screenshot 2025-01-25 at 9 17 06 PM

Original Timing (0.8 GeV):
Screenshot 2025-01-24 at 4 25 57 PM

This PR Timing (0.6 GeV):
Screenshot 2025-01-25 at 9 30 55 PM

Original Timing (0.6 GeV):
Screenshot 2025-01-24 at 4 33 32 PM

@GNiendorf
Copy link
Member Author

/run all

@GNiendorf GNiendorf requested a review from slava77 January 24, 2025 21:20
Copy link

There was a problem while building and running with CMSSW. The logs can be found here.

@GNiendorf
Copy link
Member Author

@ariostas Seems like an issue with the CMSSW tests? Something about alpaka math?

Copy link

The PR was built and ran successfully in standalone mode. Here are some of the comparison plots.

Efficiency vs pT comparison Efficiency vs eta comparison
Fake rate vs pT comparison Fake rate vs eta comparison
Duplicate rate vs pT comparison Duplicate rate vs eta comparison

The full set of validation and comparison plots can be found here.

Here is a timing comparison:

   Evt    Hits       MD       LS      T3       T5       pLS       pT5      pT3      TC       Reset    Event     Short             Rate
   avg     46.0    401.4    188.0    150.9    146.0    551.4    122.8    233.0    151.3      3.7    1994.5    1397.1+/- 387.4     528.0   explicit[s=4] (target branch)
   avg     43.0    393.4    188.3    161.6    149.4    549.3    123.6    231.1    150.6      3.2    1993.6    1401.3+/- 390.3     529.1   explicit[s=4] (this PR)

@GNiendorf
Copy link
Member Author

/run standalone lowpt

@ariostas
Copy link
Member

Oh that's a package that was recently introduced by Manos. You could cherry-pick that commit or see if by early next week the CMSSW PR finally gets merged so that you can rebase

Copy link

The PR was built and ran successfully in standalone mode (low pT setup). Here are some of the comparison plots.

Efficiency vs pT comparison Efficiency vs eta comparison
Fake rate vs pT comparison Fake rate vs eta comparison
Duplicate rate vs pT comparison Duplicate rate vs eta comparison

The full set of validation and comparison plots can be found here.

Here is a timing comparison:

   Evt    Hits       MD       LS      T3       T5       pLS       pT5      pT3      TC       Reset    Event     Short             Rate
   avg     51.0    407.0    591.2    761.4   1052.4   1228.5    294.0   1152.9    360.3      5.0    5903.7    4624.2+/- 1634.9    1533.7   explicit[s=4] (target branch)
   avg     51.7    403.2    586.2    788.8   1215.9   1222.9    293.5   1161.9    367.7      6.4    6098.2    4823.6+/- 1758.5    1590.7   explicit[s=4] (this PR)

constexpr int p08_occupancy_matrix[4][4] = {
{336, 414, 231, 146}, // category 0
{161, 129, 135, 132}, // category 0
Copy link

Choose a reason for hiding this comment

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

this is a pretty large drop: does this rely on the pending T3 DNN?

Copy link
Member Author

@GNiendorf GNiendorf Jan 24, 2025

Choose a reason for hiding this comment

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

I also don't think the T3 DNN will affect the T5 occupancies much. The T5 fake rate is already pretty low compared to the T3 fake rate, so a cleaner set of T3 candidates shouldn't lower the T5 occupancies much.

edit: Maybe this is from the T5 DNN? These occupancies were selected before the T5 DNN was added to the code. The location seems correct.

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 4

Percentiles look correct. Either I made a mistake, or it was the T5 DNN that lowered these.

" 'md_occupancies', 'sg_occupancies', 't3_occupancies', 't5_occupancies']\n",
"\n",
"# Root file generated with compile -d option turned on to generate relevant occupancy branches\n",
"file_path = \"occ_1000_p06.root\"\n",
Copy link

Choose a reason for hiding this comment

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

am I guessing correctly that the old derivation was based on 1000 events and the new on 500?
Considering some relatively large changes at 99.99% quantile, I suspect that this reduction in the occupancies may be chasing some tails of occasional combinatorial explosions. Are there always enough entries in the remaining 0.01% to make the decision? Something >>10 (e.g. > 30) would be good.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, in the slides Yonsi sent me it said she used a 500 event sample for the 0.8 occupancies, so I tried to match that here. I will check.

{0, 38, 46, 39} // category 3
{668, 271, 105, 59}, // category 0
{738, 310, 0, 0}, // category 1
{0, 13, 5, 0}, // category 2
Copy link

Choose a reason for hiding this comment

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

which kinematic regions are these 4 bins? (to follow up on the discussion during the meeting for why earlier zeroes are now not)

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2025-01-24 at 6 06 58 PM

Copy link

Choose a reason for hiding this comment

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

this still requires parsing: what are the two middle elements out of 4 in the category 2?
Is Category 2 defined by radius and z range or by the disk and ring index in the endcap?

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2025-01-24 at 6 57 09 PM

Definition of Category 2: (module_layers >= 4) & (module_subdets == 5)
Definition of Eta ranges:
eta_numbers[module_eta < 0.75] = 0
eta_numbers[(module_eta >= 0.75) & (module_eta < 1.5)] = 1
eta_numbers[(module_eta >= 1.5) & (module_eta < 2.25)] = 2
eta_numbers[(module_eta >= 2.25) & (module_eta < 3)] = 3

@GNiendorf
Copy link
Member Author

/run all

Copy link

There was a problem while building and running with CMSSW. The logs can be found here.

Copy link

The PR was built and ran successfully in standalone mode. Here are some of the comparison plots.

Efficiency vs pT comparison Efficiency vs eta comparison
Fake rate vs pT comparison Fake rate vs eta comparison
Duplicate rate vs pT comparison Duplicate rate vs eta comparison

The full set of validation and comparison plots can be found here.

Here is a timing comparison:

   Evt    Hits       MD       LS      T3       T5       pLS       pT5      pT3      TC       Reset    Event     Short             Rate
   avg     46.6    395.5    187.1    152.4    147.6    549.4    124.5    235.1    151.6      3.6    1993.5    1397.5+/- 386.1     530.6   explicit[s=4] (target branch)
   avg     44.2    394.5    190.0    154.8    141.5    551.4    124.9    235.9    151.0      3.3    1991.6    1396.0+/- 388.1     529.6   explicit[s=4] (this PR)

@GNiendorf
Copy link
Member Author

/run standalone lowpt

Copy link

The PR was built and ran successfully in standalone mode (low pT setup). Here are some of the comparison plots.

Efficiency vs pT comparison Efficiency vs eta comparison
Fake rate vs pT comparison Fake rate vs eta comparison
Duplicate rate vs pT comparison Duplicate rate vs eta comparison

The full set of validation and comparison plots can be found here.

Here is a timing comparison:

   Evt    Hits       MD       LS      T3       T5       pLS       pT5      pT3      TC       Reset    Event     Short             Rate
   avg     50.1    402.7    580.2    758.5   1048.2   1222.7    290.8   1153.1    359.7      5.6    5871.5    4598.7+/- 1628.6    1527.6   explicit[s=4] (target branch)
   avg     50.5    404.7    578.5    721.4   1132.0   1228.3    293.1   1159.6    363.2      6.3    5937.6    4658.8+/- 1669.7    1536.4   explicit[s=4] (this PR)

@GNiendorf GNiendorf changed the title Updated Occupancies Updated Occupancies + Dynamic MDs Allocation Jan 26, 2025
@GNiendorf
Copy link
Member Author

/run standalone

Copy link

There was a problem while building and running in standalone mode. The logs can be found here.

@GNiendorf GNiendorf changed the title Updated Occupancies + Dynamic MDs Allocation Updated Occupancies Jan 27, 2025
@GNiendorf
Copy link
Member Author

Moving the dynamic memory allocation to #148

@GNiendorf
Copy link
Member Author

I think it makes sense to merge #148 first and then quickly reevaluate the occupancy thresholds. It's likely we can increase the caps now without a huge increase in memory in order to decrease truncation.

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

Successfully merging this pull request may close these issues.

3 participants