graxml-commit Mailing List for GraXML
Brought to you by:
hrivnac
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
|
Aug
(12) |
Sep
(32) |
Oct
(41) |
Nov
(16) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(10) |
Feb
(10) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(12) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
(169) |
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(100) |
Nov
(14) |
Dec
(10) |
2008 |
Jan
(37) |
Feb
(4) |
Mar
(10) |
Apr
(73) |
May
(22) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Julius H. <hr...@us...> - 2008-07-29 12:11:24
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11442/atlantis/graxml3d/doc-files Modified Files: Atlantis3D.html Atlantis3DPrint.html Log Message: MDT and RPC added Index: Atlantis3D.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files/Atlantis3D.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Atlantis3D.html 23 May 2008 14:15:34 -0000 1.3 --- Atlantis3D.html 29 Jul 2008 12:11:29 -0000 1.4 *************** *** 72,75 **** --- 72,80 ---- <li>SiCluster</li> <li>STr <small>(simplified)</small></li> + <li>TRT</li> + <li>LAr</li> + <li>TILE</li> + <li>MDT</li> + <li>RPC</li> <li>InDetTrack <small>(only some descriptions)</small></li> <li>Jet</li> Index: Atlantis3DPrint.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files/Atlantis3DPrint.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Atlantis3DPrint.html 23 May 2008 14:15:41 -0000 1.2 --- Atlantis3DPrint.html 29 Jul 2008 12:11:29 -0000 1.3 *************** *** 71,74 **** --- 71,79 ---- <li>SiCluster</li> <li>STr <small>(simplified)</small></li> + <li>TRT</li> + <li>LAr</li> + <li>TILE</li> + <li>MDT</li> + <li>RPC</li> <li>InDetTrack <small>(only some descriptions)</small></li> <li>Jet</li> |
From: Julius H. <hr...@us...> - 2008-07-29 12:11:23
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11442/atlantis/graxml3d Modified Files: GraXMLBridge.java Log Message: MDT and RPC added Index: GraXMLBridge.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/GraXMLBridge.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GraXMLBridge.java 29 May 2008 10:13:16 -0000 1.3 --- GraXMLBridge.java 29 Jul 2008 12:11:27 -0000 1.4 *************** *** 28,31 **** --- 28,35 ---- import atlantis.event.ASTrData; import atlantis.event.ATRTData; + import atlantis.event.ALArData; + import atlantis.event.ATILEData; + import atlantis.event.AMDTData; + import atlantis.event.ARPCData; import atlantis.event.AInDetTrackData; import atlantis.event.AJetData; *************** *** 77,80 **** --- 81,87 ---- * <pre> * $Log$ + * Revision 1.4 2008/07/29 12:11:27 hrivnac + * MDT and RPC added + * * Revision 1.3 2008/05/29 10:13:16 hrivnac * TRT added *************** *** 132,135 **** --- 139,146 ---- else if (data instanceof ASTrData ) convertSTr ((ASTrData )data); else if (data instanceof ATRTData ) convertTRT ((ATRTData )data); + else if (data instanceof ALArData ) convertLAr ((ALArData )data); + else if (data instanceof ATILEData ) convertTILE ((ATILEData )data); + else if (data instanceof AMDTData ) convertMDT ((AMDTData )data); + else if (data instanceof ARPCData ) convertRPC ((ARPCData )data); else if (data instanceof AInDetTrackData) convertInDetTrack((AInDetTrackData)data); else if (data instanceof AJetData ) convertJet ((AJetData )data); *************** *** 327,330 **** --- 338,521 ---- } + /** Convert Atlantis structures to GraXML JAXB tree for <em>LAr</em>. + * @param data Selected {@link ALArData}. */ + private void convertLAr(ALArData data) { + float[] etas = data.getEta(); + float[] phis = data.getPhi(); + float[] energys = data.getEnergy(); + int[] ids = data.getId(); + String etaString = ""; + String phiString = ""; + String energyString = ""; + String idString = ""; + for (int j = 0; j < _drawList.length; j++) { + etaString += etas [_drawList[j]] + " "; + phiString += phis [_drawList[j]] + " "; + energyString += energys[_drawList[j]] + " "; + idString += ids [_drawList[j]] + " "; + } + EtaType eta = new EtaType(); + PhiType phi = new PhiType(); + EnergyType energy = new EnergyType(); + IdType id = new IdType(); + eta.setValue(etaString); + phi.setValue(phiString); + energy.setValue(energyString); + id.setValue(idString); + LArType entry = new LArType(); + entry.setCount(_drawList.length); + entry.setStoreGateKey(data.getStoreGateKey()); + entry.setEta(eta); + entry.setPhi(phi); + entry.setEnergy(energy); + entry.setId(id); + _dataElements.add(entry); + LAr.setColors(_colorMap, data.getColor(_drawList)); + } + + /** Convert Atlantis structures to GraXML JAXB tree for <em>TILE</em>. + * @param data Selected {@link ATILEData}. */ + private void convertTILE(ATILEData data) { + float[] etas = data.getEta(); + float[] phis = data.getPhi(); + float[] energys = data.getEnergy(); + int[] ids = data.getId(); + String etaString = ""; + String phiString = ""; + String energyString = ""; + String idString = ""; + for (int j = 0; j < _drawList.length; j++) { + etaString += etas [_drawList[j]] + " "; + phiString += phis [_drawList[j]] + " "; + energyString += energys[_drawList[j]] + " "; + idString += ids [_drawList[j]] + " "; + } + EtaType eta = new EtaType(); + PhiType phi = new PhiType(); + EnergyType energy = new EnergyType(); + IdType id = new IdType(); + eta.setValue(etaString); + phi.setValue(phiString); + energy.setValue(energyString); + id.setValue(idString); + TILEType entry = new TILEType(); + entry.setCount(_drawList.length); + entry.setStoreGateKey(data.getStoreGateKey()); + entry.setEta(eta); + entry.setPhi(phi); + entry.setEnergy(energy); + entry.setId(id); + _dataElements.add(entry); + TILE.setColors(_colorMap, data.getColor(_drawList)); + } + + /** Convert Atlantis structures to GraXML JAXB tree for <em>MDT</em>. + * @param data Selected {@link AMDTData}. */ + private void convertMDT(AMDTData data) { + float[] xs = data.getX(); + float[] ys = data.getY(); + float[] zs = data.getZ(); + float[] lengths = data.getLength(); + float[] drifts = data.getDriftR(); + int[] ids = data.getId(); + String[] identifiers = data.getIdentifier(); + String xString = ""; + String yString = ""; + String zString = ""; + String lengthString = ""; + String driftString = ""; + String idString = ""; + String identifierString = ""; + for (int j = 0; j < _drawList.length; j++) { + xString += xs [_drawList[j]] + " "; + yString += ys [_drawList[j]] + " "; + zString += zs [_drawList[j]] + " "; + lengthString += lengths [_drawList[j]] + " "; + driftString += drifts [_drawList[j]] + " "; + idString += ids [_drawList[j]] + " "; + identifierString += identifiers [_drawList[j]] + " "; + } + XType x = new XType(); + YType y = new YType(); + ZType z = new ZType(); + LengthType length = new LengthType(); + DriftRType drift = new DriftRType(); + IdType id = new IdType(); + IdentifierType identifier = new IdentifierType(); + x.setValue(zString); + y.setValue(yString); + z.setValue(zString); + length.setValue(lengthString); + drift.setValue(driftString); + id.setValue(idString); + identifier.setValue(identifierString); + MDTType entry = new MDTType(); + entry.setCount(_drawList.length); + entry.setStoreGateKey(data.getStoreGateKey()); + entry.setX(x); + entry.setY(y); + entry.setZ(z); + entry.setLength(length); + entry.setDriftR(drift); + entry.setId(id); + entry.setIdentifier(identifier); + _dataElements.add(entry); + MDT.setColors(_colorMap, data.getColor(_drawList)); + } + + /** Convert Atlantis structures to GraXML JAXB tree for <em>RPC</em>. + * @param data Selected {@link AMDTData}. */ + private void convertRPC(ARPCData data) { + float[] xs = data.getX(); + float[] ys = data.getY(); + float[] zs = data.getZ(); + float[] lengths = data.getLength(); + float[] widths = data.getWidth(); + int[] ids = data.getId(); + String[] identifiers = data.getIdentifier(); + String xString = ""; + String yString = ""; + String zString = ""; + String lengthString = ""; + String widthString = ""; + String idString = ""; + String identifierString = ""; + for (int j = 0; j < _drawList.length; j++) { + xString += xs [_drawList[j]] + " "; + yString += ys [_drawList[j]] + " "; + zString += zs [_drawList[j]] + " "; + lengthString += lengths [_drawList[j]] + " "; + widthString += widths [_drawList[j]] + " "; + idString += ids [_drawList[j]] + " "; + identifierString += identifiers [_drawList[j]] + " "; + } + XType x = new XType(); + YType y = new YType(); + ZType z = new ZType(); + LengthType length = new LengthType(); + WidthType width = new WidthType(); + IdType id = new IdType(); + IdentifierType identifier = new IdentifierType(); + x.setValue(zString); + y.setValue(yString); + z.setValue(zString); + length.setValue(lengthString); + width.setValue(widthString); + id.setValue(idString); + identifier.setValue(identifierString); + RPCType entry = new RPCType(); + entry.setCount(_drawList.length); + entry.setStoreGateKey(data.getStoreGateKey()); + entry.setX(x); + entry.setY(y); + entry.setZ(z); + entry.setLength(length); + entry.setWidth(width); + entry.setId(id); + entry.setIdentifier(identifier); + _dataElements.add(entry); + RPC.setColors(_colorMap, data.getColor(_drawList)); + } + /** Convert Atlantis structures to GraXML JAXB tree for <em>InDetTrack/Track</em>. * @param data Selected {@link AInDetTrackData}. */ |
From: Julius H. <hr...@us...> - 2008-06-26 17:09:12
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5393/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps Modified Files: MDT.java RPC.java Added Files: LAr.java TILE.java Log Message: LAr and TILE added Index: MDT.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/MDT.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MDT.java 6 Jun 2008 13:27:07 -0000 1.1 --- MDT.java 26 Jun 2008 17:09:18 -0000 1.2 *************** *** 65,68 **** --- 65,71 ---- * <pre> * $Log$ + * Revision 1.2 2008/06/26 17:09:18 hrivnac + * LAr and TILE added + * * Revision 1.1 2008/06/06 13:27:07 hrivnac * MDT + RPC added *************** *** 94,98 **** set(builder, g, "MDTs"); ! // Get Type properties MDTType mdt = (MDTType)element; int count = mdt.getCount(); --- 97,101 ---- set(builder, g, "MDTs"); ! // Get MDTType properties MDTType mdt = (MDTType)element; int count = mdt.getCount(); --- NEW FILE: TILE.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; import net.hep.atlas.graphics.JiveEvent.GeometricModel.Calo; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.TILEType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Atlantis import atlantis.utils.AHashMap; import atlantis.geometry.ACalorimeterDetector; import atlantis.graphics.ACoord; import atlantis.projection.AProjectionRZ; import atlantis.projection.AProjectionYX; import atlantis.utils.AIdHelper; import atlantis.utils.AAtlantisException; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.PointAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.Cuboid; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of <code>TILEType</code> * JiveEvent Type connected via JAXB * {@link net.hep.atlas.graphics.JiveEvent.JAXB.TILEType} generic JAXB interface. * <p><font color="#880088"> * <pre> * $Log: TILE.java,v $ * Revision 1.1 2008/06/26 17:09:18 hrivnac * LAr and TILE added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: TILE.java,v 1.1 2008/06/26 17:09:18 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class TILE extends Calo { public final void traverse(MasterBuilder builder, Object element, Group tg, String parent) { // Set values set(builder, tg, parent); // Verify element type if (! (element instanceof TILEType)) { log.error(element + " can't be traversed using " + getClass().getName() + " representation"); return; } // Create container BranchGroup g = new BranchGroup(); use(g, "TILEs", "TILE Container"); set(builder, g, "TILEs"); // Get LArType properties TILEType tile = (TILEType)element; int count = tile.getCount(); String storeGateKey = tile.getStoreGateKey(); float[] etas = floats( tile.getEta( ).getValue()); float[] phis = floats( tile.getPhi( ).getValue()); float[] energys = floats( tile.getEnergy().getValue()); int[] ids = ints( tile.getId( ).getValue()); int[] subs = ints( tile.getSub( ).getValue()); // Draw all TILEs construct("TILE", count, storeGateKey, etas, phis, energys, ids); } /** Give <code>eta</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>eta </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int etaIndex(int index) throws AAtlantisException { return AIdHelper.tileTower(index); } /** Give <code>phi</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>phi </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int phiIndex(int index) throws AAtlantisException { return AIdHelper.tileModule(index); } /** Give <code>side</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>side </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int sideIndex(int index) throws AAtlantisException { return AIdHelper.tileSide(index); } /** Set {@link Color}s to be used for line segments. * @param colorMap The array of {@link Color}s. * @param colorList The array of {@link Color}s indexes. */ public static void setColors(Color[] colorMap, int[] colorList) { _colorMap = colorMap; _colorList = colorList; _colorI = 0; } /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ protected Color3f color() { if (_colorList == null) { return null; } return new Color3f(_colorMap[_colorList[_colorI++]]); } private static Color[] _colorMap; private static int[] _colorList; private static int _colorI; /** Logging . */ private static Logger log = Logger.getLogger(TILE.class); } Index: RPC.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/RPC.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RPC.java 6 Jun 2008 13:27:11 -0000 1.1 --- RPC.java 26 Jun 2008 17:09:18 -0000 1.2 *************** *** 65,68 **** --- 65,71 ---- * <pre> * $Log$ + * Revision 1.2 2008/06/26 17:09:18 hrivnac + * LAr and TILE added + * * Revision 1.1 2008/06/06 13:27:11 hrivnac * MDT + RPC added *************** *** 130,142 **** Material material; Color3f color; - double x0; - double y0; - double z0; - double r0; - double x1; - double y1; - double z1; - double r1; - boolean barrel; // Set base Tg _baseTg = tg(); --- 133,136 ---- --- NEW FILE: LAr.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; import net.hep.atlas.graphics.JiveEvent.GeometricModel.Calo; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.LArType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Atlantis import atlantis.utils.AHashMap; import atlantis.geometry.ACalorimeterDetector; import atlantis.graphics.ACoord; import atlantis.projection.AProjectionRZ; import atlantis.projection.AProjectionYX; import atlantis.utils.AIdHelper; import atlantis.utils.AAtlantisException; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.PointAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.Cuboid; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of <code>LArType</code> * JiveEvent Type connected via JAXB * {@link net.hep.atlas.graphics.JiveEvent.JAXB.LArType} generic JAXB interface. * <p><font color="#880088"> * <pre> * $Log: LAr.java,v $ * Revision 1.4 2008/06/26 17:09:18 hrivnac * LAr and TILE added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: LAr.java,v 1.4 2008/06/26 17:09:18 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class LAr extends Calo { public final void traverse(MasterBuilder builder, Object element, Group tg, String parent) { // Set values set(builder, tg, parent); // Verify element type if (! (element instanceof LArType)) { log.error(element + " can't be traversed using " + getClass().getName() + " representation"); return; } // Create container BranchGroup g = new BranchGroup(); use(g, "LArs", "LAr Container"); set(builder, g, "LArs"); // Get LArType properties LArType lar = (LArType)element; int count = lar.getCount(); String storeGateKey = lar.getStoreGateKey(); float[] etas = floats( lar.getEta( ).getValue()); float[] phis = floats( lar.getPhi( ).getValue()); float[] energys = floats( lar.getEnergy().getValue()); int[] ids = ints( lar.getId( ).getValue()); int[] subs = ints( lar.getSub( ).getValue()); // Draw all LArs construct("LAr", count, storeGateKey, etas, phis, energys, ids); } /** Give <code>eta</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>eta </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int etaIndex(int index) throws AAtlantisException { return AIdHelper.larEta(index); } /** Give <code>phi</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>phi </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int phiIndex(int index) throws AAtlantisException { return AIdHelper.larPhi(index); } /** Give <code>side</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>side </code>index. * @throws AAtlantisException if index cannot be mapped. */ protected int sideIndex(int index) throws AAtlantisException { return AIdHelper.larBarrelEndcap(index); } /** Set {@link Color}s to be used for line segments. * @param colorMap The array of {@link Color}s. * @param colorList The array of {@link Color}s indexes. */ public static void setColors(Color[] colorMap, int[] colorList) { _colorMap = colorMap; _colorList = colorList; _colorI = 0; } /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ protected Color3f color() { if (_colorList == null) { return null; } return new Color3f(_colorMap[_colorList[_colorI++]]); } private static Color[] _colorMap; private static int[] _colorList; private static int _colorI; /** Logging . */ private static Logger log = Logger.getLogger(LAr.class); } |
From: Julius H. <hr...@us...> - 2008-06-26 17:09:12
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5393/net/hep/atlas/graphics/JiveEvent/GeometricModel Modified Files: Jet0.java JiveEventBuilder.java Added Files: Calo.java Log Message: LAr and TILE added Index: JiveEventBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/JiveEventBuilder.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** JiveEventBuilder.java 6 Jun 2008 13:26:48 -0000 1.15 --- JiveEventBuilder.java 26 Jun 2008 17:09:18 -0000 1.16 *************** *** 11,14 **** --- 11,17 ---- import atlantis.utils.xml.AXMLUtils; import atlantis.utils.xml.AXMLErrorHandler; + import atlantis.config.ADefaultValues; + import atlantis.geometry.AAtlasDetector; + import atlantis.Atlantis; // Java3D *************** *** 29,32 **** --- 32,37 ---- import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Node; + import java.util.Map; + import java.util.HashMap; /** <code>JiveEventBuilder</code> performs JiveEvent specific part *************** *** 35,38 **** --- 40,46 ---- * <pre> * $Log$ + * Revision 1.16 2008/06/26 17:09:18 hrivnac + * LAr and TILE added + * * Revision 1.15 2008/06/06 13:26:48 hrivnac * MDT + RPC added *************** *** 108,111 **** --- 116,122 ---- // Atlantis + // - ADefaultValues + ADefaultValues.readRuntimeValues(); + // - Apar if (APar.getGroup("Projection") == null) { log.info("Reading Atlantis configuration from " + ATLANTIS_CONFIG); *************** *** 116,119 **** --- 127,131 ---- parser.setErrorHandler(new AXMLErrorHandler()); Node rootNode = parser.parse(getClass().getClassLoader().getResource(ATLANTIS_CONFIG).openStream()).getDocumentElement(); + System.out.println("WWW WWW " + rootNode); new APar(AXMLUtils.getChild(rootNode, "Parameters")); } *************** *** 122,125 **** --- 134,145 ---- } } + // - AAtlasDetector (needed for LAr) + // TBD: include in JiveEvent + if (Atlantis.getDetector() == null) { + String geomIdCalo = "/home/hrivnac/work/Graphics/AtlantisJava/AtlantisJava/geometry/AGeometry.xml"; + String geomMuon = "/home/hrivnac/work/Graphics/AtlantisJava/AtlantisJava/geometry/AMuonGeometry.xml"; + AAtlasDetector detector = new AAtlasDetector(geomIdCalo, geomMuon); + Atlantis.setDetector(detector); + } } Index: Jet0.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Jet0.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Jet0.java 6 Jun 2008 13:26:45 -0000 1.9 --- Jet0.java 26 Jun 2008 17:09:18 -0000 1.10 *************** *** 56,59 **** --- 56,62 ---- * <pre> * $Log$ + * Revision 1.10 2008/06/26 17:09:18 hrivnac + * LAr and TILE added + * * Revision 1.9 2008/06/06 13:26:45 hrivnac * MDT + RPC added *************** *** 139,143 **** EtaType eta, PhiType phi, ! EnergyType e) { construct(type, count, storeGateKey, eta, phi, e.getValue()); } --- 142,146 ---- EtaType eta, PhiType phi, ! EnergyType e) { construct(type, count, storeGateKey, eta, phi, e.getValue()); } --- NEW FILE: Calo.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.LArType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Atlantis import atlantis.utils.AHashMap; import atlantis.geometry.ACalorimeterDetector; import atlantis.graphics.ACoord; import atlantis.projection.AProjectionRZ; import atlantis.projection.AProjectionYX; import atlantis.utils.AIdHelper; import atlantis.utils.AAtlantisException; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.PointAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.Cuboid; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of Calo Types. * <p><font color="#880088"> * <pre> * $Log: Calo.java,v $ * Revision 1.1 2008/06/26 17:09:18 hrivnac * LAr and TILE added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: Calo.java,v 1.1 2008/06/26 17:09:18 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public abstract class Calo extends JiveRep { public abstract void traverse(MasterBuilder builder, Object element, Group tg, String parent); /** Construct Java3D representation of those <em>Calo</em> cells. * @param type The Calo' type (name). * @param count The number of cells in a set. * @param storeGateKey The corresponding <em>StoreGate</em> key. * @param etas The cells' <em>eta</em>s. * @param phis The cell' <em>phi</em>s. * @param energys The cell' <em>energy</em>s. * @param ids The cell' <em>id</em>s. */ protected void construct(String type, int count, String storeGateKey, float[] etas, float[] phis, float[] energys, int[] ids) { // Draw all cells String name; String info; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape; Appearance appearance; Material material; Color3f color; double[][][] rz = null; double[][][] yx = null; Point3d[] points; double zMin; double zMax; int det; ACalorimeterDetector detector; AProjectionRZ rzProjection = new AProjectionRZ(); AProjectionYX yxProjection = new AProjectionYX(); ACoord coordRZ; ACoord coordYX; // Loop over cells for (int i = 0; i < count; i++) { name = type + "(" + storeGateKey + "/" + i + ")"; info = name; color = color(); // ColorList is set => get Appearance from Color if (color == null) { color = new Color3f(); appearance = builder().appearance(name, name); material = appearance.getMaterial(); material.getSpecularColor(color); } // ColorList is not set => get Color from Appearance else { appearance = new Appearance(); appearance.setMaterial(new Material(color, color, color, color, 1f)); } appearance. setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f)); setAppearance(appearance); // Construct and Use cells det = ACalorimeterDetector.getDetectorIndex(ids[i]); detector = ACalorimeterDetector.get(det); try { coordRZ = detector.getCell(rzProjection, etaIndex(ids[i]), phiIndex(ids[i]), sideIndex(ids[i])); rz = coordRZ.hv; coordYX = detector.getCell(yxProjection, etaIndex(ids[i]), phiIndex(ids[i]), sideIndex(ids[i])); yx = coordYX.hv; zMin = rz[0][0][0]; zMax = rz[0][0][0]; for (int j = 0; j < rz[0][0].length; j++) { if (rz[0][0][j] < zMin) zMin = rz[0][0][j]; if (rz[0][0][j] > zMin) zMax = rz[0][0][j]; } points = new Point3d[]{new Point3d(yx[0][0][0], yx[1][0][0], zMin), new Point3d(yx[0][0][1], yx[1][0][1], zMin), new Point3d(yx[0][0][2], yx[1][0][2], zMin), new Point3d(yx[0][0][3], yx[1][0][3], zMin), new Point3d(yx[0][0][0], yx[1][0][0], zMax), new Point3d(yx[0][0][1], yx[1][0][1], zMax), new Point3d(yx[0][0][2], yx[1][0][2], zMax), new Point3d(yx[0][0][3], yx[1][0][3], zMax)}; for (Point3d point : points) { point.scale(1.0 / builder().norm()); } shape = new Cuboid(points, appearance); shape.setAppearance(appearance); use(shape, name, info); } catch (AAtlantisException e) { log.error("Atlantis Calo cell cannot be processed", e); } } Interacter.setOutlined(outlinedBckp); } /** Give <code>eta</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>eta </code>index. * @throws AAtlantisException if index cannot be mapped. */ abstract protected int etaIndex(int index) throws AAtlantisException; /** Give <code>phi</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>phi </code>index. * @throws AAtlantisException if index cannot be mapped. */ abstract protected int phiIndex(int index) throws AAtlantisException; /** Give <code>side</code> index corresponding to <code>cell</code> * index. * @param index The <code>cell</code> index. * @return The <code>side </code>index. * @throws AAtlantisException if index cannot be mapped. */ abstract protected int sideIndex(int index) throws AAtlantisException; /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ abstract protected Color3f color(); /** Logging . */ private static Logger log = Logger.getLogger(Calo.class); } |
From: Julius H. <hr...@us...> - 2008-06-26 17:09:12
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5393/net/hep/atlas/graphics/JiveEvent/Schema Modified Files: event.xsd Log Message: LAr and TILE added Index: event.xsd =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema/event.xsd,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** event.xsd 6 Jun 2008 13:27:16 -0000 1.10 --- event.xsd 26 Jun 2008 17:09:18 -0000 1.11 *************** *** 4,7 **** --- 4,10 ---- <!-- $Log$ + Revision 1.11 2008/06/26 17:09:18 hrivnac + LAr and TILE added + Revision 1.10 2008/06/06 13:27:16 hrivnac MDT + RPC added *************** *** 913,917 **** <xs:element ref="pmt2Gain" /> </xs:sequence> ! <xs:attribute name="count" type="xs:string" default="" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> --- 916,920 ---- <xs:element ref="pmt2Gain" /> </xs:sequence> ! <xs:attribute name="count" type="xs:int" default="0" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> |
From: Julius H. <hr...@us...> - 2008-06-06 13:29:18
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14830 Modified Files: index.html Log Message: MDT + RPC added Index: index.html =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.html 2 May 2008 14:09:49 -0000 1.9 --- index.html 6 Jun 2008 13:29:18 -0000 1.10 *************** *** 67,70 **** --- 67,79 ---- </ul> </li> + <li><u>1.1.0:</u> + <ul> + <li>New features: + <ul> + <li>TRT, MDT, RPC.</li> + </ul> + </li> + </ul> + </li> <li><u>*.*.*:</u> <ul> |
From: Julius H. <hr...@us...> - 2008-06-06 13:27:55
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14005/Schema Modified Files: event.xsd Log Message: MDT + RPC added Index: event.xsd =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema/event.xsd,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** event.xsd 28 May 2008 09:45:06 -0000 1.9 --- event.xsd 6 Jun 2008 13:27:16 -0000 1.10 *************** *** 4,7 **** --- 4,10 ---- <!-- $Log$ + Revision 1.10 2008/06/06 13:27:16 hrivnac + MDT + RPC added + Revision 1.9 2008/05/28 09:45:06 hrivnac TRT added *************** *** 414,418 **** <xs:element ref="adcCounts" /> </xs:sequence> ! <xs:attribute name="count" type="xs:string" default="" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> --- 417,421 ---- <xs:element ref="adcCounts" /> </xs:sequence> ! <xs:attribute name="count" type="xs:int" default="0" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> *************** *** 477,481 **** <xs:element ref="z" /> </xs:sequence> ! <xs:attribute name="count" type="xs:string" default="" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> --- 480,484 ---- <xs:element ref="z" /> </xs:sequence> ! <xs:attribute name="count" type="xs:int" default="0" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> *************** *** 682,686 **** <xs:element ref="z" /> </xs:sequence> ! <xs:attribute name="count" type="xs:string" default="" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> --- 685,689 ---- <xs:element ref="z" /> </xs:sequence> ! <xs:attribute name="count" type="xs:int" default="0" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> |
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14005/GeometricModel/Reps Modified Files: TRT.java Added Files: AMDTDataProxy.java ARPCDataProxy.java MDT.java RPC.java Log Message: MDT + RPC added --- NEW FILE: MDT.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveRep; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.MDTType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Atlantis import atlantis.utils.AHashMap; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.PointAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.ConeSegment; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of <code>MDTType</code> * JiveEvent Type connected via JAXB * {@link net.hep.atlas.graphics.JiveEvent.JAXB.MDTType} generic JAXB interface. * <p><font color="#880088"> * <pre> * $Log: MDT.java,v $ * Revision 1.1 2008/06/06 13:27:07 hrivnac * MDT + RPC added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: MDT.java,v 1.1 2008/06/06 13:27:07 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class MDT extends JiveRep { public final void traverse(MasterBuilder builder, Object element, Group tg, String parent) { // Set values set(builder, tg, parent); // Verify element type if (! (element instanceof MDTType)) { log.error(element + " can't be traversed using " + getClass().getName() + " representation"); return; } // Create container BranchGroup g = new BranchGroup(); use(g, "MDTs", "MDT Container"); set(builder, g, "MDTs"); // Get Type properties MDTType mdt = (MDTType)element; int count = mdt.getCount(); String storeGateKey = mdt.getStoreGateKey(); float[] xs = floats( mdt.getX( ).getValue()); float[] ys = floats( mdt.getY( ).getValue()); float[] zs = floats( mdt.getZ( ).getValue()); float[] lengths = floats( mdt.getLength( ).getValue()); float[] drifts = floats( mdt.getDriftR( ).getValue()); int[] ids = ints( mdt.getId( ).getValue()); int[] barcodes = ints( mdt.getBarcode( ).getValue()); String[] identifiers = strings(mdt.getIdentifier().getValue()); // Get Atlantis proxy to MDT AHashMap p = new AHashMap(10); p.put("numData", count); p.put("storeGateKey", storeGateKey); p.put("x", xs); p.put("y", ys); p.put("z", zs); p.put("length", lengths); p.put("driftR", drifts); p.put("id", ids); p.put("barcode", barcodes); p.put("identifier", identifiers); AMDTDataProxy amdt = new AMDTDataProxy(p); // Draw all MDTs String name; String info; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape; Appearance appearance; Material material; Color3f color; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; boolean barrel; // Set base Tg _baseTg = tg(); // Determine, how to draw if (count < 50) { asCylinders(true); } else { asLines(true); } // Loop over MDTs for (int i = 0; i < count; i++) { name = "MDT(" + storeGateKey + "/" + i + ")"; info = name; color = color(i); // ColorList is set => get Appearance from Color if (color == null) { color = new Color3f(); appearance = builder().appearance(name, name); material = appearance.getMaterial(); material.getSpecularColor(color); } // ColorList is not set => get Color from Appearance else { appearance = new Appearance(); appearance.setMaterial(new Material(color, color, color, color, 1f)); } appearance. setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f)); appearance.setLineAttributes(new LineAttributes(lineWidth(), LineAttributes.PATTERN_SOLID, GlobalOptions.quality() > 5)); setAppearance(appearance); // Construct MDT r0 = amdt.r()[i]; r1 = amdt.r()[i]; x0 = r0 * cos(amdt.phi()[i]); x1 = r1 * cos(amdt.phi()[i]); y0 = r0 * sin(amdt.phi()[i]); y1 = r1 * sin(amdt.phi()[i]); z0 = amdt.z()[i] - amdt.l()[i] / 2.0; z1 = amdt.z()[i] + amdt.l()[i] / 2.0; if (_asLines) { shape = asLine(x0, y0, z0, x1, y1, z1, color); } else { shape = asCylinder(abs(r1 - r0) + abs(z1 - z0), amdt.d()[i], amdt.phi()[i], (x1 + x0) / 2.0, (y1 + y0) / 2.0, (z1 + z0) / 2.0, true); } // Use MDT shape.setAppearance(appearance); use(shape, name, info); } Interacter.setOutlined(outlinedBckp); } /** Draw one MDT straw as a {@link LineArray}. * @param x0 The x-coordinate of the straw near end. * @param y0 The y-coordinate of the straw near end. * @param z0 The z-coordinate of the straw near end. * @param x1 The x-coordinate of the straw far end. * @param y1 The y-coordinate of the straw far end. * @param z1 The z-coordinate of the straw far end. * @param color The straw color. * @return The {@link ConeSegment} {@link Shape3D} representing the MDT straw. */ // TBD: put into Rep private Shape3D asLine(double x0, double y0, double z0, double x1, double y1, double z1, Color3f color) { Shape3D shape = new Shape3D(); LineArray lineArray = new LineArray(2, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); lineArray.setCoordinate(0, new Point3d(x0 / builder().norm(), y0 / builder().norm(), z0 / builder().norm())); lineArray.setCoordinate(1, new Point3d(x1 / builder().norm(), y1 / builder().norm(), z1 / builder().norm())); lineArray.setColor(0, color); lineArray.setColor(1, color); lineArray.setNormal(0, new Vector3f(0, 0, 0)); lineArray.setNormal(1, new Vector3f(0, 0, 0)); shape.addGeometry(lineArray); return shape; } /** Draw one MDT straw as a cylindric {@link ConeSegment}. * @param l The straw length * @param r The straw diameter (drift length). * @param phi The straw phi place. * @param x The x-coordinate of the straw middle point. * @param y The y-coordinate of the straw middle point. * @param z The z-coordinate of the straw middle point. * @param barrel Whether it is barrel straw. * @return The {@link ConeSegment} representing the MDT straw. */ // TBD: put into Rep private Shape3D asCylinder(double l, double r, double phi, double x, double y, double z, boolean barrel) { ConeSegment cone = new ConeSegment(r / builder().norm(), l / builder().norm(), BuildOptions.granularity() / 2, appearance()); Matrix3d m = new Matrix3d(UMATRIX); Matrix3d m0 = new Matrix3d(UMATRIX); m0.rotZ(phi + (float)(PI / 2f)); m.mul(m0); if (!barrel) { m0 = new Matrix3d(UMATRIX); m0.rotX(PI / 2f); m.mul(m0); } TransformGroup it = new TransformGroup(new Transform3D(m, new Vector3d(x / builder().norm(), y / builder().norm(), z / builder().norm()), 1)); setTg(_baseTg); tg().addChild(it); setTg(it); return cone; } /** Give width of line segments, * the default is <code>2</code>. * @return The width of line segments. */ public int lineWidth() { return _lineWidth; } /** Set width of line segments, * the default is <code>2</code>. * @param lineWidth The width of line segments. */ public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } private static int _lineWidth = 2; /** Set cylinder representation of straws. * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number * of straws smaller then 50. * Default is <code>false</code>. */ public static void asCylinders(boolean cylinders) { _asCylinders = cylinders; _asLines = !cylinders; } /** Set line representation of straws. * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number * of straws smaller then 50. * Default is <code>false</code>. */ public static void asLines(boolean lines) { _asLines = lines; _asCylinders = !lines; } private static boolean _asCylinders = false; private static boolean _asLines = false; /** Set {@link Color}s to be used for line segments. * @param colorMap The array of {@link Color}s. * @param colorList The array of {@link Color}s indexes. */ public static void setColors(Color[] colorMap, int[] colorList) { _colorMap = colorMap; _colorList = colorList; } /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @param i The line segment number. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ protected Color3f color(int i) { if (_colorList == null) { return null; } return new Color3f(_colorMap[_colorList[i]]); } private static Color[] _colorMap; private static int[] _colorList; private Group _baseTg; private static final Matrix3d UMATRIX = new Matrix3d(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); /** Logging . */ private static Logger log = Logger.getLogger(MDT.class); } --- NEW FILE: AMDTDataProxy.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; // Atlantis import atlantis.event.AMDTData; import atlantis.graphics.ACoord; import atlantis.utils.AHashMap; // Java3D import javax.vecmath.Point2d; // Java import java.util.HashMap; /** GraXML proxy to {@link AMDTData}. * <p><font color="#880088"> * <pre> * $Log: AMDTDataProxy.java,v $ * Revision 1.1 2008/06/06 13:26:54 hrivnac * MDT + RPC added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: AMDTDataProxy.java,v 1.1 2008/06/06 13:26:54 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public class AMDTDataProxy extends AMDTData { /** Constructs a new muon box proxy. * @param p TBD */ public AMDTDataProxy(AHashMap p) { super(p); _r = new double[numDraw]; _z = new double[numDraw]; _d = new double[numDraw]; _l = new double[numDraw]; _phi = new double[numDraw]; for (int i = 0; i < numDraw; i++) { _r[ i] = getSectorRho(sector[i], rho[i], phi[i]); _z[ i] = z[ i]; _d[ i] = driftR[i]; _l[ i] = length[i]; _phi[i] = phi[ i]; } } /** TBD */ public double[] r() { return _r; } /** TBD */ public double[] z() { return _z; } /** TBD */ public double[] d() { return _d; } /** TBD */ public double[] l() { return _l; } /** TBD */ public double[] phi() { return _phi; } private double[] _r; private double[] _z; private double[] _d; private double[] _l; private double[] _phi; } Index: TRT.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/TRT.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TRT.java 28 May 2008 13:16:38 -0000 1.2 --- TRT.java 6 Jun 2008 13:27:13 -0000 1.3 *************** *** 65,68 **** --- 65,71 ---- * <pre> * $Log$ + * Revision 1.3 2008/06/06 13:27:13 hrivnac + * MDT + RPC added + * * Revision 1.2 2008/05/28 13:16:38 hrivnac * TRT improved *************** *** 142,149 **** if (!_asCylinders && !_asLines) { if (count0 < 50) { ! asCylinders(); } else { ! asLines(); } } --- 145,152 ---- if (!_asCylinders && !_asLines) { if (count0 < 50) { ! asCylinders(true); } else { ! asLines(true); } } --- NEW FILE: RPC.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveRep; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.RPCType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Atlantis import atlantis.utils.AHashMap; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.BoundingSphere; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.PointAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.PointArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.Trapezoid; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of <code>RPCType</code> * JiveEvent Type connected via JAXB * {@link net.hep.atlas.graphics.JiveEvent.JAXB.RPCType} generic JAXB interface. * <p><font color="#880088"> * <pre> * $Log: RPC.java,v $ * Revision 1.1 2008/06/06 13:27:11 hrivnac * MDT + RPC added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: RPC.java,v 1.1 2008/06/06 13:27:11 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class RPC extends JiveRep { public final void traverse(MasterBuilder builder, Object element, Group tg, String parent) { // Set values set(builder, tg, parent); // Verify element type if (! (element instanceof RPCType)) { log.error(element + " can't be traversed using " + getClass().getName() + " representation"); return; } // Create container BranchGroup g = new BranchGroup(); use(g, "RPCs", "RPC Container"); set(builder, g, "RPCs"); // Get Type properties RPCType rpc = (RPCType)element; int count = rpc.getCount(); String storeGateKey = rpc.getStoreGateKey(); float[] xs = floats( rpc.getX( ).getValue()); float[] ys = floats( rpc.getY( ).getValue()); float[] zs = floats( rpc.getZ( ).getValue()); float[] lengths = floats( rpc.getLength( ).getValue()); float[] widths = floats( rpc.getWidth( ).getValue()); int[] ids = ints( rpc.getId( ).getValue()); int[] barcodes = ints( rpc.getBarcode( ).getValue()); String[] identifiers = strings(rpc.getIdentifier().getValue()); // Get Atlantis proxy to RPC AHashMap p = new AHashMap(10); p.put("numData", count); p.put("storeGateKey", storeGateKey); p.put("x", xs); p.put("y", xs); p.put("z", zs); p.put("length", lengths); p.put("width", widths); p.put("id", ids); p.put("barcode", barcodes); p.put("identifier", identifiers); ARPCDataProxy arpc = new ARPCDataProxy(p); // Draw all RPCs String name; String info; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape; Appearance appearance; Material material; Color3f color; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; boolean barrel; // Set base Tg _baseTg = tg(); // Loop over RPCs for (int i = 0; i < count; i++) { name = "RPC(" + storeGateKey + "/" + i + ")"; info = name; color = color(i); // ColorList is set => get Appearance from Color if (color == null) { color = new Color3f(); appearance = builder().appearance(name, name); material = appearance.getMaterial(); material.getSpecularColor(color); } // ColorList is not set => get Color from Appearance else { appearance = new Appearance(); appearance.setMaterial(new Material(color, color, color, color, 1f)); } appearance. setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f)); setAppearance(appearance); // Construct RPC shape = asCube(arpc.x()[i], arpc.y()[i], arpc.z()[i], arpc.dx()[i], arpc.dy()[i], arpc.dz()[i]); // Use RPC shape.setAppearance(appearance); use(shape, name, info); } Interacter.setOutlined(outlinedBckp); } /** Draw one RPC hit as a cube {@link Trapezoid}. * @param x The x-coordinate of the hit middle point. * @param y The y-coordinate of the hit middle point. * @param z The z-coordinate of the hit middle point. * @param dx The x-half-length of the hit. * @param dy The y-half-length of the hit. * @param dz The z-half-length of the hit. * @return The {@link Trapezoid} representing the RPC hit. */ // TBD: put into Rep private Shape3D asCube(double x, double y, double z, double dx, double dy, double dz) { Trapezoid cube = new Trapezoid(2 * dx / builder().norm(), 2 * dy / builder().norm(), 2 * dz / builder().norm(), appearance()); Matrix3d m = new Matrix3d(UMATRIX); TransformGroup it = new TransformGroup(new Transform3D(m, new Vector3d(x / builder().norm(), y / builder().norm(), z / builder().norm()), 1)); setTg(_baseTg); tg().addChild(it); setTg(it); return cube; } /** Set {@link Color}s to be used for line segments. * @param colorMap The array of {@link Color}s. * @param colorList The array of {@link Color}s indexes. */ public static void setColors(Color[] colorMap, int[] colorList) { _colorMap = colorMap; _colorList = colorList; } /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @param i The line segment number. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ protected Color3f color(int i) { if (_colorList == null) { return null; } return new Color3f(_colorMap[_colorList[i]]); } private static Color[] _colorMap; private static int[] _colorList; private Group _baseTg; private static final Matrix3d UMATRIX = new Matrix3d(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); /** Logging . */ private static Logger log = Logger.getLogger(RPC.class); } --- NEW FILE: ARPCDataProxy.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; // Atlantis import atlantis.event.ARPCData; import atlantis.graphics.ACoord; import atlantis.utils.AHashMap; import static atlantis.utils.AMath.PI_BY_8; // Java3D import javax.vecmath.Point2d; // Java import java.util.HashMap; import static java.lang.Math.sin; import static java.lang.Math.cos; /** GraXML proxy to {@link ARPCData}. * <p><font color="#880088"> * <pre> * $Log: ARPCDataProxy.java,v $ * Revision 1.1 2008/06/06 13:26:58 hrivnac * MDT + RPC added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: ARPCDataProxy.java,v 1.1 2008/06/06 13:26:58 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public class ARPCDataProxy extends ARPCData { /** Constructs a new muon box proxy. * @param p TBD */ public ARPCDataProxy(AHashMap p) { super(p); _x = new double[numDraw]; _y = new double[numDraw]; _z = new double[numDraw]; _dx = new double[numDraw]; _dy = new double[numDraw]; _dz = new double[numDraw]; double d; for (int i = 0; i < numDraw; i++) { d = width[i] / 2.0; if (!measuresPhi[i]) { d = length[i] / 2.0; } _x[i ] = rho[i] * cos(phi[ i] ); _y[i ] = rho[i] * sin(phi[ i] ); _dx[i] = d * sin(sector[i] * PI_BY_8); _dy[i] = d * cos(sector[i] * PI_BY_8); _z[i ] = z[i]; _dz[i] = width[i] / 2.0; } } /** TBD */ public double[] x() { return _x; } /** TBD */ public double[] y() { return _y; } /** TBD */ public double[] z() { return _z; } /** TBD */ public double[] dx() { return _dx; } /** TBD */ public double[] dy() { return _dy; } /** TBD */ public double[] dz() { return _dz; } private double[] _x; private double[] _y; private double[] _z; private double[] _dx; private double[] _dy; private double[] _dz; } |
From: Julius H. <hr...@us...> - 2008-06-06 13:27:31
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14005/GeometricModel Modified Files: Jet0.java JiveEventBuilder.java JiveRep.java Log Message: MDT + RPC added Index: JiveEventBuilder.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/JiveEventBuilder.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** JiveEventBuilder.java 29 Apr 2008 14:42:18 -0000 1.14 --- JiveEventBuilder.java 6 Jun 2008 13:26:48 -0000 1.15 *************** *** 6,13 **** --- 6,20 ---- import net.hep.graphics.GraXML.Java3DExtensions.SelectedColor; + // Atlantis + import atlantis.parameters.APar; + import atlantis.graphics.ACoord; + import atlantis.utils.xml.AXMLUtils; + import atlantis.utils.xml.AXMLErrorHandler; + // Java3D import javax.media.j3d.Group; import javax.media.j3d.Transform3D; import javax.vecmath.Vector3d; + import javax.vecmath.Point2d; import javax.vecmath.Matrix3d; *************** *** 18,21 **** --- 25,33 ---- import org.apache.log4j.Logger; + // Java + import javax.xml.parsers.DocumentBuilder; + import javax.xml.parsers.DocumentBuilderFactory; + import org.w3c.dom.Node; + /** <code>JiveEventBuilder</code> performs JiveEvent specific part * of the {@link MasterBuilder} building proccess. *************** *** 23,26 **** --- 35,41 ---- * <pre> * $Log$ + * Revision 1.15 2008/06/06 13:26:48 hrivnac + * MDT + RPC added + * * Revision 1.14 2008/04/29 14:42:18 hrivnac * javadoc cleaned *************** *** 91,94 **** --- 106,125 ---- _pdg = new PDG(); BuildOptions.setColorPerMaterial(true); + + // Atlantis + if (APar.getGroup("Projection") == null) { + log.info("Reading Atlantis configuration from " + ATLANTIS_CONFIG); + try { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setValidating(true); + DocumentBuilder parser = factory.newDocumentBuilder(); + parser.setErrorHandler(new AXMLErrorHandler()); + Node rootNode = parser.parse(getClass().getClassLoader().getResource(ATLANTIS_CONFIG).openStream()).getDocumentElement(); + new APar(AXMLUtils.getChild(rootNode, "Parameters")); + } + catch (Exception e) { + log.error("Atlantis configuration is unreadable", e); + } + } } *************** *** 151,154 **** --- 182,200 ---- } + /** Give z-rho projection. + * @param coord The coordinations of z-rho projection + * in Atlantis format. + * @return The z-rho projection. */ + public static Point2d[] zrho(ACoord coord) { + double[][][] hv = coord.hv; + int n = hv[0][0].length; + Point2d[] p = new Point2d[n]; + int j; + for (int i = 0; i < n; i++) { + p[n - i - 1] = new Point2d(hv[0][0][i], hv[1][0][i]); + } + return p; + } + private static String _schema = "event.xsd"; *************** *** 163,166 **** --- 209,214 ---- private static float[] _vertex = {0f, 0f, 0f}; + private static String ATLANTIS_CONFIG = "net/hep/atlas/graphics/JiveEvent/AtlantisConfig.xml"; + /** Logging . */ private static Logger log = Logger.getLogger(JiveEventBuilder.class); Index: Jet0.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Jet0.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Jet0.java 30 Apr 2008 16:10:48 -0000 1.8 --- Jet0.java 6 Jun 2008 13:26:45 -0000 1.9 *************** *** 7,10 **** --- 7,11 ---- import net.hep.atlas.graphics.JiveEvent.JAXB.PtType; import net.hep.atlas.graphics.JiveEvent.JAXB.EtType; + import net.hep.atlas.graphics.JiveEvent.JAXB.EnergyType; import net.hep.atlas.graphics.JiveEvent.JAXB.IdType; import net.hep.atlas.graphics.JiveEvent.JAXB.CellsType; *************** *** 55,58 **** --- 56,62 ---- * <pre> * $Log$ + * Revision 1.9 2008/06/06 13:26:45 hrivnac + * MDT + RPC added + * * Revision 1.8 2008/04/30 16:10:48 hrivnac * Tracks are grouped, cleaning *************** *** 129,132 **** --- 133,152 ---- * @param eta The jet' <em>eta</em>s. * @param phi The jet' <em>phi</em>s. + * @param energy The jet' <em>energies</em>s. */ + protected void construct(String type, + int count, + String storeGateKey, + EtaType eta, + PhiType phi, + EnergyType e) { + construct(type, count, storeGateKey, eta, phi, e.getValue()); + } + + /** Construct Java3D representation of this <em>Jet</em>. + * @param type The jet' type (name). + * @param count The number of jets in a set. + * @param storeGateKey The corresponding <em>StoreGate</em> key. + * @param eta The jet' <em>eta</em>s. + * @param phi The jet' <em>phi</em>s. * @param et The jet' <em>et</em>s or <em>pt</em>s. */ protected void construct(String type, Index: JiveRep.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/JiveRep.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JiveRep.java 29 Apr 2008 14:42:18 -0000 1.4 --- JiveRep.java 6 Jun 2008 13:26:51 -0000 1.5 *************** *** 30,33 **** --- 30,36 ---- * <pre> * $Log$ + * Revision 1.5 2008/06/06 13:26:51 hrivnac + * MDT + RPC added + * * Revision 1.4 2008/04/29 14:42:18 hrivnac * javadoc cleaned *************** *** 148,151 **** --- 151,163 ---- } + /** Extract an array of <code>String</code>s from a blank-delimited + * <code>String</code>. + * @param value The blank-delimited <code>String</code>s in a <code>String</code>. + * @return The array of resulting <code>String</code>s. */ + protected String[] strings(String value) { + String[] strings = value.replaceAll("\n", " ").trim().split(" +"); + return strings; + } + /** Set general references. * @param builder The managing {@link MasterBuilder}. |
From: Julius H. <hr...@us...> - 2008-06-06 13:26:40
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14005 Added Files: AtlantisConfig.xml Log Message: MDT + RPC added --- NEW FILE: AtlantisConfig.xml --- <?xml version="1.0"?> <!DOCTYPE AtlantisConfiguration [ <!ELEMENT AtlantisConfiguration (Initialization, Parameters,ParameterDifferences*, WindowCorners*)> <!ELEMENT Initialization (Interactions, Canvas)> <!ELEMENT Interactions (Panel*, InteractionControl+)> <!ELEMENT InteractionControl (Panel*)> <!ATTLIST InteractionControl projectionName CDATA #REQUIRED> <!ELEMENT Panel EMPTY> <!ATTLIST Panel screenName CDATA #REQUIRED fileName CDATA #REQUIRED toolTip CDATA ""> [...1284 lines suppressed...] <CORNERS windowName="R" x0="-5.0" y0="360.0" x1="5.0" y1="360.0" x2="5.0" y2="0.0"/> <CORNERS windowName="M" x0="-2250.0" y0="4500.0" x1="2250.0" y1="4500.0" x2="2250.0" y2="-4500.0"/> <CORNERS windowName="L" x0="-1320.0" y0="2640.0" x1="1320.0" y1="2640.0" x2="1320.0" y2="-2640.0"/> <CORNERS windowName="D" x0="-2640.0" y0="1320.0" x1="2640.0" y1="1320.0" x2="2640.0" y2="-1320.0"/> <CORNERS windowName="C" x0="0.0" y0="400.0" x1="1320.0" y1="400.0" x2="1320.0" y2="0.0"/> <CORNERS windowName="B" x0="-3960.0" y0="1320.0" x1="3960.0" y1="1320.0" x2="3960.0" y2="-1320.0"/> <CORNERS windowName="9" x0="-241.0" y0="-30.0" x1="385.0" y1="-30.0" x2="385.0" y2="8.0"/> <CORNERS windowName="8" x0="-5.0" y0="360.0" x1="5.0" y1="360.0" x2="5.0" y2="0.0"/> <CORNERS windowName="7" x0="-2250.0" y0="2250.0" x1="2250.0" y1="2250.0" x2="2250.0" y2="-2250.0"/> <CORNERS windowName="6" x0="-5.0" y0="360.0" x1="5.0" y1="360.0" x2="5.0" y2="0.0"/> <CORNERS windowName="5" x0="-2250.0" y0="2250.0" x1="2250.0" y1="2250.0" x2="2250.0" y2="-2250.0"/> <CORNERS windowName="4" x0="-2250.0" y0="2250.0" x1="2250.0" y1="2250.0" x2="2250.0" y2="-2250.0"/> <CORNERS windowName="3" x0="-2250.0" y0="400.0" x1="2250.0" y1="400.0" x2="2250.0" y2="0.0"/> <CORNERS windowName="2" x0="0.0" y0="400.0" x1="1320.0" y1="400.0" x2="1320.0" y2="0.0"/> <CORNERS windowName="1" x0="-1320.0" y0="1320.0" x1="1320.0" y1="1320.0" x2="1320.0" y2="-1320.0"/> </WindowCorners> </AtlantisConfiguration> |
From: Julius H. <hr...@us...> - 2008-05-29 10:13:14
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17678/atlantis/graxml3d Modified Files: GraXMLBridge.java Log Message: TRT added Index: GraXMLBridge.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/GraXMLBridge.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GraXMLBridge.java 29 May 2008 09:56:18 -0000 1.2 --- GraXMLBridge.java 29 May 2008 10:13:16 -0000 1.3 *************** *** 77,80 **** --- 77,83 ---- * <pre> * $Log$ + * Revision 1.3 2008/05/29 10:13:16 hrivnac + * TRT added + * * Revision 1.2 2008/05/29 09:56:18 hrivnac * TRT added *************** *** 285,289 **** * @param data Selected {@link ATRTData}. */ private void convertTRT(ATRTData data) { ! float[] rhozs = data.getRhoz(); float[] phis = data.getPhi(); float[] drifts = data.getDriftR(); --- 288,292 ---- * @param data Selected {@link ATRTData}. */ private void convertTRT(ATRTData data) { ! float[] rhozs = data.getRhoZ(); float[] phis = data.getPhi(); float[] drifts = data.getDriftR(); |
From: Julius H. <hr...@us...> - 2008-05-29 09:56:17
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3644/atlantis/graxml3d Modified Files: GraXMLBridge.java Log Message: TRT added Index: GraXMLBridge.java =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/GraXMLBridge.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GraXMLBridge.java 30 Jan 2008 00:54:21 -0000 1.1 --- GraXMLBridge.java 29 May 2008 09:56:18 -0000 1.2 *************** *** 27,30 **** --- 27,31 ---- import atlantis.event.ASiClusterData; import atlantis.event.ASTrData; + import atlantis.event.ATRTData; import atlantis.event.AInDetTrackData; import atlantis.event.AJetData; *************** *** 76,79 **** --- 77,83 ---- * <pre> * $Log$ + * Revision 1.2 2008/05/29 09:56:18 hrivnac + * TRT added + * * Revision 1.1 2008/01/30 00:54:21 hrivnac * reorganising, documentation updating *************** *** 124,127 **** --- 128,132 ---- else if (data instanceof ASiClusterData ) convertSiCluster ((ASiClusterData )data); else if (data instanceof ASTrData ) convertSTr ((ASTrData )data); + else if (data instanceof ATRTData ) convertTRT ((ATRTData )data); else if (data instanceof AInDetTrackData) convertInDetTrack((AInDetTrackData)data); else if (data instanceof AJetData ) convertJet ((AJetData )data); *************** *** 160,164 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>S3D</em>. ! * @param data Selected {AS3DData}. */ private void convertS3D(AS3DData data) { float[] xs = data.getX(); --- 165,169 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>S3D</em>. ! * @param data Selected {@link AS3DData}. */ private void convertS3D(AS3DData data) { float[] xs = data.getX(); *************** *** 190,194 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>SiCluster/STC</em> ! * @param data Selected {ASiClusteData}.. */ private void convertSiCluster(ASiClusterData data) { float[][] xs = data.getX(); --- 195,199 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>SiCluster/STC</em> ! * @param data Selected {@link ASiClusteData}.. */ private void convertSiCluster(ASiClusterData data) { float[][] xs = data.getX(); *************** *** 235,239 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>STr</em>. ! * @param data Selected {ASTrData}. */ private void convertSTr(ASTrData data) { AHelix[] h = data.getHelixData(); --- 240,244 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>STr</em>. ! * @param data Selected {@link ASTrData}. */ private void convertSTr(ASTrData data) { AHelix[] h = data.getHelixData(); *************** *** 277,282 **** } /** Convert Atlantis structures to GraXML JAXB tree for <em>InDetTrack/Track</em>. ! * @param data Selected {AInDetTrackData}. */ private void convertInDetTrack(AInDetTrackData data) { float[][] xs = data.getX(); --- 282,329 ---- } + /** Convert Atlantis structures to GraXML JAXB tree for <em>TRT</em>. + * @param data Selected {@link ATRTData}. */ + private void convertTRT(ATRTData data) { + float[] rhozs = data.getRhoz(); + float[] phis = data.getPhi(); + float[] drifts = data.getDriftR(); + int[] thresholds = data.getThreshold(); + int[] subs = data.getSub(); + String rhozString = ""; + String phiString = ""; + String driftString = ""; + String thresholdString = ""; + String subString = ""; + for (int j = 0; j < _drawList.length; j++) { + rhozString += rhozs [_drawList[j]] + " "; + phiString += phis [_drawList[j]] + " "; + driftString += drifts [_drawList[j]] + " "; + thresholdString += thresholds[_drawList[j]] + " "; + subString += subs [_drawList[j]] + " "; + } + RhozType rhoz = new RhozType(); + PhiType phi = new PhiType(); + DriftRType drift = new DriftRType(); + ThresholdType threshold = new ThresholdType(); + SubType sub = new SubType(); + rhoz.setValue(rhozString); + phi.setValue(phiString); + drift.setValue(driftString); + threshold.setValue(thresholdString); + sub.setValue(subString); + TRTType entry = new TRTType(); + entry.setCount(_drawList.length); + entry.setStoreGateKey(data.getStoreGateKey()); + entry.setRhoz(rhoz); + entry.setPhi(phi); + entry.setDriftR(drift); + entry.setThreshold(threshold); + entry.setSub(sub); + _dataElements.add(entry); + TRT.setColors(_colorMap, data.getColor(_drawList)); + } + /** Convert Atlantis structures to GraXML JAXB tree for <em>InDetTrack/Track</em>. ! * @param data Selected {@link AInDetTrackData}. */ private void convertInDetTrack(AInDetTrackData data) { float[][] xs = data.getX(); *************** *** 310,319 **** entry.setPolylineZ(z); entry.setNumPolyline(n); ! _dataElements.add(entry); ! Track.setColors(_colorMap, data.getColor(_drawList)); } /** Convert Atlantis structures to GraXML JAXB tree for <em>Jet</em>. ! * @param data Selected {AJetData}. */ private void convertJet(AJetData data) { float[] etas = data.getEta(); --- 357,366 ---- entry.setPolylineZ(z); entry.setNumPolyline(n); ! _dataElements.add(entry); ! Track.setColors(data.getStoreGateKey(), _colorMap, data.getColor(_drawList)); } /** Convert Atlantis structures to GraXML JAXB tree for <em>Jet</em>. ! * @param data Selected {@link AJetData}. */ private void convertJet(AJetData data) { float[] etas = data.getEta(); *************** *** 345,349 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>BJet</em>. ! * @param data Selected {ABJetData}. */ private void convertBJet(ABJetData data) { float[] etas = data.getEta(); --- 392,396 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>BJet</em>. ! * @param data Selected {@link ABJetData}. */ private void convertBJet(ABJetData data) { float[] etas = data.getEta(); *************** *** 375,379 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>TauJet</em>. ! * @param data Selected {ATauJetData}. */ private void convertTauJet(ATauJetData data) { float[] etas = data.getEta(); --- 422,426 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>TauJet</em>. ! * @param data Selected {@link ATauJetData}. */ private void convertTauJet(ATauJetData data) { float[] etas = data.getEta(); *************** *** 405,409 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>Muon</em>. ! * @param data Selected {AMuonData}. */ private void convertMuon(AMuonData data) { float[] etas = data.getEta(); --- 452,456 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>Muon</em>. ! * @param data Selected {@link AMuonData}. */ private void convertMuon(AMuonData data) { float[] etas = data.getEta(); *************** *** 435,439 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>Electron</em>. ! * @param data Selected {AElectronData}. */ private void convertElectron(AElectronData data) { float[] etas = data.getEta(); --- 482,486 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>Electron</em>. ! * @param data Selected {@link AElectronData}. */ private void convertElectron(AElectronData data) { float[] etas = data.getEta(); *************** *** 465,469 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>Photon</em>. ! * @param data Selected {APhotonData}. */ private void convertPhoton(APhotonData data) { float[] etas = data.getEta(); --- 512,516 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>Photon</em>. ! * @param data Selected {@link APhotonData}. */ private void convertPhoton(APhotonData data) { float[] etas = data.getEta(); *************** *** 496,500 **** /** Convert Atlantis structures to GraXML JAXB tree for <em>ETMis</em>. ! * @param data Selected {AETMisData}. */ private void convertETMis(AETMisData data) { EtxType etx = new EtxType(); --- 543,547 ---- /** Convert Atlantis structures to GraXML JAXB tree for <em>ETMis</em>. ! * @param data Selected {@link AETMisData}. */ private void convertETMis(AETMisData data) { EtxType etx = new EtxType(); |
From: Julius H. <hr...@us...> - 2008-05-28 13:16:36
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1254/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps Modified Files: TRT.java Log Message: TRT improved Index: TRT.java =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps/TRT.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TRT.java 28 May 2008 09:45:03 -0000 1.1 --- TRT.java 28 May 2008 13:16:38 -0000 1.2 *************** *** 65,68 **** --- 65,71 ---- * <pre> * $Log$ + * Revision 1.2 2008/05/28 13:16:38 hrivnac + * TRT improved + * * Revision 1.1 2008/05/28 09:45:03 hrivnac * TRT added *************** *** 107,111 **** float[] rhozs = floats(rhoz.getValue()); float[] drifts = floats(drift.getValue()); ! float[] thrasholds = floats(threshold.getValue()); // Draw all TRTs --- 110,114 ---- float[] rhozs = floats(rhoz.getValue()); float[] drifts = floats(drift.getValue()); ! int[] thresholds = ints( threshold.getValue()); // Draw all TRTs *************** *** 126,142 **** double z1; double r1; // Set base Tg _baseTg = tg(); // Determine, how to draw if (!_asCylinders && !_asLines) { ! if (count < 50) { ! _asCylinders = true; } else { ! _asLines = true; } } // Loop over TRTs for (int i = 0; i < count; i++) { name = "TRT(" + storeGateKey + "/" + subs[i] + "/" + i + ")"; info = name; --- 129,157 ---- double z1; double r1; + boolean barrel; // Set base Tg _baseTg = tg(); // Determine, how to draw + int count0 = count; + if (_thresholdCut) { + count0 = 0; + for (int t : thresholds) { + count0 += t; + } + } if (!_asCylinders && !_asLines) { ! if (count0 < 50) { ! asCylinders(); } else { ! asLines(); } } // Loop over TRTs for (int i = 0; i < count; i++) { + if (_thresholdCut && thresholds[i] == 0) continue; + barrel = !(subs[i] == 0 || subs[i] == 3); + if (!_barrel && barrel) continue; + if (!_endcap && !barrel) continue; name = "TRT(" + storeGateKey + "/" + subs[i] + "/" + i + ")"; info = name; *************** *** 184,188 **** shape = asLine(x0, y0, z0, x1, y1, z1, color); } ! if (_asCylinders) { if (subs[i] == 0 || subs[i] == 3) { shape = asCylinder(abs(r1 - r0) + abs(z1 - z0), drifts[i], phis[i], (x1 + x0) / 2.0, (y1 + y0) / 2.0, (z1 + z0) / 2.0, false); --- 199,203 ---- shape = asLine(x0, y0, z0, x1, y1, z1, color); } ! else { if (subs[i] == 0 || subs[i] == 3) { shape = asCylinder(abs(r1 - r0) + abs(z1 - z0), drifts[i], phis[i], (x1 + x0) / 2.0, (y1 + y0) / 2.0, (z1 + z0) / 2.0, false); *************** *** 192,195 **** --- 207,211 ---- } } + // Use TRT shape.setAppearance(appearance); *************** *** 317,324 **** * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number ! * of straws smaller then 50. */ ! public static void asCylinders() { ! _asCylinders = true; ! _asLines = false; } --- 333,341 ---- * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number ! * of straws smaller then 50. ! * Default is <code>false</code>. */ ! public static void asCylinders(boolean cylinders) { ! _asCylinders = cylinders; ! _asLines = !cylinders; } *************** *** 326,338 **** * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number ! * of straws smaller then 50. */ ! public static void asLines() { ! _asCylinders = false; ! _asLines = true; } ! private static booloean _asCylinders = false; ! private static boolean _asLines = false; private Group _baseTg; --- 343,383 ---- * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number ! * of straws smaller then 50. ! * Default is <code>false</code>. */ ! public static void asLines(boolean lines) { ! _asLines = lines; ! _asCylinders = !lines; } ! private static boolean _asCylinders = false; ! private static boolean _asLines = false; ! ! /** Set whether to draw all straws or just those over threshold. ! * Default is true, i.e. only straws over threshold are drawn. ! * @param thresholdCut Whether to draw only straws over threshold. */ ! public static void setThresholdCut(boolean thresholdCut) { ! _thresholdCut = thresholdCut; ! } ! ! private static boolean _thresholdCut = true; ! ! /** Set whether to draw barrel straws. ! * Default is <code>true</code>. ! * @param barrel Whether to draw barrel straws. */ ! public static void drawBarrel(boolean barrel) { ! _barrel = barrel; ! } ! ! /** Set whether to draw endcap straws. ! * Default is <code>true</code>. ! * @param barrel Whether to draw endcap straws. */ ! public static void drawEndcap(boolean endcap) { ! _endcap = endcap; ! } ! ! private static boolean _barrel = true; ! ! private static boolean _endcap = true; private Group _baseTg; |
From: Julius H. <hr...@us...> - 2008-05-28 09:45:02
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7493/net/hep/atlas/graphics/JiveEvent/Schema Modified Files: event.xsd Log Message: TRT added Index: event.xsd =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/Schema/event.xsd,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** event.xsd 10 Jan 2008 23:05:40 -0000 1.8 --- event.xsd 28 May 2008 09:45:06 -0000 1.9 *************** *** 4,7 **** --- 4,10 ---- <!-- $Log$ + Revision 1.9 2008/05/28 09:45:06 hrivnac + TRT added + Revision 1.8 2008/01/10 23:05:40 hrivnac Atlantis bridge improved *************** *** 971,975 **** <xs:element ref="numBarcodes" /> </xs:sequence> ! <xs:attribute name="count" type="xs:string" default="" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> --- 974,978 ---- <xs:element ref="numBarcodes" /> </xs:sequence> ! <xs:attribute name="count" type="xs:int" default="0" /> <xs:attribute name="storeGateKey" type="xs:string" default="" /> </xs:complexType> |
From: Julius H. <hr...@us...> - 2008-05-28 09:45:02
|
Update of /cvsroot/graxml/Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7493/net/hep/atlas/graphics/JiveEvent/GeometricModel/Reps Added Files: TRT.java Log Message: TRT added --- NEW FILE: TRT.java --- package net.hep.atlas.graphics.JiveEvent.GeometricModel.Reps; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveEventBuilder; import net.hep.atlas.graphics.JiveEvent.GeometricModel.JiveRep; // Generic Model import net.hep.atlas.graphics.JiveEvent.JAXB.TRTType; import net.hep.atlas.graphics.JiveEvent.JAXB.SubType; import net.hep.atlas.graphics.JiveEvent.JAXB.PhiType; import net.hep.atlas.graphics.JiveEvent.JAXB.RhozType; import net.hep.atlas.graphics.JiveEvent.JAXB.DriftRType; import net.hep.atlas.graphics.JiveEvent.JAXB.ThresholdType; // GraXML import net.hep.graphics.GraXML.BuildOptions; import net.hep.graphics.GraXML.GlobalOptions; import net.hep.graphics.GraXML.MasterBuilder; import net.hep.graphics.GraXML.Java3DExtensions.Interactivity.Interacter; import net.hep.graphics.GraXML.Disconnecter.DetachableConnection; import net.hep.graphics.GraXML.Java3DExtensions.BillboardGroup; // Java3D import javax.media.j3d.Shape3D; import javax.media.j3d.Group; import javax.media.j3d.BranchGroup; import javax.media.j3d.TransformGroup; import javax.media.j3d.Transform3D; import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.media.j3d.LineAttributes; import javax.media.j3d.TransparencyAttributes; import javax.media.j3d.LineArray; import javax.media.j3d.GeometryArray; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Point3f; import javax.vecmath.Color3f; // FreeHEP import org.freehep.j3d.ConeSegment; // AWT import java.awt.Color; // Java import static java.lang.Math.toRadians; import static java.lang.Math.log; import static java.lang.Math.exp; import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.sin; import static java.lang.Math.cos; import static java.lang.Math.signum; import static java.lang.Math.PI; // Log4J import org.apache.log4j.Logger; /** GraXML representation of <code>TRTType</code> * JiveEvent Type connected via JAXB * {@link net.hep.atlas.graphics.JiveEvent.JAXB.TRTType} generic JAXB interface. * <p><font color="#880088"> * <pre> * $Log: TRT.java,v $ * Revision 1.1 2008/05/28 09:45:03 hrivnac * TRT added * * </pre> * </font></p> * @opt attributes * @opt operations * @opt types * @opt visibility * @version $Id: TRT.java,v 1.1 2008/05/28 09:45:03 hrivnac Exp $ * @author <a href="mailto:Jul...@ce...">J.Hrivnac</a> */ public final class TRT extends JiveRep { public final void traverse(MasterBuilder builder, Object element, Group tg, String parent) { // Set values set(builder, tg, parent); // Verify element type if (! (element instanceof TRTType)) { log.error(element + " can't be traversed using " + getClass().getName() + " representation"); return; } // Create container BranchGroup g = new BranchGroup(); use(g, "TRTs", "TRT Container"); set(builder, g, "TRTs"); // Get Type properties TRTType trt = (TRTType)element; int count = trt.getCount(); String storeGateKey = trt.getStoreGateKey(); SubType sub = trt.getSub(); PhiType phi = trt.getPhi(); RhozType rhoz = trt.getRhoz(); DriftRType drift = trt.getDriftR(); ThresholdType threshold = trt.getThreshold(); int[] subs = ints( sub.getValue()); float[] phis = floats(phi.getValue()); float[] rhozs = floats(rhoz.getValue()); float[] drifts = floats(drift.getValue()); float[] thrasholds = floats(threshold.getValue()); // Draw all TRTs String name; String info; boolean outlinedBckp = Interacter.outlined(); Interacter.setOutlined(false); Shape3D shape; Appearance appearance; Material material; Color3f color; double x0; double y0; double z0; double r0; double x1; double y1; double z1; double r1; // Set base Tg _baseTg = tg(); // Determine, how to draw if (!_asCylinders && !_asLines) { if (count < 50) { _asCylinders = true; } else { _asLines = true; } } // Loop over TRTs for (int i = 0; i < count; i++) { name = "TRT(" + storeGateKey + "/" + subs[i] + "/" + i + ")"; info = name; color = color(i); // ColorList is set => get Appearance from Color if (color == null) { color = new Color3f(); appearance = builder().appearance(name, name); material = appearance.getMaterial(); material.getSpecularColor(color); } // ColorList is not set => get Color from Appearance else { appearance = new Appearance(); appearance.setMaterial(new Material(color, color, color, color, 1f)); } appearance. setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f)); appearance.setLineAttributes(new LineAttributes(lineWidth(), LineAttributes.PATTERN_SOLID, GlobalOptions.quality() > 5)); setAppearance(appearance); // Construct TRT // - endcap if (subs[i] == 0 || subs[i] == 3) { z0 = rhozs[i]; z1 = rhozs[i]; r0 = (abs(rhozs[i]) > 280 ? 48 : 64); r1 = 103; } // - barrel else { z0 = (rhozs[i] < 62 ? 40 : 0.35); z1 = 74.2; r0 = rhozs[i]; r1 = rhozs[i]; if (subs[i] == 1) { z0 = -z0; z1 = -z1; } } x0 = r0 * cos(phis[i]); y0 = r0 * sin(phis[i]); x1 = r1 * cos(phis[i]); y1 = r1 * sin(phis[i]); if (_asLines) { shape = asLine(x0, y0, z0, x1, y1, z1, color); } if (_asCylinders) { if (subs[i] == 0 || subs[i] == 3) { shape = asCylinder(abs(r1 - r0) + abs(z1 - z0), drifts[i], phis[i], (x1 + x0) / 2.0, (y1 + y0) / 2.0, (z1 + z0) / 2.0, false); } else { shape = asCylinder(abs(r1 - r0) + abs(z1 - z0), drifts[i], phis[i], (x1 + x0) / 2.0, (y1 + y0) / 2.0, (z1 + z0) / 2.0, true); } } // Use TRT shape.setAppearance(appearance); use(shape, name, info); } Interacter.setOutlined(outlinedBckp); } /** Draw one TRT straw as a {@link LineArray}. * @param x0 The x-coordinate of the straw near end. * @param y0 The y-coordinate of the straw near end. * @param z0 The z-coordinate of the straw near end. * @param x1 The x-coordinate of the straw far end. * @param y1 The y-coordinate of the straw far end. * @param z1 The z-coordinate of the straw far end. * @param color The straw color. * @return The {@link ConeSegment} {@link Shape3D} representing the TRT straw. */ private Shape3D asLine(double x0, double y0, double z0, double x1, double y1, double z1, Color3f color) { Shape3D shape = new Shape3D(); LineArray lineArray = new LineArray(2, GeometryArray.COORDINATES| GeometryArray.COLOR_3| GeometryArray.NORMALS); lineArray.setCoordinate(0, new Point3d(x0 / builder().norm(), y0 / builder().norm(), z0 / builder().norm())); lineArray.setCoordinate(1, new Point3d(x1 / builder().norm(), y1 / builder().norm(), z1 / builder().norm())); lineArray.setColor(0, color); lineArray.setColor(1, color); lineArray.setNormal(0, new Vector3f(0, 0, 0)); lineArray.setNormal(1, new Vector3f(0, 0, 0)); shape.addGeometry(lineArray); return shape; } /** Draw one TRT straw as a cylindric {@link ConeSegment}. * @param l The straw length * @param r The straw diameter (drift length). * @param phi The straw phi place. * @param x The x-coordinate of the straw middle point. * @param y The y-coordinate of the straw middle point. * @param z The z-coordinate of the straw middle point. * @param barrel Whether it is barrel straw. * @return The {@link ConeSegment} representing the TRT straw. */ private Shape3D asCylinder(double l, double r, double phi, double x, double y, double z, boolean barrel) { ConeSegment cone = new ConeSegment(r / builder().norm(), l / builder().norm(), BuildOptions.granularity() / 2, appearance()); Matrix3d m = new Matrix3d(UMATRIX); Matrix3d m0 = new Matrix3d(UMATRIX); m0.rotZ(phi + (float)(PI / 2f)); m.mul(m0); if (!barrel) { m0 = new Matrix3d(UMATRIX); m0.rotX(PI / 2f); m.mul(m0); } TransformGroup it = new TransformGroup(new Transform3D(m, new Vector3d(x / builder().norm(), y / builder().norm(), z / builder().norm()), 1)); setTg(_baseTg); tg().addChild(it); setTg(it); return cone; } /** Set {@link Color}s to be used for line segments. * @param colorMap The array of {@link Color}s. * @param colorList The array of {@link Color}s indexes. */ public static void setColors(Color[] colorMap, int[] colorList) { _colorMap = colorMap; _colorList = colorList; } /** Give {@link Color3f} to be used for <em>i</em>s line segments. * @param i The line segment number. * @return The {@link Color3f} o be used for <em>i</em>s line segment, * <em>null</em> is colormap is not set. */ protected Color3f color(int i) { if (_colorList == null) { return null; } return new Color3f(_colorMap[_colorList[i]]); } private static Color[] _colorMap; private static int[] _colorList; /** Give width of line segments, * the default is <code>2</code>. * @return The width of line segments. */ public int lineWidth() { return _lineWidth; } /** Set width of line segments, * the default is <code>2</code>. * @param lineWidth The width of line segments. */ public static void setLineWidth(int lineWidth) { _lineWidth = lineWidth; } private static int _lineWidth = 2; /** Set cylinder representation of straws. * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number * of straws smaller then 50. */ public static void asCylinders() { _asCylinders = true; _asLines = false; } /** Set line representation of straws. * If neither cylinder nor line is set, the representation is chosen * according to number of straws: cylinders are created for number * of straws smaller then 50. */ public static void asLines() { _asCylinders = false; _asLines = true; } private static booloean _asCylinders = false; private static boolean _asLines = false; private Group _baseTg; private static final Matrix3d UMATRIX = new Matrix3d(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); /** Logging . */ private static Logger log = Logger.getLogger(TRT.class); } |
From: Julius H. <hr...@us...> - 2008-05-23 14:15:42
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2131 Modified Files: Atlantis3D.html Atlantis3DPrint.html Added Files: ajax.gif Log Message: ajax fixed Index: Atlantis3D.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files/Atlantis3D.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Atlantis3D.html 30 Jan 2008 23:21:43 -0000 1.2 --- Atlantis3D.html 23 May 2008 14:15:34 -0000 1.3 *************** *** 13,17 **** <table><tr> ! <td width="30%"><img src="atlantisgraxml.gif" width="400" name="atlantisgraxml" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> <td width="70%" align="center"> <h1 align="center"><font color="#ff000000">Atlantis3D</font><br>GraXML Provides 3D View to Atlantis</h1> --- 13,17 ---- <table><tr> ! <td width="30%"><img src="atlantisgraxml.gif" width="400" height="262" name="atlantisgraxml" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> <td width="70%" align="center"> <h1 align="center"><font color="#ff000000">Atlantis3D</font><br>GraXML Provides 3D View to Atlantis</h1> *************** *** 47,51 **** <p>Atlantis3D works under all common distributions of Linux, MacOSX and MS.</p> </td> ! <td width="50%"><img src="WebStart.gif" width="400" name="WebStart" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr></table> --- 47,51 ---- <p>Atlantis3D works under all common distributions of Linux, MacOSX and MS.</p> </td> ! <td width="50%"><img src="WebStart.gif" width="400" height="198" name="WebStart" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr></table> *************** *** 82,86 **** </ul></p> </td> ! <td width="50%"><img src="StartGraXMLMenu.gif" width="300" name="StartGraXMLMenu" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr></table> --- 82,86 ---- </ul></p> </td> ! <td width="50%"><img src="StartGraXMLMenu.gif" width="300" height="174" name="StartGraXMLMenu" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr></table> *************** *** 130,134 **** </p> </td> ! <td width="50%"><img src="collaboration.jpg" width="400" name="collaboration" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr> <tr> --- 130,134 ---- </p> </td> ! <td width="50%"><img src="collaboration.jpg" width="400" height="270" name="collaboration" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr> <tr> *************** *** 138,142 **** callable, others just serve libraries.</p> </td> ! <td width="50%"><img src="deploy.jpg" width="400" name="deploy" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr> </table> --- 138,142 ---- callable, others just serve libraries.</p> </td> ! <td width="50%"><img src="deploy.jpg" width="400" height="180" name="deploy" onmouseover="TagToTip('imgHelp', BGCOLOR, '#FFFFFF', FONTCOLOR, '#000000', BORDERCOLOR, '#FF0000', BORDERWIDTH, 3)"></td> </tr> </table> *************** *** 209,218 **** <!-- ! SET_DHTML("atlantisgraxml"+SCALABLE+TRANSPARENT, ! "WebStart"+SCALABLE+TRANSPARENT, ! "StartGraXMLMenu"+SCALABLE+TRANSPARENT, ! "Packages"+SCALABLE+TRANSPARENT, ! "collaboration"+SCALABLE+TRANSPARENT, ! "deploy"+SCALABLE+TRANSPARENT); //--> </script> --- 209,219 ---- <!-- ! SET_DHTML(RESIZABLE, TRANSPARENT, ! "atlantisgraxml", ! "WebStart", ! "StartGraXMLMenu", ! "Packages", ! "collaboration", ! "deploy"); //--> </script> --- NEW FILE: ajax.gif --- (This appears to be a binary file; contents omitted.) Index: Atlantis3DPrint.html =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/src/atlantis/graxml3d/doc-files/Atlantis3DPrint.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Atlantis3DPrint.html 30 Jan 2008 23:22:43 -0000 1.1 --- Atlantis3DPrint.html 23 May 2008 14:15:41 -0000 1.2 *************** *** 9,13 **** <span id="imgHelp"></span> ! <span id="printPdf"></span> <table><tr> --- 9,13 ---- <span id="imgHelp"></span> ! <span id="printPdf">Page with active images is here</span> <table><tr> *************** *** 18,21 **** --- 18,22 ---- Atlantis-GraXML bridge has been created allowing Atlantis objects to be visualised in GraXML.</p> + <p><a href="Atlantis3D.html" onmouseover="TagToTip('printPdf')"><img src="ajax.gif" border="0"></a></p> </td> </tr></table> |
From: Julius H. <hr...@us...> - 2008-05-05 20:48:51
|
Update of /cvsroot/graxml/Graphics/GraXMLBridge/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21582 Modified Files: build.xml Log Message: javadoc fixed Index: build.xml =================================================================== RCS file: /cvsroot/graxml/Graphics/GraXMLBridge/ant/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 30 Jan 2008 00:54:46 -0000 1.3 --- build.xml 5 May 2008 20:48:51 -0000 1.4 *************** *** 234,239 **** <Footer><![CDATA[<center>Written by: <a href='http://home.cern.ch/hrivnac'>J.Hrivnac</a></center>]]></Footer> <bottom><![CDATA[<a href='http://cern.ch/hrivnac/Activities/Packages/GraXMLBridge'>Documentation</a>]]> built ${TODAY} on ${os.name} by ${user.name}</bottom> ! <link href="http://java.sun.com/j2se/1.6.0/docs/api"/> ! <link href="http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi"/> <link href="http://cern.ch/hrivnac/Activities/Packages/GraXML/JavaDoc"/> <link href="http://cern.ch/hrivnac/Activities/Packages/HEP3D/JavaDoc"/> --- 234,239 ---- <Footer><![CDATA[<center>Written by: <a href='http://home.cern.ch/hrivnac'>J.Hrivnac</a></center>]]></Footer> <bottom><![CDATA[<a href='http://cern.ch/hrivnac/Activities/Packages/GraXMLBridge'>Documentation</a>]]> built ${TODAY} on ${os.name} by ${user.name}</bottom> ! <link href="http://java.sun.com/javase/6/docs/api"/> ! <link href="http://download.java.net/media/java3d/javadoc/1.5.0"/> <link href="http://cern.ch/hrivnac/Activities/Packages/GraXML/JavaDoc"/> <link href="http://cern.ch/hrivnac/Activities/Packages/HEP3D/JavaDoc"/> |
From: Julius H. <hr...@us...> - 2008-05-02 14:22:14
|
Update of /cvsroot/graxml/DetDescr/AGDD/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2010 Modified Files: build.xml Log Message: prepared for 0.8.0 Index: build.xml =================================================================== RCS file: /cvsroot/graxml/DetDescr/AGDD/ant/build.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** build.xml 29 Apr 2008 14:51:02 -0000 1.19 --- build.xml 2 May 2008 14:22:08 -0000 1.20 *************** *** 12,16 **** <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="pre-0.8.0"/> <path id="classpath.build"> --- 12,16 ---- <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="0.8.0"/> <path id="classpath.build"> |
From: Julius H. <hr...@us...> - 2008-05-02 14:21:26
|
Update of /cvsroot/graxml/DetDescr/AGDD/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1900 Modified Files: index.html Log Message: prepared for 0.8.0 Index: index.html =================================================================== RCS file: /cvsroot/graxml/DetDescr/AGDD/src/index.html,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.html 22 Dec 2007 15:22:52 -0000 1.27 --- index.html 2 May 2008 14:21:28 -0000 1.28 *************** *** 152,160 **** </ul> </li> - <li>Bug fixes: - <ul> - <li>***</li> - </ul> - </li> </ul> </li> --- 152,155 ---- |
From: Julius H. <hr...@us...> - 2008-05-02 14:19:42
|
Update of /cvsroot/graxml/DetDescr/GDML/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv599 Modified Files: build.xml Log Message: prepared for 0.5.4 Index: build.xml =================================================================== RCS file: /cvsroot/graxml/DetDescr/GDML/ant/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.xml 29 Apr 2008 15:15:45 -0000 1.15 --- build.xml 2 May 2008 14:19:39 -0000 1.16 *************** *** 12,16 **** <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="pre-0.5.4"/> <path id="classpath.build"> --- 12,16 ---- <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="0.5.4"/> <path id="classpath.build"> |
From: Julius H. <hr...@us...> - 2008-05-02 14:19:28
|
Update of /cvsroot/graxml/DetDescr/GDML/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv466 Modified Files: index.html Log Message: prepared for 0.5.4 Index: index.html =================================================================== RCS file: /cvsroot/graxml/DetDescr/GDML/src/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.html 22 Dec 2007 15:25:14 -0000 1.9 --- index.html 2 May 2008 14:19:21 -0000 1.10 *************** *** 141,149 **** </ul> </li> - <li>Bug fixes: - <ul> - <li>...</li> - </ul> - </li> </ul> </li> --- 141,144 ---- *************** *** 170,174 **** <hr> <img width="0" height="0" src="http://hrivnac.home.cern.ch/hrivnac/cgi-bin/record.pl?page=GDML"> ! <address><a href="http://hrivnac.home.cern.ch/~hrivnac">J.Hrivnac</a>, @BUILD@</address> <script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics1.js"/><script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics2.js"/> </body> --- 165,169 ---- <hr> <img width="0" height="0" src="http://hrivnac.home.cern.ch/hrivnac/cgi-bin/record.pl?page=GDML"> ! <address><a href="http://home.cern.ch/~hrivnac">J.Hrivnac</a>, @BUILD@</address> <script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics1.js"/><script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics2.js"/> </body> |
From: Julius H. <hr...@us...> - 2008-05-02 14:17:20
|
Update of /cvsroot/graxml/DetDescr/JiveGeometry/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31442 Modified Files: build.xml Log Message: prepared for 1.0.0 Index: build.xml =================================================================== RCS file: /cvsroot/graxml/DetDescr/JiveGeometry/ant/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** build.xml 29 Apr 2008 14:46:59 -0000 1.10 --- build.xml 2 May 2008 14:17:12 -0000 1.11 *************** *** 12,16 **** <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="pre-0.0.0"/> <path id="classpath.build"> --- 12,16 ---- <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="1.0.0"/> <path id="classpath.build"> |
From: Julius H. <hr...@us...> - 2008-05-02 14:16:10
|
Update of /cvsroot/graxml/DetDescr/JiveGeometry/src/net/hep/atlas/graphics/JiveGeometry/Test In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30038/net/hep/atlas/graphics/JiveGeometry/Test Modified Files: GeometricModel.java JAXB.java Log Message: prepared for 1.0.0 Index: JAXB.java =================================================================== RCS file: /cvsroot/graxml/DetDescr/JiveGeometry/src/net/hep/atlas/graphics/JiveGeometry/Test/JAXB.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JAXB.java 29 Apr 2008 14:46:22 -0000 1.5 --- JAXB.java 2 May 2008 14:15:36 -0000 1.6 *************** *** 19,22 **** --- 19,25 ---- * <pre> * $Log$ + * Revision 1.6 2008/05/02 14:15:36 hrivnac + * prepared for 1.0.0 + * * Revision 1.5 2008/04/29 14:46:22 hrivnac * javadoc cleaned *************** *** 53,57 **** JAXBContext jc = JAXBContext.newInstance("net.hep.atlas.graphics.JiveGeometry.JAXB"); Unmarshaller u = jc.createUnmarshaller(); ! //u.setValidating(true); TBD log.info("Opening " + args[0]); // Get geometry --- 56,60 ---- JAXBContext jc = JAXBContext.newInstance("net.hep.atlas.graphics.JiveGeometry.JAXB"); Unmarshaller u = jc.createUnmarshaller(); ! //u.setValidating(true); log.info("Opening " + args[0]); // Get geometry Index: GeometricModel.java =================================================================== RCS file: /cvsroot/graxml/DetDescr/JiveGeometry/src/net/hep/atlas/graphics/JiveGeometry/Test/GeometricModel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GeometricModel.java 29 Apr 2008 14:46:22 -0000 1.5 --- GeometricModel.java 2 May 2008 14:15:36 -0000 1.6 *************** *** 19,22 **** --- 19,25 ---- * <pre> * $Log$ + * Revision 1.6 2008/05/02 14:15:36 hrivnac + * prepared for 1.0.0 + * * Revision 1.5 2008/04/29 14:46:22 hrivnac * javadoc cleaned *************** *** 53,57 **** JAXBContext jc = JAXBContext.newInstance("net.hep.atlas.graphics.JiveGeometry.JAXB"); Unmarshaller u = jc.createUnmarshaller(); ! //u.setValidating(true); TBD log.info("Opening " + args[0]); // Get geometry --- 56,60 ---- JAXBContext jc = JAXBContext.newInstance("net.hep.atlas.graphics.JiveGeometry.JAXB"); Unmarshaller u = jc.createUnmarshaller(); ! //u.setValidating(true); log.info("Opening " + args[0]); // Get geometry |
From: Julius H. <hr...@us...> - 2008-05-02 14:15:35
|
Update of /cvsroot/graxml/DetDescr/JiveGeometry/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30038 Modified Files: index.html Log Message: prepared for 1.0.0 Index: index.html =================================================================== RCS file: /cvsroot/graxml/DetDescr/JiveGeometry/src/index.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.html 28 Apr 2008 13:20:10 -0000 1.6 --- index.html 2 May 2008 14:15:34 -0000 1.7 *************** *** 73,77 **** <hr> <img width="0" height="0" src="http://home.cern.ch/hrivnac/cgi-bin/record.pl?page=JiveGeometry"> ! <address><a href="http://home.cern.ch/~hrivnac">J.Hrivnac</a>, @BUILD@</address> <script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics1.js"/><script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics2.js"/> </body> --- 73,77 ---- <hr> <img width="0" height="0" src="http://home.cern.ch/hrivnac/cgi-bin/record.pl?page=JiveGeometry"> ! <address><a href="http://cern.ch/~hrivnac">J.Hrivnac</a>, @BUILD@</address> <script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics1.js"/><script type="text/javascript" src="http://cern.ch/hrivnac/google-analytics2.js"/> </body> |
From: Julius H. <hr...@us...> - 2008-05-02 14:11:00
|
Update of /cvsroot/graxml/Graphics/JiveEvent/ant In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26627 Modified Files: ToDo.txt build.xml Log Message: prepared for 1.0.0 Index: ToDo.txt =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/ant/ToDo.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ToDo.txt 30 Mar 2005 13:10:20 -0000 1.1 --- ToDo.txt 2 May 2008 14:10:59 -0000 1.2 *************** *** 1,9 **** - use Units - - draw transparent objects without outline - - go through Schema - - Jet: Et x Pt - document in GraXML Guide --- 1 ---- Index: build.xml =================================================================== RCS file: /cvsroot/graxml/Graphics/JiveEvent/ant/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.xml 29 Apr 2008 14:45:31 -0000 1.15 --- build.xml 2 May 2008 14:10:59 -0000 1.16 *************** *** 12,16 **** <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="pre-0.1.4"/> <path id="classpath.build"> --- 12,16 ---- <property name="env.ANT_SITE" value="dist"/> <property file="ant/config-${env.ANT_SITE}.properties"/> ! <property name="version" value="1.0.0"/> <path id="classpath.build"> |