Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  • The Track parameters are always evaluated at the origin
  • the reference point of the Track is therefore (0, 0, 0), but getReferencePoint() returns the same point as getOrigin of the particle that the track was instantiated with.
  • The Parameters of the Track are never swum to the reference point and therefore the track parameters are therefore wrong by design for all particles that don't come from the origin

Issues

This has the result that you cannot reliably swim the Track to a given point. Because the reference point for the track is 0, the Swimmer claims that the tracklength to the origin is 0. However, since the Track has been instantiated from a particle that did not originate at the IP, the track parameters do not actually correspond to the origin.
In other words: The POCA on the track to the IP results in the wrong point.
The result of this can be seen in ,

What is more: The following is an example of how to instantiate Tracks from Particles.
The approach is simple: Get a Particle, make a Track from it and compare Track momentum and particle momentum. This is kind of the whole idea of a track.
Naive approach 1: Swim the Track to the Origin of the Particle and compare momenta.
Image Added Image Added Image Added

OK, that looks pretty bad. Now, remember that the old Track has the wrong reference point, and that it is instantiated at the origin of the MCParticle. Let's compare this then to a new fast mc track that is properly smeared and swum to the origin of the particle.
Image Added Image Added Image Added

Aha ! So as long as we use Tracks from the IP (which admittedly is the majority of the tracks) or know exactly where in the detector the Track was created from the particle (...) this seems to do OK.

Just for kicks: The new interface can of course turn off smearing. So let's make some unsmeared tracks and swim them.
Image Added Image Added Image Added

A new Track

Interface Design goals:

...

Code Block
NewFastMCTrackFactory factory = new NewFastMCTrackFactory(event, false); // beamConstraint when smearing ?
for (MCParticle daughter : part.getDaughters()) {
                  Track unsmearedTrack = tf.getTrack(
                      new SpaceVector(daughter.getMomentum()), // momentum
                      new SpacePoint(daughter.getOrigin()), // position
                      new SpacePoint(part.getEndPoint()), // reference point
                      (int)daughter.getCharge(), // charge
                      rand, // random generator for smearing
                      false); // smearing ? default is true

                  Track smearedTrack = tf.getTrack(
                      new SpaceVector(daughter.getMomentum()),
                      new SpacePoint(daughter.getOrigin()),
                      new SpacePoint(part.getEndPoint()),
                      (int)daughter.getCharge(),
                      rand,
                      true);
}

...