LISTSERV mailing list manager LISTSERV 16.5

Help for LCDET-SVN Archives


LCDET-SVN Archives

LCDET-SVN Archives


LCDET-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LCDET-SVN Home

LCDET-SVN Home

LCDET-SVN  January 2015

LCDET-SVN January 2015

Subject:

r3496 - /projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the lcdet svn repository <[log in to unmask]>

Date:

Wed, 21 Jan 2015 08:50:46 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (232 lines)

Author: [log in to unmask]
Date: Wed Jan 21 00:50:35 2015
New Revision: 3496

Log:
Add a method that sets the geometry and electrical characteristics of an HpsSiSensor.  This method was ported from the class SvtSensorSetup located in the tracking module of the hps-java package.

Modified:
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java	Wed Jan 21 00:50:35 2015
@@ -1,12 +1,25 @@
 package org.lcsim.detector.tracker.silicon;
+
+import hep.physics.matrix.BasicMatrix;
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.VecOp;
 
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import org.lcsim.detector.IDetectorElement;
+import org.lcsim.detector.IRotation3D;
+import org.lcsim.detector.ITranslation3D;
+import org.lcsim.detector.RotationPassiveXYZ;
+import org.lcsim.detector.Transform3D;
+import org.lcsim.detector.Translation3D;
 import org.lcsim.detector.identifier.IIdentifier;
+import org.lcsim.detector.solids.Box;
+import org.lcsim.detector.solids.LineSegment3D;
+import org.lcsim.detector.solids.Polygon3D;
 
 /**
  * This class extends {@link SiSensor} with conditions specific to HPS SVT half-modules
@@ -31,14 +44,35 @@
 	public final static int TP_INDEX = 2;
 	
 	public final static String ELECTRON_SIDE = "ELECTRON";
-	public final static String POSITRON_SIDE = "ELECTRON";
-	
+	public final static String POSITRON_SIDE = "POSITRON";
+
 	protected int febID; 
 	protected int febHybridID;
 	protected double t0Shift = 0;
 	protected boolean isAxial = false; 
 	protected boolean isStereo = false; 
 
+	protected double readoutStripPitch = 0.060; // mm
+    protected double senseStripPitch = 0.030; // mm
+    private double readoutStripCapacitanceIntercept = 0;
+    private double readoutStripCapacitanceSlope = 0.16; // pf/mm
+    private double senseStripCapacitanceIntercept = 0;
+    private double senseStripCapacitanceSlope = 0.16; // pf/mm
+    private double readoutTransferEfficiency = 0.986;
+    private double senseTransferEfficiency = 0.419;
+
+    /*
+     * Adding separate strip capacitance for long detectors following
+     * S/N = mip_charge/(270e- + 36*C[pf/cm]*L[cm]
+     * e.g. for expected S/N=16 and L=20cm -> C=0.1708pf/mm
+     * e.g. for expected S/N=8 and L=20cm -> C=0.39pf/mm
+     * FIXME: This should be taken into account by the noise model.
+     */
+    protected double longSensorLengthThreshold = 190.0; //mm
+    protected double readoutLongStripCapacitanceSlope = 0.39;  // pf/mm
+    protected double senseLongStripCapacitanceSlope = 0.39;  // pf/mm
+	
+	
 	//-----------------------//
 	//--- Conditions Maps ---//
 	//-----------------------//
@@ -131,7 +165,7 @@
 	 * 
 	 * @return True is sensor is stereo; false if not.
 	 */
-	public boolean isStereo(){
+	public boolean isStereo() {
 		return isStereo; 
 	}
 	
@@ -263,7 +297,7 @@
 	 * 
 	 * @return The side the sensor is on (ELECTRON or POSITRON)
 	 */
-	public String getSide(){
+	public String getSide() {
 		return this.getModuleNumber() < 2 ? ELECTRON_SIDE : POSITRON_SIDE;
 	}
 	
@@ -275,7 +309,7 @@
      * @param channel : Physical channel number
      * @return ID 
      */
-	public long makeChannelID(int channel){
+	public long makeChannelID(int channel) {
 		int sideNumber = this.hasElectrodesOnSide(ChargeCarrier.HOLE) 
 				? ChargeCarrier.HOLE.charge() : ChargeCarrier.ELECTRON.charge();
 		return this.makeStripId(channel, sideNumber).getValue();
@@ -379,8 +413,7 @@
 	 * 
 	 * @param true if the sensor is Axial, false otherwise
 	 */
-	public void setAxial(boolean isAxial)
-	{
+	public void setAxial(boolean isAxial) {
 		this.isAxial = isAxial; 
 	}
 	
@@ -389,7 +422,7 @@
 	 * 
 	 * @param true is the sensor is stereo, false otherwise 
 	 */
-	public void setStereo(boolean isStereo){
+	public void setStereo(boolean isStereo) {
 		this.isStereo = isStereo; 
 	}
 	
@@ -398,7 +431,7 @@
 	 * This does NOT reset the sensor setup information, which is
 	 * assumed to be fixed once it is setup for a given session.
 	 */
-	public void reset(){
+	public void reset() {
 		pedestalMap.clear();	
 		noiseMap.clear();
 		offsetMap.clear();
@@ -409,7 +442,7 @@
 	}
 	
 	@Override
-	public String toString(){
+	public String toString() {
 		
 		StringBuffer buffer = new StringBuffer();
 		buffer.append("HpsSiSensor: ");
@@ -423,4 +456,82 @@
 		return buffer.toString(); 
 	}
 	
+	/**
+	 * Setup the geometry and electrical characteristics of an
+	 * {@link HpsSiSensor}
+	 * 
+	 */
+	private void setupSensor() { 
+	    
+	    // Get the solid corresponding to the sensor volume
+	    Box sensorSolid = (Box) this.getGeometry().getLogicalVolume().getSolid();
+	   
+       // Get the faces of the solid corresponding to the n and p sides of the sensor 
+       Polygon3D pSide = sensorSolid.getFacesNormalTo(new BasicHep3Vector(0, 0, 1)).get(0);
+       Polygon3D nSide = sensorSolid.getFacesNormalTo(new BasicHep3Vector(0, 0, -1)).get(0);
+	   
+       // p side collects holes.
+       this.setBiasSurface(ChargeCarrier.HOLE, pSide);
+            
+       // n side collects electrons.
+       this.setBiasSurface(ChargeCarrier.ELECTRON, nSide);
+       
+       // Translate to the outside of the sensor solid in order to setup electrode
+       ITranslation3D electrodesPosition = new Translation3D(VecOp.mult(-pSide.getDistance(), pSide.getNormal()));
+	
+       // Align the strips with the edge of the sensor.        
+       IRotation3D electrodesRotation = new RotationPassiveXYZ(0, 0, 0);
+       Transform3D electrodesTransform = new Transform3D(electrodesPosition, electrodesRotation);
+
+       // Set the number of readout and sense electrodes.
+       SiStrips readoutElectrodes = new SiStrips(ChargeCarrier.HOLE, readoutStripPitch, this, electrodesTransform);
+       SiStrips senseElectrodes = new SiStrips(ChargeCarrier.HOLE, senseStripPitch, (readoutElectrodes.getNCells() * 2 - 1), this, electrodesTransform);
+
+       double readoutCapacitance = this.getStripLength() > longSensorLengthThreshold ? readoutLongStripCapacitanceSlope : readoutStripCapacitanceSlope;
+       double senseCapacitance = this.getStripLength() > longSensorLengthThreshold ? senseLongStripCapacitanceSlope : senseStripCapacitanceSlope;
+	
+       // Set the strip capacitance.
+       readoutElectrodes.setCapacitanceIntercept(readoutStripCapacitanceIntercept);
+       readoutElectrodes.setCapacitanceSlope(readoutCapacitance);
+       senseElectrodes.setCapacitanceIntercept(senseStripCapacitanceIntercept);
+       senseElectrodes.setCapacitanceSlope(senseCapacitance);
+            
+       // Set sense and readout electrodes.
+       this.setSenseElectrodes(senseElectrodes);
+       this.setReadoutElectrodes(readoutElectrodes);
+
+       
+       // Set the charge transfer efficiency.
+       double[][] transferEfficiencies = {{readoutTransferEfficiency, senseTransferEfficiency}};
+       this.setTransferEfficiencies(ChargeCarrier.HOLE, new BasicMatrix(transferEfficiencies));
+	
+	}
+	
+	/**
+	 * Return the length of an {@link HpsSiSensor}.  This is done by getting 
+	 * the face of the {@link HpsSiSensor} and returning the length of the 
+	 * longest edge.
+	 * 
+	 * @return  The length of the longest {@link HpsSiSensor} edge
+	 */
+	protected double getStripLength() {
+	    
+		double length = 0;
+        
+		// Get the faces normal to the sensor
+		List<Polygon3D> faces = ((Box) this.getGeometry().getLogicalVolume().getSolid()).getFacesNormalTo(new BasicHep3Vector(0,0,1));
+        for (Polygon3D face : faces) {
+            
+            // Loop through the edges of the sensor face and find the longest 
+            // one
+            List<LineSegment3D> edges = face.getEdges();
+            for (LineSegment3D edge : edges) {
+                if (edge.getLength() > length) {
+                    length = edge.getLength();
+                }
+            }
+        }
+        return length;
+    }
+	
 }

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use