diff --git a/gdml/BabyIAXO/CompleteVeto1Layers.gdml b/gdml/BabyIAXO/CompleteVeto1Layers.gdml
index f4c149c..799f3b1 100644
--- a/gdml/BabyIAXO/CompleteVeto1Layers.gdml
+++ b/gdml/BabyIAXO/CompleteVeto1Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4470,21 +4470,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4515,21 +4515,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4560,21 +4560,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4605,21 +4605,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/CompleteVeto2Layers.gdml b/gdml/BabyIAXO/CompleteVeto2Layers.gdml
index dc81cbd..1390a76 100644
--- a/gdml/BabyIAXO/CompleteVeto2Layers.gdml
+++ b/gdml/BabyIAXO/CompleteVeto2Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4475,21 +4475,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4525,21 +4525,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4575,21 +4575,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4625,21 +4625,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/CompleteVeto3Layers.gdml b/gdml/BabyIAXO/CompleteVeto3Layers.gdml
index f510dcf..8f539e7 100644
--- a/gdml/BabyIAXO/CompleteVeto3Layers.gdml
+++ b/gdml/BabyIAXO/CompleteVeto3Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4480,21 +4480,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4535,21 +4535,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4590,21 +4590,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4645,21 +4645,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/CompleteVeto4Layers.gdml b/gdml/BabyIAXO/CompleteVeto4Layers.gdml
index 5b7e8f8..1b2722e 100644
--- a/gdml/BabyIAXO/CompleteVeto4Layers.gdml
+++ b/gdml/BabyIAXO/CompleteVeto4Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4485,21 +4485,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4545,21 +4545,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4605,21 +4605,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4665,21 +4665,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/Default.gdml b/gdml/BabyIAXO/Default.gdml
index f510dcf..8f539e7 100644
--- a/gdml/BabyIAXO/Default.gdml
+++ b/gdml/BabyIAXO/Default.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4480,21 +4480,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4535,21 +4535,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4590,21 +4590,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4645,21 +4645,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/DefaultXenon.gdml b/gdml/BabyIAXO/DefaultXenon.gdml
index 8ba1cf0..7e3126c 100644
--- a/gdml/BabyIAXO/DefaultXenon.gdml
+++ b/gdml/BabyIAXO/DefaultXenon.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4480,21 +4480,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4535,21 +4535,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4590,21 +4590,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4645,21 +4645,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/VetoSystem.gdml b/gdml/BabyIAXO/VetoSystem.gdml
index c8cc9b7..918a6bb 100644
--- a/gdml/BabyIAXO/VetoSystem.gdml
+++ b/gdml/BabyIAXO/VetoSystem.gdml
@@ -4068,21 +4068,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4123,21 +4123,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4178,21 +4178,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4233,21 +4233,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4288,21 +4288,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/BabyIAXO/WithTelescopePipe.gdml b/gdml/BabyIAXO/WithTelescopePipe.gdml
index 63b658f..c489402 100644
--- a/gdml/BabyIAXO/WithTelescopePipe.gdml
+++ b/gdml/BabyIAXO/WithTelescopePipe.gdml
@@ -4433,21 +4433,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4488,21 +4488,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4543,21 +4543,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4598,21 +4598,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4653,21 +4653,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/CompleteVeto1Layers.gdml b/gdml/IAXO-D1/CompleteVeto1Layers.gdml
index a77655b..736a9d4 100644
--- a/gdml/IAXO-D1/CompleteVeto1Layers.gdml
+++ b/gdml/IAXO-D1/CompleteVeto1Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4517,17 +4517,17 @@
-
+
-
+
-
+
-
+
@@ -4558,21 +4558,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4615,7 +4615,7 @@
-
+
@@ -4641,17 +4641,17 @@
-
+
-
+
-
+
-
+
@@ -4682,17 +4682,17 @@
-
+
-
+
-
+
-
+
@@ -4764,17 +4764,17 @@
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/CompleteVeto2Layers.gdml b/gdml/IAXO-D1/CompleteVeto2Layers.gdml
index d7dd7f0..bc369a9 100644
--- a/gdml/IAXO-D1/CompleteVeto2Layers.gdml
+++ b/gdml/IAXO-D1/CompleteVeto2Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4517,17 +4517,17 @@
-
+
-
+
-
+
-
+
@@ -4563,21 +4563,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4620,12 +4620,12 @@
-
+
-
+
@@ -4651,17 +4651,17 @@
-
+
-
+
-
+
-
+
@@ -4697,17 +4697,17 @@
-
+
-
+
-
+
-
+
@@ -4757,16 +4757,16 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -4789,17 +4789,17 @@
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/CompleteVeto3Layers.gdml b/gdml/IAXO-D1/CompleteVeto3Layers.gdml
index d5f6cfa..bdb11d9 100644
--- a/gdml/IAXO-D1/CompleteVeto3Layers.gdml
+++ b/gdml/IAXO-D1/CompleteVeto3Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4517,17 +4517,17 @@
-
+
-
+
-
+
-
+
@@ -4568,21 +4568,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4625,17 +4625,17 @@
-
+
-
+
-
+
@@ -4661,17 +4661,17 @@
-
+
-
+
-
+
-
+
@@ -4712,17 +4712,17 @@
-
+
-
+
-
+
-
+
@@ -4777,20 +4777,20 @@
-
+
-
-
+
+
-
+
-
-
+
+
@@ -4814,17 +4814,17 @@
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/CompleteVeto4Layers.gdml b/gdml/IAXO-D1/CompleteVeto4Layers.gdml
index a11f961..7f1b181 100644
--- a/gdml/IAXO-D1/CompleteVeto4Layers.gdml
+++ b/gdml/IAXO-D1/CompleteVeto4Layers.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4517,17 +4517,17 @@
-
+
-
+
-
+
-
+
@@ -4573,21 +4573,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4630,22 +4630,22 @@
-
+
-
+
-
+
-
+
@@ -4671,17 +4671,17 @@
-
+
-
+
-
+
-
+
@@ -4727,17 +4727,17 @@
-
+
-
+
-
+
-
+
@@ -4797,25 +4797,25 @@
-
-
-
-
-
-
+
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
@@ -4839,17 +4839,17 @@
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/Default.gdml b/gdml/IAXO-D1/Default.gdml
index d5f6cfa..bdb11d9 100644
--- a/gdml/IAXO-D1/Default.gdml
+++ b/gdml/IAXO-D1/Default.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4517,17 +4517,17 @@
-
+
-
+
-
+
-
+
@@ -4568,21 +4568,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4625,17 +4625,17 @@
-
+
-
+
-
+
@@ -4661,17 +4661,17 @@
-
+
-
+
-
+
-
+
@@ -4712,17 +4712,17 @@
-
+
-
+
-
+
-
+
@@ -4777,20 +4777,20 @@
-
+
-
-
+
+
-
+
-
-
+
+
@@ -4814,17 +4814,17 @@
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/DefaultXenon.gdml b/gdml/IAXO-D1/DefaultXenon.gdml
index 8ba1cf0..7e3126c 100644
--- a/gdml/IAXO-D1/DefaultXenon.gdml
+++ b/gdml/IAXO-D1/DefaultXenon.gdml
@@ -4425,21 +4425,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4480,21 +4480,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4535,21 +4535,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4590,21 +4590,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4645,21 +4645,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/gdml/IAXO-D1/VetoSystem.gdml b/gdml/IAXO-D1/VetoSystem.gdml
index 5a508ce..df36d42 100644
--- a/gdml/IAXO-D1/VetoSystem.gdml
+++ b/gdml/IAXO-D1/VetoSystem.gdml
@@ -4068,21 +4068,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4160,17 +4160,17 @@
-
+
-
+
-
+
-
+
@@ -4211,21 +4211,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -4268,17 +4268,17 @@
-
+
-
+
-
+
@@ -4304,17 +4304,17 @@
-
+
-
+
-
+
-
+
@@ -4355,17 +4355,17 @@
-
+
-
+
-
+
-
+
@@ -4420,20 +4420,20 @@
-
+
-
-
+
+
-
+
-
-
+
+
@@ -4457,17 +4457,17 @@
-
+
-
+
-
+
-
+
diff --git a/generator/src/main/kotlin/BabyIAXO/VetoSystem.kt b/generator/src/main/kotlin/BabyIAXO/VetoSystem.kt
index 04b0150..567bbe7 100644
--- a/generator/src/main/kotlin/BabyIAXO/VetoSystem.kt
+++ b/generator/src/main/kotlin/BabyIAXO/VetoSystem.kt
@@ -161,7 +161,8 @@ class VetoLayer(
val vetoLayerVolume: GdmlRef by lazy {
return@lazy gdml.structure.assembly {
for (i in 1..n) {
- physVolume(veto, name = "$name.veto$i") {
+ val index = if (!reverseIndex) n - i + 1 else i
+ physVolume(veto, name = "$name.veto$index") {
position(x = step * i - offset) { unit = LUnit.MM }
}
}
@@ -178,7 +179,7 @@ class VetoLayer(
val vetoLayerVolume: GdmlRef by lazy {
return@lazy gdml.structure.assembly {
repeat(n) { j ->
- val index = if (reverseIndex) n - j else j
+ val index = if (reverseIndex) n - j + 1 else j
if (j == 1) {
physVolume(vetoSmall, name = "vetoSmall$index") {
position(
diff --git a/generator/src/main/kotlin/IAXO-D1/VetoSystem.kt b/generator/src/main/kotlin/IAXO-D1/VetoSystem.kt
index 70d839b..b193391 100644
--- a/generator/src/main/kotlin/IAXO-D1/VetoSystem.kt
+++ b/generator/src/main/kotlin/IAXO-D1/VetoSystem.kt
@@ -66,7 +66,7 @@ class VetoLayerBottom(private val numberOfLayers: Int = 3) : Geometry() {
return@lazy gdml.structure.assembly {
for (i in 1..numberOfLayers) {
if (i == 1) {
- physVolume(vetoLayer, name = "vetoLayerBottom$i") {
+ physVolume(vetoLayerReversedIndex, name = "vetoLayerBottom$i") {
position(
y = -(Veto.FullThickness + 5) * (i - 1) + 20
) { unit = LUnit.MM }
@@ -75,14 +75,14 @@ class VetoLayerBottom(private val numberOfLayers: Int = 3) : Geometry() {
} else {
if (i % 2 == 0) {
// revert the indices so that geometry looks okay
- physVolume(vetoLayerReversedIndex, name = "vetoLayerBottom$i") {
+ physVolume(vetoLayer, name = "vetoLayerBottom$i") {
position(
y = -(Veto.FullThickness + 5) * (i - 1)
) { unit = LUnit.MM }
rotation { unit = AUnit.DEG; y = 180 * (i + 1) }
}
} else {
- physVolume(vetoLayer, name = "vetoLayerBottom$i") {
+ physVolume(vetoLayerReversedIndex, name = "vetoLayerBottom$i") {
position(
y = -(Veto.FullThickness + 5) * (i - 1)
) { unit = LUnit.MM }
@@ -146,14 +146,13 @@ class VetoLayerLeft(private val numberOfLayers: Int = 3) : Geometry() {
class VetoLayerBack(private val numberOfLayers: Int = 3) : Geometry() {
override fun generate(gdml: Gdml): GdmlRef {
- val vetoLayer = VetoLayer(3, separation = 10.0).generate(gdml)
+ val vetoLayer = VetoLayer(3, separation = 10.0, reverseIndex = true).generate(gdml)
val vetoLayerVolume: GdmlRef by lazy {
return@lazy gdml.structure.assembly {
for (i in 1..numberOfLayers) {
// We revert back layer so the numbering looks uniform
- val i_reverse = numberOfLayers - i + 1
- physVolume(vetoLayer, name = "vetoLayerBack$i_reverse") {
+ physVolume(vetoLayer, name = "vetoLayerBack$i") {
position(
z = -(Veto.FullThickness + 20) * (i - 1),
y = 0
@@ -236,4 +235,4 @@ class VetoSystem(private val numberOfLayers: Int = 3) : Geometry() {
return vetoSystemVolume
}
-}
\ No newline at end of file
+}