Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/duneggd/dunefdvd/Arapuca.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
12 changes: 6 additions & 6 deletions python/duneggd/dunefdvd/Cryostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ 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,
y = pos_y,
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,
Expand Down Expand Up @@ -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,
Expand All @@ -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),
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions python/duneggd/dunefdvd/CryostatEnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/duneggd/dunefdvd/DetEnclosure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions python/duneggd/dunefdvd/TPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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],
Expand All @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions python/duneggd/larfd/Cryostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion python/duneggd/larfd/DetEncLAr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions python/duneggd/larfd/TPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions python/duneggd/larfd/TPCPlane.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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

Expand Down Expand Up @@ -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)
Expand Down
Loading