Commit in slic/src on MAIN
StdHepToLcioConvertor.cc+12-121.30 -> 1.31
JM: Change StdHep parent handling according to request from Tony.

slic/src
StdHepToLcioConvertor.cc 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- StdHepToLcioConvertor.cc	4 Apr 2006 22:45:28 -0000	1.30
+++ StdHepToLcioConvertor.cc	4 Aug 2006 01:07:20 -0000	1.31
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.30 2006/04/04 22:45:28 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.31 2006/08/04 01:07:20 jeremy Exp $
 #include "StdHepToLcioConvertor.hh"
 
 // slic
@@ -341,7 +341,7 @@
 
   void StdHepToLcioConvertor::addMcpDaughter( int dauIdx, IMPL::MCParticleImpl* parMcp )
   {
-    if ( dauIdx > -1 ) {
+    if ( dauIdx >= 0 ) {
 
       MCParticleImpl* dauMcp = static_cast<MCParticleImpl*>
 	( m_currentMcpColl->getElementAt( dauIdx ) );
@@ -379,7 +379,7 @@
     }
 #endif
 
-    if ( parIdx > -1 ) {
+    if ( parIdx >= 0 ) {
 
       /* If index is > size of collection, the particle's parent doesn't exist yet.  We need to die! */
       if ( parIdx > m_currentMcpColl->getNumberOfElements() ) {
@@ -430,7 +430,7 @@
     }
 #endif
 
-    if ( idx1 != -1 && idx2 != -1 ) {
+    if ( idx1 >= 0 && idx2 >= 0 ) {
 
       if ( idx1 < idx2 ) {
 
@@ -469,7 +469,7 @@
 	vec.push_back(idx1);
       }
     }
-    else if ( idx1 != -1 ) {
+    else if ( idx1 >= 0 ) {
 
 #ifdef SLIC_VERBOSE
       if ( verbose() > 1 ) {
@@ -479,7 +479,7 @@
 
       vec.push_back(idx1);
     }
-    else if ( idx2 != -1 ) {
+    else if ( idx2 >= 0 ) {
 
 #ifdef SLIC_VERBOSE
       if ( verbose() > 1 ) {
@@ -545,32 +545,32 @@
     int dau2 = m_reader->daughter2(ihep) -1;
 
     // dau1 < ihep
-    if ( dau1 != -1 && dau1 < ihep ) {
+    if ( dau1 >= 0 && dau1 < ihep ) {
       cout << "WARNING: dau1 < ihep" << endl;
     }
 
     // dau2 < ihep
-    if ( dau2 != -1 && dau2 < ihep ) {
+    if ( dau2 >= 0 && dau2 < ihep ) {
       cout << "WARNING: dau2 < ihep" << endl;
     }
 
     // mom1 > ihep
-    if ( mom1 != -1 && mom1 > ihep ) {
+    if ( mom1 >= 0 && mom1 > ihep ) {
       cout << "WARNING: mom1 > ihep" << endl;
     }
 
     // mom2 > ihep
-    if ( mom2 != -1 && mom2 > ihep ) {
+    if ( mom2 >= 0 && mom2 > ihep ) {
       cout << "WARNING: mom2 > ihep" << endl;
     }
 
     // first particle in list has parents
-    if ( ihep == 0 && ( mom1 != -1 || mom2 != -1 ) ) {
+    if ( ihep == 0 && ( mom1 >= 0 || mom2 >= 0 ) ) {
       cout << "WARNING: ihep == 0 has parents" << endl;
     }
 
     // particle past first 2 with no mother
-    if ( ihep > 1 && ( mom1 == -1 && mom2 == -1 ) ) {
+    if ( ihep > 1 && ( mom1 < 0 && mom2 < 0 ) ) {
       cout << "WARNING: ihep > 1 with no mother" << endl;
     }
 
CVSspam 0.2.8