slicPandora/src
diff -u -r1.15 -r1.16
--- DetectorGeometry.cpp 16 Aug 2010 17:51:58 -0000 1.15
+++ DetectorGeometry.cpp 1 Oct 2010 15:52:16 -0000 1.16
@@ -393,6 +393,7 @@
{
std::cout << "Unknown CalorimeterType <" << calType << ">." << std::endl;
}
+ return pandora::ECAL;
}
inline pandora::InputDetectorRegion DetectorGeometry::getDetectorRegion(const std::string& calType) const
@@ -409,6 +410,7 @@
{
std::cout << "Unknown CalorimeterType <" << calType << ">." << std::endl;
}
+ return pandora::BARREL;
}
slicPandora/src
diff -u -r1.13 -r1.14
--- SimpleTrackProcessor.cpp 24 Sep 2010 07:22:50 -0000 1.13
+++ SimpleTrackProcessor.cpp 1 Oct 2010 15:52:16 -0000 1.14
@@ -17,6 +17,8 @@
// stl
#include <string>
#include <cmath>
+#include <limits>
+
using EVENT::LCCollection;
using EVENT::Track;
@@ -125,14 +127,29 @@
// Add ECal state.
LCGenericObject* ecalObj = dynamic_cast<LCGenericObject*>(ecalCollection->getElementAt(i));
- trackParameters.m_trackStateAtECal =
- pandora::TrackState(ecalObj->getFloatVal(0),
- ecalObj->getFloatVal(1),
- ecalObj->getFloatVal(2),
- ecalObj->getFloatVal(3),
- ecalObj->getFloatVal(4),
- ecalObj->getFloatVal(5));
-
+ // FIXME: quick fix to set the trackStateAtECal to the trackStateAtEnd if the ecalObj is filled with nan float values.
+ // this is the case for pt < 1.0GeV
+ if(std::isnan(ecalObj->getFloatVal(0)))
+ {
+ LCGenericObject* exceptional_endObj = dynamic_cast<LCGenericObject*>(endCollection->getElementAt(i));
+ trackParameters.m_trackStateAtECal = pandora::TrackState(exceptional_endObj->getFloatVal(0),
+ exceptional_endObj->getFloatVal(1),
+ exceptional_endObj->getFloatVal(2),
+ exceptional_endObj->getFloatVal(3),
+ exceptional_endObj->getFloatVal(4),
+ exceptional_endObj->getFloatVal(5));
+ }
+ else
+ {
+ trackParameters.m_trackStateAtECal =
+ pandora::TrackState(ecalObj->getFloatVal(0),
+ ecalObj->getFloatVal(1),
+ ecalObj->getFloatVal(2),
+ ecalObj->getFloatVal(3),
+ ecalObj->getFloatVal(4),
+ ecalObj->getFloatVal(5));
+ }
+
// Add end state.
LCGenericObject* endObj = dynamic_cast<LCGenericObject*>(endCollection->getElementAt(i));
trackParameters.m_trackStateAtEnd = pandora::TrackState(endObj->getFloatVal(0),