21 removed files
GeomConverter/sandbox/detector
diff -N CoordinateTransformation3D.java
--- CoordinateTransformation3D.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,112 +0,0 @@
-/*
- * CoordinateTransformation3D.java
- */
-
-package org.lcsim.detector;
-
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.VecOp;
-
-/**
- *
- * @author tknelson
- */
-public class CoordinateTransformation3D implements ICoordinateTransformation3D
-{
-
- // Fields
- Hep3Vector _translation = new BasicHep3Vector(0.0,0.0,0.0);
- Rotation3D _rotation = new Rotation3D();
-
- /**
- * Creates a new instance of CoordinateTransformation3D
- */
- public CoordinateTransformation3D()
- {
- }
-
- public CoordinateTransformation3D(Rotation3D rotation)
- {
- this._rotation = rotation;
- }
-
- public CoordinateTransformation3D(Hep3Vector translation)
- {
- this._translation = translation;
- }
-
- public CoordinateTransformation3D(Hep3Vector translation, Rotation3D rotation)
- {
- _translation = translation;
- _rotation = rotation;
- }
-
- public CoordinateTransformation3D(Hep3Vector translation, IRotation3D rotation)
- {
- _translation = translation;
- _rotation = (Rotation3D)rotation;
- }
-
- // Access to translation and rotation
- public Hep3Vector getTranslation()
- {
- return _translation;
- }
-
- public Rotation3D getRotation()
- {
- return _rotation;
- }
-
- // Transformations
- public Hep3Vector transform(Hep3Vector coordinates)
- {
- translate(coordinates);
- rotate(coordinates);
- return coordinates;
- }
-
- public Hep3Vector translate(Hep3Vector coordinates)
- {
- return VecOp.add(coordinates,_translation);
- }
-
- public Hep3Vector rotate(Hep3Vector coordinates)
- {
- //return VecOp.mult(_rotation,coordinates);
- return VecOp.mult(_rotation.getRotationMatrix(),coordinates);
- }
-
- // Invert the transformation
- public void invert()
- {
- _translation = VecOp.mult(-1.0,VecOp.mult(_rotation.getRotationMatrix(),_translation));
- _rotation.invert(); // Need to assure that transpose is used
- }
-
- // FIXME: Talk to Tony about supporting this pattern
-
- public CoordinateTransformation3D inverse()
- {
- CoordinateTransformation3D transform = new CoordinateTransformation3D(
- VecOp.mult(-1.0,VecOp.mult(_rotation.getRotationMatrix(),_translation)),
- _rotation.inverse()); // FIXME: Need to assure that transpose is used
- return transform;
- }
-
- // Static functions
- public static CoordinateTransformation3D mult(CoordinateTransformation3D transformation1, CoordinateTransformation3D transformation2)
- {
- Rotation3D rotation = new Rotation3D(VecOp.mult(transformation1.getRotation().getRotationMatrix(),transformation2.getRotation().getRotationMatrix()));
- Hep3Vector translation = VecOp.add(VecOp.mult(transformation1.getRotation().getRotationMatrix(),transformation2.getTranslation()),transformation1.getTranslation());
- return new CoordinateTransformation3D(translation,rotation);
- }
-
- // multiply in place
- public void mult(ICoordinateTransformation3D transformation)
- {
- _rotation.setRotationMatrix(VecOp.mult(_rotation.getRotationMatrix(), transformation.getRotation().getRotationMatrix()));
- _translation = VecOp.add(_translation, transformation.getTranslation());
- }
-}
GeomConverter/sandbox/detector
diff -N DetectorElement.java
--- DetectorElement.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-/*
- * IDetectorElement.java
- *
- * Created on November 2, 2006, 4:51 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package org.lcsim.contrib.JeremyMcCormick;
-
-import java.util.List;
-
-/**
- *
- * @author tknelson
- */
-// SlowControl
-// FastControl
-// Calibration
-// ReadOut
-public abstract class DetectorElement implements IDetectorElement
-{}
GeomConverter/sandbox/detector
diff -N ICoordinateTransformation3D.java
--- ICoordinateTransformation3D.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-/*
- * ICoordinateTransformation3D.java
- */
-
-package org.lcsim.detector;
-
-import hep.physics.vec.Hep3Vector;
-
-/**
- *
- * @author tknelson
- */
-public interface ICoordinateTransformation3D
-{
- // Access to translation and rotation
- public Hep3Vector getTranslation();
- public Rotation3D getRotation();
-
- // Transformations
- public Hep3Vector transform(Hep3Vector coordinates);
- public Hep3Vector translate(Hep3Vector coordinates);
- public Hep3Vector rotate(Hep3Vector coordinates);
-
- public void mult(ICoordinateTransformation3D trans);
-
- public void invert();
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IDetectorElement.java
--- IDetectorElement.java 1 Mar 2007 19:20:21 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,114 +0,0 @@
-package org.lcsim.detector;
-
-import org.lcsim.detector.identifier.IIdentifiable;
-
-/**
- * A class to represent a node in the detector tree,
- * based on Gaudi's IDetectorElement interface.
- *
- * @author Tim Nelson <[log in to unmask]>
- * @author Jeremy McCormick <[log in to unmask]>
- */
-public interface IDetectorElement extends IIdentifiable
-{
- public String getName();
-
- public IGeometryInfo getGeometry();
-
- public IReadout getReadout();
-
- public IDetectorElement getParent();
-
- public IDetectorElementCollection getChildren();
-
- // same as name? need to look at what Gaudi does here;
- // also could have better return type (dir or tree type class)
- public String fullPath();
-
- //typedef std::vector<IDetectorElement*> IDEContainer;
- ///
- //public:
-
- /** retrieve the unique interface identifier
- * @return the unique interface identifier
- */
- //static const InterfaceID& interfaceID() { return IID_IDetectorElement; }
-
- /// "accessor": name/identifier of the Detector Element
- //virtual const std::string& name () const = 0;
-
- /// Return the SmartRef for the condition called 'name'.
- //virtual SmartRef<Condition> condition(const std::string &name) const = 0;
-
- ///
- /// delegations:
- ///
- /// "accessor": delegates the IGeometryInfo Interface
- //virtual IGeometryInfo* geometry () = 0;
- /// "accessor": delegates the IGeometryInfo Interface (const)
- //virtual const IGeometryInfo* geometry () const = 0;
- /// "accessor": delegates the IAlignment Interface
- //virtual IAlignment* alignment () = 0;
- /// "accessor": delegates the IAlignment Interface (const)
- //virtual const IAlignment* alignment () const = 0;
- /// "accessor": delegates the ICalibration Interface
- //virtual ICalibration* calibration() = 0;
- /// "accessor": delegates the ICalibration Interface (const)
- //virtual const ICalibration* calibration() const = 0;
- /// "accessor": delegates the IReadOut Interface
- //virtual IReadOut* readOut () = 0;
- /// "accessor": delegates the IReadOut Interface (const)
- //virtual const IReadOut* readOut () const = 0;
- /// "accessor": delegates the ISlowControl Interface
- //virtual ISlowControl* slowControl() = 0;
- /// "accessor": delegates the ISlowControl Interface (const)
- //virtual const ISlowControl* slowControl() const = 0;
- /// "accessor": delegates the IFastControl Interface
- //virtual IFastControl* fastControl() = 0;
- // "accessor": delegates the IFastControl Interface (const)
- //virtual const IFastControl* fastControl() const = 0;
- /// some functions to simplify the navigation
- /// (according to feedback after release 3)
- /// pointer to parent IDetectorElement (const version)
- //virtual IDetectorElement* parentIDetectorElement() const = 0 ;
- /// (reference to) container of pointers to child detector elements
- //virtual IDetectorElement::IDEContainer&
- //childIDetectorElements() const = 0;
- /// iterators for manipulation of daughter elements
- /// begin iterator
- //virtual IDetectorElement::IDEContainer::iterator childBegin() = 0;
- //virtual IDetectorElement::IDEContainer::const_iterator childBegin() const = 0;
- /// end iterator
- //virtual IDetectorElement::IDEContainer::iterator childEnd() = 0 ;
- //virtual IDetectorElement::IDEContainer::const_iterator childEnd() const = 0 ;
- /// functions for listing of objects, used in overloaded << operations
- //virtual std::ostream& printOut ( std::ostream& ) const = 0;
- /// reset to the initial state
- //virtual IDetectorElement* reset() = 0 ;
-
- /**
- * Method used to access the ParamValidDataObject methods from IDetectorElement
- * interface.
- */
- //virtual const ParamValidDataObject *params() const = 0;
-
- /**
- * Return a sensitive volume identifier for a given point in the
- * global reference frame.
- */
-
- //virtual const int sensitiveVolumeID(const Gaudi::XYZPoint& globalPos ) const=0;
-
- /**
- * This method initializes the detector element. It should be overridden
- * and used for computation purposes. This is a kind of hook for adding
- * user code easily in the initialization of a detector element.
- */
- //virtual StatusCode initialize() = 0;
-
- /// destructor
- //virtual ~IDetectorElement() ;
-
- };
-
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IDetectorElementCollection.java
--- IDetectorElementCollection.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-package org.lcsim.detector;
-
-import java.util.Collection;
-
-interface IDetectorElementCollection extends Collection<IDetectorElement>
-{}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IGeometryInfo.java
--- IGeometryInfo.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,192 +0,0 @@
-package org.lcsim.detector;
-
-import hep.physics.vec.Hep3Vector;
-
-/**
- *
- * IGeometryInfo.java
- *
- * A port of Gaudi's IGeometryInfo, an abstract interface
- * to a node in the geometry tree.
- *
- * @author Tim Nelson <[log in to unmask]>
- * @author Jeremy McCormick <[log in to unmask]>
- */
-public interface IGeometryInfo
-{
- public ILogicalVolume getLogicalVolume();
-
- public String getLogicalVolumeName();
-
- public boolean hasLogicalVolume();
-
- // global to local transformation
- public CoordinateTransformation3D toLocal();
-
- // local to global transformation
- public CoordinateTransformation3D toGlobal();
-
- // transform a point in local coordinates to global coordinates
- public Hep3Vector toGlobal(Hep3Vector local_point);
-
- // transform a point in global coordinates to local coordinates
- public Hep3Vector toLocal(Hep3Vector global_point);
-
- // get name of daughter volume containing a point in global coordinates
- public String childVolumeName(Hep3Vector global_point);
-
- // get daughter volume containing a point in global coordinates
- public IPhysicalVolume getPhysicalVolume(Hep3Vector globalPoint);
-
- public boolean isInside(Hep3Vector point);
-
- public Hep3Vector getPosition();
-
- String belongsToPath(Hep3Vector globalPoint);
-
- String belongsToPath(Hep3Vector globalPoint, int level);
-
- IGeometryInfo belongsTo(Hep3Vector globalPoint);
-
- IGeometryInfo belongsTo(Hep3Vector globalPoint, int level);
-
- /** find full geometry information for given point
- * @param point input 3D point
- * @param level number of levels to nagigate down the hierarchy
- * @param start is the location (or path) of "nearest regular
- * DetectorElement", which simultaneously contains the
- * Point and has the connection with Actual Geometry Tree.
- * @param volumePath retuned information
- */
- IPhysicalVolumePath getFullGeoInfoForPoint(
- Hep3Vector point,
- int level,
- IGeometryInfo start);
-
- /** find full geometry information for given point
- * @param point input 3D point
- * @param level number of levels to nagigate down the hierarchy
- * @param start is the location (or path) of "nearest regular
- * DetectorElement", which simultaneously contains the
- * Point and has the connection with Actual Geometry Tree.
- * @param replicaPath retuned information
- */
-// virtual StatusCode fullGeoInfoForPoint
-// ( const Gaudi::XYZPoint& point ,
-// const int level ,
-// IGeometryInfo*& start ,
-// ILVolume::ReplicaPath& replicaPath ) = 0;
-
- /** find full geometry information for given point
- * @param point input 3D point
- * @param level number of levels to nagigate down the hierarchy
- * @param start is the location (or path) of "nearest regular
- * DetectorElement", which simultaneously contains the
- * Point and has the connection with Actual Geometry Tree.
- * @param volumePath retuned information
- */
- IPhysicalVolumePath fullGeoInfoForPoint
- ( Hep3Vector point, int level, String start);
-
- /** find full geometry information for given point
- * @param point input 3D point
- * @param level number of levels to nagigate down the hierarchy
- * @param start is the location (or path) of "nearest regular
- * DetectorElement", which simultaneously contains the
- * Point and has the connection with Actual Geometry Tree.
- * @param replicaPath retuned information
- */
-// virtual StatusCode fullGeoInfoForPoint
-// ( const Gaudi::XYZPoint& point ,
-// const int level ,
-// std::string& start ,
-// ILVolume::ReplicaPath& replicaPath ) = 0;;
-
- /** the information about the support
- * @param start "start" geometry info
- * @param replicaPath replica path
- * @return status code
- */
- //virtual StatusCode location
- //( IGeometryInfo*& start ,
- // ILVolume::ReplicaPath& replicaPath ) const = 0;
-
- /** the information about the support
- * @param start "start" geometry info
- * @param replicaPath replica path
- * @return status code
- */
- //virtual StatusCode location
- //( std::string& start ,
- // ILVolume::ReplicaPath& replicaPath ) const = 0;
-
- /** the name of Logical Volume, addressed by start and Replica Path
- * @param start start
- * @param replicaPath replicaPath
- * @return the name of Logical Volume
- */
- //virtual std::string lvolumePath
- //( const std::string& start ,
- // const ILVolume::ReplicaPath& replicaPath ) = 0;
-
- /** the Logical Volume, addressed by start and Replica Path
- * @param start start
- * @param replicaPath replicaPath
- * @return pointer to Logical Volume
- */
- //virtual const ILVolume* lvolume
- //( const std::string& start ,
- // const ILVolume::ReplicaPath& replicaPath ) = 0;
-
- /** the name of Logical Volume, addressed by start and Replica Path
- * @param start start
- * @param replicaPath replicaPath
- * @return the name of Logical Volume
- */
- //virtual std::string lvolumePath
- //( IGeometryInfo* start ,
- // const ILVolume::ReplicaPath& replicaPath ) = 0;
-
- /** the Logical Volume, addressed by start and Replica Path
- * @param start start
- * @param replicaPath replicaPath
- * @return pointer to Logical Volume
- */
- //virtual const ILVolume* lvolume
- //( IGeometryInfo* start ,
- // const ILVolume::ReplicaPath& replicaPath ) = 0;
-
- /// retrive reference to replica path (mistrerious "rpath" or "npath")
- //virtual const ILVolume::ReplicaPath& supportPath() const = 0;
-
- /** @} */ // end of group LogVol
-
- /** pointer to the parent IGeometryInfo (const version)
- * @return pointer to the parent IGeometryInfo
- */
- IGeometryInfo parentIGeometryInfo();
-
- // virtual IGeometryInfo* supportIGeometryInfo() = 0 ;
-
- /** (reference to) container of children IGeometryInfo
- * return reference to container of children IGeometryInfo
- */
- //virtual IGeometryInfo::IGIChildrens& childIGeometryInfos() = 0;
-
- interface IGeometryInfoIterator
- {
- IGeometryInfo next();
- IGeometryInfo prev();
- IGeometryInfo end();
- IGeometryInfo begin();
- }
-
- IGeometryInfoIterator childBegin();
-
- IGeometryInfoIterator childEnd();
-
- // Gaudi has "get the exact full geometry location" What does this mean???
- // One interpretation, entire heirarchy as map of LVolumes to
- // positions in coordinates of each volume
- // public Map<ILVolume,Hep3Vector>
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N ILogicalVolume.java
--- ILogicalVolume.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-package org.lcsim.detector;
-
-import java.util.List;
-
-public interface ILogicalVolume
-{
- String getName();
- ISolid getSolid();
- IMaterial getMaterial();
- List<IPhysicalVolume> getDaughterVolumes();
-}
GeomConverter/sandbox/detector
diff -N IMaterial.java
--- IMaterial.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-package org.lcsim.detector;
-
-public interface IMaterial
-{
- public String name();
- public String description();
- public double density();
- public double pressure();
- public double Z();
- public double A();
- public double atomicWeight();
- public double meltingPoint();
- public double boilingPoint();
- public double nuclearInteractionLength();
- public double moliereRadius();
- public double radiationLength();
- public double ionizationPotential();
- public boolean isAtomicElement();
- enum State
- {
- Gas,
- Liquid,
- Solid,
- Unknown
- }
- State state();
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IMaterialComposite.java
--- IMaterialComposite.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-package org.lcsim.detector;
-
-public interface IMaterialComposite extends IMaterial
-{
- public int numberOfSubMaterials();
- public void setNumberOfSubMaterials(int i);
- public boolean hasMaxNumberOfSubMaterials();
- public IMaterial get(int i);
- public void addByMassFraction(IMaterial submaterial, double massFrac);
- public void addByDensityFraction(IMaterial submaterial, double massFrac);
- public void addByNumberOfAtoms(IMaterial submaterial, int n);
- public void massFraction(int i);
- public void densityFraction(int i);
-}
GeomConverter/sandbox/detector
diff -N IMaterialMixture.java
--- IMaterialMixture.java 1 Mar 2007 19:20:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-package org.lcsim.detector;
-
-public interface IMaterialMixture extends IMaterial
-{
- public int numberOfMaterials();
- public void setNumberOfMaterials(int i);
- public boolean hasMaxMaterials();
- public IMaterial getMaterial(int i);
- public void addByMassFraction(IMaterial submaterial, double massFrac);
- public void addByNumberOfAtoms(IMaterial submaterial, int n);
- public void getMassFraction(int i);
- public void getFractionOfAtomCount(int i);
- public void lock();
-}
GeomConverter/sandbox/detector
diff -N IPhysicalVolume.java
--- IPhysicalVolume.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-package org.lcsim.detector;
-
-import hep.physics.vec.Hep3Vector;
-
-public interface IPhysicalVolume
-{
- //ILogicalVolume volume();
- String getName();
- ILogicalVolume getLogicalVolume();
- ITransform3D getTransform();
- Hep3Vector parentToLocal(Hep3Vector point);
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IPhysicalVolumeCollection.java
--- IPhysicalVolumeCollection.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-package org.lcsim.detector;
-
-import java.util.Collection;
-
-public interface IPhysicalVolumeCollection
-extends Collection<IPhysicalVolume>
-{}
GeomConverter/sandbox/detector
diff -N IPhysicalVolumePath.java
--- IPhysicalVolumePath.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-package org.lcsim.detector;
-
-import java.util.List;
-
-public interface IPhysicalVolumePath extends List<IPhysicalVolume>
-{}
GeomConverter/sandbox/detector
diff -N IRotation3D.java
--- IRotation3D.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,97 +0,0 @@
-package org.lcsim.detector;
-
-import hep.physics.vec.BasicHep3Matrix;
-import hep.physics.vec.Hep3Matrix;
-import hep.physics.vec.Hep3Vector;
-
-// interface to rotations in 3D space
-interface IRotation3D
-{
- public static final int XCol=0, YCol=1, ZCol=2,XRow=0,YRow=1,ZRow=2;
- public static final int XX=0, XY=1, XZ=2, YX=3, YY=4, YZ=5, ZX=6, ZY=7, ZZ=8;
-
- // returns a copy of the rotation matrix
- public BasicHep3Matrix getRotationMatrix();
-
- public void setRotationMatrix(Hep3Matrix matrix);
- public void setRotationMatrix(BasicHep3Matrix matrix);
- public void setRotationMatrix(double [][] arr);
-
- public void setTaitBryan(double alpha, double beta, double gamma);
- public void setPassiveEuler(double phi, double theta, double psi);
- public void setActiveEuler(double phi, double theta, double psi);
-
- public void setComponents(double xx, double xy, double xz, double yx, double yy, double yz, double zx, double zy, double zz);
- public double[] getComponents();
-
- public void invert();
- public IRotation3D inverse();
- public double trace();
-
- public double xx();
- public double xy();
- public double xz();
-
- public double yx();
- public double yy();
- public double yz();
-
- public double zx();
- public double zy();
- public double zz();
-
- // these return new objects
- // and don't effect the rotation
- // in place; use set methods
- public Hep3Vector getColumnX();
- public Hep3Vector getColumnY();
- public Hep3Vector getColumnZ();
-
- public Hep3Vector getRowX();
- public Hep3Vector getRowY();
- public Hep3Vector getRowZ();
-
- public void setRow(int row, Hep3Vector vec);
- public void setRow(int row, double[] vec);
- public void setRow(int row, double a, double b, double c);
-
- public void setColumn(int col, Hep3Vector vec);
- public void setColumn(int col, double[] vec);
- public void setColumn(int col, double x, double y, double z);
-
- public void setColumnX(Hep3Vector vec);
- public void setColumnX(double[] arr);
- public void setColumnX(double x, double y, double z);
-
- public void setColumnY(Hep3Vector vec);
- public void setColumnY(double [] arr);
- public void setColumnY(double x, double y, double z);
-
- public void setColumnZ(Hep3Vector vec);
- public void setColumnZ(double [] arr);
- public void setColumnZ(double x, double y, double z);
-
- public void setRowX(Hep3Vector vec);
- public void setRowX(double [] arr);
- public void setRowX(double x, double y, double z);
-
- public void setRowY(Hep3Vector vec);
- public void setRowY(double [] arr);
- public void setRowY(double x, double y, double z);
-
- public void setRowZ(Hep3Vector vec);
- public void setRowZ(double [] arr);
- public void setRowZ(double x, double y, double z);
-
- // set element
- public void set(int row, int col, double v);
-
- // get element
- public double get(int row, int col);
-
- // get ith element
- public double get(int i);
-
- // resets the rotation to the identity matrix
- public void resetToIdentity();
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N IReadout.java
--- IReadout.java 1 Mar 2007 19:20:21 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-package org.lcsim.detector;
-
-import java.util.List;
-
-public interface IReadout
-{
- String name();
- IDigitContainer getDigitCollection();
- List<IDigitContainer> digitCollections();
- String[] digitCollectionNames();
- int numberOfDigitCollections();
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N ITransform3D.java
--- ITransform3D.java 28 Feb 2007 19:48:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-package org.lcsim.detector;
-
-public interface ITransform3D
-{
- IRotation3D rotation();
- ITranslation3D translation();
-}
GeomConverter/sandbox/detector
diff -N ITranslation3D.java
--- ITranslation3D.java 28 Feb 2007 19:48:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-package org.lcsim.detector;
-
-public interface ITranslation3D {
-
-}
GeomConverter/sandbox/detector
diff -N LVolume.java
--- LVolume.java 28 Feb 2007 19:48:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-/*
- * LVolume.java
- *
- * Created on October 9, 2006, 3:15 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package org.lcsim.contrib.subdetector.tracker.silicon;
-
-import org.lcsim.material.Material;
-import org.lcsim.material.MaterialManager;
-import org.lcsim.material.MaterialNotFoundException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.jdom.Element;
-import org.jdom.JDOMException;
-
-/**
- *
- * @author tknelson
- */
-public class LVolume
-{
- // Fields
- protected String _name;
- protected Material _material;
- protected ISolid _solid;
- protected List<PVolume> _pvolumes = new ArrayList<PVolume>();
-
- public LVolume(String name, ISolid solid, Material material)
- {
- _name = name;
- _solid = solid;
- _material = material;
- }
-
- public LVolume(Element lvolume) throws JDOMException
- {
- buildFromXML(lvolume);
- }
-
- // Accessors
- //==========
- public String getName()
- {
- return _name;
- }
-
- public Material getMaterial()
- {
- return _material;
- }
-
- public ISolid getSolid()
- {
- return _solid;
- }
-
- public List<PVolume> getPVolumes()
- {
- return _pvolumes;
- }
-
- public void addPVolume(PVolume pvolume)
- {
- _pvolumes.add(pvolume);
- }
-
- public void buildFromXML(Element lvolume)
- {
- // Create name
- _name = lvolume.getAttributeValue("name");
-
- // Create material
- try
- {
- _material = MaterialManager.findMaterial(lvolume.getAttributeValue("material"));
- }
- catch (MaterialNotFoundException mnfe)
- {
- throw new RuntimeException(mnfe);
- }
-
- // Create solid
- Element solid = lvolume.getChild("solid");
- String shape = solid.getAttributeValue("shape");
- if (shape=="box") _solid = new Box(solid);
- if (shape=="tubesegment") _solid = new TubeSegment(solid);
-
- // Add physical volumes
- for (Iterator i = lvolume.getChildren("pvolume").iterator(); i.hasNext();)
- {
- addPVolume( new PVolume((Element)i.next()) ) ;
- }
-
- }
-
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N PVolume.java
--- PVolume.java 28 Feb 2007 19:48:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,107 +0,0 @@
-/*
- * PVolume.java
- *
- * Created on November 2, 2006, 5:17 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package org.lcsim.contrib.subdetector.tracker.silicon;
-
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.BasicHep3Vector;
-import org.jdom.Element;
-import org.jdom.DataConversionException;
-
-/**
- *
- * @author tknelson
- */
-public class PVolume
-{
-
- private String _name;
- private String _lvolume_name;
- private CoordinateTransformation3D _parent_to_local = new CoordinateTransformation3D();
-
- /** Creates a new instance of PVolume */
- public PVolume(String name, String lvolume_name, CoordinateTransformation3D parent_to_local)
- {
- _name = name;
- _lvolume_name = lvolume_name;
- _parent_to_local = parent_to_local;
- }
-
- public PVolume(Element pvolume)
- {
- buildFromXML(pvolume);
- }
-
- // Accessors
- //==========
- public String getName()
- {
- return _name;
- }
-
- public String getLVolumeName()
- {
- return _lvolume_name;
- }
-
- public LVolume getLVolume(String name)
- {
- return GeometryCatalog.getInstance().getLVolume(_lvolume_name);
- }
-
- public CoordinateTransformation3D getParentToLocal()
- {
- return _parent_to_local;
- }
-
- public Hep3Vector parentToLocal(Hep3Vector parent_point)
- {
- return _parent_to_local.transform(parent_point);
- }
-
- public void buildFromXML(Element pvolume)
- {
- // Create name
- _name = pvolume.getAttributeValue("name");
-
- // Create lvolume name
- _lvolume_name = pvolume.getAttributeValue("lvolume");
-
- // Create CoordinateTransformation3D
- Element trans = pvolume.getChild("posXYZ");
- Hep3Vector translation = null;
- try
- {
- translation = new BasicHep3Vector(trans.getAttribute("x").getDoubleValue(),
- trans.getAttribute("y").getDoubleValue(),
- trans.getAttribute("z").getDoubleValue());
- }
- catch (DataConversionException dce)
- {
- System.out.println("Cannot convert translation to double!");
- }
-
- Element rot = pvolume.getChild("rotXYZ");
- Hep3Rotation rotation = null;
- try
- {
- rotation = Hep3Rotation.passiveTaitBryan(rot.getAttribute("rot_x").getDoubleValue(),
- rot.getAttribute("rot_y").getDoubleValue(),
- rot.getAttribute("rot_z").getDoubleValue());
- }
- catch (DataConversionException dce)
- {
- System.out.println("Cannot convert rotation to double!");
- }
-
- _parent_to_local = new CoordinateTransformation3D(translation,rotation);
-
- }
-
-}
GeomConverter/sandbox/detector
diff -N Rotation3D.java
--- Rotation3D.java 28 Feb 2007 19:48:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,435 +0,0 @@
-/*
- * Hep3Rotation.java
- */
-
-package org.lcsim.detector;
-
-import hep.physics.vec.BasicHep3Matrix;
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.Hep3Matrix;
-import hep.physics.vec.VecOp;
-
-import java.io.PrintStream;
-
-/**
- *
- * @author Tim Nelson <[log in to unmask]>
- * @author Jeremy McCormick <[log in to unmask]>
- */
-public class Rotation3D implements IRotation3D
-{
- public static final int XCol=0, YCol=1, ZCol=2,XRow=0,YRow=1,ZRow=2;
-
- private BasicHep3Matrix matrix = BasicHep3Matrix.identity();
-
- public Rotation3D()
- {}
-
- public void setRotationMatrix(Hep3Matrix matrix)
- {
- this.matrix = (BasicHep3Matrix)matrix;
- }
-
- /**
- * Transform rotation using Tait-Bryan convention.
- * @param alpha
- * @param beta
- * @param gamma
- */
- public void setTaitBryan(double alpha, double beta, double gamma)
- {
- matrix = passiveTaitBryan(alpha,beta,gamma);
- }
-
- public void setPassiveEuler(double phi, double theta, double psi)
- {
- matrix.setPassiveEuler(phi,theta,psi);
- }
-
- public void setActiveEuler(double phi, double theta, double psi)
- {
- matrix.setActiveEuler(phi,theta,psi);
- }
-
- // Static Methods
- //===============
- public static BasicHep3Matrix passiveEuler(double phi, double theta, double psi)
- {
- BasicHep3Matrix matrix = new BasicHep3Matrix();
- matrix.setPassiveEuler(phi,theta,psi);
- return matrix;
- }
-
- public static BasicHep3Matrix passiveTaitBryan(double alpha, double beta, double gamma)
- {
- return (BasicHep3Matrix)VecOp.mult(passiveZRotation(gamma),VecOp.mult(passiveYRotation(beta),passiveXRotation(alpha)));
- }
-
- public static BasicHep3Matrix passiveXRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- BasicHep3Matrix rotation = BasicHep3Matrix.identity();
- rotation.setElement(1,1,cos);
- rotation.setElement(1,2,sin);
- rotation.setElement(2,1,-sin);
- rotation.setElement(2,2,cos);
- return rotation;
- }
-
- public static BasicHep3Matrix passiveYRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- BasicHep3Matrix rotation = BasicHep3Matrix.identity();
- rotation.setElement(0,0,cos);
- rotation.setElement(0,2,sin);
- rotation.setElement(2,0,-sin);
- rotation.setElement(2,2,cos);
- return rotation;
- }
-
- public static BasicHep3Matrix passiveZRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- BasicHep3Matrix rotation = BasicHep3Matrix.identity();
- rotation.setElement(0,0,cos);
- rotation.setElement(0,1,sin);
- rotation.setElement(1,0,-sin);
- rotation.setElement(1,1,cos);
- return rotation;
- }
-
- public void invert()
- {
- matrix.transpose();
- }
-
- public IRotation3D inverse()
- {
- BasicHep3Matrix inversematrix = new BasicHep3Matrix(matrix);
- inversematrix.invert();
- return new Rotation3D(inversematrix);
- }
-
- public double xx()
- {
- return matrix.e(0,0);
- }
-
- public double xy()
- {
- return matrix.e(0,1);
- }
-
- public double xz()
- {
- return matrix.e(0,2);
- }
-
- public double yx()
- {
- return matrix.e(1,0);
- }
-
- public double yy()
- {
- return matrix.e(1,1);
- }
-
- public double yz()
- {
- return matrix.e(1,2);
- }
-
- public double zx()
- {
- return matrix.e(2,0);
- }
-
- public double zy()
- {
- return matrix.e(2,1);
- }
-
- public double zz()
- {
- return matrix.e(2,2);
- }
-
- public Hep3Vector getColumnX()
- {
- return new BasicHep3Vector(xx(),yx(),zx());
- }
-
- public Hep3Vector getColumnY()
- {
- return new BasicHep3Vector(xy(),yy(),zy());
- }
-
- public Hep3Vector getColumnZ()
- {
- return new BasicHep3Vector(xz(),yz(),zz());
- }
-
- public Hep3Vector getRowX()
- {
- return new BasicHep3Vector(xx(),xy(),xz());
- }
-
- public Hep3Vector getRowY()
- {
- return new BasicHep3Vector(yx(),yy(),yz());
- }
-
- public Hep3Vector getRowZ()
- {
- return new BasicHep3Vector(zx(),zy(),zz());
- }
-
- public void printOut(PrintStream ps)
- {
- ps.print("[");
- ps.println();
-
- BasicHep3Matrix m = getRotationMatrix();
-
- for (int i=0; i<3; i++)
- {
- ps.printf("%.4f %.4f %.4f", m.e(i,0), m.e(i,1), m.e(i,2));
- ps.println();
- }
-
- ps.print("]");
- ps.println('\n');
- }
-
- public void setColumn(int col, double[] arr)
- {
- assert(col >=0 && col <=3);
- assert(arr.length>2);
- for (int i=0; i<3; i++)
- {
- set(i,col,arr[i]);
- }
- }
-
- public void setColumn(int col, Hep3Vector vec)
- {
- setColumn(col,vec.v());
- }
-
- public void setRow(int row, double[] arr)
- {
- assert(row >=0 && row <=3);
- assert(row >=0 && row <=3);
- for (int i=0; i<3; i++)
- {
- set(row, i, arr[i]);
- }
- }
-
- public void setRow(int row, Hep3Vector vec)
- {
- setRow(row,vec.v());
- }
-
- public void setColumnX(double[] arr) {
- setColumn(0,arr);
- }
-
- public void setColumnX(Hep3Vector vec) {
- setColumnX(vec.v());
- }
-
- public void setColumnY(double[] arr)
- {
- setColumn(1,arr);
- }
-
- public void setColumnY(Hep3Vector vec) {
- setColumnY(vec.v());
- }
-
- public void setColumnZ(double[] arr)
- {
- setColumn(2,arr);
- }
-
- public void setColumnZ(Hep3Vector vec) {
- setColumnZ(vec.v());
- }
-
- public void setRowX(double[] arr) {
- setRow(0,arr);
- }
-
- public void setRowX(Hep3Vector vec)
- {
- setRowX(vec.v());
- }
-
- public void setRowY(double[] arr)
- {
- setRow(1,arr);
- }
-
- public void setRowY(Hep3Vector vec) {
- setRowY(vec.v());
- }
-
- public void setRowZ(double[] arr) {
- setRow(2,arr);
- }
-
- public void setRowZ(Hep3Vector vec) {
- setRowZ(vec.v());
- }
-
- public Rotation3D(BasicHep3Matrix matrix)
- {
- setRotationMatrix(matrix);
- }
-
- public Rotation3D(Hep3Matrix matrix)
- {
- setRotationMatrix((BasicHep3Matrix)matrix);
- }
-
- public void set(int i, int j, double v)
- {
- matrix.setElement(i,j,v);
- }
-
- public void setColumn(int col, double x, double y, double z)
- {
- setColumn(col, new double[]{x,y,z});
- }
-
- public void setColumnX(double x, double y, double z) {
- setColumnX(new double[]{x,y,z});
- }
-
- public void setColumnY(double x, double y, double z) {
- setColumnY(new double[]{x,y,z});
- }
-
- public void setColumnZ(double x, double y, double z) {
- setColumnZ(new double[]{x,y,z});
- }
-
- public void setRow(int row, double a, double b, double c)
- {
- setRow(row,new double[]{a,b,c});
- }
-
- public void setComponents(double xx, double xy, double xz, double yx, double yy, double yz, double zx, double zy, double zz)
- {
- setRowX(xx,xy,xz);
- setRowY(yx,yy,yz);
- setRowZ(zx,zy,zz);
- }
-
- public double[] getComponents()
- {
- double[] arr = new double[9];
- int c=0;
- for (int i=0; i<3; i++)
- {
- for (int j=0; j<3; j++)
- {
- arr[c]=matrix.e(i,j);
- c++;
- }
- }
- return arr;
- }
-
- public void setRowX(double xx, double xy, double xz)
- {
- set(0,0,xx);
- set(0,1,xy);
- set(0,2,xz);
- }
-
- public void setRowY(double yx, double yy, double yz)
- {
- set(1,0,yx);
- set(1,1,yy);
- set(1,2,yz);
- }
-
- public void setRowZ(double zx, double zy, double zz)
- {
- set(2,0,zx);
- set(2,1,zy);
- set(2,2,zz);
- }
-
- // set from row,col array of at least size 3x3
- public void setRotationMatrix(double [][] a)
- {
- matrix = new BasicHep3Matrix();
- for (int i=0; i<3; i++)
- {
- for (int j=0; j<3; j++)
- {
- set(i, j, a[i][j]);
- }
- }
- }
-
- public void resetToIdentity()
- {
- matrix = BasicHep3Matrix.identity();
- }
-
- public double trace()
- {
- return matrix.trace();
- }
-
- public BasicHep3Matrix getRotationMatrix()
- {
- return this.matrix;
- }
-
- public void setRotationMatrix(BasicHep3Matrix matrix)
- {
- this.matrix = matrix;
- }
-
- public double get(int r, int c)
- {
- return matrix.e(r,c);
- }
-
- public double get(int i)
- {
- switch (i)
- {
- case XX:
- return xx();
- case XY:
- return xy();
- case XZ:
- return xz();
- case YX:
- return yx();
- case YY:
- return yy();
- case YZ:
- return yz();
- case ZX:
- return zx();
- case ZY:
- return zy();
- case ZZ:
- return zz();
- default:
- throw new IllegalArgumentException("Invalid matrix element : " + i );
- }
- }
-}
\ No newline at end of file
GeomConverter/sandbox/detector
diff -N RotationMatrix3D.java
--- RotationMatrix3D.java 28 Feb 2007 19:48:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,230 +0,0 @@
-/*
- * Hep3Rotation.java
- */
-
-//package org.lcsim.contrib.subdetector.tracker.silicon;
-
-package org.lcsim.detector.kernel;
-
-import hep.physics.vec.BasicHep3Matrix;
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.BasicHep3Matrix;
-import hep.physics.vec.Hep3Matrix;
-import hep.physics.vec.VecOp;
-
-import java.io.PrintStream;
-
-/**
- *
- * @author tknelson
- */
-public class RotationMatrix3D
-{
- private BasicHep3Matrix matrix = BasicHep3Matrix.identity();
-
- // Fields
- //=======
- /**
- * Create a new Hep3Rotation containing the identify matrix.
- */
- public RotationMatrix3D()
- {}
-
- /**
- * Create a new Hep3Rotation from a 3x3 matrix.
- * @param matrix
- */
- public RotationMatrix3D(BasicHep3Matrix matrix)
- {
- setMatrix(matrix);
- }
-
- public RotationMatrix3D(Hep3Matrix matrix)
- {
- setMatrix((BasicHep3Matrix)matrix);
- }
-
- public BasicHep3Matrix getMatrix()
- {
- return this.matrix;
- }
-
- public void setMatrix(BasicHep3Matrix matrix)
- {
- this.matrix = matrix;
- }
-
- /**
- * Transform rotation using Tait-Bryan convention.
- * @param alpha
- * @param beta
- * @param gamma
- */
- public void setTaitBryan(double alpha, double beta, double gamma)
- {
- matrix = passiveTaitBryan(alpha,beta,gamma);
- }
-
- public void setPassiveEuler(double phi, double theta, double psi)
- {
- matrix.setPassiveEuler(phi,theta,psi);
- }
-
- public static BasicHep3Matrix passiveEuler(double phi, double theta, double psi)
- {
- BasicHep3Matrix matrix = new BasicHep3Matrix();
- matrix.setPassiveEuler(phi,theta,psi);
- return matrix;
- }
-
- // Static Methods
- //===============
- public static BasicHep3Matrix passiveTaitBryan(double alpha, double beta, double gamma)
- {
- return (BasicHep3Matrix)VecOp.mult(passiveZRotation(gamma),VecOp.mult(passiveYRotation(beta),passiveXRotation(alpha)));
- }
-
- public static BasicHep3Matrix passiveXRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- //Hep3Rotation rotation = new Hep3Rotation();
- BasicHep3Matrix rotation = new BasicHep3Matrix();
- rotation.setElement(0,0,cos);
- rotation.setElement(0,1,sin);
- rotation.setElement(1,0,-sin);
- rotation.setElement(1,1,cos);
- return rotation;
- }
-
- public static BasicHep3Matrix passiveYRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- //Hep3Rotation rotation = new Hep3Rotation();
- BasicHep3Matrix rotation = new BasicHep3Matrix();
-
- // FIXME: Off by 1 error! Indexed from 0.
- //rotation.setElement(1,3,-sin);
- //rotation.setElement(3,1,sin);
- //rotation.setElement(3,3,cos);
-
- // FIXME: Is this correct?
- rotation.setElement(1,1,cos);
- rotation.setElement(1,2,sin);
- rotation.setElement(2,1,-sin);
- rotation.setElement(2,2,cos);
- return rotation;
- }
-
- public static BasicHep3Matrix passiveZRotation(double angle)
- {
- double sin = Math.sin(angle);
- double cos = Math.cos(angle);
- //Hep3Rotation rotation = new Hep3Rotation();
- BasicHep3Matrix rotation = new BasicHep3Matrix();
- rotation.setElement(0,0,cos);
- rotation.setElement(0,1,sin);
- rotation.setElement(1,0,-sin);
- rotation.setElement(1,1,cos);
- return rotation;
- }
-
- public void invert()
- {
- matrix.invert();
- }
-
- public double xx()
- {
- return matrix.e(0,0);
- }
-
- public double xy()
- {
- return matrix.e(0,1);
- }
-
- public double xz()
- {
- return matrix.e(0,2);
- }
-
- public double yx()
- {
- return matrix.e(1,0);
- }
-
- public double yy()
- {
- return matrix.e(1,1);
- }
-
- public double yz()
- {
- return matrix.e(1,2);
- }
-
- public double zx()
- {
- return matrix.e(2,0);
- }
-
- public double zy()
- {
- return matrix.e(2,1);
- }
-
- public double zz()
- {
- return matrix.e(2,2);
- }
-
- Hep3Vector colX()
- {
- return new BasicHep3Vector(matrix.e(0,0),matrix.e(1,0),matrix.e(2,0));
- }
-
- Hep3Vector colY()
- {
- return new BasicHep3Vector(matrix.e(0,1),matrix.e(1,1),matrix.e(2,1));
- }
-
- Hep3Vector colZ()
- {
- return new BasicHep3Vector(matrix.e(0,2),matrix.e(1,2),matrix.e(2,2));
- }
-
- Hep3Vector rowX()
- {
- return new BasicHep3Vector(matrix.e(0,0),matrix.e(0,1),matrix.e(0,2));
- }
-
- Hep3Vector rowY()
- {
- return new BasicHep3Vector(matrix.e(1,0),matrix.e(1,1),matrix.e(1,2));
- }
-
- Hep3Vector rowZ()
- {
- return new BasicHep3Vector(matrix.e(2,0),matrix.e(2,1),matrix.e(2,2));
- }
-
- public void printOut(PrintStream ps)
- {
- ps.print("[");
- ps.println();
-
- BasicHep3Matrix m = getMatrix();
-
- for (int i=0; i<3; i++)
- {
- ps.printf("%.4f %.4f %.4f", m.e(i,0), m.e(i,1), m.e(i,2));
- ps.println();
- }
-
- ps.print("]");
- ps.println('\n');
- }
-}
\ No newline at end of file
CVSspam 0.2.8