lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.2 -r1.3
--- FuzzyQNeutralHadronClusterEnergyCalculator.java 1 Apr 2008 01:47:59 -0000 1.2
+++ FuzzyQNeutralHadronClusterEnergyCalculator.java 12 Aug 2008 23:45:11 -0000 1.3
@@ -14,7 +14,7 @@
* an extension of Ron's QNeutralHadronClusterEnergyCalculator
* class.
*
- * @version $Id: FuzzyQNeutralHadronClusterEnergyCalculator.java,v 1.2 2008/04/01 01:47:59 mcharles Exp $
+ * @version $Id: FuzzyQNeutralHadronClusterEnergyCalculator.java,v 1.3 2008/08/12 23:45:11 mcharles Exp $
*/
public class FuzzyQNeutralHadronClusterEnergyCalculator extends QNeutralHadronClusterEnergyCalculator
@@ -52,6 +52,7 @@
int detector_index = idc.getValue("system");
if(detector_index == 2)
{
+ // EM barrel
int layer = idc.getValue("layer");
if(layer < nFrontLayersEcal)
{
@@ -66,6 +67,7 @@
}
else if(detector_index == 6)
{
+ // EM endcap
int layer = idc.getValue("layer");
if(layer < nFrontLayersEcal)
{
@@ -78,8 +80,24 @@
EmeasEst += hitWeight * (hit.getRawEnergy()/sf[index]);
}
}
+ else if(detector_index == 9)
+ {
+ // Forward EM endcap -- treat mostly as EM endcap
+ int layer = idc.getValue("layer");
+ if(layer < nFrontLayersEcal-1) // No pre-shower detector layer => "-1" in this line
+ {
+ index = 2;
+ EmeasEst += hitWeight * (hit.getRawEnergy()/sf[index]);
+ }
+ else
+ {
+ index = 3;
+ EmeasEst += hitWeight * (hit.getRawEnergy()/sf[index]);
+ }
+ }
else if(detector_index == 3)
{
+ // HAD barrel
double Ehit = 1.0;
if (analogHcal) { Ehit = hit.getRawEnergy(); }
double[] pos = hit.getPosition();
@@ -90,13 +108,32 @@
}
else if(detector_index == 7)
{
+ // HAD endcap
double Ehit = 1.0;
if (analogHcal) { Ehit = hit.getRawEnergy(); }
double[] pos = hit.getPosition();
double R = Math.sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
double st = Math.abs(pos[2])/R;
EmeasEst += hitWeight * ((Ehit/(1. + alpha*(1./st - 1.)))/sf[5]);
- }
+ } else if (detector_index == 8) {
+ // Muon endcap
+ double muonSamplingFraction = 3.80; // 0.263 GeV per hit => 3.80
+ double Ehit = 1.0;
+ double[] pos = hit.getPosition();
+ double R = Math.sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
+ double st = Math.abs(pos[2])/R;
+ EmeasEst += hitWeight * ((Ehit/(1. + alpha*(1./st - 1.)))/muonSamplingFraction);
+ } else if (detector_index == 4) {
+ // Muon barrel
+ double muonSamplingFraction = 2.53; // 0.396 GeV per hit => 2.53
+ double Ehit = 1.0;
+ double[] pos = hit.getPosition();
+ double R = Math.sqrt(pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2]);
+ double st = Math.abs(pos[2])/R;
+ EmeasEst += hitWeight * ((Ehit/(1. + alpha*(1./st - 1.)))/muonSamplingFraction);
+ } else {
+ System.out.println("ERROR: Failed to recognize system id "+detector_index+" named "+hit.getSubdetector().getName());
+ }
}
//
// Now invert
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.1 -r1.2
--- FuzzyQPhotonClusterEnergyCalculator.java 27 Mar 2008 18:15:28 -0000 1.1
+++ FuzzyQPhotonClusterEnergyCalculator.java 12 Aug 2008 23:45:11 -0000 1.2
@@ -13,7 +13,7 @@
* clusters such that the total weight adds up to 1. This is
* an extension of Ron's QPhotonClusterEnergyCalculator class.
*
- * @version $Id: FuzzyQPhotonClusterEnergyCalculator.java,v 1.1 2008/03/27 18:15:28 mcharles Exp $
+ * @version $Id: FuzzyQPhotonClusterEnergyCalculator.java,v 1.2 2008/08/12 23:45:11 mcharles Exp $
*/
public class FuzzyQPhotonClusterEnergyCalculator extends QPhotonClusterEnergyCalculator
@@ -50,6 +50,7 @@
double cc = cb;
if(detector_index == 2)
{
+ // EM barrel
int layer = idc.getValue("layer");
if(layer < nFrontLayersEcal)
{
@@ -62,6 +63,7 @@
}
else if(detector_index == 6)
{
+ // EM endcap
cc = ce;
int layer = idc.getValue("layer");
if(layer < nFrontLayersEcal)
@@ -73,6 +75,20 @@
index = 3;
}
}
+ else if(detector_index == 9)
+ {
+ // Forward endcap -- treat mostly as EM endcap
+ cc = ce;
+ int layer = idc.getValue("layer");
+ if(layer < nFrontLayersEcal-1) // NB no preshower layer in FCAL => "-1" in this line
+ {
+ index = 2;
+ }
+ else
+ {
+ index = 3;
+ }
+ }
if(index > -1)
{
EmeasEst += hitWeight * ((hit.getRawEnergy()/sf[index])/cc);