1 package org.lcsim.recon.tracking.vsegment.geom; 2 3 import java.util.List; 4 5 import hep.physics.vec.Hep3Vector; 6 7 /** 8 * Any class that implements this interface defines a particular shape of silicon 9 * sensor and its segmentation into strips or pixels. 10 * Current design assumes that all strips are parallel to each other, each strip or 11 * pixel has no more than one neighbor in each direction. Reference frame on a sensor: 12 * (U, V, W). U is the measurement direction (in the sensor plane, perpendicular to 13 * strips), V is along the strips, W forms right-nahded system. 14 * 15 * @author D.Onoprienko 16 * @version $Id: SensorType.java,v 1.1 2008/12/06 21:53:43 onoprien Exp $ 17 */ 18 public interface SensorType { 19 20 /** 21 * Converts a point in local sensor coordinates to channel ID. 22 * Returns -1 if the point is outside of sensor sensitive area. 23 */ 24 public int getChannelID(Hep3Vector point); 25 26 /** 27 * Returns position of the center of a given channel, in local sensor coordinates. 28 */ 29 public Hep3Vector getChannelPosition(int channelID); 30 31 /** Returns maximum channel ID on this sensor. */ 32 public int getMaxChannelID(); 33 34 /** Returns <tt>true</tt> if channel with this ID exists on this sensor. */ 35 public boolean isValidChannelID(int channelID); 36 37 /** Returns dimensions of a given channel along U, V, W. */ 38 public Hep3Vector getChannelDimensions(int channelID); 39 40 /** 41 * Returns the dimension of a measurement by this type of sensor 42 * (1 for strips, 2 for pixels, etc). Note that algorithms can ignore this method 43 * and use {@link #getChannelDimensions(int)} to decide how to treat measurements 44 * by the given sensor. However, {@link #getNeighbors(int)} should only look for 45 * neighbors in <tt>U</tt> direction if this method returns <tt>1</tt>. 46 */ 47 public int getHitDimension(); 48 49 /** 50 * Returns ID of a channel obtained by shifting the given channel by the given 51 * number of channels in the given direction along the local reference frame axis. 52 * Returns <tt>-1</tt> if shifting puts the point outside of the sensor boundaries. 53 * Throws <tt>IllegalArgumentException</tt> if this type of sensor does not have a 54 * concept of a neighbor in the given direction. 55 * 56 * @param channelID ID of the original channel 57 * @param shiftV move in <tt>V</tt> direction by <tt>shiftV</tt> channels 58 * @param shiftU move in <tt>U</tt> direction by <tt>shiftU</tt> channels 59 */ 60 public int getNeighbor(int channelID, int shiftU, int shiftV); 61 62 /** 63 * Returns a list of IDs of all immediate neighbor channels. 64 */ 65 public List<Integer> getNeighbors(int channelID); 66 67 }