lcsim/src/org/lcsim/event/base
diff -u -r1.3 -r1.4
--- BaseMCParticle.java 15 Feb 2011 23:22:29 -0000 1.3
+++ BaseMCParticle.java 29 Apr 2011 16:22:33 -0000 1.4
@@ -3,7 +3,7 @@
*
* Created on March 30, 2006, 8:58 AM
*
- * $Id: BaseMCParticle.java,v 1.3 2011/02/15 23:22:29 grefe Exp $
+ * $Id: BaseMCParticle.java,v 1.4 2011/04/29 16:22:33 grefe Exp $
*/
package org.lcsim.event.base;
@@ -56,6 +56,10 @@
_status = status;
}
+ public void setSimulatorStatus(int value) {
+ _status = new Status(value);
+ }
+
public String toString()
{
// TODO fix this to call super.toString() when BasicParticle implements toString()
@@ -90,6 +94,60 @@
return _endPoint;
}
+ protected class Status implements SimulatorStatus {
+ int simulatorStatus;
+ public Status(int v) {
+ simulatorStatus = v;
+ }
+ public boolean vertexIsNotEndpointOfParent()
+ {
+ return (simulatorStatus & (1<<BITVertexIsNotEndpointOfParent)) != 0;
+ }
+
+ public boolean isStopped()
+ {
+ return (simulatorStatus & (1<<BITStopped)) != 0;
+ }
+
+ public boolean isDecayedInTracker()
+ {
+ return (simulatorStatus & (1<<BITDecayedInTracker)) != 0;
+ }
+
+ public boolean isDecayedInCalorimeter()
+ {
+ return (simulatorStatus & (1<<BITDecayedInCalorimeter)) != 0;
+ }
+
+ public boolean isCreatedInSimulation()
+ {
+ return (simulatorStatus & (1<<BITCreatedInSimulation)) != 0;
+ }
+
+ public boolean isBackscatter()
+ {
+ return (simulatorStatus & (1<<BITBackscatter)) != 0;
+ }
+
+ public boolean hasLeftDetector()
+ {
+ return (simulatorStatus & (1<<BITLeftDetector)) != 0;
+ }
+
+ public int getValue()
+ {
+ return simulatorStatus;
+ }
+ // define the bit positions for the simulation flag
+ private final static int BITEndpoint = 31;
+ private final static int BITCreatedInSimulation = 30;
+ private final static int BITBackscatter = 29;
+ private final static int BITVertexIsNotEndpointOfParent = 28;
+ private final static int BITDecayedInTracker = 27;
+ private final static int BITDecayedInCalorimeter = 26;
+ private final static int BITLeftDetector = 25;
+ private final static int BITStopped = 24;
+ }
}
lcsim/src/org/lcsim/event/base
diff -u -r1.13 -r1.14
--- BaseSimTrackerHit.java 25 Oct 2010 18:17:01 -0000 1.13
+++ BaseSimTrackerHit.java 29 Apr 2011 16:22:33 -0000 1.14
@@ -82,7 +82,11 @@
this.meta = meta;
this.de = de;
}
-
+
+ public void setTime(double time) {
+ this.time = time;
+ }
+
public int getLayer()
{
getIDDecoder().setID(getCellID());