View Javadoc

1   package org.lcsim.recon.tracking.trfbase;
2   
3   import java.util.*;
4   
5   import org.lcsim.recon.tracking.trfbase.Cluster;
6   import org.lcsim.recon.tracking.trfbase.ETrack;
7   import org.lcsim.recon.tracking.trfbase.Surface;
8   import org.lcsim.recon.tracking.trfbase.HitTest;
9   
10  public class ClusterTest extends Cluster
11  {
12      // surface
13      private  SurfTest _stst;
14      
15      // # predictions to generate
16      private int _npred;
17      
18      public String toString()
19      {
20          return "Dummy hit (" + _npred + " predictions)";
21      }
22      public boolean equal(Cluster clus)
23      { return _npred == ((ClusterTest) clus)._npred;
24      }
25      
26      public List predict(ETrack tre)
27      {
28          List hits = new ArrayList();
29          for ( int ipred=0; ipred<_npred; ++ipred )
30              hits.add( new HitTest(ipred) );
31          // don't set cluster association anywhere?
32          return hits;
33      }
34      
35      // static methods
36      // Return the type name.
37          /*public static String get_type_name()
38          {
39                  return "ClusterTest";
40          }
41           */
42          /*
43          // Return the type.
44          public static String get_static_type()
45          {
46                  return get_type_name();
47          }
48           */
49      
50      public ClusterTest( SurfTest srf,int npred)
51      {
52          _stst  = srf;
53          _npred = npred;
54      }
55      
56      public ClusterTest( ClusterTest clus)
57      {
58          _stst  = clus._stst;
59          _npred = clus._npred;
60      }
61      
62      public String type()
63      {
64          return staticType();
65      }
66      
67      //public SurfTest get_surface()
68      public Surface surface()
69      {
70          return _stst;
71      }
72  }