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

Comparison PR for upgrade to 14_1 #41

Open
wants to merge 268 commits into
base: CMSSW_12_6_0_pre2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
f811452
Merge pull request #34751 from mariadalfonso/backport_part2
cmsbuild Aug 4, 2021
10b2033
Merge pull request #34747 from bsunanda/Run3-hcx306X
cmsbuild Aug 4, 2021
c291535
Merge pull request #34741 from cms-tsg-storm/HLTmigrationTo1200pre5
cmsbuild Aug 4, 2021
29e1354
Merge pull request #34766 from thomreis/ecal-gpu-ecalout-fix
cmsbuild Aug 4, 2021
2c9cc65
Merge pull request #34743 from jshlee/GEM-newDAQStatus-12_0_0_pre3
cmsbuild Aug 4, 2021
3f7d8b5
Merge pull request #34749 from fwyzard/HCAL_GPU_modules_protect_for_e…
cmsbuild Aug 5, 2021
20c7b7a
HF SimHits timing fix 12_0_X
Aug 5, 2021
11f2a69
Merge pull request #34799 from abdoulline/EqualizeTimeShift_12_0_X
cmsbuild Aug 7, 2021
db8c328
Backport of changes in PR34606 merged into 12_1_X
veszpv Aug 10, 2021
57f13f6
Python3 fix + various improvements
ggovi Aug 12, 2021
fb3c78c
Fix the regex to match the LHE tags in mergeLHE.py
colizz Aug 13, 2021
8178f5a
Merge pull request #34851 from veszpv/PixelClusterRepairByMorphing_ba…
cmsbuild Aug 13, 2021
b001a8c
Change event number to 12 for workflow 537
colizz Aug 13, 2021
67a7f32
Add check if track angles are finite to avoid rare crash
Aug 11, 2021
10f0cad
fix miscelleanous mistakes in the all-in-one template configutations
mmusich Aug 13, 2021
7916c58
introduce python compilation time check of the configuration files pr…
mmusich Aug 13, 2021
1ef8943
Merge pull request #34877 from mmusich/miscellaneousFixesAlignmentOff…
cmsbuild Aug 16, 2021
4462af2
migrate AlignmentProducer to event consumes
mmusich Aug 16, 2021
5c0525f
Merge pull request #34845 from CTPPS/pps-alignment-global-fix
cmsbuild Aug 16, 2021
28903fd
Merge pull request #34888 from mmusich/TemplateInterpolate_isFinite_f…
cmsbuild Aug 17, 2021
3972dac
Add HCAL tag HcalRespCorrs_2021_v3.0_mc
tvami Aug 17, 2021
bd35faa
Fix radix sort test
fwyzard Aug 18, 2021
9fee873
do not produce NaNs in SiPixelActionExecutor
mmusich Aug 16, 2021
261229f
Merge pull request #34930 from fwyzard/fix_radix_sort_test_120x
cmsbuild Aug 19, 2021
0c32170
Merge pull request #34936 from mmusich/fixWf8.0comparisons_12_0_X
cmsbuild Aug 19, 2021
5eb3dd9
Merge pull request #34854 from ggovi/condcore-utilities-o2o-10-120X
cmsbuild Aug 19, 2021
3d1669c
HLT customisation for Patatrack pixel tracks and GPU offload
fwyzard Aug 19, 2021
7e07667
Merge pull request #34947 from mmusich/Alignment/CommonAlignmentProdu…
cmsbuild Aug 20, 2021
bc59305
Correct material order in DB payload
cvuosalo Aug 20, 2021
571d4a4
Clean debug line
cvuosalo Aug 20, 2021
122ff5c
Fix an issue with the track parameter digitization. Add a new functio…
Jul 21, 2021
b27b636
Merge pull request #34957 from fwyzard/HLT_customisation_for_GPU_120x
cmsbuild Aug 21, 2021
c9c01df
Restore cms::cuda::ESProduct construction without GPU
makortel Aug 20, 2021
557a7e8
Merge pull request #34949 from fwyzard/CUDA_fix_concurrent_EventSetup…
cmsbuild Aug 23, 2021
3ba9d5c
Code formatting
cvuosalo Aug 23, 2021
7bbc0d9
add dqm harvested file opening capability in legacyiohelper
sroychow Jul 23, 2021
e8e1c59
use legacy io helper in sistripofflineDQM
sroychow Jul 23, 2021
289fab5
close input file after cloning histos
sroychow Aug 20, 2021
5f864df
reset residuals mean map name for summary file creation
mmusich Aug 20, 2021
34b2f98
add unit test for SiStripDQM_OfflineTkMap
mmusich Aug 16, 2021
fe63c1e
code-format & code-check & clean-up
mmusich Aug 20, 2021
3e7c831
Merge pull request #34923 from tvami/FixHCALrespAssymetry-backport
cmsbuild Aug 25, 2021
bda431d
Validation plots for APE and bug fixes
mteroerd Aug 25, 2021
c3bf8f4
fixed some edge-cases in HLT-Patatrack customisations
missirol Aug 24, 2021
a53f448
support for PixelTracksSeq-only case in customisePixelLocalReconstruc…
missirol Aug 24, 2021
c3a3add
Merge pull request #35007 from mteroerd/ape_bugfix_1200_backport
cmsbuild Aug 26, 2021
f8a13ae
Merge pull request #34861 from colizz/dev-120X-fixWorkflow537AndFixMe…
cmsbuild Aug 26, 2021
44fd084
Merge pull request #35009 from missirol/devel_hltPatatrackCustomFunc_…
cmsbuild Aug 26, 2021
5396089
Fix on compilation issues with DMR, GC and MTS validation scripts. Ba…
TomasKello Aug 26, 2021
82812dd
added some members to pftruthparticle
jkiesele Jun 18, 2021
28baaa4
a step towards pf particle
jkiesele Jun 21, 2021
ef16953
fixes
jkiesele Jun 21, 2021
a69d303
Add particle guns
kdlong Aug 27, 2021
83da069
Turn off TP and SC associations in PFTruth
kdlong Aug 27, 2021
a0f03e3
Fix input collection for SimHits and SimTracks
kdlong Aug 27, 2021
7ea37ce
Merge pull request #20 from kdlong/pepr_CMSSW_12_0_0_pre3
jkiesele Aug 27, 2021
c9d4d00
Merged pepr_CMSSW_12_0_0_pre3 from repository cms-pepr with cms-merge…
jkiesele Aug 27, 2021
24ccadd
running version of pf truth
jkiesele Aug 27, 2021
1c1f6d2
remove unneeded includes
mmusich Aug 27, 2021
4c02f36
another snapshot
jkiesele Aug 27, 2021
10323b3
Merge pull request #34987 from cvuosalo/matOrdFix120
cmsbuild Aug 27, 2021
a6516bc
Merge pull request #35025 from TomasKello/fix_validation_DMR_MTS_GC_12_0
cmsbuild Aug 29, 2021
d5688d6
Enable concurrent GEN in Configuration/Generator/python (12_0_X)
colizz Aug 30, 2021
e0dff19
Fix the random segfault of RelVal workflow 573 (12_0_X)
colizz Aug 30, 2021
898b013
Better handling of timeout in FWCore/SharedMemory
Dr15Jones Aug 6, 2021
5e4077c
Make algorithm logic clearer
Dr15Jones Aug 7, 2021
472ca8a
Share code across tests
Dr15Jones Aug 8, 2021
3a1dbf7
Merge pull request #34993 from CMSTrackerDPG/fixTrackerMapsForRun3_12X
cmsbuild Aug 31, 2021
c8dbfef
Merge pull request #35076 from colizz/dev-120X-timeoutSharedMemory
cmsbuild Aug 31, 2021
a087bfe
Merge pull request #35075 from colizz/dev-120X-bacportConcurrentGenUt…
cmsbuild Sep 1, 2021
46905e0
Merge pull request #35087 from Sam-Harper/PATTriggerFullModeZeroFilte…
cmsbuild Sep 1, 2021
7ad8211
Merge pull request #34970 from aperloff/CMSSW_12_0_X-TrackWordDigitiz…
cmsbuild Sep 2, 2021
27b3465
PFTruth particle (with unmerged SCs)
kdlong Sep 20, 2021
1f6d93e
Merged pepr_CMSSW_12_0_0_pre3 from repository kdlong with cms-merge-t…
kdlong Sep 20, 2021
00a3d7f
Take CMSSW_12_0 Geant settings
kdlong Sep 20, 2021
a76038d
Merged pepr_CMSSW_12_0_0 from repository kdlong with cms-merge-topic
kdlong Oct 5, 2021
0d84915
Add outline of RecoTrack to SC matching
kdlong Oct 18, 2021
f732fe5
Merged pepr_CMSSW_12_0_0 from repository cms-pepr with cms-merge-topic
jkiesele Oct 21, 2021
887c93c
added sensor radius approximation and genVertexTable(s) fix
jkiesele Oct 21, 2021
f0b7afc
Merge branch 'pepr_CMSSW_12_0_0' into from-CMSSW_12_0_0
jkiesele Oct 21, 2021
6b6aebf
Update nanoHGCML_cff.py
kdlong Oct 22, 2021
443d11f
Merge pull request #49 from jkiesele/from-CMSSW_12_0_0
kdlong Oct 22, 2021
50d956b
fogotten merging with circles was never added
jkiesele Oct 22, 2021
8b81c7d
make it work in 12
jkiesele Oct 22, 2021
dd0def5
abstract 1:1 merger implementation to replace Thomas's node merging f…
jkiesele Oct 22, 2021
ddde97b
finalised version 0
jkiesele Oct 22, 2021
c16a63a
tested and made it nicer
jkiesele Oct 23, 2021
f13f4e9
better description and recalc function in place
jkiesele Oct 23, 2021
85fb5a8
added index tracing that might come handy
jkiesele Oct 24, 2021
867e7ea
typo fix and more description
jkiesele Oct 24, 2021
a970074
Store Track-->SimCluster matching by dR
kdlong Oct 26, 2021
f939119
Add Track<-->TrackingPart associations to ntuples
kdlong Oct 26, 2021
8ad9bdc
Add Track-->PFTruth indices to ntuples
kdlong Oct 28, 2021
1b89b83
Fix #35827
lecriste Oct 28, 2021
9dadb6f
Fix era for DQM BeamSpot clients
francescobrivio Oct 29, 2021
364cd6a
HLT migration to 12_1_0_pre5 template
Martin-Grunewald Oct 29, 2021
9b2be04
HLT migration to 12_1_0_pre5 template
Martin-Grunewald Oct 29, 2021
66f4763
HLT migration to 12_1_0_pre5 template
Martin-Grunewald Oct 29, 2021
54cfee0
Merge pull request #35907 from cms-tsg-storm/HLTmigrationTo1210pre5
cmsbuild Oct 30, 2021
d12459e
Merge pull request #35905 from slava77/CMSSW_12_1_X_2021-10-27-2300/s…
cmsbuild Oct 31, 2021
1247301
Produce new collection of CPs keyed to merged SCs
kdlong Oct 31, 2021
c6b9967
Merge pull request #35902 from fwyzard/fix_customiseHCALFor2018Input_…
cmsbuild Nov 1, 2021
8d510da
fix for TestDQMServicesDemo unit test
missirol Oct 31, 2021
3b61d16
Improve DQM beamspot clients
francescobrivio Oct 30, 2021
d5206da
fix typo in name of BeamSpotOnline tag for Legacy client
francescobrivio Oct 30, 2021
fdb4e60
remove getByLabel and allow to fetch vertex collection from configura…
mmusich Nov 1, 2021
2a7ef1d
remove ptMin = 0.1 in DQM BeamSpot Legacy client
francescobrivio Nov 1, 2021
3c65168
Merge pull request #35930 from mmusich/devel_fixDQMUnitTest_12_1_X
cmsbuild Nov 2, 2021
3f27c8b
Merge pull request #35916 from fwyzard/fix_hltSiPixelRecHitSoA_121x
cmsbuild Nov 2, 2021
679e644
Merge pull request #35894 from mmusich/parallelValidation_12_1_X
cmsbuild Nov 2, 2021
b15182b
Merge pull request #35895 from mmusich/fix_beam_pixel_client
cmsbuild Nov 3, 2021
bd6dfef
Merge pull request #35933 from mmusich/fixGetByLabel_12_1_X
cmsbuild Nov 3, 2021
9a896be
Merge pull request #35935 from francescobrivio/alca-BS_nameFix_12_1_X
cmsbuild Nov 3, 2021
7e9be35
Merge pull request #35900 from francescobrivio/alca-BS_eraModifier_12…
cmsbuild Nov 3, 2021
73a27db
Removing obsolete code
perrotta Nov 4, 2021
17d9b6a
Merge pull request #35980 from perrotta/fixCaloLayer1Setup
cmsbuild Nov 4, 2021
b5695d3
Merge pull request #35958 from slava77/CMSSW_12_1_0_pre4/sign1125/egm…
cmsbuild Nov 4, 2021
86bfd2c
ML based online Ecal DQM
abhih1 Nov 5, 2021
db180df
Change onnx file location and remove some unused variables
abhih1 Nov 5, 2021
b6d7108
Add switch for lumi only for online config
abhih1 Nov 5, 2021
ab48878
Add condition for runs without luminosity and fix unittest fail
abhih1 Nov 7, 2021
872fd94
HLT menu migration to 12_1_0 template
Martin-Grunewald Nov 9, 2021
da3cadd
adding proxy support for hlt menu retrival
Sam-Harper Nov 3, 2021
7953092
fixing jar download to update if there is a new jar file
Sam-Harper Nov 4, 2021
48b0a2d
bug fixes in hltIntegration setup commands
Sam-Harper Nov 4, 2021
79ceb5f
Apply suggestions from code review
Sam-Harper Nov 5, 2021
5d4be7e
adjusting to read the confdb version file instead of hashes
Sam-Harper Nov 5, 2021
101b8b2
Apply suggestions from code review
Sam-Harper Nov 8, 2021
13ac29b
Make ML plots available only for online dqm
abhih1 Nov 9, 2021
ff3a6fa
small fix to integrationTests
Sam-Harper Nov 9, 2021
0cf4375
Update mkFit seed converted and partition function
mmasciov Nov 3, 2021
418ac2f
Implement comments from PR review
mmasciov Nov 9, 2021
4230278
Merge pull request #36048 from cms-tsg-storm/HLTmigrationTo1210
cmsbuild Nov 10, 2021
0ce8650
introduced pt_threshold and default values to L2TauCNN
valeriadamante Nov 5, 2021
a50ff6a
Add default working points to deepTauID
lwezenbe Nov 5, 2021
22c4707
Small fixes suggested during review
mbluj Nov 6, 2021
6d8a387
fix memory bug in DNN-based ID
slava77 Nov 11, 2021
5ae4869
Merge pull request #35992 from abhih1/ML4DQM_EB_integration_121X
cmsbuild Nov 12, 2021
155c85a
Merge pull request #36089 from cms-tau-pog/CMSSW_12_2_X_tau-pog_DNNat…
cmsbuild Nov 12, 2021
78a4df7
Apply suggestions from code review
Sam-Harper Nov 12, 2021
4ca9aea
Merge pull request #36091 from slava77/patch-112
cmsbuild Nov 12, 2021
e8b78dd
Merge pull request #36051 from Sam-Harper/hltProxySupport_1210
cmsbuild Nov 12, 2021
e9f7bbc
Merge pull request #36075 from trackreco/backportPR35974
cmsbuild Nov 13, 2021
f8deafb
Merge pull request #36110 from fwyzard/MPICore_add_cmsenv_scripts
cmsbuild Nov 14, 2021
235efa6
customisation snippet for full-range M0 default
Nov 17, 2021
5ea513a
update and move HBHE reco customisation to RecoLocalCalo/Configuration
Nov 18, 2021
923d8cd
Merge pull request #36162 from abdoulline/M0_full-range_default_12_1
cmsbuild Nov 20, 2021
7c54952
Change SiPixel LA PCL naming
tvami Nov 19, 2021
db63563
Merge pull request #36189 from mmusich/from_tvami_LAPCLNaming_12_1_X
cmsbuild Nov 22, 2021
0cf183d
update split vertex validation
mmusich Nov 17, 2021
a83c27a
fix graphics for 2D maps for BPix L1
mmusich Nov 22, 2021
b1193a1
fix graphics of dz vs phi fit
mmusich Nov 22, 2021
cea8a7a
several fixes in the binning of SplitVertexResolution
mmusich Nov 23, 2021
cbe82d9
use PixelTopologyMap and Phase1PixelSummaryMap
mmusich Apr 11, 2021
93f3d6f
rationalize token usage
mmusich Nov 4, 2021
7fc98dc
add provision for the pilot beam 2021
mmusich Nov 4, 2021
79f9cd2
fix manually set scale for Layer 1 trends
mmusich Nov 4, 2021
49a428a
code-checks and format
mmusich Nov 4, 2021
ccd0be8
simplify ES access
mmusich Nov 4, 2021
43a0ae0
fix COM energy in label
mmusich Nov 4, 2021
8fca7fc
move run-based analysis to beginRun
mmusich Nov 4, 2021
623871b
Merge pull request #36240 from mmusich/miscellaneaneousUpdatesPVValid…
cmsbuild Nov 25, 2021
ba66c7c
backport of cms-sw#35858
missirol Nov 25, 2021
7ef40fa
backport of cms-sw#36019
missirol Nov 25, 2021
357a595
Merge pull request #36252 from missirol/devel_hltSchedule_121X
cmsbuild Nov 26, 2021
17b8322
Modify calculations for the Lorentz angle
tvami Nov 26, 2021
6213a97
Merge pull request #36266 from tvami/LANewMethod
cmsbuild Nov 28, 2021
d970003
Add label for SiPixelQuality used in RawToDigi
tsusa Nov 25, 2021
2c556b7
Add process modifier
tsusa Nov 25, 2021
999dd47
Apply code_checks
tsusa Nov 26, 2021
c2985b6
Move code to the proper place
tsusa Nov 29, 2021
6da4f66
Merge pull request #36280 from fwyzard/fix_prefixScan_assert
cmsbuild Nov 29, 2021
2b25de1
First version of nanoDQMIO content
jfernan2 Nov 29, 2021
60daa13
Fixed missing CTPPS modifier
jfernan2 Nov 29, 2021
63d2e22
Fixed another ME
jfernan2 Nov 29, 2021
4f7edcd
Fixed version
jfernan2 Nov 30, 2021
4c0e282
Merge pull request #36286 from tsusa/SiPixelQualityLabelEventFilter_121X
cmsbuild Dec 1, 2021
6fe7825
Define constant ids for subdetector layers in mkFit geometry
mmasciov Nov 24, 2021
37970e1
Add PilotBeam data in relval matrix tests
francescobrivio Nov 17, 2021
bbe8d33
backport DNN cuts for mkFit 12_2_0_pre3
JanFSchulte Dec 1, 2021
5318bc2
Update conditions for PilotBeams2021 re-reco
francescobrivio Dec 1, 2021
607f6d7
Extra DT ME
jfernan2 Dec 2, 2021
df2f9a0
Merge pull request #36315 from trackreco/backport36246
cmsbuild Dec 3, 2021
2fd4246
Merge pull request #36327 from JanFSchulte/DNNBackport_121X
cmsbuild Dec 3, 2021
f3c3408
Merge pull request #36308 from jfernan2/nanoDQMIOv0.1_1210
cmsbuild Dec 3, 2021
01bfb2c
Merge pull request #36329 from francescobrivio/alca-Run3DataGTandWFs
cmsbuild Dec 3, 2021
b315038
small changes in merging, added option to FlatEtaRangeGunProducer
jkiesele Jan 12, 2022
5709418
Merge pull request #50 from jkiesele/from-CMSSW_12_0_0
kdlong Jan 13, 2022
16ba4d7
Allow discrete energies in no tracker gun, eventid in SCs and CPs
kdlong Jan 17, 2022
a7f82fe
Merged pepr_CMSSW_12_0_0 from repository kdlong with cms-merge-topic
kdlong Feb 21, 2022
0b1bb68
Merged pepr_CMSSW_12_1_1 from repository kdlong with cms-merge-topic
kdlong Feb 21, 2022
1d2c4a7
Add option to store best match table for one to many
kdlong May 6, 2022
60c9df4
Restructure best tables
kdlong May 8, 2022
afa8798
Merge pull request #29 from kdlong/pepr_CMSSW_12_1_1
jkiesele May 10, 2022
b12b455
Merged pepr_CMSSW_12_1_1 from repository cms-pepr with cms-merge-topic
jkiesele May 10, 2022
3aa8046
structure cleanup
jkiesele May 11, 2022
4a7ba28
Merge pull request #30 from jkiesele/from-CMSSW_12_1_1
jkiesele May 11, 2022
537e3b2
temporary
jkiesele May 11, 2022
1fd419e
probably working version with many shortcuts
jkiesele May 11, 2022
a7578e7
snapshot
jkiesele May 13, 2022
378fc0a
status. matches screwed up downstream
jkiesele May 13, 2022
409d72e
bugfix
jkiesele May 13, 2022
cf57bfd
working version still lots of printout
jkiesele May 16, 2022
cd4e1db
snapshot
jkiesele May 17, 2022
5a24675
working id, still a lot of debug stuff
jkiesele May 17, 2022
eae3858
habemus particlem pfum
jkiesele May 19, 2022
907f0c6
calo particle splitting by tracking particles
jkiesele May 20, 2022
e000f26
added pf p4s
jkiesele May 20, 2022
d02e7df
snapshot first working hit-graph based merging. looks very good
jkiesele Jun 26, 2022
1e111ce
latest status
jkiesele Sep 20, 2022
98357b8
Merge pull request #31 from jkiesele/from-CMSSW_12_1_1
kdlong Sep 27, 2022
b0eb17e
Merged pepr_CMSSW_12_1_1 from repository kdlong with cms-merge-topic
kdlong Sep 27, 2022
bbecd9f
Cleanup merge mistakes
kdlong Sep 27, 2022
d5ec8bc
I think this is working with the esconsumes
kdlong Sep 27, 2022
7bab0d9
Move esConsumes to propogator class
kdlong Sep 27, 2022
ab311a7
Make EtaRange gun inherit from EGun to fix esetup
kdlong May 9, 2022
b6453b9
Fix unintentionally changed param
kdlong Sep 27, 2022
48a915d
Update fine calo proc modifier
kdlong Sep 28, 2022
9914851
Merge remote-tracking branch 'pepr/pepr_CMSSW_12_1_1' into pepr_CMSSW…
kdlong Sep 28, 2022
cf4d8bd
Update event setup in PFTruthProducer
kdlong Sep 28, 2022
d3d0a9e
Remove deprecated producers instead of fixing them
kdlong Sep 28, 2022
e9bd66e
Merge pull request #32 from kdlong/pepr_CMSSW_12_6_0_pre2
kdlong Sep 28, 2022
c335117
Start trying to make consistent with PFNano
kdlong Sep 28, 2022
7ee2868
HGC sim hits from common producer
kdlong Sep 29, 2022
63b8bf1
A bit of reorganizing between Calo and HGCal nano folders
kdlong Sep 29, 2022
1fbc253
Merge pull request #33 from kdlong/pepr_CMSSW_12_6_0_pre2
kdlong Sep 29, 2022
b91ce3b
Merged pepr_CMSSW_12_6_0_pre2 from repository cms-pepr with cms-merge…
jkiesele Oct 10, 2022
d37884c
fixes and hard coded things
jkiesele Oct 10, 2022
f3645a8
not very performant atm but ok
jkiesele Oct 10, 2022
f3911b3
brute force fixes. NCLayers is now important
jkiesele Oct 10, 2022
7e6755f
Add pepr-specific SC variables
kdlong Oct 10, 2022
de848b2
snapshot
jkiesele Oct 11, 2022
49bd86d
added track p
jkiesele Oct 11, 2022
970db1d
Add back merged simClusters, fix more ES consumes
kdlong Oct 11, 2022
2f6b084
Merge pull request #35 from jkiesele/from-CMSSW_12_6_0_pre2
kdlong Oct 11, 2022
021f5ff
Merge pull request #36 from kdlong/pepr_CMSSW_12_6_0_pre2
kdlong Oct 11, 2022
537bfc8
snapshot
jkiesele Oct 11, 2022
0300d6c
Merge pull request #38 from jkiesele/from-CMSSW_12_6_0_pre2
jkiesele Oct 11, 2022
7c78b8d
parameters I am remotely ok with
jkiesele Oct 12, 2022
94b3d20
Merge pull request #39 from jkiesele/from-CMSSW_12_6_0_pre2
jkiesele Oct 12, 2022
6f6c81c
Merged pepr_CMSSW_12_6_0_pre2 from repository cms-pepr with cms-merge…
jkiesele Oct 12, 2022
3fb7bc9
hit r and some tuning of PF truth
jkiesele Oct 14, 2022
7aa6f4b
clean up of mergers
jkiesele Dec 14, 2022
3c098f7
small additions to simcluster
jkiesele Dec 20, 2022
2909744
more reasonable thresholds
jkiesele Dec 20, 2022
b84511f
removing muon contributions
jkiesele Dec 20, 2022
3c0a402
HGCSimTruth/HGCSimTruth/plugins/CPtoSimClusters.cc
jkiesele Jan 21, 2023
21bf3b2
new
jkiesele Jan 21, 2023
06c96b8
revert to non close by
jkiesele Jan 21, 2023
9e78f7d
Merge pull request #40 from jkiesele/from-CMSSW_12_6_0_pre2
jkiesele Jan 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CommonTools/RecoAlgos/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
<use name="TrackingTools/Records"/>
<use name="CommonTools/Utils"/>
<use name="CommonTools/RecoAlgos"/>
<use name="JetMETCorrections/JetCorrector"/>
</library>
12 changes: 12 additions & 0 deletions CommonTools/RecoAlgos/plugins/HGCRecHitCollectionMerger.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "FWCore/Framework/interface/MakerMacros.h"
#include "CommonTools/UtilAlgos/interface/Merger.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHit.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
#include "DataFormats/Common/interface/CloneTrait.h"
#include "DataFormats/Common/interface/RefToBaseVector.h"
#include "DataFormats/Common/interface/CopyPolicy.h"


typedef Merger<HGCRecHitCollection, HGCRecHitCollection, edm::CopyPolicy<HGCRecHit>> HGCRecHitCollectionMerger;

DEFINE_FWK_MODULE(HGCRecHitCollectionMerger);
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// system include files
#include <memory>
#include <string>

// user include files
#include "FWCore/Framework/interface/stream/EDProducer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/Framework/interface/ESHandle.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"

#include "DataFormats/Common/interface/Association.h"
#include "DataFormats/Common/interface/AssociationMap.h"
#include "DataFormats/Common/interface/OneToManyWithQualityGeneric.h"

#include "FWCore/Utilities/interface/transform.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include <set>

//
// class decleration
//
typedef std::pair<size_t, float> IdxAndFraction;
typedef edm::AssociationMap<edm::OneToManyWithQualityGeneric<
HGCRecHitCollection, std::vector<reco::CaloCluster>, float>> RecHitToLayerCluster;

class RecHitToLayerClusterAssociationProducer : public edm::stream::EDProducer<> {
public:
explicit RecHitToLayerClusterAssociationProducer(const edm::ParameterSet&);
~RecHitToLayerClusterAssociationProducer() override;

private:
void produce(edm::Event&, const edm::EventSetup&) override;

std::vector<edm::InputTag> caloRechitTags_;
std::vector<edm::EDGetTokenT<HGCRecHitCollection>> caloRechitCollectionTokens_;
edm::EDGetTokenT<std::vector<reco::CaloCluster>> layerClusterToken_;
};

RecHitToLayerClusterAssociationProducer::RecHitToLayerClusterAssociationProducer(const edm::ParameterSet& pset)
: caloRechitTags_(pset.getParameter<std::vector<edm::InputTag>>("caloRecHits")),
caloRechitCollectionTokens_(edm::vector_transform(
caloRechitTags_, [this](const edm::InputTag& tag) { return consumes<HGCRecHitCollection>(tag); })),
layerClusterToken_(consumes<std::vector<reco::CaloCluster>>(pset.getParameter<edm::InputTag>("layerClusters"))) {
for (auto& tag : caloRechitTags_) {
const std::string& label = !tag.instance().empty() ? tag.instance() : tag.label();
produces<edm::Association<std::vector<reco::CaloCluster>>>(label + "ToBestLayerCluster");
produces<RecHitToLayerCluster>(label + "ToLayerCluster");
}
}

RecHitToLayerClusterAssociationProducer::~RecHitToLayerClusterAssociationProducer() {}

//
// member functions
//

// ------------ method called to produce the data ------------
void RecHitToLayerClusterAssociationProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
edm::Handle<std::vector<reco::CaloCluster>> lcCollection;
iEvent.getByToken(layerClusterToken_, lcCollection);
std::unordered_map<size_t, std::vector<IdxAndFraction>> hitDetIdToIndices;

for (size_t j = 0; j < lcCollection->size(); j++) {
for (auto& idAndFrac : (*lcCollection)[j].hitsAndFractions()) {
hitDetIdToIndices[idAndFrac.first.rawId()].push_back({j, idAndFrac.second});
}
}

for (size_t i = 0; i < caloRechitCollectionTokens_.size(); i++) {
std::string label = caloRechitTags_.at(i).instance();
if (label.empty())
label = caloRechitTags_.at(i).label();
std::vector<int> rechitIndices;

edm::Handle<HGCRecHitCollection> caloRechitCollection;
iEvent.getByToken(caloRechitCollectionTokens_.at(i), caloRechitCollection);

auto assocMap = std::make_unique<RecHitToLayerCluster>(caloRechitCollection, lcCollection);

for (size_t h = 0; h < caloRechitCollection->size(); h++) {
HGCRecHitRef caloRh(caloRechitCollection, h);
size_t id = caloRh->detid().rawId();

// Need to sort before inserting into AssociationMap
auto match = hitDetIdToIndices.find(id);
if (match == std::end(hitDetIdToIndices)) {
rechitIndices.push_back(-1);
continue;
}
auto& lcIdxAndFrac = match->second;
// Sort by energy fraction
std::sort(std::begin(lcIdxAndFrac), std::end(lcIdxAndFrac),
[](auto& a, auto& b) { return a.second > b.second; });

for (size_t m = 0; m < lcIdxAndFrac.size(); m++) {
float fraction = lcIdxAndFrac[m].second;
int lcIdx = lcIdxAndFrac[m].first;
// Best match is the layerCluster that carries the hit with the highest energy fraction
// (that is, the one responsible for the largest deposit in the detId)
if (m == 0)
rechitIndices.push_back(lcIdx);
edm::Ref<std::vector<reco::CaloCluster>> lc(lcCollection, lcIdx);
assocMap->insert(caloRh, std::make_pair(lc, fraction));
}
}

auto assoc = std::make_unique<edm::Association<std::vector<reco::CaloCluster>>>(lcCollection);
edm::Association<std::vector<reco::CaloCluster>>::Filler filler(*assoc);
filler.insert(caloRechitCollection, rechitIndices.begin(), rechitIndices.end());
filler.fill();
iEvent.put(std::move(assoc), label + "ToBestLayerCluster");
iEvent.put(std::move(assocMap), label + "ToLayerCluster");
}
}

// define this as a plug-in
DEFINE_FWK_MODULE(RecHitToLayerClusterAssociationProducer);

133 changes: 133 additions & 0 deletions CommonTools/RecoAlgos/plugins/RecHitToPFCandAssociationProducer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
// system include files
#include <memory>
#include <string>

// user include files
#include "FWCore/Framework/interface/stream/EDProducer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/Framework/interface/ESHandle.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
#include "SimDataFormats/CaloAnalysis/interface/SimClusterFwd.h"
#include "SimDataFormats/CaloAnalysis/interface/SimCluster.h"
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
#include "SimDataFormats/CaloHit/interface/PCaloHit.h"
#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"

#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFraction.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockFwd.h"
#include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
#include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"

#include "DataFormats/Common/interface/Association.h"

#include "FWCore/Utilities/interface/transform.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include <set>

//
// class decleration
//
typedef std::pair<size_t, float> IdxAndFraction;

class RecHitToPFCandAssociationProducer : public edm::stream::EDProducer<> {
public:
explicit RecHitToPFCandAssociationProducer(const edm::ParameterSet&);
~RecHitToPFCandAssociationProducer() override;

private:
void produce(edm::Event&, const edm::EventSetup&) override;

std::vector<edm::InputTag> caloRechitTags_;
std::vector<edm::EDGetTokenT<edm::PCaloHitContainer>> caloSimhitCollectionTokens_;
std::vector<edm::EDGetTokenT<edm::View<CaloRecHit>>> caloRechitCollectionTokens_;
edm::EDGetTokenT<reco::PFCandidateCollection> pfCollectionToken_;
};

RecHitToPFCandAssociationProducer::RecHitToPFCandAssociationProducer(const edm::ParameterSet& pset)
: caloRechitTags_(pset.getParameter<std::vector<edm::InputTag>>("caloRecHits")),
caloRechitCollectionTokens_(edm::vector_transform(
caloRechitTags_, [this](const edm::InputTag& tag) { return consumes<edm::View<CaloRecHit>>(tag); })),
pfCollectionToken_(consumes<reco::PFCandidateCollection>(pset.getParameter<edm::InputTag>("pfCands"))) {
for (auto& tag : caloRechitTags_) {
const std::string& label = !tag.instance().empty() ? tag.instance() : tag.label();
produces<edm::Association<reco::PFCandidateCollection>>(label + "ToPFCand");
}
}

RecHitToPFCandAssociationProducer::~RecHitToPFCandAssociationProducer() {}

//
// member functions
//

// ------------ method called to produce the data ------------
void RecHitToPFCandAssociationProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
edm::Handle<reco::PFCandidateCollection> pfCollection;
iEvent.getByToken(pfCollectionToken_, pfCollection);
std::unordered_map<size_t, IdxAndFraction> hitDetIdToIndex;

for (size_t j = 0; j < pfCollection->size(); j++) {
const auto& pfCand = pfCollection->at(j);
const reco::PFCandidate::ElementsInBlocks& elements = pfCand.elementsInBlocks();
for (auto& element : elements) {
const reco::PFBlockRef blockRef = element.first;
if (!blockRef.isNonnull())
continue;
for (const auto& block : blockRef->elements()) {
// This seems to not work for PFTICL
//if (block.type() == reco::PFBlockElement::HGCAL) {
const reco::PFClusterRef cluster = block.clusterRef();
if (cluster.isNonnull()) {
const std::vector<reco::PFRecHitFraction>& rhf = cluster->recHitFractions();
for (const auto& hf : rhf) {
auto& hit = hf.recHitRef();
if (!hit)
throw cms::Exception("RecHitToPFCandAssociationProducer") << "Invalid RecHit ref";
size_t detId = hit->detId();
auto entry = hitDetIdToIndex.find(detId);
if (entry == hitDetIdToIndex.end() || entry->second.second < hf.fraction())
hitDetIdToIndex[detId] = {j, hf.fraction()};
}
}
}
}
}

for (size_t i = 0; i < caloRechitCollectionTokens_.size(); i++) {
std::string label = caloRechitTags_.at(i).instance();
if (label.empty())
label = caloRechitTags_.at(i).label();
std::vector<size_t> rechitIndices;

edm::Handle<edm::View<CaloRecHit>> caloRechitCollection;
iEvent.getByToken(caloRechitCollectionTokens_.at(i), caloRechitCollection);

for (size_t h = 0; h < caloRechitCollection->size(); h++) {
const CaloRecHit& caloRh = caloRechitCollection->at(h);
size_t id = caloRh.detid().rawId();
int match = hitDetIdToIndex.find(id) == hitDetIdToIndex.end() ? -1 : hitDetIdToIndex.at(id).first;
rechitIndices.push_back(match);
}

auto assoc = std::make_unique<edm::Association<reco::PFCandidateCollection>>(pfCollection);
edm::Association<reco::PFCandidateCollection>::Filler filler(*assoc);
filler.insert(caloRechitCollection, rechitIndices.begin(), rechitIndices.end());
filler.fill();
iEvent.put(std::move(assoc), label + "ToPFCand");
}
}

// define this as a plug-in
DEFINE_FWK_MODULE(RecHitToPFCandAssociationProducer);
Loading