slic/src
diff -u -r1.24 -r1.25
--- StdHepToLcioConvertor.cc 6 Oct 2005 08:49:39 -0000 1.24
+++ StdHepToLcioConvertor.cc 7 Oct 2005 21:08:20 -0000 1.25
@@ -1,6 +1,9 @@
-// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.24 2005/10/06 08:49:39 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.25 2005/10/07 21:08:20 jeremy Exp $
#include "StdHepToLcioConvertor.hh"
+// slic
+#include "LcioMcpManager.hh"
+
// lcio
#include "IMPL/LCEventImpl.h"
#include "UTIL/LCTOOLS.h"
@@ -18,7 +21,7 @@
using std::cerr;
using std::cout;
using std::endl;
-
+
using EVENT::LCIO;
using EVENT::LCCollection;
using IMPL::LCEventImpl;
@@ -27,19 +30,10 @@
namespace slic
{
-
- const double StdHepToLcioConvertor::c_light_NO_CLHEP = 299.792;
-
StdHepToLcioConvertor::StdHepToLcioConvertor(lStdHep* rdr)
: m_reader(rdr)
{
assert( rdr );
-
- /* Init invalid charge flag to NaN. */
- NO_CHARGE = sqrt(-1.0);
-
- /* Check it just in case. */
- assert( NO_CHARGE != NO_CHARGE );
}
StdHepToLcioConvertor::StdHepToLcioConvertor()
@@ -125,7 +119,6 @@
#ifdef SLIC_VERBOSE
if ( verbose() > 1 ) {
- //cout << endl;
cout << "ihep <" << ihep << ">" << endl;
}
#endif
@@ -163,11 +156,18 @@
}
#endif
+ /*
+ * Geant4 Particle definition exists for this MCParticle,
+ * so set the charge from it.
+ */
if ( pdef != 0 ) {
mcp->setCharge( pdef->GetPDGCharge() );
}
+ /*
+ * No Geant4 particle definition, so flag charge as invalid.
+ */
else {
- mcp->setCharge( NO_CHARGE );
+ mcp->setCharge( LcioMcpManager::NO_CHARGE_FLAG );
}
// momentum vec
@@ -193,29 +193,22 @@
#ifdef SLIC_VERBOSE
if ( verbose() > 1 ) {
- cout << "decay time <" << rdr->T( ihep ) / c_light_NO_CLHEP << ">" << endl;
+ cout << "decay time <" << rdr->T( ihep ) / c_light << ">" << endl;
}
#endif
// creation time
- mcp->setTime( rdr->T( ihep ) / c_light_NO_CLHEP );
+ mcp->setTime( rdr->T( ihep ) / c_light );
// add to mcpColl
mcpColl->addElement( mcp );
-#ifdef SLIC_VERBOSE
- if ( verbose() > 1 ) {
- cout << "setting up parents..." << endl;
- }
-#endif
-
// setup parentage
setupParents( ihep, mcp, rdr, mcpColl );
#ifdef SLIC_VERBOSE
if ( verbose() > 1 ) {
cout << "done with ihep <" << ihep << ">" << endl;
- //cout << endl;
}
#endif
slic/include
diff -u -r1.14 -r1.15
--- StdHepToLcioConvertor.hh 6 Oct 2005 08:49:39 -0000 1.14
+++ StdHepToLcioConvertor.hh 7 Oct 2005 21:08:21 -0000 1.15
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/StdHepToLcioConvertor.hh,v 1.14 2005/10/06 08:49:39 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/StdHepToLcioConvertor.hh,v 1.15 2005/10/07 21:08:21 jeremy Exp $
#ifndef slic_StdHepToLcioConvertor_hh
#define slic_StdHepToLcioConvertor_hh
@@ -61,9 +61,6 @@
EVENT::LCCollection* m_currentMcpColl;
lStdHep* m_reader;
-
- static const double c_light_NO_CLHEP;
- double NO_CHARGE;
};
};