lcsim/src/org/lcsim/digisim
diff -u -r1.5 -r1.6
--- Crosstalk.java 7 Dec 2005 18:31:00 -0000 1.5
+++ Crosstalk.java 20 Jan 2006 23:40:55 -0000 1.6
@@ -10,7 +10,7 @@
* A modifier for simulation of crosstalk in calorimeter cells
*
* @author Guilherme Lima
- * @version $Id: Crosstalk.java,v 1.5 2005/12/07 18:31:00 lima Exp $
+ * @version $Id: Crosstalk.java,v 1.6 2006/01/20 23:40:55 lima Exp $
*/
class Crosstalk extends AbstractCalHitModifier {
@@ -63,6 +63,7 @@
// loop over hit cells
for( Long sourceID : origMap.keySet() ) {
TempCalHit srchit = origMap.get( sourceID );
+ TempCalHit refhit = hitmap.get( sourceID );
_segm.setID( sourceID.longValue() );
long neigs[] = _segm.getNeighbourIDs(0,1,1);
@@ -102,14 +103,18 @@
+", add="+ampl );
}
- desthit.addContribution( sourceID, ampl, time );
+ // consider a 0.1nsec time penalty for crosstalk. GL060119
+ desthit.addContribution( sourceID, ampl, time+0.1 );
+ refhit.reduceContribution(ampl);
if(_debug>0) {
System.out.println(", after="+desthit.getTotalEnergy()+")");
}
}
else {
// create new hit and add it to hitmap
- desthit = new TempCalHit( destID, sourceID, ampl, time );
+ // consider a 0.1nsec time penalty for crosstalk. GL060119
+ desthit = new TempCalHit( destID, sourceID, ampl, time+0.1 );
+ refhit.reduceContribution(ampl);
if(_debug>0) {
System.out.println("Crosstalk:"
+" from sourceID="+Long.toHexString(sourceID)