GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Addressing Hits by Array-index
Addressing Hits by Array-index [message #4306] Wed, 23 May 2007 13:26
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi!

For the pattern recognition I have the following problem:
There are many cases where I have to sort my hits(Clusters resp.) in some way (e.g. according to radius). This obviously distorts their order in the array.

I conclude that the array index is not a good way to index objects.

However for the moment their might be this workaround:
Anyway for the sorting I copy pointers into a std::vector and use the stl sorting algorithms. This leaves the original TClonesArray untouched. But I have to give the hits a member which keeps track of their index.

Any comments?

Cheers! Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Previous Topic: Heavy Development on genfit
Next Topic: box generator
Goto Forum:
  


Current Time: Sun Nov 03 22:46:57 CET 2024

Total time taken to generate the page: 0.01021 seconds