3 modified files
slicPandora/src
diff -u -r1.6 -r1.7
--- CalorimeterHitProcessor.cpp 19 May 2010 21:42:14 -0000 1.6
+++ CalorimeterHitProcessor.cpp 19 May 2010 22:25:41 -0000 1.7
@@ -1,4 +1,4 @@
-// $Id: CalorimeterHitProcessor.cpp,v 1.6 2010/05/19 21:42:14 jeremy Exp $
+// $Id: CalorimeterHitProcessor.cpp,v 1.7 2010/05/19 22:25:41 jeremy Exp $
#include "CalorimeterHitProcessor.h"
@@ -82,6 +82,8 @@
PandoraApi::GeometryParameters::LayerParameters layerParams = (*layerList)[layer];
DetectorGeometry::ExtraLayerParameters xlayerParams = xsubdet->m_extraLayerParams[layer];
+ float mipEnergy = xsubdet->m_mipEnergy.Get();
+
float samplingFraction = xlayerParams.m_samplingFraction.Get();
float emSamplingFraction = xlayerParams.m_emSamplingFraction.Get();
float hadSamplingFraction = xlayerParams.m_hadSamplingFraction.Get();
@@ -115,9 +117,7 @@
params.m_hadronicEnergy = rawEnergy / hadSamplingFraction;
// MIP equivalent energy.
- // FIXME: Hard-coded to 1.0.
- // TODO: Calculate MIP equivalent energy. (How?)
- params.m_mipEquivalentEnergy = 1.0;
+ params.m_mipEquivalentEnergy = rawEnergy / mipEnergy;
// Digital calorimeter setting.
params.m_isDigital = xsubdet->m_isDigital;
slicPandora/src
diff -u -r1.11 -r1.12
--- DetectorGeometry.cpp 19 May 2010 21:42:14 -0000 1.11
+++ DetectorGeometry.cpp 19 May 2010 22:25:41 -0000 1.12
@@ -70,6 +70,7 @@
outerR = outerZ = outerPhi = 0;
int outerSym = 0;
int nlayers = 0;
+ float mipEnergy = 0;
// Read in parameters.
calElem->QueryFloatAttribute("innerR", &innerR );
@@ -80,6 +81,7 @@
calElem->QueryFloatAttribute("outerZ", &outerZ );
calElem->QueryFloatAttribute("outerPhi", &outerPhi );
calElem->QueryIntAttribute("outerSymmetryOrder", &outerSym );
+ calElem->QueryFloatAttribute("mipEnergy", &mipEnergy );
// Set subdetector parameters.
subdet->m_innerRCoordinate = innerR;
@@ -185,6 +187,7 @@
extras.m_decoder = decoder;
extras.m_inputHitType = getHitType(subdetType);
extras.m_inputDetectorRegion = getDetectorRegion(subdetType);
+ extras.m_mipEnergy = mipEnergy;
if (innerSym != outerSym)
{
slicPandora/include
diff -u -r1.10 -r1.11
--- DetectorGeometry.h 19 May 2010 21:42:14 -0000 1.10
+++ DetectorGeometry.h 19 May 2010 22:25:41 -0000 1.11
@@ -1,4 +1,4 @@
-// $Id: DetectorGeometry.h,v 1.10 2010/05/19 21:42:14 jeremy Exp $
+// $Id: DetectorGeometry.h,v 1.11 2010/05/19 22:25:41 jeremy Exp $
#ifndef DetectorGeometry_h
#define DetectorGeometry_h 1
@@ -22,7 +22,7 @@
public:
pandora::InputFloat m_samplingFraction;
pandora::InputFloat m_emSamplingFraction;
- pandora::InputFloat m_hadSamplingFraction;
+ pandora::InputFloat m_hadSamplingFraction;
pandora::InputFloat m_cellThickness;
};
@@ -35,6 +35,7 @@
pandora::InputFloat m_cellThickness;
pandora::InputFloat m_cellSizeU;
pandora::InputFloat m_cellSizeV;
+ pandora::InputFloat m_mipEnergy;
std::string m_collection;
IDDecoder* m_decoder;
ExtraLayerParametersList m_extraLayerParams;
CVSspam 0.2.8