Print

Print


Commit in slic on MAIN
include/LcioMcpFactory.hh+2-21.5 -> 1.6
src/LcioMcpFactory.cc+3-91.6 -> 1.7
+5-11
2 modified files
Always set charge to NaN when using only primary info.  (This means particle was unknown.)

slic/include
LcioMcpFactory.hh 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- LcioMcpFactory.hh	22 Sep 2005 21:38:58 -0000	1.5
+++ LcioMcpFactory.hh	7 Oct 2005 21:54:38 -0000	1.6
@@ -1,8 +1,8 @@
-// $Header: /cvs/lcd/slic/include/LcioMcpFactory.hh,v 1.5 2005/09/22 21:38:58 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/LcioMcpFactory.hh,v 1.6 2005/10/07 21:54:38 jeremy Exp $
 #ifndef slic_LcioMcpFactory_hh
 #define slic_LcioMcpFactory_hh 1
 
-// lcio 
+// lcio
 #include "EVENT/LCCollection.h"
 #include "EVENT/LCEvent.h"
 #include "EVENT/MCParticle.h"

slic/src
LcioMcpFactory.cc 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- LcioMcpFactory.cc	7 Oct 2005 21:08:51 -0000	1.6
+++ LcioMcpFactory.cc	7 Oct 2005 21:54:39 -0000	1.7
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioMcpFactory.cc,v 1.6 2005/10/07 21:08:51 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMcpFactory.cc,v 1.7 2005/10/07 21:54:39 jeremy Exp $
 #include "LcioMcpFactory.hh"
 
 // slic
@@ -298,14 +298,8 @@
     // mass
     mcp->setMass( primary->GetMass() / GeV );
 
-    /* Invalid charge from primary? --> Set to NaN in MCParticle. */
-    if ( std::isinf( primary->GetCharge() )) {
-      mcp->setCharge( LcioMcpManager::NO_CHARGE_FLAG );
-    }
-    /* Otherwise, the primary itself has a valid charge.  (Can this happen???) */
-    else {
-      mcp->setCharge( primary->GetCharge() );
-    }
+    /* FIXME: Wrong if G4PrimaryParticle actually has valid charge.  (Can it happen here???) */
+    mcp->setCharge( LcioMcpManager::NO_CHARGE_FLAG );
 
     return mcp;
   }
CVSspam 0.2.8