LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-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

HPS-SVN Home

HPS-SVN Home

HPS-SVN  September 2015

HPS-SVN September 2015

Subject:

r3560 - /java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java

From:

[log in to unmask]

Reply-To:

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

Date:

Wed, 9 Sep 2015 14:26:53 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (112 lines)

Author: [log in to unmask]
Date: Wed Sep  9 07:26:49 2015
New Revision: 3560

Log:
cluster x position corrections

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java	Wed Sep  9 07:26:49 2015
@@ -14,25 +14,28 @@
 public final class ClusterPositionCorrection {
            
     // Variables for electron position corrections.
-    static final double ELECTRON_POS_A1 = 0.0066;
-    static final double ELECTRON_POS_A2 = -0.03;
-    static final double ELECTRON_POS_B1 = 0.028;
-    static final double ELECTRON_POS_B2 = -0.451;
-    static final double ELECTRON_POS_B3 = 0.465;
+    static final double ELECTRON_POS_A1 = -0.0005813;//0.0066;
+    static final double ELECTRON_POS_A2 = 0.005738;//-0.03;
+    static final double ELECTRON_POS_A3 = -0.0309;
+    static final double ELECTRON_POS_B1 = 0.02963;//0.028;
+    static final double ELECTRON_POS_B2 = -4.289;//-0.451;
+    static final double ELECTRON_POS_B3 = 4.596;//0.465;
     
     // Variables for positron position corrections.
-    static final double POSITRON_POS_A1 = 0.0072;
-    static final double POSITRON_POS_A2 = -0.031;
-    static final double POSITRON_POS_B1 = 0.007;
-    static final double POSITRON_POS_B2 = 0.342;
-    static final double POSITRON_POS_B3 = 0.108;
+    static final double POSITRON_POS_A1 = -0.0006243;//0.0072;
+    static final double POSITRON_POS_A2 = 0.006799;//-0.031;
+    static final double POSITRON_POS_A3 = -0.03141;
+    static final double POSITRON_POS_B1 = 0.0869;//0.007;
+    static final double POSITRON_POS_B2 = 2.965;//0.342;
+    static final double POSITRON_POS_B3 = 1.653;//0.108;
     
     // Variables for photon position corrections.
-    static final double PHOTON_POS_A1 = 0.005;
-    static final double PHOTON_POS_A2 = -0.032;
-    static final double PHOTON_POS_B1 = 0.011;
-    static final double PHOTON_POS_B2 = -0.037;
-    static final double PHOTON_POS_B3 = 0.294;
+    static final double PHOTON_POS_A1 = -0.0006329;//0.005;
+    static final double PHOTON_POS_A2 = 0.00595;//-0.032;
+    static final double PHOTON_POS_A3 = -0.03563;
+    static final double PHOTON_POS_B1 = 0.06444;//0.011;
+    static final double PHOTON_POS_B2 = -0.5836;//-0.037;
+    static final double PHOTON_POS_B3 = 3.508;//0.294;
     
   
     public static double[] calculateCorrectedPosition(Cluster cluster) {
@@ -59,38 +62,40 @@
      * @return Corrected x position
      */
     private static double computeCorrectedPosition(int pdg, double xPos, double rawEnergy) {
-        double xCl = xPos / 10.0;//convert to cm
+        //double xCl = xPos / 10.0;//convert to cm
         double xCorr;
         switch(pdg) {
             case 11: //Particle is electron        
-                xCorr = positionCorrection(xCl, rawEnergy, ELECTRON_POS_A1, ELECTRON_POS_A2, ELECTRON_POS_B1, ELECTRON_POS_B2, ELECTRON_POS_B3);
-                return xCorr * 10.0;
+                xCorr = positionCorrection(xPos, rawEnergy, ELECTRON_POS_A1, ELECTRON_POS_A2, ELECTRON_POS_A3, ELECTRON_POS_B1, ELECTRON_POS_B2, ELECTRON_POS_B3);
+                return xCorr;
             case -11:// Particle is positron       
-                xCorr = positionCorrection(xCl, rawEnergy, POSITRON_POS_A1, POSITRON_POS_A2, POSITRON_POS_B1, POSITRON_POS_B2, POSITRON_POS_B3);
-                return xCorr * 10.0;
+                xCorr = positionCorrection(xPos, rawEnergy, POSITRON_POS_A1, POSITRON_POS_A2, POSITRON_POS_A3, POSITRON_POS_B1, POSITRON_POS_B2, POSITRON_POS_B3);
+                return xCorr;
             case 22: // Particle is photon      
-                xCorr = positionCorrection(xCl, rawEnergy, PHOTON_POS_A1, PHOTON_POS_A2, PHOTON_POS_B1, PHOTON_POS_B2, PHOTON_POS_B3);
-                return xCorr * 10.0;
+                xCorr = positionCorrection(xPos, rawEnergy, PHOTON_POS_A1, PHOTON_POS_A2, PHOTON_POS_A3, PHOTON_POS_B1, PHOTON_POS_B2, PHOTON_POS_B3);
+                return xCorr;
             default: //Unknown 
-                xCorr = xCl;
-                return xCorr * 10.0;
+                xCorr = xPos;
+                return xCorr;
         }
     }
     
    /**
     * Calculates the position correction in cm using the raw energy and variables associated with the fit
-    * of the particle as described in  
+    * of the particle. Prodecure described in  
     * <a href="https://misportal.jlab.org/mis/physics/hps_notes/index.cfm?note_year=2014">HPS Note 2014-001</a>
     * @param xCl
     * @param rawEnergy
     * @param varA1
     * @param varA2
+    * @param varA3
     * @param varB1
     * @param varB2
     * @param varB3
     * @return
     */    
-    private static double positionCorrection(double xCl, double rawEnergy, double varA1, double varA2, double varB1, double varB2, double varB3) {
-        return ((xCl - (varB1 * rawEnergy + varB2 / Math.sqrt(rawEnergy) + varB3))/(varA1 / Math.sqrt(rawEnergy) + varA2 + 1));
+    private static double positionCorrection(double xCl, double rawEnergy, double varA1, double varA2, double varA3, double varB1, double varB2, double varB3) {
+        //return ((xCl - (varB1 * rawEnergy + varB2 / Math.sqrt(rawEnergy) + varB3))/(varA1 / Math.sqrt(rawEnergy) + varA2 + 1));
+    	return ((xCl - (varB1 * rawEnergy + varB2 / Math.sqrt(rawEnergy) + varB3))/(varA1 * rawEnergy + varA2 / Math.sqrt(rawEnergy) + varA3 + 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

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
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