View Javadoc

1   package org.lcsim.recon.tracking.trfbase;
2   //**********************************************************************
3   import org.lcsim.recon.tracking.trfbase.SurfTest;
4   import org.lcsim.recon.tracking.trfbase.BoundedStat;
5   import org.lcsim.recon.tracking.trfbase.CrossStat;
6   import org.lcsim.recon.tracking.trfbase.ETrack;
7   import org.lcsim.recon.tracking.trfbase.Surface;
8   import org.lcsim.recon.tracking.trfbase.VTrack;
9   
10  
11  // Bounded surface
12  
13  public class BSurfTest extends SurfTest {
14  
15  // attributes
16  
17    // parameters specifying the bounds
18    private double _bparam;
19  
20   // static methods
21  
22    // Return the type name.
23    public static String typeName() { return "BSurfTest"; }
24   
25    // Return the type.
26    public static String staticType() { return typeName(); }
27  
28    // methods
29  
30    // output stream
31    public String toString()
32    {
33    return "BSurfTest "+super.toString()+" bound= "+_bparam +"\n";
34    }
35  
36    // Equality comparing two bound surfaces of this type
37    protected boolean safeBoundEqual( Surface srf)  {
38      if ( ! pureEqual(srf) ) return false;
39      return _bparam == ((BSurfTest) srf)._bparam;
40    }
41  
42   // methods
43  
44    // Constructor
45    public BSurfTest(double x, double bparam) 
46    {
47    super(x);
48    _bparam= bparam;
49    }
50    
51    // Return the type.
52    public String type()  { return staticType(); }
53   
54    // return the full crossing status
55    public CrossStat status( VTrack trv) 
56      { return new CrossStat(BoundedStat.IN_BOUNDS); };
57    public CrossStat status( ETrack tre) 
58      { return new CrossStat(BoundedStat.BOTH_BOUNDS); };
59  
60    // clone
61    public Surface newSurface()  {
62      return new BSurfTest(parameter(0),_bparam);
63    }
64  
65  }
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88