EventFactory: Fill the event owned by the user.

EventFactory::MakeEmptyEvent() was renamed to
EventFactory::SetupEmptyEvent(ev). The new function takes an already
existing analysis event, clears it and fills the rawevent and mc weight
into the cleared particle.

This fixes a problem which resulted from deleting the same event several
times.
AnalysisEvent: avoid memory fragmentation.

Particles are now stored in a static WTF Vector of the AnalysisEvent. I
replaced the AddParticle function with a new function called
GetEmptyParticle() which resizes the vector and returns a reference to
the new particle. That particle is then cleared and returned.

So

Analysis::Particle* p = new Analysis::Particle;
... // fill particle
AddParticle(p)

should be changed to

Analysis::Particle& p = event.GetEmptyParticle();
... // fill particle

Let's see how it works.
Simplified code in GetEmptyParticle()
Simplify constructor.
Make documentation less technical.
Clarify docu.
SplineTrack: Do not create/delete SplineTracks from AnalysisParticle.

SplineTrack got a "Clear" and "IsEmpty" function.

AnalysisParticle now reuses it's SplineTrack member. After each
invocation of Particle::Clear() the SplineTrack is cleared as well.

TrackFactory now fills an empty SplineTrack instead of returning a new
instance from the heap. The SplineTrack passed to the TrackFactory has
to be empty, otherwise the code will assert.

The Analysis::Particle::GetSplineTrack() accessor now checks if the
SplineTrack is empty and returns a null pointer if it is. Otherwise the
address of its SplineTrack member is returned.

This means that very little code had to be modified: Only code which
creates new SplineTracks was changed. Every function that just works
with the Analysis::Particle's SplineTrack will work the same way.
SplineTrack: Removed fPoints member.

It's unnecessary and constantly clears and resizes.

To check if a spline track is empty a new variable fIsEmpty has been
introduced. All the spline track functions assert on this variable to
make sure that only valid spline tracks are used for analysis.

fIsEmpty is set to false by the TrackFactory when the track has been
built and it's reset to true once SplineTrack::Clear() is called.
SplineTracK: Use static variables in track factory.

Should provide a slight speedup.
SplineTrack: Document fIsEmpty.
SplineTrack: Remove vector include, it's no longer required.
SplineTrack: Use new CubicSpline2D class which derives from TSpline3.

The nice thing about this new CubicSpline2D class is that it implements
Clear() and Build(double*, double*) functions. These functions modify
the members of the TSpline3 and recreate the cubic spline's
coefficients.

This will help to reduce memory fragmentation by a lot. Prior to this
change multiple re-allocations and deletions in ROOT internal TSpline3
code were executed per event!
SplineTrack: Make CubicSpline2D constructor and destructor private.

This class should only be used internally by the SplineTrack and the
TrackFactory.
Merge branch 'dev' into splineTrack_fix
Fix ws.
Clarify docu.
Change default value for MaxSegments.

Reduce the number of segments that will be identified
by TrdTracking. This matches the requirements of most uses
and will greatly speed up programs.

If you really need all segments, the values can be changed using
the ConfigHandler.
Merge branch 'splineTrack_fix' into dev

Signed-off-by: Henning Gast <henning@physik.rwth-aachen.de>