View Javadoc

1   package org.lcsim.detector.converter.compact;
2   
3   import hep.physics.vec.Hep3Vector;
4   
5   import org.lcsim.detector.DetectorElement;
6   import org.lcsim.geometry.Detector;
7   
8   /**
9    * Wraps a compact detector in a DetectorElement.
10   * 
11   * @see org.lcsim.geometry.Detector
12   * @see org.lcsim.detector.DetectorElement
13   * @see org.lcsim.geometry.FieldMap
14   * 
15   * @author Jeremy McCormick
16   * @version $Id: DeDetector.java,v 1.3 2010/11/30 00:16:27 jeremy Exp $
17   */
18  public class DeDetector extends DetectorElement
19  {
20      Detector detector;
21  
22      public DeDetector( Detector detector )
23      {
24          super( detector.getName(), null, "/" );
25          this.detector = detector;
26      }
27  
28      public Hep3Vector getBField( Hep3Vector position )
29      {
30          return detector.getFieldMap().getField( position );
31      }
32  
33      public Detector getCompactDetector()
34      {
35          return detector;
36      }
37  }