GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
diff -u -r1.3 -r1.4
--- HPSTracker.java 13 Jan 2012 00:04:28 -0000 1.3
+++ HPSTracker.java 18 Jan 2012 00:26:15 -0000 1.4
@@ -35,6 +35,11 @@
{
super(node);
}
+
+ public boolean isTracker()
+ {
+ return true;
+ }
void addToLCDD(LCDD lcdd, SensitiveDetector sd) throws JDOMException
{
@@ -112,17 +117,13 @@
Position p = new Position(moduleBaseName + "_position");
- //System.out.println("x,y,z = " + x + "," + y + "," + z);
-
p.setX(x);
p.setY(y);
p.setZ(z + dz);
Rotation rot = new Rotation(moduleBaseName + "_rotation");
rot.setX(0);
rot.setY(0);
- //rot.setX(-Math.PI / 2);
- //rot.setY(Math.PI / 2 + phi0);
- rot.setZ(0);
+ rot.setZ(phi0);
lcdd.add(p);
lcdd.add(rot);
@@ -144,16 +145,13 @@
double rphi0 = phi0;
if (flipSA)
rphi0 = -rphi0;
- //rotr.setX(-Math.PI / 2);
- //rotr.setY(Math.PI / 2 + rphi0);
rotr.setX(0);
rotr.setY(0);
- rotr.setZ(0);
+ rotr.setZ(rphi0);
lcdd.add(pr);
lcdd.add(rotr);
- // System.out.println("Reflecting "+ x+" "+y+" "+z);
PhysVol pvr = new PhysVol(moduleVolume, lcdd.getTrackingVolume(), pr, rotr);
pvr.addPhysVolID("system", sysId);
pvr.addPhysVolID("barrel", 0);
@@ -177,7 +175,6 @@
double x, y;
x = params.getDimension(0);
y = params.getDimension(1);
-
Box box = new Box(params.getName() + "Box", x, y, thickness);
lcdd.add(box);
@@ -246,27 +243,23 @@
throw new RuntimeException("Maximum of 2 sensors per module.");
}
- // Build an child sensor volume to allow dead areas.
+ // Build a child sensor volume to allow dead areas.
String sensorName = componentName + "Sensor" + sensor;
double sensorX = component.getDimensionX();
- // System.out.println("sensorX="+sensorX);
if (sensorX > moduleX)
throw new RuntimeException("Sensor X dimension " + sensorX + " is too big for module.");
double sensorY = component.getDimensionY();
- // System.out.println("sensorY="+sensorY);
if (sensorY > moduleY)
throw new RuntimeException("Sensor Y dimension " + sensorY + " is too big for module.");
- // System.out.println("sensorBox = "+sensorX+", " + sensorY + ", " + thickness);
Box sensorBox = new Box(sensorName + "Box", sensorX, sensorY, thickness);
lcdd.add(sensorBox);
Volume sensorVol = new Volume(sensorName, sensorBox, material);
sensorVol.setSensitiveDetector(sd);
- // sensorVol.setVisAttributes(blah);
lcdd.add(sensorVol);
Position sensorPosition = new Position(sensorName + "Position", 0, 0, 0);
@@ -294,11 +287,6 @@
}
}
- public boolean isTracker()
- {
- return true;
- }
-
static class ModuleComponentParameters
{
protected String materialName;