Print

Print


Author: [log in to unmask]
Date: Sat Oct 25 11:08:27 2014
New Revision: 1301

Log:
commit only to change username

Added:
    java/branches/hps-java_ecal-commissioning/evio/pom.xml
      - copied, changed from r1181, java/branches/hps-java_ecal-commissioning/evio/pom.xml
    java/branches/hps-java_ecal-commissioning/pom.xml
      - copied, changed from r1180, java/branches/hps-java_ecal-commissioning/pom.xml
Modified:
    java/branches/hps-java_ecal-commissioning/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/PassiveViewer.java
    java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/ECalUtils.java
    java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
    java/branches/hps-java_ecal-commissioning/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java
    java/branches/hps-java_ecal-commissioning/record-util/pom.xml
    java/branches/hps-java_ecal-commissioning/steering-files/src/main/resources/org/hps/steering/monitoring/ECalLedCommissioning.lcsim

Modified: java/branches/hps-java_ecal-commissioning/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/PassiveViewer.java
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/PassiveViewer.java	(original)
+++ java/branches/hps-java_ecal-commissioning/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/PassiveViewer.java	Sat Oct 25 11:08:27 2014
@@ -70,7 +70,7 @@
 	 * @param min - The lower bound.
 	 * @param max - The upper bound.
 	 */
-	public void setScale(int min, int max) {
+	public void setScale(double min, double max) {
 		ecalPanel.setScaleMinimum(min);
 		ecalPanel.setScaleMaximum(max);
 	}
@@ -82,7 +82,7 @@
 	 * scale.
 	 * @param max - The upper bound.
 	 */
-	public void setScaleMaximum(int max) { ecalPanel.setScaleMaximum(max); }
+	public void setScaleMaximum(double max) { ecalPanel.setScaleMaximum(max); }
 	
 	/**
 	 * <b>setScaleMinimum</b><br/><br/>
@@ -91,7 +91,7 @@
 	 * scale.
 	 * @param min - The lower bound.
 	 */
-	public void setScaleMinimum(int min) { ecalPanel.setScaleMinimum(min); }
+	public void setScaleMinimum(double min) { ecalPanel.setScaleMinimum(min); }
 	
 	/**
 	 * <b>updateDisplay</b><br/><br/>

Modified: java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/ECalUtils.java
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/ECalUtils.java	(original)
+++ java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/ECalUtils.java	Sat Oct 25 11:08:27 2014
@@ -21,7 +21,7 @@
     public static final double elemCharge = 1.60217657e-19;
     public static final double gainPreAmpl = 525e12; // Gain of the preamplifier in pC/pC, true value is higher but does not take into account losses
     public static final int nBit = 12;  //number of bits used by the fADC to code a value
-    public static final double maxVolt = 2.0;   //maximum volt intput of the fADC
+    public static final double maxVolt = 1.0;   //maximum volt intput of the fADC
     public static final double Req = 1.0 / 27.5; // equivalent resistance of the amplification chain
     public static final double adcResolution = maxVolt / (Math.pow(2, nBit) - 1); //volts per ADC count
     public static final double readoutGain = Req * lightYield * quantumEff * surfRatio * gainAPD * gainPreAmpl * elemCharge;// = 15.0545 volt-seconds/GeV

Modified: java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java	(original)
+++ java/branches/hps-java_ecal-commissioning/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java	Sat Oct 25 11:08:27 2014
@@ -35,15 +35,15 @@
      * @param hit
      * @return
      */
-    private short sumADC(RawTrackerHit hit) {
+    private int sumADC(RawTrackerHit hit) {
         //Sum all pedestal subtracted ADC values 
         //return scale * (amplitude + 0.5) + pedestal;
         if (debug) {
             System.out.println("Summing ADC for hit: " + hit.toString());
         }
-       // double pedestal = EcalConditions.physicalToPedestal(hit.getCellID());
-        double pedestal = 0;
-        short sum = 0;
+          double pedestal = EcalConditions.physicalToPedestal(hit.getCellID());
+       // double pedestal = 0;
+        int sum = 0;
         short samples[] = hit.getADCValues();
         for (int isample = 0; isample < samples.length; ++isample) {
             sum += (samples[isample] - pedestal);

Copied: java/branches/hps-java_ecal-commissioning/evio/pom.xml (from r1181, java/branches/hps-java_ecal-commissioning/evio/pom.xml)
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/evio/pom.xml	(original)
+++ java/branches/hps-java_ecal-commissioning/evio/pom.xml	Sat Oct 25 11:08:27 2014
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>hps-evio</artifactId>
     <name>evio</name>
-    <description>HPS EVIO utilities package</description>
+    <description>EVIO utilities including EVIO to LCIO event builders</description>
     <parent>
         <groupId>org.hps</groupId>
         <artifactId>hps-parent</artifactId>
@@ -19,7 +19,7 @@
         <dependency>
             <groupId>org.jlab.coda</groupId>
             <artifactId>jevio</artifactId>
-            <version>4.0</version>
+            <version>4.3.1</version>
         </dependency>
         <dependency>
             <groupId>org.hps</groupId>

Modified: java/branches/hps-java_ecal-commissioning/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java	(original)
+++ java/branches/hps-java_ecal-commissioning/monitoring-drivers/src/main/java/org/hps/monitoring/ecal/plots/EcalEventDisplay.java	Sat Oct 25 11:08:27 2014
@@ -13,6 +13,13 @@
 import java.awt.event.ActionListener;
 import java.util.ArrayList;
 import java.util.List;
+import java.lang.System;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.IOException;
+
 
 import org.hps.monitoring.ecal.eventdisplay.event.Cluster;
 import org.hps.monitoring.ecal.eventdisplay.event.EcalHit;
@@ -58,18 +65,11 @@
 	int pedSamples=10;
 	
 	double amp,ped,sigma;
-	
+	double hitE;
     int[] windowRaw=new int[47*11];//in case we have the raw waveform, this is the window lenght (in samples)
 	boolean[] isFirstRaw=new boolean[47*11];
 	
-	/*this is the flag that checks if the event display enables to look at FADC 20, ch 13,14,15.
-	These are FADC channels not connected to any crystal. But,
-	-For ECAL TOP:
-		 at ch 13 cosmic counter 1,
-		 at ch 14 comsic counter 2,
-		 at ch 14 led
-	-For ECAL BOTTOM:
-		nothing at the moment*/
+	
 	boolean enableAllFadc=false; 
     
 	private PEventViewer viewer; //this is the Kyle event viewer.    
@@ -85,6 +85,9 @@
     
     
     double maxEch = 2500 * ECalUtils.MeV;
+    double minEch = -0.1;
+    
+    int itmpx,itmpy;
     
     public EcalEventDisplay() {
     	
@@ -96,6 +99,10 @@
     
     public void setMaxEch(double maxEch) {
         this.maxEch = maxEch;
+    }
+    
+    public void setMinEch(double minEch) {
+        this.minEch = minEch;
     }
     
     public void setPedSamples(int pedSamples) {
@@ -185,6 +192,8 @@
         System.out.println("Create the event viewer");
         viewer=new PEventViewer();
         viewer.addCrystalListener(this);
+        viewer.setScaleMinimum(minEch);
+        viewer.setScaleMaximum(maxEch);
         System.out.println("Done");
         
       
@@ -201,7 +210,7 @@
     }
 
     @Override
-    public void process(EventHeader event) {
+    public void process(EventHeader event){
     	
     	  int ii;
           int row = 0;
@@ -227,12 +236,25 @@
                 column=hit.getIdentifierFieldValue("ix");           	
                 if ((row!=0)&&(column!=0)){
                     ii = ECalUtils.getHistoIDFromRowColumn(row,column);
-                    if (hit.getCorrectedEnergy() > 0) { //A.C. > 0 for the 2D plot drawing                 	
+                    hitE=hit.getCorrectedEnergy();
+                    if (hitE > 0) { //A.C. > 0 for the 2D plot drawing                 	
                     	channelEnergyPlot.get(ii).fill(hit.getCorrectedEnergy());
                         channelTimePlot.get(ii).fill(hit.getTime());
-                        channelTimeVsEnergyPlot.get(ii).fill(hit.getTime(),hit.getCorrectedEnergy());        
-                        if (do_update) viewer.addHit(new EcalHit(column,row, hit.getCorrectedEnergy()));         
+                        channelTimeVsEnergyPlot.get(ii).fill(hit.getTime(),hit.getCorrectedEnergy());                                    
                         }
+                    if ((do_update)){
+                    	if ((hitE>minEch)&&(hitE<maxEch)){
+                    		viewer.addHit(new EcalHit(column,row, hitE));  //before was in >0 check
+                    	}
+                    	else if (hitE>maxEch){
+                    		viewer.addHit(new EcalHit(column,row, maxEch));  
+                    	}
+                    	
+                   
+                    
+                    	
+                    	
+                    	}
                  } 
             }
         }
@@ -243,10 +265,12 @@
                 if (do_update){
                 the_cluster=new Cluster(seedHit.getIdentifierFieldValue("ix"), seedHit.getIdentifierFieldValue("iy"), cluster.getEnergy());
                 for (CalorimeterHit hit : cluster.getCalorimeterHits()) {
-                    if (hit.getRawEnergy() > 0) 
-                        column=hit.getIdentifierFieldValue("ix");
+                	hitE=hit.getCorrectedEnergy();
+                	if ((hitE>minEch)&&(hitE<maxEch)){               
+                		column=hit.getIdentifierFieldValue("ix");
                         row=hit.getIdentifierFieldValue("iy");                	
                         the_cluster.addComponentHit(hit.getIdentifierFieldValue("ix"),hit.getIdentifierFieldValue("iy"));
+                    }
                 }         
                 viewer.addCluster(the_cluster);
                }
@@ -275,7 +299,8 @@
                 			 }                  
                 			 result=ECalUtils.computeAmplitude(hit.getADCValues(),windowRaw[ii],pedSamples);
                 			 channelRawWaveform.get(ii).setTitle("Ampl: "+String.format("%.2f",result[0])+" mV , ped : "+String.format("%.2f",result[1])+" "+String.format("%.2f",result[2])+" ADC counts");
-                		 } 
+                			 plotter.region(3).refresh();
+                		 } 	
                 	 }
                  }
             }
@@ -328,7 +353,7 @@
     @Override
 	public void crystalClicked(CrystalEvent e){
     
-    	int itmpx,itmpy;
+    	
     	Point displayPoint,ecalPoint;
     	displayPoint=e.getCrystalID();
     	ecalPoint=viewer.toEcalPoint(displayPoint);

Copied: java/branches/hps-java_ecal-commissioning/pom.xml (from r1180, java/branches/hps-java_ecal-commissioning/pom.xml)
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/pom.xml	(original)
+++ java/branches/hps-java_ecal-commissioning/pom.xml	Sat Oct 25 11:08:27 2014
@@ -1,5 +1,4 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.hps</groupId>
     <artifactId>hps-modules</artifactId>
@@ -7,27 +6,23 @@
     <name>HPS Java Project</name>
     <description>HPS module build</description>
     <url>http://www.lcsim.org/sites/hps/</url>
-
     <parent>
         <groupId>org.hps</groupId>
         <artifactId>hps-parent</artifactId>
         <relativePath>parent/pom.xml</relativePath>
         <version>3.0.3-SNAPSHOT</version>
     </parent>   
-
     <scm>
         <url>svn://svn.freehep.org/hps/java/trunk/</url>
         <connection>scm:svn:svn://svn.freehep.org/hps/java/trunk/</connection>
         <developerConnection>scm:svn:svn://svn.freehep.org/hps/java/trunk/</developerConnection>
     </scm>
-
     <distributionManagement>
         <site>
             <id>lcsim-site</id>
             <url>dav:http://srs.slac.stanford.edu/nexus/content/sites/lcsim-site/hps/</url>
         </site>
     </distributionManagement>
-
     <build>
         <pluginManagement>
             <plugins>
@@ -46,7 +41,6 @@
             </plugins>
         </pluginManagement>
     </build>
-
     <reporting>
         <plugins>
             <plugin>
@@ -122,52 +116,26 @@
             </plugin>
         </plugins>
     </reporting>
-    
-    <profiles>
-        <profile>
-            <id>default</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-                <module>parent</module>
-                <module>util</module>
-                <module>detector-data</module>
-                <module>conditions</module>
-                <module>ecal-readout-sim</module>
-                <module>ecal-recon</module>
-                <module>evio</module>
-                <module>recon</module>
-                <module>tracking</module>
-                <module>ecal-event-display</module>
-                <module>monitoring-drivers</module>
-                <module>record-util</module>
-                <module>monitoring-app</module>
-                <module>analysis</module>
-                <module>users</module>
-                <module>steering-files</module>
-                <module>distribution</module>
-                <module>plugin</module>
-                <module>integration-tests</module>
-            </modules>
-        </profile>
-        <profile>
-            <id>site</id>
-            <modules>
-                <module>analysis</module>
-                <module>conditions</module>
-                <module>ecal-readout-sim</module>
-                <module>ecal-recon</module>
-                <module>evio</module>
-                <module>monitoring-app</module>
-                <module>monitoring-drivers</module>
-                <module>plugin</module>                                                                              
-                <module>recon</module>
-                <module>tracking</module>
-                <module>users</module>                
-                <module>util</module>
-            </modules>
-        </profile>
-    </profiles>
-
+    <modules>
+        <module>analysis</module>
+        <module>conditions</module>
+        <module>datacat</module>
+        <module>detector-data</module>
+        <module>distribution</module>
+        <module>ecal-event-display</module>
+        <module>ecal-readout-sim</module>
+        <module>ecal-recon</module>
+        <module>evio</module>
+        <module>integration-tests</module>
+        <module>monitoring-app</module>
+        <module>monitoring-drivers</module>
+        <module>parent</module>
+        <module>plugin</module>
+        <module>recon</module>
+        <module>record-util</module>
+        <module>steering-files</module>
+        <module>tracking</module>
+        <module>users</module>
+        <module>util</module>
+    </modules>
 </project>

Modified: java/branches/hps-java_ecal-commissioning/record-util/pom.xml
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/record-util/pom.xml	(original)
+++ java/branches/hps-java_ecal-commissioning/record-util/pom.xml	Sat Oct 25 11:08:27 2014
@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>hps-record-util</artifactId>
     <name>record-util</name>
-    <description>Record processing utilities</description>
+    <description>record processing utilities for EVIO, LCIO and ET events</description>
     <parent>
         <groupId>org.hps</groupId>
         <artifactId>hps-parent</artifactId>
@@ -36,7 +36,7 @@
 	  
             <groupId>org.jlab.coda</groupId> 
             <artifactId>et</artifactId>
-            <version>12.0</version>
+            <version>14.0</version>
 
         </dependency>
     </dependencies>

Modified: java/branches/hps-java_ecal-commissioning/steering-files/src/main/resources/org/hps/steering/monitoring/ECalLedCommissioning.lcsim
 =============================================================================
--- java/branches/hps-java_ecal-commissioning/steering-files/src/main/resources/org/hps/steering/monitoring/ECalLedCommissioning.lcsim	(original)
+++ java/branches/hps-java_ecal-commissioning/steering-files/src/main/resources/org/hps/steering/monitoring/ECalLedCommissioning.lcsim	Sat Oct 25 11:08:27 2014
@@ -41,7 +41,8 @@
             <inputClusterCollection>EcalClusters</inputClusterCollection>
             <enableAllFadc>true</enableAllFadc>
             <pedSamples>20</pedSamples>
-            <maxEch>2.0</maxEch>
+            <maxEch>10.0</maxEch>
+            <minEch>-0.01</minEch>
             <eventRefreshRate>100</eventRefreshRate>
         </driver>