Commit in slic/src on MAIN
LcioHCBuilder.cc+6-31.29 -> 1.30
Added momentum to SimTrackerHit output.  Leaving in old LCGenericObject collection of momentum until org.lcsim compatibility.

slic/src
LcioHCBuilder.cc 1.29 -> 1.30
diff -u -r1.29 -r1.30
--- LcioHCBuilder.cc	16 Sep 2005 23:04:40 -0000	1.29
+++ LcioHCBuilder.cc	19 Sep 2005 17:13:22 -0000	1.30
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioHCBuilder.cc,v 1.29 2005/09/16 23:04:40 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioHCBuilder.cc,v 1.30 2005/09/19 17:13:22 jeremy Exp $
 #include "LcioHCBuilder.hh"
 
 // SLIC
@@ -100,8 +100,7 @@
 	m_currentLCEvent->addCollection( collVect, HC->GetName() );
       }
       else {
-	std::cout << "No HC exists for HCID <" << hcid << ">." << std::endl;
-	G4Exception( "LcioHCBuilder::createHitCollections() - HC not found!" );
+	G4Exception( "LcioHCBuilder::createHitCollections() - No collection found for Hits Collection ID <" + hcid + ">");
       }
     }
   }
@@ -280,6 +279,10 @@
     double pos[3] = { hitPos.x(), hitPos.y(), hitPos.z() };
     simTrkHit->setPosition( pos );
 
+    /* momentum */
+    const G4ThreeVector& momentum = trkHit->getMomentum();
+    simTrkHit->setMomentum( momentum.x(), momentum.y(), momentum.z() );
+
     // dEdx in GeV (LCIO units)
     float edep = trkHit->getEdep();
     simTrkHit->setdEdx( edep / GeV );
CVSspam 0.2.8