From 7609966e95fd84ee87ab7b7413cab4f93d6a93e1 Mon Sep 17 00:00:00 2001 From: Nitish Nayak Date: Tue, 12 May 2026 15:29:26 -0400 Subject: [PATCH] fix various duneggd geometries to ensure physical volume names conform with larsoft requirements --- python/duneggd/dunefdvd/Arapuca.py | 2 +- python/duneggd/dunefdvd/Cryostat.py | 12 +- python/duneggd/dunefdvd/CryostatEnc.py | 4 +- python/duneggd/dunefdvd/DetEnclosure.py | 2 +- python/duneggd/dunefdvd/TPC.py | 11 +- python/duneggd/larfd/Cryostat.py | 4 +- python/duneggd/larfd/DetEncLAr.py | 2 +- python/duneggd/larfd/TPC.py | 8 +- python/duneggd/larfd/TPCPlane.py | 10 +- python/duneggd/larfd/larfd.cfg | 296 ++++++++++++------------ python/duneggd/protodunevd/protodune.py | 2 +- python/duneggd/protodunevd/tpcs.py | 12 +- 12 files changed, 183 insertions(+), 182 deletions(-) diff --git a/python/duneggd/dunefdvd/Arapuca.py b/python/duneggd/dunefdvd/Arapuca.py index 82a44f0..bf22096 100644 --- a/python/duneggd/dunefdvd/Arapuca.py +++ b/python/duneggd/dunefdvd/Arapuca.py @@ -116,7 +116,7 @@ def placeArapuca(self, geom, arapucaenc_LV, arapuca_LV, opdet_LV, opdet_pos, rot pos = "posCenter", rot = rotArapuca ) - place2 = geom.structure.Placement('placeopdet_in'+arapucaenc_LV.name, + place2 = geom.structure.Placement(opdet_LV.name+'_PV', volume = opdet_LV, pos = opdet_pos, ) diff --git a/python/duneggd/dunefdvd/Cryostat.py b/python/duneggd/dunefdvd/Cryostat.py index 2c05a03..4673f2f 100644 --- a/python/duneggd/dunefdvd/Cryostat.py +++ b/python/duneggd/dunefdvd/Cryostat.py @@ -182,7 +182,7 @@ def placeTPC(self, geom, tpc_LV, tpcenc_LV): pos_y += globals.get("gapSST_y") pos_y_bot += globals.get("gapSST_ybottom") - place_top = geom.structure.Placement('placeTop%s-%d' % (name, idx), + place_top = geom.structure.Placement(tpc_LV.name+('_PV_Top%d'%idx), volume = tpc_LV, pos = geom.structure.Position('posTop%s-%d' % (name, idx), x = pos_x, @@ -190,7 +190,7 @@ def placeTPC(self, geom, tpc_LV, tpcenc_LV): z = pos_z)) tpcenc_LV.placements.append(place_top.name) if globals.get("nCRM_x") == 2: - place_bot = geom.structure.Placement('placeBot%s-%d' % (name, idx), + place_bot = geom.structure.Placement(tpc_LV.name+('_PV_Bot%d'%idx), volume = tpc_LV, pos = geom.structure.Position('posBot%s-%d' % (name, idx), x = posbottom_x, @@ -227,13 +227,13 @@ def placeCathodeAndAnode(self, geom, c_LV, a_LV, a_bot_LV, tpcenc_LV): name_c = re.sub(r'vol', '', c_LV.name) name_a = re.sub(r'vol', '', a_LV.name) name_a_bot = re.sub(r'vol', '', a_bot_LV.name) - place_c = geom.structure.Placement('place%s%d_inTPCEnc'%(c_LV.name, idx), + place_c = geom.structure.Placement(c_LV.name+('_PV%d'%idx), volume = c_LV, pos = geom.structure.Position('pos%s-%d'%(name_c, idx), x = cathode_x, y = cathode_y, z = cathode_z)) - place_a = geom.structure.Placement('place%s%d_inTPCEnc'%(a_LV.name, idx), + place_a = geom.structure.Placement(a_LV.name+('_PV%d'%idx), volume = a_LV, pos = geom.structure.Position('pos%s-%d'%(name_a, idx), x = anode_toppos, @@ -244,7 +244,7 @@ def placeCathodeAndAnode(self, geom, c_LV, a_LV, a_bot_LV, tpcenc_LV): tpcenc_LV.placements.append(place_a.name) if globals.get("nCRM_x") == 2: - place_ab = geom.structure.Placement('place%s%d_inTPCEncBottom'%(name_a_bot, idx_bot), + place_ab = geom.structure.Placement(a_bot_LV.name+('_PV%d'%idx_bot), volume = a_bot_LV, pos = geom.structure.Position('pos%sBottom-%d' % \ (name_a_bot, idx_bot), @@ -256,7 +256,7 @@ def placeCathodeAndAnode(self, geom, c_LV, a_LV, a_bot_LV, tpcenc_LV): idx_bot += 1 # dead material on one side only anode_posz_bot2 = anode_posz_bot + globals.get("lengthAnodeBottom") + (2 * globals.get("borderCRUBottom1side_z")) - place_ab2 = geom.structure.Placement('place%s%d_inTPCEncBottom'%(name_a_bot, idx_bot), + place_ab2 = geom.structure.Placement(a_bot_LV.name+('_PV%d'%idx_bot), volume = a_bot_LV, pos = geom.structure.Position('pos%sBottom-%d' % \ (name_a_bot, idx_bot), diff --git a/python/duneggd/dunefdvd/CryostatEnc.py b/python/duneggd/dunefdvd/CryostatEnc.py index c1b40cc..93f24c2 100644 --- a/python/duneggd/dunefdvd/CryostatEnc.py +++ b/python/duneggd/dunefdvd/CryostatEnc.py @@ -23,14 +23,14 @@ def construct(self, geom): dx = globals.get("Cryostat_x")/2 + self.fWarmSkinThickness + self.fWoodThickness + self.fShieldThickness + self.fColdSkinThickness + self.Offset, dy = globals.get("Cryostat_y")/2 + self.fWarmSkinThickness + self.fWoodThickness + self.fShieldThickness + self.fColdSkinThickness + self.Offset, dz = globals.get("Cryostat_z")/2 + self.fWarmSkinThickness + self.fWoodThickness + self.fShieldThickness + self.fColdSkinThickness + self.Offset) - cryoencLV = geom.structure.Volume('vol'+self.name, material="Air", shape=cryoencBox) + cryoencLV = geom.structure.Volume('volEnclosureCryostat', material="Air", shape=cryoencBox) self.add_volume(cryoencLV) cryostat = self.get_builder("Cryostat") cryostatLV = cryostat.get_volume() ###this is the start of Cryostat logical volume ### - cryostat_place = geom.structure.Placement('Cryostat_Place', pos = "posCenter", volume = cryostatLV) + cryostat_place = geom.structure.Placement(cryostatLV.name+'_PV', pos = "posCenter", volume = cryostatLV) cryoencLV.placements.append(cryostat_place.name) fSolidCryostat = geom.get_shape(cryostatLV) diff --git a/python/duneggd/dunefdvd/DetEnclosure.py b/python/duneggd/dunefdvd/DetEnclosure.py index 74780b5..d5100ee 100644 --- a/python/duneggd/dunefdvd/DetEnclosure.py +++ b/python/duneggd/dunefdvd/DetEnclosure.py @@ -31,7 +31,7 @@ def construct_simplified(self, geom): posCryoInDetEnc = geom.structure.Position("posCryoInDetEnc", x=globals.get("posCryoInDetEnc_x"), y=globals.get("posCryoInDetEnc_y"), z=globals.get("posCryoInDetEnc_z")) - cryostat_place = geom.structure.Placement('place'+cryostat.name, + cryostat_place = geom.structure.Placement(cryostatLV.name+'_PV_InDetEnc', volume = cryostatLV, pos = posCryoInDetEnc) detencLV.placements.append(cryostat_place.name) diff --git a/python/duneggd/dunefdvd/TPC.py b/python/duneggd/dunefdvd/TPC.py index 049095e..ecc8a4d 100644 --- a/python/duneggd/dunefdvd/TPC.py +++ b/python/duneggd/dunefdvd/TPC.py @@ -71,10 +71,9 @@ def construct(self, geom): y = Q(str(w[2])+'cm'), z = Q(str(w[1])+'cm')) id = str(n) if plane != 'Z' else w[0] - wire_place = geom.structure.Placement('place%sWire%s%d'%(self.name, plane, n), - volume = wires.get_volume( - "vol%sWire%s%s"%(self.name, plane, id) - ), + wire_vol = wires.get_volume("vol%sWire%s%s"%(self.name, plane, id)) + wire_place = geom.structure.Placement(wire_vol.name+('_PV%d'%n), + volume = wire_vol, pos = pos, rot = rotation) # place the wires inside each place @@ -93,7 +92,7 @@ def construct(self, geom): self.add_volume(tpc_LV) # place the individual place for plane in ['U', 'V', 'Z']: - tpc_place = geom.structure.Placement('place%sPlane%s'%(self.name, plane), + tpc_place = geom.structure.Placement(tpcplanes_LV[plane].name+'_PV', volume = tpcplanes_LV[plane], pos = geom.structure.Position('posPlane%s'%plane, x = postpcs[plane][0], @@ -102,7 +101,7 @@ def construct(self, geom): rot = "rIdentity") tpc_LV.placements.append(tpc_place.name) # place the active block - tpcactive_place = geom.structure.Placement('place%sActive'%self.name, + tpcactive_place = geom.structure.Placement(tpcactive_LV.name+'_PV', volume = tpcactive_LV, pos = geom.structure.Position('posActive', x = tpcactive_pos[0], diff --git a/python/duneggd/larfd/Cryostat.py b/python/duneggd/larfd/Cryostat.py index 238fbd3..50e0918 100644 --- a/python/duneggd/larfd/Cryostat.py +++ b/python/duneggd/larfd/Cryostat.py @@ -275,11 +275,11 @@ def construct(self, geom): rot1 = 'r180aboutX_180aboutY' # Place the TPCs, making sure to rotate the right one - pTPC0_in_C = geom.structure.Placement('place'+pos0Name, + pTPC0_in_C = geom.structure.Placement(tpc0_lv.name+'_PVplace'+pos0Name, volume = tpc0_lv, pos = tpc0_in_cryo, rot = rot0 ) - pTPC1_in_C = geom.structure.Placement('place'+pos1Name, + pTPC1_in_C = geom.structure.Placement(tpc1_lv.name+'_PVplace'+pos1Name, volume = tpc1_lv, pos = tpc1_in_cryo, rot = rot1 ) diff --git a/python/duneggd/larfd/DetEncLAr.py b/python/duneggd/larfd/DetEncLAr.py index 65d0189..9f84e51 100644 --- a/python/duneggd/larfd/DetEncLAr.py +++ b/python/duneggd/larfd/DetEncLAr.py @@ -242,7 +242,7 @@ def construct(self, geom): self.MainDetCenter[1], self.MainDetCenter[2]) - place_cryo_in_E = geom.structure.Placement('place'+posName, + place_cryo_in_E = geom.structure.Placement(cryo_lv.name+'_PV', volume = cryo_lv, pos = cryo_in_enc) detEnc_lv.placements.append(place_cryo_in_E.name) diff --git a/python/duneggd/larfd/TPC.py b/python/duneggd/larfd/TPC.py index bf938d7..db30bb4 100644 --- a/python/duneggd/larfd/TPC.py +++ b/python/duneggd/larfd/TPC.py @@ -96,19 +96,19 @@ def construct(self, geom): # place each plane and active volume in TPC volume - pPlaneZ_in_TPC = geom.structure.Placement('placePlaneZ_in_'+self.name, + pPlaneZ_in_TPC = geom.structure.Placement(readPlaneZ_lv.name+'_PV_'+self.name, volume = readPlaneZ_lv, pos = readPlaneZ_in_tpc) - pPlaneV_in_TPC = geom.structure.Placement('placePlaneV_in_'+self.name, + pPlaneV_in_TPC = geom.structure.Placement(readPlaneV_lv.name+'_PV_'+self.name, volume = readPlaneV_lv, pos = readPlaneV_in_tpc) - pPlaneU_in_TPC = geom.structure.Placement('placePlaneU_in_'+self.name, + pPlaneU_in_TPC = geom.structure.Placement(readPlaneU_lv.name+'_PV_'+self.name, volume = readPlaneU_lv, pos = readPlaneU_in_tpc) - pActive_in_TPC = geom.structure.Placement('placeActive_in_'+self.name, + pActive_in_TPC = geom.structure.Placement(tpcActive_lv.name+'_PV', volume = tpcActive_lv, pos = tpcActive_in_tpc) diff --git a/python/duneggd/larfd/TPCPlane.py b/python/duneggd/larfd/TPCPlane.py index 984ba62..ca9b40e 100644 --- a/python/duneggd/larfd/TPCPlane.py +++ b/python/duneggd/larfd/TPCPlane.py @@ -86,9 +86,9 @@ def ParseExcel(self, newcolumns = self.WirePosition.columns.tolist() for i in range(len(newcolumns)): - if (newcolumns[i].find('X' ) is -1 and - newcolumns[i].find('Y' ) is -1 and - newcolumns[i].find('Front/Back') is -1): + if (newcolumns[i].find('X' ) == -1 and + newcolumns[i].find('Y' ) == -1 and + newcolumns[i].find('Front/Back') == -1): self.WirePosition.drop([newcolumns[i]], axis=1, inplace=True) newcolumns = self.WirePosition.columns.tolist() @@ -107,7 +107,7 @@ def ParseExcel(self, elif self.WirePosition.columns[i] == 'Y.1' or self.WirePosition.columns[i] == 'Y.3': newcolumns[i] = 'YEnd' self.YEndIndex = i+1 - elif self.WirePosition.columns[i].find('Front/Back') is not -1: + elif self.WirePosition.columns[i].find('Front/Back') != -1: newcolumns[i] = 'Front' self.FrontOrBack = i+1 @@ -319,7 +319,7 @@ def PlaceWire( self, geom, num, plane_lv, wirePos, wireRot, wire_lv ): wirePos[1], wirePos[2]) - pWire_in_Plane = geom.structure.Placement('place_'+posName, + pWire_in_Plane = geom.structure.Placement(wire_lv.name+'_PV_'+str(num), volume = wire_lv, pos = wire_in_plane, rot = wireRot) diff --git a/python/duneggd/larfd/larfd.cfg b/python/duneggd/larfd/larfd.cfg index 6d6b833..dc3a801 100644 --- a/python/duneggd/larfd/larfd.cfg +++ b/python/duneggd/larfd/larfd.cfg @@ -1,61 +1,98 @@ -[TPCPlaneZ] -class = TPCPlane.TPCPlaneBuilder -view = 'Z' -wirePitch = Q('0.479cm') -wireAngle = Q('0deg') -nChannels = 960 -nowires = False -wireDiam = Q('152um') -# wireDiam = Q('1520um') -G10ThicknessFoot = Q('1mm') -G10ThicknessSide = None -# the position of the wire wrt the wire coming out of the boards -# Z direction is 2.20mm(bottom left) - 44.8mm (see 8760104) -HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('42.6mm')] -HeadAPAFrameScrewCentre = [Q('0m'), Q('55.73mm'), Q('45mm')] -wrapCover = Q('0.0625in') -APAFrameDim = {APAFrame:size} -# planeDim = [{TPCPlaneZ:wireDiam}, Q('606cm')-Q('7.61cm'), Q('229.4562cm')] -planeDim = [{TPCPlaneZ:wireDiam}, Q('606cm')-Q('7.61cm'), Q('229.593cm')] +[World] +subbuilders = ['DetEnclosureLAr'] +class = World.WorldBuilder +worldMat = 'Rock' +worldDim = [Q('400m'),Q('400m'),Q('400m')] # enough room for CRY, otherwise arbitrary +encBackWallToHall_z = Q('46.25ft') -[TPCPlaneV] -class = TPCPlane.TPCPlaneBuilder -view = 'V' -wirePitch = Q('0.4669cm') -wireAngle = Q('-35.7deg') -nChannels = 800 -nowires = {TPCPlaneZ:nowires} -wireDiam = {TPCPlaneZ:wireDiam} -G10ThicknessFoot = Q('1mm') -G10ThicknessSide = Q('3.18mm') -# the position of the wire wrt the wire coming out of the boards -# Z direction is ( 45mm - 30.96mm ) * tan (35.7deg) - 44.8mm (see 8760108) -# HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('40.71mm')] -HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('34.71mm')] -HeadAPAFrameScrewCentre = {TPCPlaneZ:HeadAPAFrameScrewCentre} -SideWrappingBoardOffset = Q('12.98mm') - Q('11.08mm') -wrapCover = {TPCPlaneZ:wrapCover} -APAFrameDim = {APAFrame:size} -# planeDim = [{TPCPlaneV:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.125in'), Q('230.0175cm')] -planeDim = [{TPCPlaneV:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.125in'), Q('230.0025cm')] +[DetEnclosureLAr] +#https://docs.dunescience.org/cgi-bin/private/RetrieveFile?docid=14242&filename=ARUP-DWG-000006.00.IFI.00.01.pdf&version=1 +# Enjoy if you have to read that. Page 53. +subbuilders = ['Cryostat'] +class = DetEncLAr.DetEncLArBuilder +# detEncDim = [Q('19.80m'),Q('23.15m'),Q('3.3m')+Q('60.45m')+Q('5.55m')+Q('12m')+Q('5.55m')+Q('60.45m')+Q('3.3m')-Q('84m')] +detEncDim = [Q('19.80m'),Q('23.15m'),Q('3.3m')+Q('60.45m')+Q('5.55m')+Q('12m')+Q('5.55m')+Q('60.45m')+Q('3.3m')] +archRadius = Q('12.84m') +archHalfAngle = Q('50deg') -[TPCPlaneU] -class = TPCPlane.TPCPlaneBuilder -view = 'U' -wirePitch = Q('0.4669cm') -wireAngle = Q('35.7deg') -nChannels = 800 -nowires = {TPCPlaneZ:nowires} -wireDiam = {TPCPlaneZ:wireDiam} -G10ThicknessFoot = Q('1mm') -G10ThicknessSide = Q('3.18mm') -HeadBoardScrewCentre = {TPCPlaneZ:HeadBoardScrewCentre} -HeadAPAFrameScrewCentre = {TPCPlaneZ:HeadAPAFrameScrewCentre} -SideWrappingBoardOffset = Q('12.98mm') - Q('11.08mm') -wrapCover = {TPCPlaneZ:wrapCover} -APAFrameDim = {APAFrame:size} -# planeDim = [{TPCPlaneU:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.25in'), Q('230.6525cm')] -planeDim = [{TPCPlaneU:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.25in'), Q('230.6375cm')] +# https://docs.dunescience.org/cgi-bin/private/RetrieveFile?docid=464&filename=LBNF%20-%20Underground%20-%20North%20Cavern%20Clearance%20Envelopes%20-%202018-12-07.pdf&version=10 +# these numbers come from here. This document is not quite compatible with 100% CF but... +# note the y number means the detector is on the floor +# the x number is the number it *should be* if everything has the perfect size and the detector is in the centre +# y and z are actually used. +ConcreteBeamGap = [Q('427mm'),Q('0mm'),Q('427mm')] +RadioRockThickness = Q('1cm') +RadioRockMaterial = 'RadioRock' +ShotCreteThickness = Q('4in') +ShotCreteMaterial = "Air"#'ShotRock' +ConcreteThickness = Q('11in') +ConcreteMaterial = "Air"#'Concrete' +GroutThickness = Q('1in') +GroutMaterial = "Air"#'Concrete' + +[Cryostat] +subbuilders = ['TPC', 'TPCOuter', 'APAFrame'] +class = Cryostat.CryostatBuilder +CryostatInnerDim = [Q('15100mm'),Q('14000mm'),Q('62000mm')] +membraneThickness = Q('800mm') #https://edms.cern.ch/ui/file/1834156/1/CENBNFCR0075.pdf +# cathodeThickness = Q('0.016cm') +cathodeThickness = Q('0.13in') +# nAPAs = [1, 2, 6] +nAPAs = [3, 2, 25] +IgnoredAPAs = [[]] +outerAPAs = True +sideLAr = Q('1cm') +APAToFloor = Q('49.2cm') +LArLevel = Q('13m') +APAToUpstreamWall = Q('301.2cm') +APAToDownstreamWall = Q('49.2cm') +Layer1Thickness = Q('0.010m') +Layer2Thickness = Q('0.045m') +Layer3Thickness = Q('0.745m') +Layer1Material = "S460ML" +Layer2Material = "Cellulose" +Layer3Material = "PolyurethaneFoam" +WarmSkinMaterial = "S460ML" +DSSClearance = [Q('402mm'),Q('400mm'),Q('1403mm')-Q('1600mm')/2] +nDSSBeam = 0 +DSSBeamHeight = Q('203.2mm') +DSSBeamBase = Q('101.6mm') +DSSBeamThickW = Q('6.9mm') +DSSBeamThickF = Q('10.4mm') +#https://www.structural-drafting-net-expert.com/steel-sections-Europe-HL.html +# or CENBNFCR0122.pdf +IPEBeamHeight = Q('1108mm') +IPEBeamBase = Q('402mm') +IPEBeamThickW = Q('22mm') +IPEBeamThickF = Q('40mm') +# CENBNFCR0129.pdf +IPEBeamRoofHeight = Q('600mm') +IPEBeamRoofBase = Q('300mm') +IPEBeamRoofThickW = Q('15.5mm') +IPEBeamRoofThickF = Q('30mm') +# elevation of the transverse beams +# CENBNFCR0080.pdf in +BeamFloors = [Q('2002mm')+Q('3608mm'), Q('6002mm')+Q('3608mm'), Q('10002mm')+Q('3608mm')] +HoleDiam = Q('800mm') +TopBeam = [0,2,3,5,6,8] +#numbers of beams (same ref) +nBeamX = 39 +BeamSeparationX = Q('1600mm') +nBeamY = 39 +BeamSeparationY = Q('1600mm') +nBeamZ = 9 +BeamSeparationZ = Q('1600mm') +BeamMaterial = "RadioS460ML" +# CENBNFCR0214.pdf +SteelThickness = Q('12mm') +nLightPaddlePerAPA = 10 + +FieldCageBarWidth = Q("1.8125in") +FieldCageBarHeight = Q("0.4375in") +FieldCageMaterial = "ALUMINUM_AL" + +doWaterShielding = False +waterThickness = Q("50cm") [APAFrame] # https://edms.cern.ch/ui/file/2112698/1/8760050_ASSEMBLY_REV_WIP.PDF and ref therein. @@ -119,100 +156,65 @@ APAFrameDim = {APAFrame:size} cathodeThickness = {Cryostat:cathodeThickness} nAPAs = {Cryostat:nAPAs} +[TPCPlaneZ] +class = TPCPlane.TPCPlaneBuilder +view = 'Z' +wirePitch = Q('0.479cm') +wireAngle = Q('0deg') +nChannels = 960 +nowires = False +wireDiam = Q('152um') +# wireDiam = Q('1520um') +G10ThicknessFoot = Q('1mm') +G10ThicknessSide = None +# the position of the wire wrt the wire coming out of the boards +# Z direction is 2.20mm(bottom left) - 44.8mm (see 8760104) +HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('42.6mm')] +HeadAPAFrameScrewCentre = [Q('0m'), Q('55.73mm'), Q('45mm')] +wrapCover = Q('0.0625in') +APAFrameDim = {APAFrame:size} +# planeDim = [{TPCPlaneZ:wireDiam}, Q('606cm')-Q('7.61cm'), Q('229.4562cm')] +planeDim = [{TPCPlaneZ:wireDiam}, Q('606cm')-Q('7.61cm'), Q('229.593cm')] -[Cryostat] -subbuilders = ['TPC', 'TPCOuter', 'APAFrame'] -class = Cryostat.CryostatBuilder -CryostatInnerDim = [Q('15100mm'),Q('14000mm'),Q('62000mm')] -membraneThickness = Q('800mm') #https://edms.cern.ch/ui/file/1834156/1/CENBNFCR0075.pdf -# cathodeThickness = Q('0.016cm') -cathodeThickness = Q('0.13in') -# nAPAs = [1, 2, 6] -nAPAs = [3, 2, 25] -IgnoredAPAs = [[]] -outerAPAs = True -sideLAr = Q('1cm') -APAToFloor = Q('49.2cm') -LArLevel = Q('13m') -APAToUpstreamWall = Q('301.2cm') -APAToDownstreamWall = Q('49.2cm') -Layer1Thickness = Q('0.010m') -Layer2Thickness = Q('0.045m') -Layer3Thickness = Q('0.745m') -Layer1Material = "S460ML" -Layer2Material = "Cellulose" -Layer3Material = "PolyurethaneFoam" -WarmSkinMaterial = "S460ML" -DSSClearance = [Q('402mm'),Q('400mm'),Q('1403mm')-Q('1600mm')/2] -nDSSBeam = 0 -DSSBeamHeight = Q('203.2mm') -DSSBeamBase = Q('101.6mm') -DSSBeamThickW = Q('6.9mm') -DSSBeamThickF = Q('10.4mm') -#https://www.structural-drafting-net-expert.com/steel-sections-Europe-HL.html -# or CENBNFCR0122.pdf -IPEBeamHeight = Q('1108mm') -IPEBeamBase = Q('402mm') -IPEBeamThickW = Q('22mm') -IPEBeamThickF = Q('40mm') -# CENBNFCR0129.pdf -IPEBeamRoofHeight = Q('600mm') -IPEBeamRoofBase = Q('300mm') -IPEBeamRoofThickW = Q('15.5mm') -IPEBeamRoofThickF = Q('30mm') -# elevation of the transverse beams -# CENBNFCR0080.pdf in -BeamFloors = [Q('2002mm')+Q('3608mm'), Q('6002mm')+Q('3608mm'), Q('10002mm')+Q('3608mm')] -HoleDiam = Q('800mm') -TopBeam = [0,2,3,5,6,8] -#numbers of beams (same ref) -nBeamX = 39 -BeamSeparationX = Q('1600mm') -nBeamY = 39 -BeamSeparationY = Q('1600mm') -nBeamZ = 9 -BeamSeparationZ = Q('1600mm') -BeamMaterial = "RadioS460ML" -# CENBNFCR0214.pdf -SteelThickness = Q('12mm') -nLightPaddlePerAPA = 10 - -FieldCageBarWidth = Q("1.8125in") -FieldCageBarHeight = Q("0.4375in") -FieldCageMaterial = "ALUMINUM_AL" +[TPCPlaneV] +class = TPCPlane.TPCPlaneBuilder +view = 'V' +wirePitch = Q('0.4669cm') +wireAngle = Q('-35.7deg') +nChannels = 800 +nowires = {TPCPlaneZ:nowires} +wireDiam = {TPCPlaneZ:wireDiam} +G10ThicknessFoot = Q('1mm') +G10ThicknessSide = Q('3.18mm') +# the position of the wire wrt the wire coming out of the boards +# Z direction is ( 45mm - 30.96mm ) * tan (35.7deg) - 44.8mm (see 8760108) +# HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('40.71mm')] +HeadBoardScrewCentre = [Q('0m'), Q('45mm'), Q('34.71mm')] +HeadAPAFrameScrewCentre = {TPCPlaneZ:HeadAPAFrameScrewCentre} +SideWrappingBoardOffset = Q('12.98mm') - Q('11.08mm') +wrapCover = {TPCPlaneZ:wrapCover} +APAFrameDim = {APAFrame:size} +# planeDim = [{TPCPlaneV:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.125in'), Q('230.0175cm')] +planeDim = [{TPCPlaneV:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.125in'), Q('230.0025cm')] -doWaterShielding = False -waterThickness = Q("50cm") +[TPCPlaneU] +class = TPCPlane.TPCPlaneBuilder +view = 'U' +wirePitch = Q('0.4669cm') +wireAngle = Q('35.7deg') +nChannels = 800 +nowires = {TPCPlaneZ:nowires} +wireDiam = {TPCPlaneZ:wireDiam} +G10ThicknessFoot = Q('1mm') +G10ThicknessSide = Q('3.18mm') +HeadBoardScrewCentre = {TPCPlaneZ:HeadBoardScrewCentre} +HeadAPAFrameScrewCentre = {TPCPlaneZ:HeadAPAFrameScrewCentre} +SideWrappingBoardOffset = Q('12.98mm') - Q('11.08mm') +wrapCover = {TPCPlaneZ:wrapCover} +APAFrameDim = {APAFrame:size} +# planeDim = [{TPCPlaneU:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.25in'), Q('230.6525cm')] +planeDim = [{TPCPlaneU:wireDiam}, Q('606cm')-Q('7.61cm')+Q('0.25in'), Q('230.6375cm')] -[DetEnclosureLAr] -#https://docs.dunescience.org/cgi-bin/private/RetrieveFile?docid=14242&filename=ARUP-DWG-000006.00.IFI.00.01.pdf&version=1 -# Enjoy if you have to read that. Page 53. -subbuilders = ['Cryostat'] -class = DetEncLAr.DetEncLArBuilder -# detEncDim = [Q('19.80m'),Q('23.15m'),Q('3.3m')+Q('60.45m')+Q('5.55m')+Q('12m')+Q('5.55m')+Q('60.45m')+Q('3.3m')-Q('84m')] -detEncDim = [Q('19.80m'),Q('23.15m'),Q('3.3m')+Q('60.45m')+Q('5.55m')+Q('12m')+Q('5.55m')+Q('60.45m')+Q('3.3m')] -archRadius = Q('12.84m') -archHalfAngle = Q('50deg') -# https://docs.dunescience.org/cgi-bin/private/RetrieveFile?docid=464&filename=LBNF%20-%20Underground%20-%20North%20Cavern%20Clearance%20Envelopes%20-%202018-12-07.pdf&version=10 -# these numbers come from here. This document is not quite compatible with 100% CF but... -# note the y number means the detector is on the floor -# the x number is the number it *should be* if everything has the perfect size and the detector is in the centre -# y and z are actually used. -ConcreteBeamGap = [Q('427mm'),Q('0mm'),Q('427mm')] -RadioRockThickness = Q('1cm') -RadioRockMaterial = 'RadioRock' -ShotCreteThickness = Q('4in') -ShotCreteMaterial = "Air"#'ShotRock' -ConcreteThickness = Q('11in') -ConcreteMaterial = "Air"#'Concrete' -GroutThickness = Q('1in') -GroutMaterial = "Air"#'Concrete' -[World] -subbuilders = ['DetEnclosureLAr'] -class = World.WorldBuilder -worldMat = 'Rock' -worldDim = [Q('400m'),Q('400m'),Q('400m')] # enough room for CRY, otherwise arbitrary -encBackWallToHall_z = Q('46.25ft') \ No newline at end of file diff --git a/python/duneggd/protodunevd/protodune.py b/python/duneggd/protodunevd/protodune.py index ed8352d..a99e644 100644 --- a/python/duneggd/protodunevd/protodune.py +++ b/python/duneggd/protodunevd/protodune.py @@ -182,7 +182,7 @@ def construct(self, geom): z=Q('0cm')) cryo_place = geom.structure.Placement( - "cryo_place", + cryo_vol.name+"_PV", volume=cryo_vol, pos=cryo_pos) diff --git a/python/duneggd/protodunevd/tpcs.py b/python/duneggd/protodunevd/tpcs.py index 9e9b323..73048e8 100644 --- a/python/duneggd/protodunevd/tpcs.py +++ b/python/duneggd/protodunevd/tpcs.py @@ -380,7 +380,7 @@ def make_volume(name, shape, material="LAr", quad="", **params): z=wire[1]) # xcenter rot = "rUWireAboutX" place = geom.structure.Placement( - f"placeWireU{wid}_{quad}", + f"{wire_vol.name}_PV", volume=wire_vol, pos=pos, rot=rot) @@ -409,7 +409,7 @@ def make_volume(name, shape, material="LAr", quad="", **params): z=wire[1]) # xcenter rot = "rVWireAboutX" place = geom.structure.Placement( - f"placeWireV{wid}_{quad}", + f"{wire_vol.name}_PV", volume=wire_vol, pos=pos, rot=rot) @@ -449,7 +449,7 @@ def make_volume(name, shape, material="LAr", quad="", **params): z=zpos) rot = "rPlus90AboutX" place = geom.structure.Placement( - f"placeWireZ{wid}_{quad}", + f"{wire_vol_z.name}_PV_{wid}", volume=wire_vol_z, pos=pos, rot=rot) @@ -467,7 +467,7 @@ def make_volume(name, shape, material="LAr", quad="", **params): # Place all volumes for name, (x, y, z) in placements.items(): pos = geom.structure.Position(f"pos{name}{quad}_pos", x=x, y=Q('0cm'), z=Q('0cm')) - place = geom.structure.Placement(f"pos{name.split('_')[-1]}{quad}", + place = geom.structure.Placement(f"{vols[name].name}_PV_{quad}", volume=vols[name], pos=pos) vols['tpc'].placements.append(place.name) @@ -559,7 +559,7 @@ def place_tpcs(self, geom, cryo_vol, argon_dim, params): z=myposTPCZ ) place_top = geom.structure.Placement( - f"placeTopTPC_{idx}", + f"{tpc_vol.name}_PVTop{idx}", volume=tpc_vol, pos=pos_top ) @@ -573,7 +573,7 @@ def place_tpcs(self, geom, cryo_vol, argon_dim, params): z=myposTPCZ ) place_bot = geom.structure.Placement( - f"placeBotTPC_{idx}", + f"{tpc_vol.name}_PVBot{idx}", volume=tpc_vol, pos=pos_bot, rot='rPlus180AboutY' # Rotate bottom TPC