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

Question on GSF track to track association for low pt electrons #42110

Closed
ArturAkh opened this issue Jun 27, 2023 · 10 comments
Closed

Question on GSF track to track association for low pt electrons #42110

ArturAkh opened this issue Jun 27, 2023 · 10 comments

Comments

@ArturAkh
Copy link

ArturAkh commented Jun 27, 2023

Dear Egamma experts,

During my studies to fix tau embedding
for central CMS production, I've had a closer look into low pt electron reconstruction, in particular into:

https://github.com/cms-sw/cmssw/blob/master/RecoEgamma/EgammaElectronProducers/plugins/LowPtGSFToTrackLinker.cc

This producer performs GSF track to track association by making use of a common track reference. To do that, it checks for the right electron seed index in preid vector indexed by electron seeds, and acesses the trackRef of the PreId. I wonder why this indirect access to track references is required, where a much more direct access is possible,

using

gref->seedRef().castTo<reco::ElectronSeedRef>()->ctfTrack()

instead of

preid->at(gref->seedRef().castTo<reco::ElectronSeedRef>().index()).trackRef()

Introducing the following line:

std::cout << "Considering GSF track no. " << igsf << " with seed reference CTF track (id, index): (" << gref->seedRef().castTo<reco::ElectronSeedRef>()->ctfTrack().id() << ", " << gref->seedRef().castTo<reco::ElectronSeedRef>()->ctfTrack().index() << "), determined track ref (id, index) from preid: (" << trk.id() << ", " << trk.index() << ")" << std::endl;

after LowPtGSFToTrackLinker.cc#L57

results in the following output, when running on an example input file:

Begin processing the 11th record. Run 320823, Event 169761289, LumiSection 113 on stream 0 at 27-Jun-2023 14:36:38.789 CEST
Considering GSF track no. 0 with seed reference CTF track (id, index): (9:1653, 0), determined track ref (id, index) from preid: (9:1653, 0)                                                                                                                                   
Considering GSF track no. 1 with seed reference CTF track (id, index): (9:1653, 1), determined track ref (id, index) from preid: (9:1653, 1)                                                                                                                                   
Begin processing the 12th record. Run 320823, Event 169393937, LumiSection 113 on stream 0 at 27-Jun-2023 14:36:39.414 CEST
Considering GSF track no. 0 with seed reference CTF track (id, index): (9:1653, 0), determined track ref (id, index) from preid: (9:1653, 0)                                                                                                                                   
Begin processing the 13th record. Run 320823, Event 170028693, LumiSection 113 on stream 0 at 27-Jun-2023 14:36:40.214 CEST
Considering GSF track no. 0 with seed reference CTF track (id, index): (9:1653, 1), determined track ref (id, index) from preid: (9:1653, 1) 

So all in all, both accesses to the track reference are equivalent in terms of id() and index().

Is there something I'm missing about preid, like backward-compatibility, or some kind of a corner case?

Cheers,

Artur

@cmsbuild
Copy link
Contributor

A new Issue was created by @ArturAkh Artur Gottmann.

@Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign reconstruction

@cms-sw/egamma-pog-l2

@cmsbuild
Copy link
Contributor

New categories assigned: reconstruction

@mandrenguyen,@clacaputo you have been requested to review this Pull request/Issue and eventually sign? Thanks

@swagata87
Copy link
Contributor

tagging developer of low-pT electron reco @bainbrid

@ArturAkh
Copy link
Author

Hi all,

More than two months have passed...

Is there any progress on this issue? I may create a pull request, since the change outlined above is valid by construction, if looking at the corresponding producers.

Cheers,

Artur

@bainbrid
Copy link
Contributor

Hi @ArturAkh please go ahead if you feel the code is an improvement.

@ArturAkh
Copy link
Author

Thanks @bainbrid,

Corresponding PR is created: #42690

@mandrenguyen
Copy link
Contributor

+reconstruction
Issue seems resolved by #42690

@cmsbuild
Copy link
Contributor

This issue is fully signed and ready to be closed.

@makortel
Copy link
Contributor

@cmsbuild, please close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants