GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » [FIXED] Mc Truth Match
Re: Mc Truth Match [message #15256 is a reply to message #15253] Tue, 20 August 2013 12:55 Go to previous messageGo to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Hello Stefano,

I have tried the same with Add to a new RhoCandList instead of removing items. I get the same numbers as with remove. I attached my macro to this post for those who are interested.

Probably, remove is only dangerous if one forgets that the indices of subsequent list items are shifted when an item is removed. This needs to be accounted for in the for loop if counting up (from 0 to the end of the list) or alternatively, as Klaus suggested one can count "backwards" which circumvents the problem.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] PndAnalysis::McTruthMatch always returns false, again ....
Next Topic: [FIXED] Bug in RhoCandList (?)
Goto Forum:
  


Current Time: Fri Nov 22 19:11:32 CET 2019

Total time taken to generate the page: 0.01895 seconds