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

Reco Updates -- Fix ParticleFlow ECAL Cluster timing. #837

Merged
merged 9 commits into from Oct 2, 2013

Conversation

lgray
Copy link
Contributor

@lgray lgray commented Sep 15, 2013

@bendavid @slava77

Down to 0.05 sec/event from 0.12 sec/event in #706.
The timing was 0.03 sec/event originally.
Further improvements would require factorization of PositionCalc code to take advantage of the PFCluster's refs to its rechits. Most of the extra time is spent building the necessary structures for pos calc and then in poscalc it is spent searching for the rechits in the sorted collection.

Since the PFClusters have the refs to the rechits that compose them, searching for the associated rechit again isn't really necessary.

@argiro : Perhaps we could factor apart the rechit energy determination and position weighting parts of PositionCalc into two steps? If the sorted rechit collection wasn't required for the latter it would speed things up significantly in PFClusterAlgo.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @lgray (Lindsey Gray) for CMSSW_7_0_X.

Fix particleFlowClusterECAL timing.

It involves the following packages:

RecoParticleFlow/Configuration
RecoParticleFlow/PFClusterProducer

@thspeer, @slava77 can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.

@argiro
Copy link
Contributor

argiro commented Sep 16, 2013

On 15 Sep 2013, at 18:58, Lindsey Gray notifications@github.com wrote:

@bendavid @slava77

Down to 0.05 sec/event from 0.12 sec/event in #706.
The timing was 0.03 sec/event originally.
Further improvements would require factorization of PositionCalc code to take advantage of the PFCluster's refs to its rechits. Most of the extra time is spent building the necessary structures for pos calc and then in poscalc it is spent searching for the rechits in the sorted collection.

Since the PFClusters have the refs to the rechits that compose them, searching for the associated rechit again isn't really necessary.

@argiro : Perhaps we could factor apart the rechit energy determination and position weighting parts of PositionCalc into two steps?

sure, it's probably quicker if you do the change and I will review and cross check

Stefano

You can merge this Pull Request by running

git pull https://github.com/lgray/cmssw fix_ECALpfclustertiming
Or view, comment on, or merge it at:

#837

Commit Summary

• changes to RecoToDisplay
• fix to cluster timing, down to ~0.05 sec/event from 0.12, can do better by refactorizing PositionCalc
File Changes

• M RecoParticleFlow/Configuration/test/RecoToDisplay_batch_cfg.py (4)
• M RecoParticleFlow/Configuration/test/RecoToDisplay_cfg.py (6)
• M RecoParticleFlow/PFClusterProducer/interface/PFClusterAlgo.h (25)
• M RecoParticleFlow/PFClusterProducer/src/PFClusterAlgo.cc (69)
Patch Links:

https://github.com/cms-sw/cmssw/pull/837.patch
https://github.com/cms-sw/cmssw/pull/837.diff

@lgray
Copy link
Contributor Author

lgray commented Sep 16, 2013

@nclopezo
Copy link
Contributor

Hi @lgray
I am not signing it. Giulio told me to write a +1 on the first line of my comment from now on, each time the pull requests passes all the usual tests. He will use it on cms-bot, as I understood.

@lgray
Copy link
Contributor Author

lgray commented Sep 16, 2013

@nclopezo Ahh ok, I was just uninformed. :-)

@ktf
Copy link
Contributor

ktf commented Sep 16, 2013

Indeed. The plan is to have a "tests-pending" / "tests-done" label so that we can quickly find out what as been tested and what not, eventually resetting the label if a pull request is updated. @nclopezo this does not prevent you from actually reading the comments. In this particular case a change was requested and in any case you'll have to run again.

@cmsbuild
Copy link
Contributor

Pull request #837 was updated. @nclopezo, @thspeer, @slava77 can you please check and sign again.

@lgray
Copy link
Contributor Author

lgray commented Sep 17, 2013

@argiro Please have a look at the above commit and double check that I haven't caused some bug.
The timing of particleFlowClusterECAL is now down to 0.036 sec/Event.
@slava77 Is that acceptable?

@slava77
Copy link
Contributor

slava77 commented Sep 24, 2013

@slava77 working on it

@slava77
Copy link
Contributor

slava77 commented Sep 25, 2013

@lgray
Hi Lindsey,
there are many changes in the outputs.

Changes in PF photons in EE are quite significant for TTBarPU workflow (202.0)
all_sign254vsorig_ttbarpuwf202p0c_recopfcandidates_particleflow__reco_obj_eta37

The same distribution looks ~OK for signle gamma 35 sample.

Could you please investigate and see if there is a bug.
In general, it would be better to have technical/timing performance changes come without undeclared changes in physics.

I was testing with respect to CMSSW_7_0_X_2013-09-24-1400

Thanks

Slava

@cmsbuild
Copy link
Contributor

Pull request #837 was updated. @nclopezo, @smuzaffar, @thspeer, @slava77 can you please check and sign again.

@cmsbuild
Copy link
Contributor

Pull request #837 was updated. @nclopezo, @smuzaffar, @thspeer, @slava77 can you please check and sign again.

@cmsbuild
Copy link
Contributor

Pull request #837 was updated. @nclopezo, @smuzaffar, @thspeer, @slava77 can you please check and sign again.

if( 0 == iRecHits || 0 == iSubGeom ) {
throw cms::Exception("PositionCalc")
<< "Calculate_Location() called uninitialized or wrong initialization.";
}

if( 0 != iDetIds.size() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

(since we are still fishing for a problem in this PR, why not make a simple fix)
! iDetIds.empty()
(and similarly below) takes less cycles

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

Hi Lindsey,

Redoing the tests from scratch still didn't help.
There are still large discrepancies.

It's not immediately obvious to me that the changes in the PFClusterAlgo are identical
(PositionCalc looks OK).

Slava

@cmsbuild
Copy link
Contributor

Pull request #837 was updated. @nclopezo, @smuzaffar, @thspeer, @slava77 can you please check and sign again.

@ktf
Copy link
Contributor

ktf commented Sep 30, 2013

Logs are suspiciously too equal. We should check they are actually correct.

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

Which logs?

@ktf
Copy link
Contributor

ktf commented Sep 30, 2013

The comparison log @nclopezo post ed

Sent from my iPhone

On 30/set/2013, at 15:58, slava77 notifications@github.com wrote:

Which logs?


Reply to this email directly or view it on GitHub.

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

Do you mean the baseLineComparisons ? (my inference powers are dwindling)

@nclopezo
Copy link
Contributor

yes, that ones

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

OK, that was the goal of this PR, to have no differences in physics performance
and the last few iterations were not successful to get there.

@lgray
Copy link
Contributor Author

lgray commented Sep 30, 2013

@slava77 I'll check again to make sure the timing improvements are there after moving the push_back().

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

Lindsey,
I'm running my tests already.
So, you can just twiddle your thumbs in the meantime.

@lgray
Copy link
Contributor Author

lgray commented Sep 30, 2013

@slava77 0.045 sec/event from running on 200 events of ttbar. Let me know how the rest turns out.

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

The EBCLT dicluster mass is the only kind of distribution that's somewhat different.
Since the diff is in bin zero, I'm guessing this is all numerical. The difference is similar in ele/gamma guns and in ttbarPU
screen shot 2013-09-30 at 11 00 29 pm

@slava77
Copy link
Contributor

slava77 commented Sep 30, 2013

+1

Tested 8eba4e6 in CMSSW_7_0_X_2013-09-24-1400 as sign254.
There are no differences in histogram level comparisons of products.
Minor difference of numerical nature appears in a few DQM ecal monitoring plots. Maybe the most visible is displayed above.

Timing of particleFlowClusterECAL went down reasonably close to the performance before changes made in #706.
For a reference, 202.0 200 events total time in reco went from 6sec to 24 sec (#706) to 8sec (#837).

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

ktf added a commit that referenced this pull request Oct 2, 2013
Reco Updates -- Fix ParticleFlow ECAL Cluster timing.
@ktf ktf merged commit 163a843 into cms-sw:CMSSW_7_0_X Oct 2, 2013
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

6 participants