lcsim/src/org/lcsim/recon/cluster/util
diff -u -r1.2 -r1.3
--- DetailedNeutralHadronClusterEnergyCalculator.java 23 Mar 2007 18:15:47 -0000 1.2
+++ DetailedNeutralHadronClusterEnergyCalculator.java 16 Jan 2008 21:02:19 -0000 1.3
@@ -7,66 +7,68 @@
public class DetailedNeutralHadronClusterEnergyCalculator implements ClusterEnergyCalculator
{
- private ConditionsManager _mgr;
- double Emeas;
+ protected ConditionsManager _mgr;
+ protected double Emeas;
// mean value of the measured Energy per correction bin
- double[] fE;
+ protected double[] fE;
// correction value for each bin
- double[] fC;
+ protected double[] fC;
// Overall normalization
- double fN;
+ protected double fN;
// Energy of the calibration points for each detector
- double[] EM1BarEnergy;
- double[] EM1ECEnergy;
- double[] EM2BarEnergy;
- double[] EM2ECEnergy;
- double[] HADBarEnergy;
- double[] HADECEnergy;
+ protected double[] EM1BarEnergy;
+ protected double[] EM1ECEnergy;
+ protected double[] EM2BarEnergy;
+ protected double[] EM2ECEnergy;
+ protected double[] HADBarEnergy;
+ protected double[] HADECEnergy;
// Mean responses for each detector - need both analog and digital for EM
- double[] EM1BarAnaResponse;
- double[] EM1BarDigResponse;
- double[] EM1ECAnaResponse;
- double[] EM1ECDigResponse;
- double[] EM2BarAnaResponse;
- double[] EM2BarDigResponse;
- double[] EM2ECAnaResponse;
- double[] EM2ECDigResponse;
- double[] HADBarResponse;
- double[] HADECResponse;
+ protected double[] EM1BarAnaResponse;
+ protected double[] EM1BarDigResponse;
+ protected double[] EM1ECAnaResponse;
+ protected double[] EM1ECDigResponse;
+ protected double[] EM2BarAnaResponse;
+ protected double[] EM2BarDigResponse;
+ protected double[] EM2ECAnaResponse;
+ protected double[] EM2ECDigResponse;
+ protected double[] HADBarResponse;
+ protected double[] HADECResponse;
// Angle corrections for each detector
- double[] EM1BarAnaAngCorr;
- double[] EM1BarDigAngCorr;
- double[] EM1ECAnaAngCorr;
- double[] EM1ECDigAngCorr;
- double[] EM2BarAnaAngCorr;
- double[] EM2BarDigAngCorr;
- double[] EM2ECAnaAngCorr;
- double[] EM2ECDigAngCorr;
- double[] HADBarAngCorr;
- double[] HADECAngCorr;
+ protected double[] EM1BarAnaAngCorr;
+ protected double[] EM1BarDigAngCorr;
+ protected double[] EM1ECAnaAngCorr;
+ protected double[] EM1ECDigAngCorr;
+ protected double[] EM2BarAnaAngCorr;
+ protected double[] EM2BarDigAngCorr;
+ protected double[] EM2ECAnaAngCorr;
+ protected double[] EM2ECDigAngCorr;
+ protected double[] HADBarAngCorr;
+ protected double[] HADECAngCorr;
// hit energy cuts
- double EM1BarEcut;
- double EM1ECEcut;
- double EM2BarEcut;
- double EM2ECEcut;
- double HADBarEcut;
- double HADECEcut;
+ protected double EM1BarEcut;
+ protected double EM1ECEcut;
+ protected double EM2BarEcut;
+ protected double EM2ECEcut;
+ protected double HADBarEcut;
+ protected double HADECEcut;
// hit time cuts
- double EM1BarTcut;
- double EM1ECTcut;
- double EM2BarTcut;
- double EM2ECTcut;
- double HADBarTcut;
- double HADECTcut;
+ protected double EM1BarTcut;
+ protected double EM1ECTcut;
+ protected double EM2BarTcut;
+ protected double EM2ECTcut;
+ protected double HADBarTcut;
+ protected double HADECTcut;
// EM #hit cut to switch from digital to analog
- double EM1BarDtoAcut;
- double EM1ECDtoAcut;
- double EM2BarDtoAcut;
- double EM2ECDtoAcut;
+ protected double EM1BarDtoAcut;
+ protected double EM1ECDtoAcut;
+ protected double EM2BarDtoAcut;
+ protected double EM2ECDtoAcut;
+// Lower bound on cluster energy (default is 1.0 GeV)
+ protected double minimumAllowedEnergy = 1.0;
public DetailedNeutralHadronClusterEnergyCalculator()
{
}
- private void init() {
+ protected void init() {
//
// Get the calibration constants
//
@@ -422,10 +424,13 @@
}
}
//
-// Put a lower bound of 1 GeV on Energy and return
+// Put a lower bound on Energy and return
//
- if(Eret > 1.)return Eret;
- return 1.;
+ if (Eret > minimumAllowedEnergy) {
+ return Eret;
+ } else {
+ return minimumAllowedEnergy;
+ }
}
public double EcontEst(double val,double[] Energy,double[] res,double[] angc,double ang)
{
@@ -499,4 +504,8 @@
return val*Eest/response;
}
}
+ /** Specify the minimum energy that will be returned. Default is 1.0 GeV. */
+ public void setMinimumAllowedEnergy(double eMin) {
+ minimumAllowedEnergy = eMin;
+ }
}