- Use TParameter<T> for storing parameters of the
analysis rather than TNamed. TNamed cannot be
merged which results in a huge overhead of
objects and time when merging containers with
objects of that class. TParameter<T> can be
merged and should not imply this overhead.
- Fix memory leak and very inefficient and wrong code when
inspecting the trigger words in AliFMDEventInspector.
- The previous code (by Alexander) tokenized every
defined trigger class (from the physiscs selection)
on every event, but the returned TObjArray was never
free'd - which causes a memory leak.
- The code was wrong, because the trigger classes
where only tokenized to get the positive and
negative parts, and then the found trigger word
was compared the positive part. However, the
positive part can consist of many words
(separated by commas) and so the comparison
would always fail.
- The code was inefficient, since the classes
where inspected on each event. Since the
trigger classes are constant over a run,
it is much more efficient to cache the
positive words up front (on the first event
say).
The new implementation caches the positive
words for both collision and background triggers
on the first event. For each event, we then
loop over these cached words and compare those
to the found trigger word of the event. In this
way, we only tokenize the trigger classes once
(actually, twice per class - one to get the
positive list, one to get the individual words)
and we make sure we clean up the memory. In each
event we can do simple comparisons (using the
AliESDEvent supplied methods), and thereby
speed up the code. We also avoid hidden memory
leaks and overly many allocations this way.
- Other clean up in the event inspector, so that all
MC specific stuff is done in the derived class
AliFMDMCEventInspector.
- Code in the event inspector has been re-factored
into separate member functions for clear structure
and easier maintaince.
- Debug statements added in various places to help
identify problems (conditional on verbosity level
of AliAnalysisManager)
- AliDisplacedVertexSelection had duplicate code
in the member functions for the vertex and
centrality. This has been unified into a
single member function Process that should be
called early in each event. This will set
internal member variables which can be retrieved
using GetVertexZ and GetCentralityPercentile.
IMPORTANT CHANGE FOR SATELITTE EVENT ANALYSIS:
The AliFMDEventInspector when run over MC no
longer tries to subsitute the IP z coordinate
and centrality with information directly from
the simulation. Instead, this information is
available from the
AliFMDMCEventInspector::ProcessMC member function.