Author: [log in to unmask]
Date: Mon Dec 15 11:38:24 2014
New Revision: 3452
Log:
revert changes to raw energy
Modified:
projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/base/BaseCluster.java
Modified: projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/base/BaseCluster.java
=============================================================================
--- projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/base/BaseCluster.java (original)
+++ projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/base/BaseCluster.java Mon Dec 15 11:38:24 2014
@@ -12,22 +12,21 @@
import org.lcsim.geometry.IDDecoder;
import org.lcsim.geometry.compact.Subdetector;
+
/**
* Default implementation of Cluster Interface for Simulation
*
* @author cassell
- *
- * @version $Id:
*/
public class BaseCluster implements Cluster
{
protected List<CalorimeterHit> hits = new ArrayList<CalorimeterHit>();
protected List<Cluster> clusters = new ArrayList<Cluster>();
protected List<Subdetector> detectors = new ArrayList<Subdetector>();
-// protected double raw_energy;
+ protected double raw_energy;
protected double corrected_energy;
protected double energyError;
-// protected double[] subdetector_raw_energies = new double[10];
+ protected double[] subdetector_raw_energies = new double[10];
protected double[] subdetector_corrected_energies = new double[10];
protected List<Double> hit_energies = new ArrayList<Double>();
protected ClusterPropertyCalculator cluster_property_calculator = new TensorClusterPropertyCalculator();
@@ -41,11 +40,11 @@
public BaseCluster()
{
- // raw_energy = 0.;
+ raw_energy = 0.;
corrected_energy = 0.;
for(int i=0;i<10;i++)
{
-// subdetector_raw_energies[i] = 0.;
+ subdetector_raw_energies[i] = 0.;
subdetector_corrected_energies[i] = 0.;
}
position = new double[3];
@@ -60,7 +59,7 @@
{
hits.add(hit);
double hre = hit.getRawEnergy();
- // raw_energy += hre;
+ raw_energy += hre;
double hce = hit.getCorrectedEnergy();
IDDecoder idc = hit.getIDDecoder();
idc.setID(hit.getCellID());
@@ -70,7 +69,7 @@
if((detector_index > 9 )|(detector_index < 0))detector_index = 0;
corrected_energy += hce;
hit_energies.add(hce);
-// subdetector_raw_energies[detector_index] += hre;
+ subdetector_raw_energies[detector_index] += hre;
subdetector_corrected_energies[detector_index] += hce;
needsPropertyCalculation = true;
}
@@ -94,7 +93,7 @@
int indx = hits.indexOf(hit);
hits.remove(hit);
double hre = hit.getRawEnergy();
- // raw_energy -= hre;
+ raw_energy -= hre;
double hce = hit.getCorrectedEnergy();
IDDecoder idc = hit.getIDDecoder();
idc.setID(hit.getCellID());
@@ -102,7 +101,7 @@
if((detector_index > 9 )|(detector_index < 0))detector_index = 0;
corrected_energy -= hce;
hit_energies.remove(indx);
-// subdetector_raw_energies[detector_index] -= hre;
+ subdetector_raw_energies[detector_index] -= hre;
subdetector_corrected_energies[detector_index] -= hce;
needsPropertyCalculation = true;
}
@@ -122,16 +121,16 @@
needsPropertyCalculation = true;
}
corrected_energy += cluster.getEnergy();
-// if(cluster instanceof BaseCluster)
-// {
-// BaseCluster bcl = (BaseCluster) cluster;
-// raw_energy += bcl.getRawEnergy();
-// }
+ if(cluster instanceof BaseCluster)
+ {
+ BaseCluster bcl = (BaseCluster) cluster;
+ raw_energy += bcl.getRawEnergy();
+ }
double[] sde = cluster.getSubdetectorEnergies();
for(int i=0;i<sde.length;i++)
{
subdetector_corrected_energies[i] += sde[i];
-// subdetector_raw_energies[i] += sde[i];
+ subdetector_raw_energies[i] += sde[i];
}
}
@@ -280,13 +279,13 @@
return 0;
}
-// /**
-// * Return the sum of the raw energies from the hits in the cluster
-// */
-// public double getRawEnergy()
-// {
-// return raw_energy;
-// }
+ /**
+ * Return the sum of the raw energies from the hits in the cluster
+ */
+ public double getRawEnergy()
+ {
+ return raw_energy;
+ }
/**
* Allow for recalculation of cluster properties, or
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1
|