-
Notifications
You must be signed in to change notification settings - Fork 2
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
remove normalisation by area in seeding #468
remove normalisation by area in seeding #468
Conversation
@jbsauvan here are a few plots (all including offset correction and JEC on reconstructed jets) further investigating the proposed changes, depending on the new threshold for seed selection:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @echapon
In addition to the comments, could you rebase this PR on top of hgc-tpg-devel-CMSSW_12_0_0_pre3
.
int bin1_10pct_; | ||
float R1_10pct_; | ||
float R2_10pct_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three variables are only used in the constructor, so could be local variables instead of class members
@@ -64,6 +65,12 @@ HGCalHistoSeedingImpl::HGCalHistoSeedingImpl(const edm::ParameterSet& conf) | |||
<< "Inconsistent size of neighbour weights vector in HGCalMulticlustering ( " << neighbour_weights_.size() | |||
<< " ). Should be " << neighbour_weights_size_ << "\n"; | |||
} | |||
|
|||
// compute quantities for non-normalised-by-area histoMax | |||
bin1_10pct_ = (int)0.1 * nBins1_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason to choose a reference bin area 10% away from the minimal r/z? Or is this arbitrary? It just changes the scale of the threshold, so that's not critical, but it may be useful to add a comment in the code.
@@ -87,6 +87,7 @@ | |||
seeding_space=cms.string("RPhi"),# RPhi, XY | |||
seed_smoothing_ecal=seed_smoothing_ecal, | |||
seed_smoothing_hcal=seed_smoothing_hcal, | |||
seeds_norm_by_area=cms.bool(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep the current normalization for the moment, until the new normalization can be checked by other people, in particular on electrons.
@@ -105,7 +106,7 @@ | |||
# (see https://indico.cern.ch/event/806845/contributions/3359859/attachments/1815187/2966402/19-03-20_EGPerf_HGCBE.pdf | |||
# for more details) | |||
phase2_hgcalV10.toModify(histoMax_C3d_seeding_params, | |||
threshold_histo_multicluster=8.5, # MipT | |||
threshold_histo_multicluster=20, # arb. units (for seeds_norm_by_area=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep the current normalization for the moment, until the new normalization can be checked by other people, in particular on electrons.
): | ||
parameters_seeding_c3d.nBins_X1_histo_multicluster = nBins_X1 | ||
parameters_seeding_c3d.nBins_X2_histo_multicluster = nBins_X2 | ||
parameters_seeding_c3d.binSumsHisto = binSumsHisto | ||
parameters_seeding_c3d.threshold_histo_multicluster = seed_threshold | ||
parameters_seeding_c3d.seeds_norm_by_area = seeds_norm_by_area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in all this file: May be better for the moment to write a specific custom function dedicated to switching the normalization type and keep the existing customs untouched. In particular some of the existing customs are not concerned by this normalization.
3e5ad19
to
12e9e54
Compare
hi @jbsauvan , I am confused about how to proceed with this PR given the rebase. Should I create a fresh PR to |
Hi @echapon |
12e9e54
to
1bf0432
Compare
@jbsauvan done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @echapon
In addition to the inline comments, could you apply code-format
?
@@ -13,7 +13,7 @@ def set_histomax_seeding_params(parameters_seeding_c3d, | |||
nBins_X1, | |||
nBins_X2, | |||
binSumsHisto, | |||
seed_threshold, | |||
seed_threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below in this file: if possible it would be better to keep the formatting of the existing code unchanged.
): | ||
parameters_c3d = histoMaxXYVariableDR_C3d_params.clone() | ||
set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, | ||
histoMaxXYVariableDR_C3d_params.binSumsHisto,seed_threshold) | ||
process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d | ||
return process | ||
|
||
def custom_3dclustering_seedNoArea(process, | ||
seeds_norm_by_area=cms.bool(False), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the function is meant to remove the norm by area, this shouldn't be a parameter of the function. Otherwise we could call custom_3dclustering_seedNoArea(process, seeds_norm_by_area=True)
which would be a bit inconsistent.
parameters_c3d = histoMax_C3d_seeding_params.clone() | ||
parameters_c3d.seeds_norm_by_area = seeds_norm_by_area | ||
parameters_c3d.threshold_histo_multicluster = seed_threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to set the parameters within the clone()
:
parameters_c3d = histoMax_C3d_seeding_params.clone(seeds_norm_by_area=False,
threshold_histo_multicluster=seed_threshold )
): | ||
parameters_c3d = histoMaxXYVariableDR_C3d_params.clone() | ||
set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, | ||
histoMaxXYVariableDR_C3d_params.binSumsHisto,seed_threshold) | ||
process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d | ||
return process | ||
|
||
def custom_3dclustering_seedNoArea(process, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function should return process
Thanks @jbsauvan , just pushed a new commit accounting for these comments |
Hi @echapon e.g. here for the cluster eta (red is the reference and blue is this PR): Could you check whether you see similar things? |
oops... indeed something's wrong. I thought I had checked but let me have another look with the latest state of the code. |
When I run testHGCalL1T_RelValV11_cfg.py out of the box with this PR (all commits included) I get something that looks very much like the red. |
Thanks @echapon for the cross-check |
PR description:
Investigation of a modified seeding for clusters: removing normalisation by area in HGCalHistoSeedingImpl. First discussed in this HGCal TPG meeting
[WORK IN PROGRESS]
PR validation:
Work in progress
Before submitting your pull requests, make sure you followed this checklist: