Commit in hps-java/src/main on MAIN | |||
java/org/lcsim/hps/recon/ecal/HPSEcalFADCReadoutDriver.java | +9 | -1 | 1.4 -> 1.5 |
/HPSEcalConverterDriver.java | +20 | -6 | 1.1 -> 1.2 |
/HPSEcalConverter.java | +26 | -2 | 1.2 -> 1.3 |
resources/org/lcsim/hps/steering/ecal_fadc_bkgd.lcsim | +6 | -2 | 1.5 -> 1.6 |
+61 | -11 |
change FADC sum resolution
diff -u -r1.4 -r1.5 --- HPSEcalFADCReadoutDriver.java 9 Dec 2011 23:40:21 -0000 1.4 +++ HPSEcalFADCReadoutDriver.java 11 Jan 2012 18:45:13 -0000 1.5 @@ -18,7 +18,7 @@
* Simulates time evolution of preamp output pulse. * * @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalFADCReadoutDriver.java,v 1.4 2011/12/09 23:40:21 meeg Exp $
+ * @version $Id: HPSEcalFADCReadoutDriver.java,v 1.5 2012/01/11 18:45:13 meeg Exp $
*/ public class HPSEcalFADCReadoutDriver extends HPSEcalReadoutDriver<RawCalorimeterHit> { //buffer for deposited energy
@@ -54,6 +54,14 @@
this.coincidenceWindow = coincidenceWindow; }
+ public void setPedestal(double pedestal) { + converter.setPedestal(pedestal); + } + + public void setScale(double scale) { + converter.setScale(scale); + } +
public void setT0(double t0) { this.t0 = t0; }
diff -u -r1.1 -r1.2 --- HPSEcalConverterDriver.java 4 Nov 2011 00:51:19 -0000 1.1 +++ HPSEcalConverterDriver.java 11 Jan 2012 18:45:13 -0000 1.2 @@ -8,7 +8,6 @@
import java.util.List; import org.lcsim.event.CalorimeterHit; import org.lcsim.event.EventHeader;
-import org.lcsim.event.RawCalorimeterHit;
import org.lcsim.geometry.Detector; import org.lcsim.geometry.Subdetector; import org.lcsim.util.Driver;
@@ -17,7 +16,7 @@
/** * * @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalConverterDriver.java,v 1.1 2011/11/04 00:51:19 meeg Exp $
+ * @version $Id: HPSEcalConverterDriver.java,v 1.2 2012/01/11 18:45:13 meeg Exp $
*/ public class HPSEcalConverterDriver extends Driver {
@@ -33,6 +32,15 @@
flags = 0; flags += 1 << LCIOConstants.CHBIT_LONG; //store position flags += 1 << LCIOConstants.RCHBIT_ID1; //store cell ID
+ converter = new HPSEcalConverter(null); + } + + public void setPedestal(double pedestal) { + converter.setPedestal(pedestal); + } + + public void setScale(double scale) { + converter.setScale(scale);
} public void setEcalCollectionName(String ecalCollectionName) {
@@ -47,25 +55,31 @@
this.rawCollectionName = rawCollectionName; }
+ @Override
public void startOfData() {
- if (ecalCollectionName == null)
+ if (ecalCollectionName == null) {
throw new RuntimeException("The parameter ecalCollectionName was not set!");
+ }
- if (ecalName == null)
+ if (ecalName == null) {
throw new RuntimeException("The parameter ecalName was not set!");
+ }
}
+ @Override
public void detectorChanged(Detector detector) { // Get the Subdetector. ecal = (Subdetector) detector.getSubdetector(ecalName);
- converter = new HPSEcalConverter(ecal.getIDDecoder());
+ converter.setIDDecoder(ecal.getIDDecoder());
}
+ @Override
public void process(EventHeader event) { // Get the list of ECal hits. List<HPSFADCCalorimeterHit> hits = event.get(HPSFADCCalorimeterHit.class, rawCollectionName);
- if (hits == null)
+ if (hits == null) {
throw new RuntimeException("Event is missing ECal hits collection!");
+ }
ArrayList<CalorimeterHit> newHits = new ArrayList<CalorimeterHit>();
diff -u -r1.2 -r1.3 --- HPSEcalConverter.java 9 Dec 2011 23:40:21 -0000 1.2 +++ HPSEcalConverter.java 11 Jan 2012 18:45:13 -0000 1.3 @@ -11,7 +11,7 @@
/** * * @author Sho Uemura <[log in to unmask]>
- * @version $Id: HPSEcalConverter.java,v 1.2 2011/12/09 23:40:21 meeg Exp $
+ * @version $Id: HPSEcalConverter.java,v 1.3 2012/01/11 18:45:13 meeg Exp $
*/ public class HPSEcalConverter {
@@ -25,6 +25,30 @@
this.dec = dec; }
+ public double getPedestal() { + return pedestal; + } + + public void setPedestal(double pedestal) { + this.pedestal = pedestal; + } + + public double getScale() { + return scale; + } + + public void setScale(double scale) { + this.scale = scale; + } + + public IDDecoder getIDDecoder() { + return dec; + } + + public void setIDDecoder(IDDecoder dec) { + this.dec = dec; + } +
public int AtoD(double amplitude, long cellID) { return (int) Math.floor((amplitude + pedestal) / scale); }
@@ -43,6 +67,6 @@
public RawCalorimeterHit HitAtoD(CalorimeterHit hit) { dec.setID(hit.getCellID());
- return new HPSFADCCalorimeterHit(hit.getCellID(), AtoD(hit.getRawEnergy(), hit.getCellID()), (int) Math.round(hit.getTime() / period),0);
+ return new HPSFADCCalorimeterHit(hit.getCellID(), AtoD(hit.getRawEnergy(), hit.getCellID()), (int) Math.round(hit.getTime() / period), 0);
} }
diff -u -r1.5 -r1.6 --- ecal_fadc_bkgd.lcsim 9 Jan 2012 23:15:20 -0000 1.5 +++ ecal_fadc_bkgd.lcsim 11 Jan 2012 18:45:13 -0000 1.6 @@ -1,7 +1,7 @@
<!-- Example LCSim steering file to run simple HPS ECal clustering and analysis. @author Sho Uemura <[log in to unmask]>
- @version $Id: ecal_fadc_bkgd.lcsim,v 1.5 2012/01/09 23:15:20 meeg Exp $
+ @version $Id: ecal_fadc_bkgd.lcsim,v 1.6 2012/01/11 18:45:13 meeg Exp $
--> <lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
@@ -43,22 +43,26 @@
<ecalCollectionName>EcalHits</ecalCollectionName> <ecalRawCollectionName>EcalRawHits</ecalRawCollectionName> <threshold>0.005</threshold>
+ <scale>0.08</scale>
</driver> <driver name="EcalConverter" type="org.lcsim.hps.recon.ecal.HPSEcalConverterDriver"> <ecalName>Ecal</ecalName> <rawCollectionName>EcalRawHits</rawCollectionName> <ecalCollectionName>EcalCorrectedHits</ecalCollectionName>
+ <scale>0.08</scale>
</driver> <driver name="EcalClusterer" type="org.lcsim.hps.recon.ecal.HPSEcalClusterer"> <ecalName>Ecal</ecalName> <ecalCollectionName>EcalCorrectedHits</ecalCollectionName>
+ <seedEMin>0.1</seedEMin> + <addEMin>0.1</addEMin>
</driver> <driver name="EcalTrigger" type="org.lcsim.hps.recon.ecal.HPSFADCTriggerDriver"> <clusterCollectionName>EcalClusters</clusterCollectionName>
- <outputFileName>${outputFile}_triggers</outputFileName>
+ <outputFileName>${outputFile}.triggers</outputFileName>
<ecalName>Ecal</ecalName> </driver> <driver name="EcalPlots"
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1