From 1963f12be03b7231d064e1c4b1ea2938599e8393 Mon Sep 17 00:00:00 2001 From: AsaNehm <101250148+AsaNehm@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:16:35 +0100 Subject: [PATCH] Correcting(?) the magnetic field direction in center region of TMS Uncommenting, correcting and implemeting the second box option to allow for the magnetic field to be in the opposite direction of the outer region. Inner region pointing up, outer region pointing down --- duneggd/SubDetector/TMS.py | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/duneggd/SubDetector/TMS.py b/duneggd/SubDetector/TMS.py index fbcdda2..a3b4157 100644 --- a/duneggd/SubDetector/TMS.py +++ b/duneggd/SubDetector/TMS.py @@ -23,28 +23,28 @@ def construct(self, geom): dx = 0.5*self.thinbox1Dimension[0], dy = 0.5*self.thinbox1Dimension[1], dz = 0.5*self.thinbox1Dimension[2]) - #thinBox2 = geom.shapes.Box( 'box2'+self.name, - # dx = 0.5*self.thinbox2Dimension[0], - # dy = 0.5*self.thinbox2Dimension[1], - # dz = 0.5*self.thinbox2Dimension[2]) + thinBox2 = geom.shapes.Box( 'box2'+self.name, + dx = 0.5*self.thinbox1Dimension[0], + dy = 0.5*self.thinbox1Dimension[1], + dz = 0.5*self.thinbox1Dimension[2]) thickBox1 = geom.shapes.Box( 'thickbox'+self.name, dx = 0.5*self.thinbox1Dimension[0], dy = 0.5*self.thinbox1Dimension[1], dz = 0.5*Q("0.040m")) - #thickBox2 = geom.shapes.Box( 'thickbox2'+self.name, - # dx = 0.5*self.thinbox2Dimension[0], - # dy = 0.5*self.thinbox2Dimension[1], - # dz = 0.5*Q("0.040m")) + thickBox2 = geom.shapes.Box( 'thickbox2'+self.name, + dx = 0.5*self.thinbox1Dimension[0], + dy = 0.5*self.thinbox1Dimension[1], + dz = 0.5*Q("0.040m")) doubleBox1 = geom.shapes.Box( 'doublebox'+self.name, dx = 0.5*self.thinbox1Dimension[0], dy = 0.5*self.thinbox1Dimension[1], dz = 0.5*Q("0.080m")) - #doubleBox2 = geom.shapes.Box( 'doublebox2'+self.name, - # dx = 0.5*self.thinbox2Dimension[0], - # dy = 0.5*self.thinbox2Dimension[1], - # dz = 0.5*Q("0.080m")) + doubleBox2 = geom.shapes.Box( 'doublebox2'+self.name, + dx = 0.5*self.thinbox1Dimension[0], + dy = 0.5*self.thinbox1Dimension[1], + dz = 0.5*Q("0.080m")) @@ -69,17 +69,17 @@ def construct(self, geom): thinBox1_lv = geom.structure.Volume( 'thinvol'+self.name, material=self.mat, shape=thinBox1 ) - #thinBox2_lv = geom.structure.Volume( 'thinvol2'+self.name, material=self.mat, shape=thinBox2 ) + thinBox2_lv = geom.structure.Volume( 'thinvol2'+self.name, material=self.mat, shape=thinBox2 ) thickBox1_lv = geom.structure.Volume( 'thickvol'+self.name, material=self.mat, shape=thickBox1 ) - #thickBox2_lv = geom.structure.Volume( 'thickvol2'+self.name, material=self.mat, shape=thickBox2 ) + thickBox2_lv = geom.structure.Volume( 'thickvol2'+self.name, material=self.mat, shape=thickBox2 ) doubleBox1_lv = geom.structure.Volume( 'doublevol'+self.name, material=self.mat, shape=doubleBox1 ) - #doubleBox2_lv = geom.structure.Volume( 'doublevol2'+self.name, material=self.mat, shape=doubleBox2 ) + doubleBox2_lv = geom.structure.Volume( 'doublevol2'+self.name, material=self.mat, shape=doubleBox2 ) thinBox1_lv.params.append(('BField',self.BFieldDownHigh)) - #thinBox2_lv.params.append(('BField',self.BFieldUpHigh)) + thinBox2_lv.params.append(('BField',self.BFieldUpHigh)) thickBox1_lv.params.append(('BField',self.BFieldDownLow)) - #thickBox2_lv.params.append(('BField',self.BFieldUpLow)) + thickBox2_lv.params.append(('BField',self.BFieldUpLow)) doubleBox1_lv.params.append(('BField',self.BFieldDownLow)) - #doubleBox2_lv.params.append(('BField',self.BFieldUpLow)) + doubleBox2_lv.params.append(('BField',self.BFieldUpLow)) thin_layer_lv = geom.structure.Volume( 'thinlayervol', material='Air', shape=thin_layer ) thick_layer_lv = geom.structure.Volume( 'thicklayervol', material='Air', shape=thick_layer ) @@ -129,8 +129,8 @@ def construct(self, geom): #thin_layer_lv.placements.append(ctr_pla.name) pla_1 = geom.structure.Placement( 'plane1'+self.name, volume=thinBox1_lv, pos=steel_pos1 ) - pla_2 = geom.structure.Placement( 'plane2'+self.name, volume=thinBox1_lv, pos=steel_pos2 ) - pla_3 = geom.structure.Placement( 'plane3'+self.name, volume=thinBox1_lv, pos=steel_pos3 ) + pla_2 = geom.structure.Placement( 'plane2'+self.name, volume=thinBox2_lv, pos=steel_pos2 ) + pla_3 = geom.structure.Placement( 'plane3'+self.name, volume=thinBox2_lv, pos=steel_pos3 ) pla_4 = geom.structure.Placement( 'plane4'+self.name, volume=thinBox1_lv, pos=steel_pos4 ) thin_layer_lv.placements.append(pla_1.name) @@ -148,8 +148,8 @@ def construct(self, geom): #thick_layer_lv.placements.append(thick_ctr_pla.name) thick_pla_1 = geom.structure.Placement( 'thickplane1'+self.name, volume=thickBox1_lv, pos=steel_pos1 ) - thick_pla_2 = geom.structure.Placement( 'thickplane2'+self.name, volume=thickBox1_lv, pos=steel_pos2 ) - thick_pla_3 = geom.structure.Placement( 'thickplane3'+self.name, volume=thickBox1_lv, pos=steel_pos3 ) + thick_pla_2 = geom.structure.Placement( 'thickplane2'+self.name, volume=thickBox2_lv, pos=steel_pos2 ) + thick_pla_3 = geom.structure.Placement( 'thickplane3'+self.name, volume=thickBox2_lv, pos=steel_pos3 ) thick_pla_4 = geom.structure.Placement( 'thickplane4'+self.name, volume=thickBox1_lv, pos=steel_pos4 ) thick_layer_lv.placements.append(thick_pla_1.name) @@ -167,8 +167,8 @@ def construct(self, geom): #double_layer_lv.placements.append(double_ctr_pla.name) double_pla_1 = geom.structure.Placement( 'doubleplane1'+self.name, volume=doubleBox1_lv, pos=steel_pos1 ) - double_pla_2 = geom.structure.Placement( 'doubleplane2'+self.name, volume=doubleBox1_lv, pos=steel_pos2 ) - double_pla_3 = geom.structure.Placement( 'doubleplane3'+self.name, volume=doubleBox1_lv, pos=steel_pos3 ) + double_pla_2 = geom.structure.Placement( 'doubleplane2'+self.name, volume=doubleBox2_lv, pos=steel_pos2 ) + double_pla_3 = geom.structure.Placement( 'doubleplane3'+self.name, volume=doubleBox2_lv, pos=steel_pos3 ) double_pla_4 = geom.structure.Placement( 'doubleplane4'+self.name, volume=doubleBox1_lv, pos=steel_pos4 ) double_layer_lv.placements.append(double_pla_1.name)