Print

Print


Author: [log in to unmask]
Date: Wed Dec 17 03:37:53 2014
New Revision: 3463

Log:
Move unnecessary mixin API to Hit interface.

Removed:
    projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/HasMetaData.java
    projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/HasPosition.java
Modified:
    projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/Hit.java

Modified: projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/Hit.java
 =============================================================================
--- projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/Hit.java	(original)
+++ projects/lcsim/trunk/event-model/src/main/java/org/lcsim/event/Hit.java	Wed Dec 17 03:37:53 2014
@@ -3,19 +3,82 @@
 import org.lcsim.detector.DetectorIdentifierHelper;
 import org.lcsim.detector.HasDetectorElement;
 import org.lcsim.detector.identifier.Identifiable;
+import org.lcsim.event.EventHeader.LCMetaData;
 import org.lcsim.geometry.subdetector.BarrelEndcapFlag;
+import org.lcsim.geometry.IDDecoder;
+import org.lcsim.geometry.Subdetector;
+import hep.physics.vec.Hep3Vector;
 
-public interface Hit extends HasMetaData, HasDetectorElement, HasPosition, Identifiable {
+/**
+ * This is a common API for hit objects in events such
+ * as CalorimeterHit, etc.
+ * @author Jeremy McCormick <[log in to unmask]>
+ */
+public interface Hit extends HasDetectorElement, Identifiable {
+
+    /**
+     * Get the position vector of the hit.
+     * @return The position of the hit as a vector.
+     */
+    Hep3Vector getPositionVec();
+
+    /**
+     * Get the position of the hit as a double array of length 3.
+     * @return The position of the hit.
+     */
+    double[] getPosition();
 	
+    /**
+     * Convenience method to get the Subdetector's IdentifierHelper.
+     * @return The subdetector identifier helper.
+     */
     DetectorIdentifierHelper getDetectorIdentifierHelper();
+    
+    /**
+     * Get the collection meta data reference for this object.
+     * @return The collection meta data.
+     */
+    LCMetaData getMetaData();
+    
+    /**
+     * Set the collection meta data of this object.
+     */
+    void setMetaData(LCMetaData meta);
+   
+    /**
+     * Get the subdetector of this hit.
+     * @return The subdetector of the hit.
+     */
+    Subdetector getSubdetector();
+    
+    /**
+     * Get the IDDecoder for the hit.
+     * @return The IDDecoder for the hit.
+     */
+    IDDecoder getIDDecoder();
+    
+    /**
+     * Get the subdetector's system ID.
+     * @return The subdetector's system ID.
+     */
+    int getSystemId();
 	
-    // FIXME: I don't think none of this below belongs here!
-    
-	int getSystemId();
+    /**
+     * Get the barrel flag (collider-detector specific).
+     * @return The barrel flag.
+     */
+    BarrelEndcapFlag getBarrelEndcapFlag();
 	
-	BarrelEndcapFlag getBarrelEndcapFlag();
+    /**
+     * Get the layer number of the hit.
+     * @return The layer number.
+     */
+    int getLayerNumber();
 	
-	int getLayerNumber();
-	
-	int getIdentifierFieldValue(String field);
+    /**
+     * Get a field value using the helper.
+     * @param field The name of the field.
+     * @return A field value.
+     */
+    int getIdentifierFieldValue(String field);
 }

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1