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  June 2015

HPS-SVN June 2015

Subject:

r3120 - in /java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal: EcalPulseFitter.java EcalRawConverter.java EcalRawConverterDriver.java

From:

[log in to unmask]

Reply-To:

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

Date:

Wed, 10 Jun 2015 20:55:45 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (115 lines)

Author: [log in to unmask]
Date: Wed Jun 10 13:55:34 2015
New Revision: 3120

Log:
another update to allow pulse fitting to work on mc

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalPulseFitter.java
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalPulseFitter.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalPulseFitter.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalPulseFitter.java	Wed Jun 10 13:55:34 2015
@@ -14,7 +14,6 @@
 import java.util.logging.Logger;
 
 import org.hps.conditions.database.DatabaseConditionsManager;
-import org.hps.conditions.ecal.EcalChannel;
 import org.hps.conditions.ecal.EcalChannelConstants;
 import org.hps.conditions.ecal.EcalConditions;
 import org.lcsim.event.RawTrackerHit;
@@ -33,6 +32,9 @@
 
     // don't bother fitting pulses with threshold crossing outside this sample range:
     public int threshRange[]={7,20}; // (28 ns <--> 80 ns)
+    
+    // restrict fit's time0 parameter to this range:  (units=samples)
+    public int t0limits[]={1,30};
     
     // fit sample range relative to threshold crossing:
     private final static int fitRange[]={-10,15};
@@ -181,11 +183,7 @@
 
         // constrain parameters:
 //        fitter.fitParameterSettings("time0").setBounds(1,30);
-        double t0min=threshRange[0]-6;
-        double t0max=threshRange[1]+10;
-        if (t0min<1) t0min=1;
-        if (t0max>=samples.length-5) t0max=samples.length-6;
-        fitter.fitParameterSettings("time0").setBounds(t0min,t0max);
+        fitter.fitParameterSettings("time0").setBounds(t0limits[0],t0limits[1]);
         fitter.fitParameterSettings("width").setBounds(0.1,5);
         fitter.fitParameterSettings("integral").setBounds(0,999999);
         if (fixShapeParameter) fitter.fitParameterSettings("width").setFixed(true);

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java	Wed Jun 10 13:55:34 2015
@@ -155,10 +155,12 @@
         pulseFitter.globalThreePoleWidth=width; 
         pulseFitter.fixShapeParameter=true;
     }
-    public void setFitThresholdRange(int sample1,int sample2) {
-        pulseFitter.threshRange[0]=sample1;
-        pulseFitter.threshRange[1]=sample2;
-    }
+    public void setFitThresholdTimeLo(int sample) { pulseFitter.threshRange[0]=sample; }
+    public void setFitThresholdTimeHi(int sample) { pulseFitter.threshRange[1]=sample; }
+    public void setFitLimitTimeLo(int sample) { pulseFitter.t0limits[0]=sample; }
+    public void setFitLimitTimeHi(int sample) { pulseFitter.t0limits[1]=sample; }
+    
+    
 
     public void setLeadingEdgeThreshold(double thresh) {
         leadingEdgeThreshold=thresh;

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java	Wed Jun 10 13:55:34 2015
@@ -48,14 +48,14 @@
     }
 
     /*
+     * Set to <code>true</code> to use pulse fitting instead of arithmetic integration:<br/>
+     */
+    public void setUseFit(boolean useFit) { converter.setUseFit(useFit); }
+    
+    /*
      * Fix 3-pole function width to be the same for all 442 ECal channels.  Units=samples.
      */
     public void setGlobalFixedPulseWidth(double width) { converter.setGlobalFixedPulseWidth(width); }
-    
-    /*
-     * Set to <code>true</code> to use pulse fitting instead of arithmetic integration:<br/>
-     */
-    public void setUseFit(boolean useFit) { converter.setUseFit(useFit); }
     
     /*
      * Set to <code>true</code> to fix fitted pulse widths to their channel's mean value:<br/>
@@ -63,9 +63,16 @@
     public void setFixShapeParameter(boolean fix) { converter.setFixShapeParameter(fix); }
    
     /*
-     * Limit threshold crossing range for pulse-fitter.  Units=samples.
-     */
-    public void setFitThresholdRange(int sample1,int sample2) { converter.setFitThresholdRange(sample1,sample2); }
+     * Limit threshold crossing range that is candidate for pulse-fitting.   Units=samples.
+     */
+    public void setFitThresholdTimeLo(int sample) { converter.setFitThresholdTimeLo(sample); }
+    public void setFitThresholdTimeHi(int sample) { converter.setFitThresholdTimeHi(sample); }
+    
+    /*
+     * Constrain pulse fit time0 parameter.  Units=samples. 
+     */
+    public void setFitLimitTimeLo(int sample) { converter.setFitLimitTimeLo(sample); }
+    public void setFitLimitTimeHi(int sample) { converter.setFitLimitTimeHi(sample); }
     
     /**
      * Set to <code>true</code> to use the "2014" gain formula:<br/>

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