Print

Print


Commit in lcsim/src/org/lcsim/util on MAIN
OverlayDriver.java+9-31.9 -> 1.10
Fixed a problem with time windows for calorimeter hits. Now the time windows are ignored (as originally intended) if their length is set to 0.

lcsim/src/org/lcsim/util
OverlayDriver.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- OverlayDriver.java	2 May 2011 09:40:39 -0000	1.9
+++ OverlayDriver.java	22 Mar 2012 12:48:03 -0000	1.10
@@ -475,7 +475,9 @@
 				nHitsMoved++;
 				if (this.getHistogramLevel() > HLEVEL_HIGH && nHitsMoved%100 == 0) System.out.print("Moved "+nHitsMoved+" / "+nSimCaloHits+" hits\n");
 				if (fullCaloProcessing) {
-					if (hit.getTime() > signalTime + tofCorr + timeWindow) continue;
+					if (timeWindow > 0) {
+						if (hit.getTime() > signalTime + tofCorr + timeWindow) continue;
+					}
 					nHitsMoved++;
 					// create arrays to hold contributions from different mc particles
 					List<Object> mcList = new ArrayList<Object>();
@@ -485,7 +487,9 @@
 					double rawEnergy = 0.;
 					for (int i = 0; i != hit.getMCParticleCount(); i++) {
 						float hitTime = (float) (hit.getContributedTime(i) + time);
-						if (hitTime < signalTime + tofCorr + tofCaloOffset || hitTime > signalTime + tofCorr + timeWindow) continue;
+						if (timeWindow > 0) {
+							if (hitTime < signalTime + tofCorr + tofCaloOffset || hitTime > signalTime + tofCorr + timeWindow) continue;
+						}
 						float hitEnergy = (float) hit.getContributedEnergy(i);
 						mcList.add(hit.getMCParticle(i));
 						eneList.add(hitEnergy);
@@ -512,7 +516,9 @@
 					movedHit.setMetaData(collection);
 				} else {
 					double hitTime = hit.getTime() + time;
-					if (hitTime < signalTime + tofCorr + tofCaloOffset || hitTime > signalTime + tofCorr + timeWindow) continue;
+					if (timeWindow > 0) {
+						if (hitTime < signalTime + tofCorr + tofCaloOffset || hitTime > signalTime + tofCorr + timeWindow) continue;
+					}
 					movedHit = (BaseSimCalorimeterHit) hit;
 					movedHit.shiftTime(time);
 				}
CVSspam 0.2.12


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