[GraXML-commit] Graphics/JiveEvent/src/net/hep/atlas/graphics/JiveEvent/GeometricModel Jet0.java,
Brought to you by:
hrivnac
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}. |