Commit in slicPandora/src on MAIN
DetectorGeometry.cpp+21.15 -> 1.16
SimpleTrackProcessor.cpp+25-81.13 -> 1.14
+27-8
2 modified files
return something to avoid the warnings in DetectorGeometry
Quick fix for trackstateatecal calculation in simpletrackprocessor. Protect against nan values for tracks with a pt < 1.0GeV by filling the trackstateatend into the trackstateatecal

slicPandora/src
DetectorGeometry.cpp 1.15 -> 1.16
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
SimpleTrackProcessor.cpp 1.13 -> 1.14
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), 
CVSspam 0.2.8