]> git.uio.no Git - u/mrichter/AliRoot.git/commit - PWGLF/FORWARD/analysis2/AliForwardUtil.cxx
Multiple fixes:
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Jul 2012 09:09:12 +0000 (09:09 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Jul 2012 09:09:12 +0000 (09:09 +0000)
commit241cca4d2b1e097014803dc36941305e7808c207
tree80b63be2573afacf5bdb50c705175a5bfb068c7d
parent8f40bd27946b17a739378e51972131ecd1fcafb0
Multiple fixes:

- 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.
20 files changed:
PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx
PWGLF/FORWARD/analysis2/AliBasedNdetaTask.h
PWGLF/FORWARD/analysis2/AliCentralMCCorrectionsTask.cxx
PWGLF/FORWARD/analysis2/AliDisplacedVertexSelection.cxx
PWGLF/FORWARD/analysis2/AliDisplacedVertexSelection.h
PWGLF/FORWARD/analysis2/AliFMDCorrector.cxx
PWGLF/FORWARD/analysis2/AliFMDDensityCalculator.cxx
PWGLF/FORWARD/analysis2/AliFMDEnergyFitter.cxx
PWGLF/FORWARD/analysis2/AliFMDEventInspector.cxx
PWGLF/FORWARD/analysis2/AliFMDEventInspector.h
PWGLF/FORWARD/analysis2/AliFMDMCEventInspector.cxx
PWGLF/FORWARD/analysis2/AliFMDMCEventInspector.h
PWGLF/FORWARD/analysis2/AliFMDMultCuts.cxx
PWGLF/FORWARD/analysis2/AliFMDMultCuts.h
PWGLF/FORWARD/analysis2/AliFMDSharingFilter.cxx
PWGLF/FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
PWGLF/FORWARD/analysis2/AliForwardMCMultiplicityTask.cxx
PWGLF/FORWARD/analysis2/AliForwardQATask.cxx
PWGLF/FORWARD/analysis2/AliForwardUtil.cxx
PWGLF/FORWARD/analysis2/AliForwardUtil.h