2 added + 6 modified, total 8 files
GeomConverter/src/org/lcsim/detector
diff -N DetectorFactory.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DetectorFactory.java 7 Mar 2007 00:43:41 -0000 1.1
@@ -0,0 +1,135 @@
+package org.lcsim.detector;
+
+import org.lcsim.detector.identifier.IIdentifier;
+import org.lcsim.detector.material.IMaterial;
+import org.lcsim.detector.material.MaterialElement;
+import org.lcsim.detector.material.MaterialMixture;
+import org.lcsim.detector.material.IMaterial.State;
+import org.lcsim.detector.solids.Box;
+import org.lcsim.detector.solids.ISolid;
+import org.lcsim.detector.solids.Tube;
+
+public class DetectorFactory
+implements IDetectorFactory
+{
+ public Box createBox(String name, double xHalfLength, double yHalfLength,
+ double zHalfLength)
+ {
+ return new Box(
+ name,
+ xHalfLength,
+ yHalfLength,
+ zHalfLength);
+ }
+
+ public ICoordinateTransformation3D createCoordinateTransformation3D()
+ {
+ return new CoordinateTransformation3D();
+ }
+
+ public IDetectorElement createDetectorElement(
+ String name,
+ IDetectorElement parent,
+ IPhysicalVolumePath support,
+ IIdentifier id) {
+ return new DetectorElement(
+ name,
+ parent,
+ support,
+ id);
+ }
+
+ public ILogicalVolume createLogicalVolume(
+ String name,
+ ISolid solid,
+ IMaterial material)
+ {
+ return new LogicalVolume(name, solid, material);
+ }
+
+ public IMaterial createMaterialElement(
+ String name,
+ double Z,
+ double A,
+ double density)
+ {
+ return new MaterialElement(name,Z,A,density);
+ }
+
+ public IMaterial createMaterialElement(
+ String name,
+ int Z,
+ int A,
+ double density,
+ double ionizationPotential,
+ State state,
+ double temperature,
+ double pressure,
+ double meltingPoint,
+ double boilingPoint)
+ {
+ return new MaterialElement(
+ name,
+ Z,
+ A,
+ density,
+ ionizationPotential,
+ state,
+ temperature,
+ pressure,
+ meltingPoint,
+ boilingPoint);
+ }
+
+ public IMaterial createMaterialMixture(
+ String name,
+ int nComponents,
+ double density,
+ State state)
+ {
+ return new MaterialMixture(
+ name,
+ nComponents,
+ density,
+ state);
+ }
+
+ public IPhysicalVolume createPhysicalVolume(
+ ICoordinateTransformation3D transform,
+ String name,
+ ILogicalVolume logicalVolume,
+ ILogicalVolume motherLogicalVolume,
+ int copyNum)
+ {
+ return new PhysicalVolume(
+ transform,
+ name,
+ logicalVolume,
+ motherLogicalVolume,
+ copyNum);
+ }
+
+ public IPhysicalVolumeNavigator createPhysicalVolumeNavigator(
+ IPhysicalVolume worldVolume)
+ {
+ return new PhysicalVolumeNavigator(worldVolume);
+ }
+
+ public IRotation3D createRotation3D()
+ {
+ return new Rotation3D();
+ }
+
+ public Tube createTube(
+ String name,
+ double innerRadius,
+ double outerRadius,
+ double zHalfLength)
+ {
+ return new Tube(
+ name,
+ innerRadius,
+ outerRadius,
+ zHalfLength);
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -N DetectorStore.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DetectorStore.java 7 Mar 2007 00:43:41 -0000 1.1
@@ -0,0 +1,47 @@
+package org.lcsim.detector;
+
+import org.lcsim.detector.material.IMaterialStore;
+import org.lcsim.detector.material.MaterialStore;
+import org.lcsim.detector.solids.ISolidStore;
+import org.lcsim.detector.solids.SolidStore;
+
+public class DetectorStore
+implements IDetectorStore
+{
+ private static IDetectorStore store;
+
+ public static IDetectorStore getInstance()
+ {
+ if ( store == null )
+ {
+ store = new DetectorStore();
+ }
+ return store;
+ }
+
+ public IDetectorElementStore getDetectorElementStore()
+ {
+ return DetectorElementStore.getInstance();
+ }
+
+ public ILogicalVolumeStore getLogicalVolumeStore()
+ {
+ return LogicalVolumeStore.getInstance();
+ }
+
+ public IMaterialStore getMaterialStore()
+ {
+ return MaterialStore.getInstance();
+ }
+
+ public IPhysicalVolumeStore getPhysicalVolumeStore()
+ {
+ return PhysicalVolumeStore.getInstance();
+ }
+
+ public ISolidStore getSolidStore()
+ {
+ return SolidStore.getInstance();
+ }
+
+}
GeomConverter/src/org/lcsim/detector
diff -u -r1.1 -r1.2
--- IDetectorConstruction.java 3 Mar 2007 13:33:56 -0000 1.1
+++ IDetectorConstruction.java 7 Mar 2007 00:43:41 -0000 1.2
@@ -3,4 +3,5 @@
public interface IDetectorConstruction
{
public IPhysicalVolume create();
+ public IPhysicalVolume getWorldVolume();
}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -u -r1.4 -r1.5
--- IDetectorFactory.java 6 Mar 2007 20:22:16 -0000 1.4
+++ IDetectorFactory.java 7 Mar 2007 00:43:41 -0000 1.5
@@ -1,15 +1,23 @@
package org.lcsim.detector;
+import org.lcsim.detector.identifier.IIdentifier;
import org.lcsim.detector.material.IMaterial;
+import org.lcsim.detector.material.IMaterial.State;
import org.lcsim.detector.solids.Box;
import org.lcsim.detector.solids.ISolid;
import org.lcsim.detector.solids.Tube;
public interface IDetectorFactory
{
- IDetectorElement createDetectorElement(String name);
+ IRotation3D createRotation3D();
+
+ ICoordinateTransformation3D createCoordinateTransformation3D();
- IGeometryInfo createGeometryInfo(IDetectorElement de);
+ IDetectorElement createDetectorElement(
+ String name,
+ IDetectorElement parent,
+ IPhysicalVolumePath support,
+ IIdentifier id);
ILogicalVolume createLogicalVolume(
String name,
@@ -23,13 +31,41 @@
ILogicalVolume motherLogicalVolume,
int copyNum);
- IPhysicalVolumeNavigator createPhysicalVolumeNavigator(IPhysicalVolume world);
- IRotation3D createRotation3D();
- ICoordinateTransformation3D createTransform3D();
+ IPhysicalVolumeNavigator createPhysicalVolumeNavigator(IPhysicalVolume world);
+
+ IMaterial createMaterialElement(
+ String name,
+ double Z,
+ double A,
+ double density);
- IMaterial createMaterialElement(String name,double Z,double A,double density);
- IMaterial createMaterialMixture();
+ IMaterial createMaterialElement(
+ String name,
+ int Z,
+ int A,
+ double density,
+ double ionizationPotential,
+ State state,
+ double temperature,
+ double pressure,
+ double meltingPoint,
+ double boilingPoint);
+
+ IMaterial createMaterialMixture(
+ String name,
+ int nComponents,
+ double density,
+ State state);
- Box createBox(String name, double xHalfLength, double yHalfLength, double zHalfLength);
- Tube createTube(String name, double innerRadius, double outerRadius, double zHalfLength);
+ Box createBox(
+ String name,
+ double xHalfLength,
+ double yHalfLength,
+ double zHalfLength);
+
+ Tube createTube(
+ String name,
+ double innerRadius,
+ double outerRadius,
+ double zHalfLength);
}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -u -r1.1 -r1.2
--- IDetectorStore.java 3 Mar 2007 13:33:56 -0000 1.1
+++ IDetectorStore.java 7 Mar 2007 00:43:41 -0000 1.2
@@ -5,8 +5,9 @@
public interface IDetectorStore
{
- IPhysicalVolumeStore getPhysicalVolumeStore();
- ILogicalVolumeStore getLogicalVolumeStore();
- ISolidStore getSolidStore();
- IMaterialStore getMaterialStore();
+ public IPhysicalVolumeStore getPhysicalVolumeStore();
+ public ILogicalVolumeStore getLogicalVolumeStore();
+ public ISolidStore getSolidStore();
+ public IMaterialStore getMaterialStore();
+ public IDetectorElementStore getDetectorElementStore();
}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -u -r1.4 -r1.5
--- IPhysicalVolumeNavigator.java 6 Mar 2007 20:22:16 -0000 1.4
+++ IPhysicalVolumeNavigator.java 7 Mar 2007 00:43:41 -0000 1.5
@@ -11,7 +11,7 @@
* transform of an IPhysicalVolumePath.
*
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: IPhysicalVolumeNavigator.java,v 1.4 2007/03/06 20:22:16 jeremy Exp $
+ * @version $Id: IPhysicalVolumeNavigator.java,v 1.5 2007/03/07 00:43:41 jeremy Exp $
*/
public interface IPhysicalVolumeNavigator
{
@@ -79,5 +79,14 @@
* @param globalPoint
* @return
*/
- public IPhysicalVolumePath getPath(Hep3Vector globalPoint);
+ public IPhysicalVolumePath getPath(Hep3Vector globalPoint);
+
+ /**
+ * Traverse the tree using preorder or parent first,
+ * calling the visit method of the @param IPhysicalVolumeVisitor.
+ *
+ * @param visitor An IPhysicalVolumeVisitor that will be activated
+ * at each PhysicalVolume in the tree.
+ */
+ public void traversePreOrder(IPhysicalVolumeVisitor visitor);
}
\ No newline at end of file
GeomConverter/src/org/lcsim/detector
diff -u -r1.3 -r1.4
--- PhysicalVolume.java 6 Mar 2007 20:22:16 -0000 1.3
+++ PhysicalVolume.java 7 Mar 2007 00:43:41 -0000 1.4
@@ -6,13 +6,13 @@
extends Named
implements IPhysicalVolume
{
- CoordinateTransformation3D transform;
+ ICoordinateTransformation3D transform;
ILogicalVolume logicalVolume;
ILogicalVolume motherLogicalVolume;
int copyNum;
public PhysicalVolume(
- CoordinateTransformation3D transform,
+ ICoordinateTransformation3D transform,
String name,
ILogicalVolume logicalVolume,
ILogicalVolume motherLogicalVolume,
@@ -63,7 +63,7 @@
return logicalVolume;
}
- public CoordinateTransformation3D getTransform()
+ public ICoordinateTransformation3D getTransform()
{
return transform;
}
GeomConverter/src/org/lcsim/detector/material
diff -u -r1.2 -r1.3
--- MaterialMixture.java 6 Mar 2007 20:22:17 -0000 1.2
+++ MaterialMixture.java 7 Mar 2007 00:43:41 -0000 1.3
@@ -65,7 +65,8 @@
}
/** Construct a material with a number of components. */
- public MaterialMixture(String name,
+ public MaterialMixture(
+ String name,
int nComponents,
double density,
State state)
CVSspam 0.2.8