Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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);
}

...