SegmentLinking / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1 stars 2 forks source link

Add Low pT Occupancies #54

Closed GNiendorf closed 2 months ago

GNiendorf commented 3 months ago

This PR adds the occupancies for the 0.6 GeV pT threshold. It changes the current if statements for the occupancies into a 2d matrix of category and eta number for cleaner code. There are 2 matrices for each object, the current 0.8 GeV occupancies matrix and an additional matrix for the 0.6 GeV occupancies. This PR also cleans up some code copy-paste related to the occupancy kernels for selecting the relevant eta and category bins. Lastly, I also added the script that was used to select the 0.6 GeV occupancies.

GNiendorf commented 3 months ago

/run all

github-actions[bot] commented 3 months ago

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     50.6    328.3    127.7     58.1    105.6    506.5    124.4    167.5    104.5      2.4    1575.5    1018.4+/- 265.5     434.2   explicit_cache[s=4] (target branch)
   avg     50.6    330.6    128.0     56.3    103.8    496.9    121.1    165.2    104.6      2.9    1560.0    1012.5+/- 260.3     434.4   explicit_cache[s=4] (this PR)
github-actions[bot] commented 3 months ago

The PR was built and ran successfully with CMSSW. Here are some plots.

OOTB All Tracks
Efficiency and fake rate vs pT, eta, and phi

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

GNiendorf commented 3 months ago

/run all

github-actions[bot] commented 3 months ago

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     47.8    322.3    119.2     47.1     96.1    506.8    118.9    158.7    103.8      2.4    1523.1     968.6+/- 254.1     415.1   explicit_cache[s=4] (target branch)
   avg     47.4    322.3    119.7     48.1     94.4    549.0    119.5    160.1    112.1      2.7    1575.3     978.9+/- 255.4     431.5   explicit_cache[s=4] (this PR)
github-actions[bot] commented 3 months ago

The PR was built and ran successfully with CMSSW. Here are some plots.

OOTB All Tracks
Efficiency and fake rate vs pT, eta, and phi

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

GNiendorf commented 3 months ago

@ariostas Is there any way you could add an optional parameter to the CI to test with the low pT cut? The only thing that would have to change is adding a --ptCut 0.6 for the standalone code, although I'm not sure how you would update the CMSSW run.

ariostas commented 3 months ago

Is there any way you could add an optional parameter to the CI to test with the low pT cut?

Yeah, I'll figure out how one is supposed to adjust parameters in CMSSW and I'll add the option to the CI.

ariostas commented 2 months ago

/run all lowpt

It should work now unless I messed something up. You'll just have to add "lowpt" somewhere in the comment, and if you want to test both setups then you'll just have to make two comments. For now, I didn't make the pt cut configurable (so only 0.8 and 0.6), but if there's a need I can do that.

ariostas commented 2 months ago

/run all lowpt

(I did mess something up. Trying again.)

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago

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     54.6    327.5    361.1    142.7    442.5   1128.1    269.4    772.5    246.0      2.0    3746.3    2563.6+/- 814.1     982.2   explicit_cache[s=4] (target branch)
   avg     55.9    339.6    383.3    190.3    577.4   1239.4    291.2    836.1    268.6     15.6    4197.3    2902.0+/- 997.9    1144.7   explicit_cache[s=4] (this PR)
github-actions[bot] commented 2 months ago

The PR was built and ran successfully with CMSSW (low pT setup). Here are some plots.

OOTB All Tracks
Efficiency and fake rate vs pT, eta, and phi

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

GNiendorf commented 2 months ago

@ariostas Thank you for updating the CI! @slava77 I think this PR is ready for review when you get a chance.

GNiendorf commented 2 months ago

/run all

github-actions[bot] commented 2 months ago

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     47.3    324.1    120.2     47.1     96.8    505.3    119.3    160.1    104.4      1.9    1526.4     973.8+/- 256.0     416.4   explicit_cache[s=4] (target branch)
   avg     48.2    328.1    120.3     47.0     97.4    550.5    120.2    162.8    112.8      2.2    1589.4     990.7+/- 254.7     430.3   explicit_cache[s=4] (this PR)
github-actions[bot] commented 2 months ago

The PR was built and ran successfully with CMSSW. Here are some plots.

OOTB All Tracks
Efficiency and fake rate vs pT, eta, and phi

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

slava77 commented 2 months ago

Here is a timing comparison:

pLS time went up from 505 to 551. Is this real? (I can't quite match with the changes in the code)

@GNiendorf please run the timing locally to check. Thank you.

GNiendorf commented 2 months ago

@slava77 I don't see any timing difference locally

Current CPU timing (4555, 7f3fe16b8e3): master_timing

This PR CPU timing: my_pr_timing

Current GPU timing (4555, 7f3fe16b8e3): Screenshot 2024-07-05 at 4 29 27 PM

This PR GPU timing: Screenshot 2024-07-05 at 4 32 18 PM