Closed missirol closed 3 years ago
Hi Marino, thanks a lot! From my side it was not know. Anyway I think that your solution of "resorting" the vertices in the trimmer makes quite sense, given that, apart from Patatrack case, it may not always be the case that the sorter is the same. Do you have any feeling of if and how it affects timing?
Hi Adriano. No, I haven't checked this. I would assume that the impact is small, but of course it should be checked.
The second question would be whether the trimmer should use the exact same sorting as the original vertices (I'm assuming that the best sorter for the Patatrack pixel vertices is the one in the Patatrack workflow). Being able to use different sorters in PixelVertexCollectionTrimmer
would require improving that module a bit further.
As suggested by @AdrianoDee, I opened a PR related to this in https://github.com/cms-sw/cmssw/pull/33091.
Thanks!
The technical side of this was addressed in https://github.com/cms-sw/cmssw/pull/33091, so I think the issue can be closed.
Worth noting that, as things as are now, the trimmer will continue to use its own vertex sorting (from Run-2), even when it is applied to Patatrack pixel vertices (which are sorted in a slightly different way).
While testing a Run-3 HLT menu with the Patatrack pixel reconstruction, I think I might have stumbled upon a small difference between the sorting of the
hltPixelVertices
and the so-called 'trimmed' pixel vertices, i.e.hltTrimmedPixelVertices
.For what I understood so far, reading the code:
the vertices from
PixelVertexProducerCUDA
are ordered using aSumPt2
criterion, implemented ingpuSortByPt2
, using tracks selected ingpuVertexFinder::loadTracks
;in the module that creates the trimmed collection at HLT, i.e.
PixelVertexCollectionTrimmer
, the PV sorting criterion uses againSumPt2
as figure of merit, but the track selection for the sum calculation is different, and based on aPSet
namedHLTPSetPvClusterComparerForIT
at HLT (see for example HLT_FULL_cff); the calculation ofSumPt2
is ultimately done here.One issue is that the current implementation of
PixelVertexCollectionTrimmer
is rather fragile, because it implicitly assumes that the inputs are already sorted according to the same criterion used by the trimming module itself (the 1st entry of the input collection is assumed to have the highest f.o.m.). This was indeed the case in the Run-2 HLT (the samePSet
and sorter were used for bothhltPixelVertices
andhltTrimmedPixelVertices
). In the Patatrack case, this is not enforced anymore.In general, it might be useful to make
PixelVertexCollectionTrimmer
a bit more robust (e.g. remove assumptions on the order of the input vertices); an attempt can be found here.I was just wondering if all this is already known (in case it is confirmed).
Some relevant printouts can be found here, and were obtained as follows