LISTSERV mailing list manager LISTSERV 16.5

Help for LCDET-SVN Archives


LCDET-SVN Archives

LCDET-SVN Archives


LCDET-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LCDET-SVN Home

LCDET-SVN Home

LCDET-SVN  December 2014

LCDET-SVN December 2014

Subject:

r3467 - in /projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter: JavaSurveyVolume.java LCDDSurveyVolume.java SurveyVolumeImpl.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the lcdet svn repository <[log in to unmask]>

Date:

Fri, 19 Dec 2014 21:03:00 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (132 lines)

Author: [log in to unmask]
Date: Fri Dec 19 13:02:55 2014
New Revision: 3467

Log:
Further merging of the lcdd and java SurveyVolumes

Modified:
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/JavaSurveyVolume.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/JavaSurveyVolume.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/JavaSurveyVolume.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/JavaSurveyVolume.java	Fri Dec 19 13:02:55 2014
@@ -73,8 +73,8 @@
 		setComponentId(volumeId);
 		setMother(mother);
 		mother.addDaughter(this);
-		buildBox(surveyVolume);
-		buildVolume(surveyVolume);
+		buildBox();
+		buildVolume();
 		setPositionAndRotation(surveyVolume);
 		if(isDebug()) System.out.printf("%s: DONE JavaBaseGeometry %s\n", this.getClass().getSimpleName(),surveyVolume.getName());
 	}
@@ -89,16 +89,15 @@
 		JavaSurveyVolume physMother =  getPhysMother();
 		setPhysVolume(new PhysicalVolume(new Transform3D(getPos(), getRot()), getName(), volume, physMother.getVolume(),getComponentId()));
 	}
-	public void buildBox(SurveyVolume base) {
-		Hep3Vector b = base.getBoxDim();
-		b = VecOp.mult(0.5, b);
+	
+	public void buildBox() {
+		Hep3Vector b = VecOp.mult(0.5,getBoxDim());
 		if(isDebug()) System.out.printf("%s: build box for %s with dimensions %s \n", this.getClass().getSimpleName(),getName(), b);
 		setBox(new Box(getName() + "Box", b.x(), b.y(), b.z())); 
 	}
-	public void buildVolume(SurveyVolume base) {
-		if(isDebug()) System.out.printf("%s: build volume for %s with material %s\n", this.getClass().getSimpleName(),getName(),base.getMaterial());
-			IMaterial material = MaterialStore.getInstance().get(base.getMaterial());
-			setVolume(new LogicalVolume(getName() + "_volume", box, material));
+	public void buildVolume() {
+		if(isDebug()) System.out.printf("%s: build volume for %s with material %s\n", this.getClass().getSimpleName(),getName(), MaterialStore.getInstance().get(getMaterial()));
+			setVolume(new LogicalVolume(getName() + "_volume", box, MaterialStore.getInstance().get(getMaterial())));
 		
 	}
 	public void setPositionAndRotation(SurveyVolume base) {

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/LCDDSurveyVolume.java	Fri Dec 19 13:02:55 2014
@@ -70,8 +70,8 @@
 		this.lcdd = lcdd;
 		setMother(mother);
 		mother.addDaughter(this);
-		buildBox(surveyVolume);
-		buildVolume(surveyVolume);
+		buildBox();
+		buildVolume();
 		setPositionAndRotation(surveyVolume);
 		//buildPhysVolume(mother);
 		if(isDebug()) System.out.printf("%s: DONE constructing LCDD object %s\n", this.getClass().getSimpleName(),surveyVolume.getName());
@@ -86,14 +86,14 @@
 	    //if(isDebug()) System.out.printf("%s: build phys volume for %s\n", this.getClass().getSimpleName(),getName());
 		//setPhysVolume(new PhysVol(volume, getMother().getVolume(), getPos(), getRot()));
 	}
-	public void buildBox(SurveyVolume base) {
-		if(isDebug()) System.out.printf("%s: build box for %s\n", this.getClass().getSimpleName(),getName());
-		setBox(new Box(getName() + "Box", base.getBoxDim().x(), base.getBoxDim().y(), base.getBoxDim().z())); 
-	}
-	public void buildVolume(SurveyVolume base) {
-		if(isDebug()) System.out.printf("%s: build volume for %s with material %s\n", this.getClass().getSimpleName(),getName(),base.getMaterial());
+	public void buildBox() {
+		if(isDebug()) System.out.printf("%s: build box for %s\n", getClass().getSimpleName(),getName());
+		setBox(new Box(getName() + "Box", getBoxDim().x(), getBoxDim().y(), getBoxDim().z())); 
+	}
+	public void buildVolume() {
+		if(isDebug()) System.out.printf("%s: build volume for %s with material %s\n", this.getClass().getSimpleName(),getName(),getMaterial());
 		try {
-			Material mat = lcdd.getMaterial(base.getMaterial());
+			Material mat = lcdd.getMaterial(getMaterial());
 			setVolume(new Volume(getName() + "_volume", box, mat));
 		} catch (JDOMException e) {
 			e.printStackTrace();

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java	Fri Dec 19 13:02:55 2014
@@ -1,4 +1,6 @@
 package org.lcsim.geometry.compact.converter;
+
+import hep.physics.vec.Hep3Vector;
 
 public abstract class SurveyVolumeImpl extends SurveyVolumeVisualization {
 
@@ -12,14 +14,22 @@
 
     public abstract void buildPhysVolume();
 
-    public abstract void buildBox(SurveyVolume base);
+    public abstract void buildBox();
 
-    public abstract void buildVolume(SurveyVolume base);
+    public abstract void buildVolume();
 
     public abstract void setPositionAndRotation(SurveyVolume base);
 
     public String getName() {
     	return surveyVolume.getName();
+    }
+    
+    protected Hep3Vector getBoxDim() {
+        return surveyVolume.getBoxDim();
+    }
+    
+    protected String getMaterial() {
+        return surveyVolume.getMaterial();
     }
 
     public boolean isDebug() {

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use