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

HPS-SVN March 2015

Subject:

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

From:

[log in to unmask]

Reply-To:

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

Date:

Tue, 24 Mar 2015 06:12:57 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (356 lines)

Author: [log in to unmask]
Date: Mon Mar 23 23:12:52 2015
New Revision: 2520

Log:
Add additional method documentation to EcalRawConverterDriver and remove doc stubs from EcalRawConverter for now.

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/EcalRawConverterDriver.java

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	Mon Mar 23 23:12:52 2015
@@ -25,10 +25,8 @@
  * objects with energy information.
  *
  * @author Sho Uemura <[log in to unmask]>
- * @author Jeremy McCormick <[log in to unmask]>
  * @author Andrea Celentano <[log in to unmask]>
  * @author Nathan Baltzell <[log in to unmask]>
- *
  *
  * baltzell:  New in 2015:  (default behavior is still unchanged)
  *
@@ -142,17 +140,11 @@
 			}
     	});
     }
-
-    /*
-     * Set Leading Edge Threshold
-     */
+  
     public void setLeadingEdgeThreshold(double thresh) {
         leadingEdgeThreshold=thresh;
     }
     
-    /*
-     * Set NSA
-     */
     public void setNSA(int nsa) {
         if (NSA%nsPerSample !=0 || NSA<0) {
             throw new RuntimeException("NSA must be multiples of 4ns and non-negative.");
@@ -160,9 +152,6 @@
         NSA=nsa;
     }
     
-    /*
-     * Set NSB
-     */
     public void setNSB(int nsb) {
         if (NSB%nsPerSample !=0 || NSB<0) {
             throw new RuntimeException("NSB must be multiples of 4ns and non-negative.");
@@ -170,16 +159,10 @@
         NSB=nsb;
     }
     
-    /* 
-     * Set windowSamples
-     */
     public void setWindowSamples(int windowSamples) {
         this.windowSamples=windowSamples;
     }
     
-    /*
-     * set Npeak
-     */
     public void setNPeak(int nPeak) {
         if (nPeak<1 || nPeak>3) {
             throw new RuntimeException("Npeak must be 1, 2, or 3.");
@@ -187,46 +170,28 @@
         this.nPeak=nPeak;
     }
     
-    /*
-     * set Mode7
-     */
     public void setMode7(boolean mode7)
     {
         this.mode7=mode7;
     }
 
-    /*
-     * set gain
-     */
     public void setGain(double gain) {
         constantGain = true;
         this.gain = gain;
     }
 
-    /*
-     * set use2014Gain
-     */
     public void setUse2014Gain(boolean use2014Gain) {
         this.use2014Gain = use2014Gain;
     }
 
-    /*
-     * set useRunningPedstal
-     */
     public void setUseRunningPedestal(boolean useRunningPedestal) {
         this.useRunningPedestal=useRunningPedestal;
     }
 
-    /*
-     * set useTimewalkcprrrection
-     */
     public void setUseTimeWalkCorrection(boolean useTimeWalkCorrection) {
         this.useTimeWalkCorrection=useTimeWalkCorrection;
     }
     
-    /*
-     * set usedaqconfig
-     */
     public void setUseDAQConfig(boolean state) {
     	useDAQConfig = state;
     }

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	Mon Mar 23 23:12:52 2015
@@ -18,10 +18,6 @@
 import org.lcsim.util.Driver;
 
 /**
- *
- * @version $Id: HPSEcalRawConverterDriver.java,v 1.2 2012/05/03 00:17:54
- * phansson Exp $
- * baltzell
  * 
  * 
  * baltzell New in 2015:  (default behavior is unchanged)
@@ -61,75 +57,219 @@
         converter = new EcalRawConverter();
     }
 
+    /**
+     * Set to <code>true</code> to use "2014" gain formula:<br/>
+     * <pre>channelGain * adcSum * gainFactor * readoutPeriod</pre>
+     * <p>
+     * This formula is deprecated and should generally not be used. 
+     * 
+     * @param use2014Gain True to use 2014 gain formulation.
+     */
     public void setUse2014Gain(boolean use2014Gain) {
         converter.setUse2014Gain(use2014Gain);
     }
 
+    /**
+     * Set to <code>true</code> to apply time walk correction from {@link EcalTimeWalk#correctTimeWalk(double, double)}.
+     * <p>
+     * This is only applicable to Mode-3 data.
+     * 
+     * @param useTimeWalkCorrection True to apply time walk correction.
+     */
     public void setUseTimeWalkCorrection(boolean useTimeWalkCorrection) {
         converter.setUseTimeWalkCorrection(useTimeWalkCorrection);
     }
+    
+    /**
+     * Set to <code>true</code> to use a running pedestal calibration from mode 7 data.
+     * <p>
+     * The running pedestal values are retrieved from the event collection "EcalRunningPedestals"
+     * which is a <code>Map</code> between {@link org.hps.conditions.ecal.EcalChannel} objects
+     * are their average pedestal.
+     * 
+     * @param useRunningPedestal True to use a running pedestal value.
+     */
     public void setUseRunningPedestal(boolean useRunningPedestal) {
         converter.setUseRunningPedestal(useRunningPedestal);
     }
 
+    /**
+     * Set to <code>true</code> to generate a {@link org.lcsim.event.CalorimeterHit} 
+     * collection which is a conversion from raw signals to energy.
+     * 
+     * @param runBackwards True to run the procedure backwards.
+     */
     public void setRunBackwards(boolean runBackwards) {
         this.runBackwards = runBackwards;
     }
 
+    /**
+     * Set to <code>true</code> to drop hits that are mapped to a hard-coded 
+     * bad FADC configuration from the Test Run.
+     * 
+     * @param dropBadFADC True to drop hits mapped to a bad FADC.
+     */
     public void setDropBadFADC(boolean dropBadFADC) {
         this.dropBadFADC = dropBadFADC;
     }
 
+    /**
+     * Set a minimum energy threshold in GeV for created {@link org.lcsim.event.CalorimeterHit}
+     * objects to be written into the output collection.
+     * @param threshold The minimum energy threshold in GeV.
+     */
     public void setThreshold(double threshold) {
         this.threshold = threshold;
     }
 
+    /**
+     * Set to <code>true</code> to use Mode-7 emulation in calculations.
+     * 
+     * @param mode7 True to use Mode-7 emulation in calculations.
+     */
     public void setEmulateMode7(boolean mode7) {
         converter.setMode7(mode7);
     }
+    
+    /**
+     * Set to <code>true</code> to emulate firmware conversion of Mode-1 to Mode-3 data.
+     * 
+     * @param emulateFirmware True to use firmware emulation.
+     */
     public void setEmulateFirmware(boolean emulateFirmware) {
         this.emulateFirmware = emulateFirmware;
     }
+    
+    /**
+     * Set the leading-edge threshold in ADC counts, relative to pedestal, for pulse-finding 
+     * and time determination.
+     * <p>
+     * Used to convert Mode-1 readout into Mode-3 or Mode-7 data that is usable by clustering.
+     * 
+     * @param threshold The leading edge threshold in ADC counts.
+     */
     public void setLeadingEdgeThreshold(double threshold) {
         converter.setLeadingEdgeThreshold(threshold);
     }
+    
+    /**
+     * Set the number of samples in the FADC readout window.
+     * <p>
+     * This is needed in order to properly pedestal-correct clipped pulses for mode-3 and mode-7.  
+     * It is ignored for mode-1 input, since this data already includes the number of samples.
+     * <p>
+     * A non-positive number disables pulse-clipped pedestals and reverts to the old behavior which 
+     * assumed that the integration range was constant.
+     * 
+     * @param windowSamples The number of samples in the FADC readout window.
+     */
     public void setWindowSamples(int windowSamples) {
         converter.setWindowSamples(windowSamples);
     }
+    
+    /**
+     * Set the integration range in nanoseconds after the threshold crossing. 
+     * <p>
+     * These numbers must be multiples of 4 nanoseconds.
+     * <p>
+     * This value is used for pulse integration in Mode-1, and pedestal subtraction in all modes.
+     * 
+     * @param nsa The number of samples after the threshold crossing.
+     * @see #setNsb(int)
+     */
     public void setNsa(int nsa) {
         converter.setNSA(nsa);
     }
+    
+    /**
+     * Set the integration range in nanoseconds before the threshold crossing.
+     * <p>
+     * These numbers must be multiples of 4 nanoseconds.
+     * <p>
+     * This value is used for pulse integration in Mode-1, and pedestal subtraction in all modes.
+     * 
+     * @param nsb The number of samples after the threshold crossing.
+     * @see #setNsa(int)
+     */
     public void setNsb(int nsb) {
         converter.setNSB(nsb);
     }
+    
+    /**
+     * Set the maximum number of peaks to search for in the signal, 
+     * which must be between 1 and 3, inclusive.
+     * @param nPeak The maximum number of peaks to search for in the signal.
+     */
     public void setNPeak(int nPeak) {
         converter.setNPeak(nPeak);
     }
     
+    /**
+     * Set a constant gain factor in the converter for all channels.
+     * @param gain The constant gain value.
+     */
     public void setGain(double gain) {
         converter.setGain(gain);
     }
 
+    /**
+     * Set the {@link org.lcsim.event.CalorimeterHit} collection name,
+     * which is used as input in "normal" mode and output when running
+     * "backwards".
+     * 
+     * @param ecalCollectionName The <code>CalorimeterHit</code> collection name.
+     * @see #runBackwards
+     */
     public void setEcalCollectionName(String ecalCollectionName) {
         this.ecalCollectionName = ecalCollectionName;
     }
 
+    /**
+     * Set the raw collection name which is used as output in "normal" mode
+     * and input when running "backwards".
+     * <p>
+     * Depending on the Driver configuration, this could be a collection
+     * of {@link org.lcsim.event.RawTrackerHit} objects for Mode-1
+     * or {@link org.lcsim.event.RawCalorimeterHit} objects for Mode-3
+     * or Mode-7.
+     * 
+     * @param rawCollectionName The raw collection name.
+     */
     public void setRawCollectionName(String rawCollectionName) {
         this.rawCollectionName = rawCollectionName;
     }
 
+    /**
+     * Set to <code>true</code> to ignore data from channels that
+     * are flagged as "bad" in the conditions system.
+     * @param apply True to ignore bad channels.
+     */
     public void setApplyBadCrystalMap(boolean apply) {
         this.applyBadCrystalMap = apply;
     }
 
+    /**
+     * Set to <code>true</code> to turn on debug output.
+     * @param debug True to turn on debug output.
+     */
     public void setDebug(boolean debug) {
         this.debug = debug;
     }
 
+    /**
+     * Set to <code>true</code> to use timestamp information from the ECal or trigger.
+     * @param useTimestamps True to use timestamp information.
+     */
+    // FIXME: What does this actually do?  What calculations does it affect?  
     public void setUseTimestamps(boolean useTimestamps) {
         this.useTimestamps = useTimestamps;
     }
 
+    /**
+     * Set to <code>true</code> to use MC truth information.
+     * @param useTruthTime True to use MC truth information.
+     */
+    // FIXME: What does this actually do?  What calculations does it affect?  
     public void setUseTruthTime(boolean useTruthTime) {
         this.useTruthTime = useTruthTime;
     }

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