Print

Print


Commit in lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype on MAIN
Cylinder.java+10-151.3 -> 1.4
CylinderLZR.java-1271.2 removed
+10-142
1 removed + 1 modified, total 2 files
Removed PhyZR cylinder SensorType

lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
Cylinder.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- Cylinder.java	15 Sep 2008 15:44:06 -0000	1.3
+++ Cylinder.java	15 Sep 2008 16:08:12 -0000	1.4
@@ -10,18 +10,16 @@
 import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
 import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
 import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
-import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameCylinder;
-import org.lcsim.contrib.onoprien.vsegment.transform.RefFrameLocalOnCylinder;
 
 /**
  * This class represents a cylindrical sensor with pixels or strips parallel to its axis.
  * <p>
- * The reference frame is (U,V,W = Phi,Z,R). 
- * Channel positions returned by <tt>getChannelPosition</tt> method will be on the cylindrical
- * reference surface specified by the radius supplied to the constructor.
- *
+ * The reference frame is (U,V,W = R0*Phi,Z,R-R0), where R0 is the reference surface
+ * radius supplied to the constructor.
+ * 
+ * 
  * @author D.Onoprienko
- * @version $Id: Cylinder.java,v 1.3 2008/09/15 15:44:06 onoprien Exp $
+ * @version $Id: Cylinder.java,v 1.4 2008/09/15 16:08:12 onoprien Exp $
  */
 public class Cylinder extends Rectangle {
   
@@ -39,8 +37,8 @@
    * @param rReference  Radius of the reference surface.
    */
   public Cylinder(double radius, double length, double thickness, int nPhi, int nLength, double rReference) {
-    super(TWOPI, length, thickness, nPhi, nLength, new ConstHep3Vector(0., 0., rReference));
-    _hitType = ((length/nLength)/((TWOPI*rReference)/nPhi) < 4.) ? ITrackerHit.Type.PIXEL : ITrackerHit.Type.STRIP;
+    super(2.*Math.PI*rReference, length, thickness, nPhi, nLength, new ConstHep3Vector(0., 0., radius-rReference));
+    _hitType = ((length/nLength)/((2.*Math.PI*rReference)/nPhi) < 4.) ? ITrackerHit.Type.PIXEL : ITrackerHit.Type.STRIP;
   }
   
   /**
@@ -56,7 +54,7 @@
    * @param center       Controls definition of the local reference frame
    */
   public Cylinder(double radius, double length, double thickness, double stripPitch, double stripLength, double rReference) {
-    this(radius, length, thickness, (int) Math.round((TWOPI*rReference)/stripPitch), (int) Math.round(length/stripLength), rReference);
+    this(radius, length, thickness, (int) Math.round((2.*Math.PI*rReference)/stripPitch), (int) Math.round(length/stripLength), rReference);
   }
 
 // -----------------------------------------------------------------------------
@@ -85,7 +83,7 @@
    * For this type of sensor, the specified sensor reference frame is returned, independent of position.
    */
   public IRefFrame getLocalFrame(IRefFrame sensorFrame, Hep3Vector position) {
-    return new RefFrameLocalOnCylinder((RefFrameCylinder)sensorFrame, position);
+    return sensorFrame;
   }
   
   /**
@@ -126,8 +124,5 @@
     }
     return out;
   }
-  
-// -- Private parts :  ---------------------------------------------------------
-  
-  static private final double TWOPI = Math.PI*2.;
+
 }

lcsim/src/org/lcsim/contrib/onoprien/vsegment/geom/sensortype
CylinderLZR.java removed after 1.2
diff -N CylinderLZR.java
--- CylinderLZR.java	15 Sep 2008 15:44:06 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
-package org.lcsim.contrib.onoprien.vsegment.geom.sensortype;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
-
-import org.lcsim.contrib.onoprien.vsegment.geom.SensorType;
-import org.lcsim.contrib.onoprien.vsegment.hit.ITrackerHit;
-import org.lcsim.contrib.onoprien.vsegment.transform.ConstHep3Vector;
-import org.lcsim.contrib.onoprien.vsegment.transform.IRefFrame;
-
-/**
- * This class represents a cylindrical sensor with pixels or strips parallel to its axis.
- * <p>
- * The reference frame is (U,V,W = R0*Phi,Z,R-R0), where R0 is the reference surface
- * radius supplied to the constructor.
- *
- * @author D.Onoprienko
- * @version $Id: CylinderLZR.java,v 1.2 2008/09/15 15:44:06 onoprien Exp $
- */
-public class CylinderLZR extends Rectangle {
-  
-// -- Constructors :  ----------------------------------------------------------
-  
-  /**
-   * Create <tt>Cylinder</tt> instance.
-   * The <tt>center</tt> parameter controls offsets in the local reference frame.
-   *
-   * @param length      Length of the cylinder (along strip direction).
-   * @param radius      Radius of the cylinder (average between inner and outer redii).
-   * @param thickness   Thickness of the cylinder.
-   * @param nLength     Number of divisions along the cylinder length.
-   * @param nPhi        Number of divisions in phi.
-   * @param rReference  Radius of the reference surface.
-   */
-  public CylinderLZR(double radius, double length, double thickness, int nPhi, int nLength, double rReference) {
-    super(2.*Math.PI*rReference, length, thickness, nPhi, nLength, new ConstHep3Vector(0., 0., radius-rReference));
-    _hitType = ((length/nLength)/((2.*Math.PI*rReference)/nPhi) < 4.) ? ITrackerHit.Type.PIXEL : ITrackerHit.Type.STRIP;
-  }
-  
-  /**
-   * Create <tt>Cylinder</tt> instance.
-   * Strip width will be adjusted to make sure integral number of strips fits the 
-   * circumference of the cylinder.
-   *
-   * @param length       Length of the cylinder (along strip direction).
-   * @param radius       Radius of the cylinder.
-   * @param thickness    Thickness of the sensor.
-   * @param stripPitch   Strip width.
-   * @param stripLength  Strip length.
-   * @param center       Controls definition of the local reference frame
-   */
-  public CylinderLZR(double radius, double length, double thickness, double stripPitch, double stripLength, double rReference) {
-    this(radius, length, thickness, (int) Math.round((2.*Math.PI*rReference)/stripPitch), (int) Math.round(length/stripLength), rReference);
-  }
-
-// -----------------------------------------------------------------------------
-
-  /**
-   * Converts a point in local sensor coordinates to channel ID.
-   * Returns -1 if the point is outside of sensor sensitive area.
-   */
-  public int getChannelID(Hep3Vector point) {
-
-    double u = point.x();
-    double v = point.y();
-
-    int nV = (int) Math.floor((v-_vLow)/_length);
-    if ((nV < 0) || (nV >= _nDivV)) return -1;
-
-    int nU = (int) Math.floor((u-_uLow)/_pitch); 
-    while (nU < 0) nU += _nDivU;
-    while (nU >= _nDivU) nU -= _nDivU;
-
-    return nV*_nDivU + nU;
-  }
-  
-  /**
-   * Returns local cartesian reference frame at the specified position in local sensor coordinates.
-   * For this type of sensor, the specified sensor reference frame is returned, independent of position.
-   */
-  public IRefFrame getLocalFrame(IRefFrame sensorFrame, Hep3Vector position) {
-    return sensorFrame;
-  }
-  
-  /**
-   * Returns channel ID of a neighbor channel.
-   * Returns -1 if the channel defined by shifts does not exist on this sensor.
-   *
-   * @param channelID  ID of the original channel
-   * @param shiftV     move in <tt>V</tt> direction by <tt>shiftV</tt> channels
-   * @param shiftU     move in <tt>U</tt> direction by <tt>shiftU</tt> channels
-   */
-  public int getNeighbor(int channelID, int shiftU, int shiftV) {
-    int nV = (channelID / _nDivU) + shiftV;
-    if (nV < 0 || nV >= _nDivV) return -1;
-    int nU = (channelID % _nDivU) + shiftU;
-    while (nU < 0) nU += _nDivU;
-    while (nU >= _nDivU) nU -= _nDivU;
-    return nV*_nDivU + nU;
-  }
-  
-  /** 
-   * Returns array of IDs of all immediate neighbor channels. 
-   * For strips ({@link #getHitDimension()} returns 1), this method looks for neighbors
-   * in U direction only. Therefore, each strip has 1 or 2 neighbors. For pixels
-   * ({@link #getHitDimension()} returns 2), up to 8 neighbors can be found.
-   */
-  public List<Integer> getNeighbors(int channelID) {
-    int nU = channelID % _nDivU;
-    int nV = channelID / _nDivU;
-    ArrayList<Integer> out = new ArrayList<Integer>(8);
-    int vDown = ((_hitType.nMeasured() == 2) && (nV > 0)) ? nV-1 : nV;
-    int vUp = ((_hitType.nMeasured() == 2) && (nV < _nDivV-1)) ? nV+1 : nV;
-    for (int iV = vDown; iV < vUp; iV++) {
-      for (int iU = nU-1; iU < nU+1; iU++) {
-        while (nU < 0) nU += _nDivU;
-        while (nU >= _nDivU) nU -= _nDivU;
-        out.add(nV*_nDivU + nU);
-      }
-    }
-    return out;
-  }
-
-}
CVSspam 0.2.8