Commit in slic/src on MAIN | |||
LcioHitsCollectionBuilder.cc | +13 | -9 | 1.22 -> 1.23 |
JM: preliminary fix for zero edep bug reported by Jan Strube
diff -u -r1.22 -r1.23 --- LcioHitsCollectionBuilder.cc 31 Jan 2012 18:52:30 -0000 1.22 +++ LcioHitsCollectionBuilder.cc 13 Aug 2012 23:27:30 -0000 1.23 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioHitsCollectionBuilder.cc,v 1.22 2012/01/31 18:52:30 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioHitsCollectionBuilder.cc,v 1.23 2012/08/13 23:27:30 jeremy Exp $
// SLIC #include "LcioHitsCollectionBuilder.hh"
@@ -283,7 +283,7 @@
addMcpContribs(calHit, simCalHit); // compare edep of calHit with simHit when debugging
-#ifdef SLIC_DEBUG
+//#ifdef SLIC_DEBUG
const McpHitContribList& contribs = calHit->getMcpHitContribList(); double totE = 0; for ( McpHitContribList::const_iterator iter = contribs.begin();
@@ -293,14 +293,18 @@
totE += (*iter).getEdep(); }
+ // Set energy from total of individual contributions. + simCalHit->setEnergy(totE/GeV); + + //std::cout << "set totE = " << totE/GeV << std::endl;
// sanity check so that new and old edeps must match
- if (abs( totE/GeV - simCalHit->getEnergy() ) > ( 0.001 * totE ) ) - { - log() << LOG::debug << "g4 hit E: " << totE << LOG::done; - log() << LOG::debug << "sim hit E: " << simCalHit->getEnergy() << LOG::done; - G4Exception("", "", JustWarning, "LCIO simCalHit E != G4 CalHit E, within tolerance"); - } -#endif
+ //if (abs( totE/GeV - simCalHit->getEnergy() ) > ( 0.001 * totE ) ) + //{ + // log() << LOG::debug << "g4 hit E: " << totE << LOG::done; + // log() << LOG::debug << "sim hit E: " << simCalHit->getEnergy() << LOG::done; + // G4Exception("", "", JustWarning, "LCIO simCalHit E != G4 CalHit E, within tolerance"); + //} +//#endif
return simCalHit; }
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1