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

Slim down PFRecHit #14151

Merged
merged 15 commits into from Apr 27, 2016
Merged

Slim down PFRecHit #14151

merged 15 commits into from Apr 27, 2016

Conversation

VinInn
Copy link
Contributor

@VinInn VinInn commented Apr 19, 2016

made on top of #14058 to avoid merge conflicts.

What has been done?
removed all positional content
add a pointer to the corresponding CaloCell (itself improved to satifly PF needs)
forward all positional access methods to caloCell
made neighebours a single vector (transient, so just index in the collection)
move to float for energy and time

Caveat:
This would have been all trivial if was not for the depth correctiion in EF.
CMSSW_8_1_X...VinInn:SlimPFHit81#diff-4a5cef800feb39968287c389658617bcL85
What I did is simply to double the geometry of EF: now each IdealZPrism owns a copy of itslelf with PF depth-correction applied (as magic numbers)
CMSSW_8_1_X...VinInn:SlimPFHit81#diff-1a95dcb4933ebfc4bbc6f2bf984cc933R47

what will not work?
anybody accessing positional content of PFRecHIt from reco-files w/o protection.
In the released code this affects only FWPFCandidateDetailView (note that instead FWPFCandidateWithHitsProxyBuilder works out of the box, so a solution internal to FireWorks exists
as acknowledged by Alja)
validate.C will require to drop few histos (eta/phi of PFRecHit)
as already noted no DQM/Validatation code exists for PF, so no problem there ;-)

what we gain?
a solid 6% of total time of HLT above what already gained so far.

minor regression observed most probably related to numerics
http://innocent.home.cern.ch/innocent/regress/pu35_SlimPFHit3/

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @VinInn (Vincenzo Innocente) for CMSSW_8_1_X.

It involves the following packages:

DataFormats/Math
DataFormats/ParticleFlowReco
Fireworks/ParticleFlow
Geometry/CaloGeometry
Geometry/HcalEventSetup
Geometry/HcalTowerAlgo
RecoParticleFlow/PFClusterProducer
RecoParticleFlow/PFClusterTools
RecoParticleFlow/PFProducer

@civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @alja, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@ghellwig, @mmarionncern, @makortel, @rafaellopesdesa, @lgray, @alja, @bachtis this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@VinInn
Copy link
Contributor Author

VinInn commented Apr 19, 2016

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/12497/console

@VinInn
Copy link
Contributor Author

VinInn commented Apr 19, 2016

@fwyzard as well

@VinInn
Copy link
Contributor Author

VinInn commented Apr 19, 2016

"fixes" needed to validate.C

 diff  ~/code/cms-reco-tools/validate.C .
1642,1643c1642,1643
<       plotvar("recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.position().eta()");
<       plotvar("recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.position().phi()");
---
>       // plotvar("recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.position().eta()");
>       // plotvar("recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.position().phi()");
1648,1649c1648,1649
<       plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position().eta()");
<       plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position().phi()");
---
>       // plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position().eta()");
>       // plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position().phi()");
1654,1655c1654,1655
<       plotvar("recoPFRecHits_particleFlowRecHitHCAL_Cleaned_"+recoS+".obj.position().eta()");
<       plotvar("recoPFRecHits_particleFlowRecHitHCAL_Cleaned_"+recoS+".obj.position().phi()");
---
>       // plotvar("recoPFRecHits_particleFlowRecHitHCAL_Cleaned_"+recoS+".obj.position().eta()");
>       // plotvar("recoPFRecHits_particleFlowRecHitHCAL_Cleaned_"+recoS+".obj.position().phi()");
1660,1661c1660,1661
<       plotvar("recoPFRecHits_particleFlowRecHitPS_Cleaned_"+recoS+".obj.position().eta()");
<       plotvar("recoPFRecHits_particleFlowRecHitPS_Cleaned_"+recoS+".obj.position().phi()");
---
>       // plotvar("recoPFRecHits_particleFlowRecHitPS_Cleaned_"+recoS+".obj.position().eta()");
>       // plotvar("recoPFRecHits_particleFlowRecHitPS_Cleaned_"+recoS+".obj.position().phi()");

@alja
Copy link
Contributor

alja commented Apr 19, 2016

+1

@cmsbuild
Copy link
Contributor

@VinInn VinInn changed the title Slim PFRecHit Slim down PFRecHit Apr 20, 2016
@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented Apr 21, 2016

the release diverged pretty quickly.
Time to rebase.

@VinInn
Copy link
Contributor Author

VinInn commented Apr 21, 2016

Wonder who touched these files....

@ianna
Copy link
Contributor

ianna commented Apr 26, 2016

please test

@VinInn
Copy link
Contributor Author

VinInn commented Apr 26, 2016

should we really run tests once more?

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 26, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/12643/console

@ianna
Copy link
Contributor

ianna commented Apr 26, 2016

@VinInn - I'm sure by the time it is merged, the tests will be done

@VinInn
Copy link
Contributor Author

VinInn commented Apr 26, 2016

@ianna, ok. please just merge again on your area and test the writer yourself (I did in my area)

@ianna
Copy link
Contributor

ianna commented Apr 26, 2016

+1

@Dr15Jones
Copy link
Contributor

+1

@slava77
Copy link
Contributor

slava77 commented Apr 26, 2016

+1

for #14151 fe93fd7

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@VinInn
Copy link
Contributor Author

VinInn commented Apr 27, 2016

in reco is very difficult to assess timing differences in PFBlock: I observe differences even in functions not accessing PFRecHits
I do not exclude that we are paying a price of mixed math in some of the LinkByRecHit that I have not fixed (actually I fixed only testECALAndPSByRecHit)
I can surely improve all others along the same lines
As @LGrey suggested one my extend the use of KDtree to other linkers once we identify the more relevant for reco and HLT
In any case it seems that hltParticleFlowBlockForTaus runs for all TTBAR events while at HLT its contribution is actually much smaller, still something to to watch

@VinInn
Copy link
Contributor Author

VinInn commented Apr 27, 2016

Indeed HLT for 252002 step2 is dominated by PFBlock (25%)
At least on my machine I do not see any slowdown caused this PR.

@davidlange6 davidlange6 merged commit 8f622e0 into cms-sw:CMSSW_8_1_X Apr 27, 2016
davidlange6 added a commit that referenced this pull request Aug 26, 2016
backport of #14058: speed up avoiding eta phi computations, and #14151: Slim down PFRecHit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants