HepChooser |
The HepChooser class is a combinatoric engine which, given lists of objects, successively generates a list of objects which form a unique combination.
A HepChooser can take between 1 and 6 lists of objects. Then, the next() method or operator() will return the next set of objects, or 0 if done. The set is returned as a HepAList.
On each successive call to next(), HepChooser tries to find a new unique combination of objects. It uses locks (see HepLockable) to make certain that the same (fundamental) object is not used more than once anywhere in the list. For example, if A, B, C, and D are fundamental "track" objects, and E = A + B, then E and B or A cannot be in the same combination.
HepChooser respects locks, and therefore, any objects locked by a HepLock (which is turned on!) will not be used in a combination.
If a HepChooser is given the same list more than once, it will take the appropriate action so that the same combination (in a different) order does not occur more than once. The method orderMatters() will turn off this feature.
#include "CLHEP/Combination/Chooser.h" template <class TYPE> class HepChooser