4 modified files
lcsim/src/org/lcsim/event
diff -u -r1.6 -r1.7
--- CalorimeterHit.java 5 Apr 2006 18:46:45 -0000 1.6
+++ CalorimeterHit.java 29 Nov 2006 08:20:26 -0000 1.7
@@ -7,7 +7,7 @@
/**
* A hit in a calorimeter.
* @author tonyj
- * @version $Id: CalorimeterHit.java,v 1.6 2006/04/05 18:46:45 jeremy Exp $
+ * @version $Id: CalorimeterHit.java,v 1.7 2006/11/29 08:20:26 jeremy Exp $
*/
public interface CalorimeterHit
{
@@ -48,4 +48,6 @@
* the hit position from the hit ID.
*/
public double[] getPosition();
+
+ //public int getLayerNumber();
}
lcsim/src/org/lcsim/recon/ganging
diff -u -r1.2 -r1.3
--- GangedCalorimeterIDDecoder.java 20 Oct 2006 20:53:18 -0000 1.2
+++ GangedCalorimeterIDDecoder.java 29 Nov 2006 08:20:26 -0000 1.3
@@ -53,16 +53,16 @@
}
/** Get an expanded identifier that maps strings to integer values. */
- public ExpandedIdentifier getExpandedIdentifier()
- {
- return oldDecoder.getExpandedIdentifier();
- }
+ //public ExpandedIdentifier getExpandedIdentifier()
+ //{
+ // return oldDecoder.getExpandedIdentifier();
+ //}
/** Same as getIDExpanded() except sets id. */
- public ExpandedIdentifier getExpandedIdentifier(long id)
- {
- return oldDecoder.getExpandedIdentifier(id);
- }
+ //public ExpandedIdentifier getExpandedIdentifier(long id)
+ //{
+ // return oldDecoder.getExpandedIdentifier(id);
+ //}
/*/\/\/\ Access to field data /\/\/\ */
public int getValue(String field)
lcsim/src/org/lcsim/util/event
diff -u -r1.4 -r1.5
--- BaseCalorimeterHit.java 23 May 2006 17:30:31 -0000 1.4
+++ BaseCalorimeterHit.java 29 Nov 2006 08:20:26 -0000 1.5
@@ -17,6 +17,7 @@
protected double[] position;
protected double time;
protected long id;
+ protected int layer;
public double getTime()
{
@@ -43,6 +44,7 @@
position[0] = iddecoder.getX();
position[1] = iddecoder.getY();
position[2] = iddecoder.getZ();
+ layer = iddecoder.getLayer();
}
return position;
}
@@ -68,4 +70,9 @@
{
return id;
}
+
+ public int getLayerNumber()
+ {
+ return layer;
+ }
}
lcsim/src/org/lcsim/util/heprep
diff -u -r1.11 -r1.12
--- LCSimHepRepConverter.java 5 Apr 2006 09:09:12 -0000 1.11
+++ LCSimHepRepConverter.java 29 Nov 2006 08:20:27 -0000 1.12
@@ -64,17 +64,32 @@
{
EventHeader event = (EventHeader) object;
HepRep root = factory.createHepRep();
-
+
// Lets start with the detector
- try
- {
- Detector detector = event.getDetector();
- detector.appendHepRep(factory,root);
+ // Try to find heprep in zip file.
+ HepRep h = null;
+ try {
+ HepRepConditions cond = new HepRepConditions();
+ h = cond.getHepRep();
}
- catch (Exception x)
- {
-
+ catch (Exception e)
+ {}
+
+ if (h != null) {
+ System.out.println("using heprep from zip conditions file");
+ root = h;
+ }
+ else {
+ System.out.println("creating detector heprep on the fly");
+ try
+ {
+ Detector detector = event.getDetector();
+ detector.appendHepRep(factory,root);
+ }
+ catch (Exception x)
+ {
+ }
}
// Now on to deal with the event data
CVSspam 0.2.8