View Javadoc

1   package org.lcsim.recon.tracking.trfbase;
2   /** Derived from propagator and add a modifiable default direction.
3    * We implement the methods that do not specify a direction using
4    * those that do.
5    *
6    * @author Norman A. Graf
7    * @version 1.0
8    */
9   public abstract class PropDirected extends Propagator
10  {
11      
12      private PropDir _dir;
13      
14      //
15      
16      /**
17       *constructor with default direction = NEAREST
18       *
19       */
20      public PropDirected()
21      {
22          direction( PropDir.NEAREST );
23      }
24      
25      //
26      
27      /**
28       *constructor from direction
29       *
30       * @param   dir Direction in which to propagate
31       */
32      public PropDirected(PropDir dir)
33      {
34          direction( dir );
35      }
36      
37      //
38      
39      /**
40       *set the default direction
41       *
42       * @param   dir direction in which to propagate
43       */
44      public void direction(PropDir dir)
45      {
46          _dir = dir;
47      }
48      
49      //
50      
51      /**
52       *get the default direction
53       *
54       * @return the default direction in which to propagate
55       */
56      public PropDir direction()
57      {
58          return _dir;
59      }
60      
61      //
62      
63      /**
64       *Propagate a track without error in the default direction.
65       *
66       * @param   trv VTrack to propagate
67       * @param   srf Surface to which to propagate
68       * @param   tder TrackDerivative to update at srf
69       * @return  propagation status
70       */
71      public PropStat vecProp(VTrack  trv,  Surface  srf,
72              TrackDerivative  tder )
73      {
74          return vecDirProp(trv, srf, _dir, tder);
75      }
76      
77      //
78      
79      /**
80       *Propagate a track with error in the default direction.
81       *
82       * @param   trv ETrack to propagate
83       * @param   srf Surface to which to propagate
84       * @param   tder TrackDerivative to update at srf
85       * @return  propagation status
86       */
87      public PropStat errProp( ETrack  trv,  Surface  srf,
88              TrackDerivative  tder )
89      {
90          return errDirProp(trv, srf, _dir, tder);
91      }
92  }