deacrylify10kt.sh
Go to the documentation of this file.
1 #!/bin/sh
2 
3 # On Alex Himmel's request -- turn all of the photon detector Acrylic to LAr
4 # in the DUNE 10kt *_nowires.gdml files, in order to make photon library generation
5 # easier.
6 
7 # some assumptions -- the photon detectors are the only acrylic in these files.
8 # this is the case for the 10kt geometries as of April 2017, but we'll skip doing
9 # this for ProtoDUNE's and 35t -- they have acrylic cosmic-ray taggers, and their
10 # photon detector volumes are already LAr in the *_nowires.gdml files for them.
11 
12 # to do later -- de-acrylify only those Acrylic lines right after the optical
13 # detector names
14 
15 tmpfile=deacrylifytmpgdml.txt
16 
17 for filename in dune10kt*_nowires.gdml
18 do
19  echo Processing $filename
20  touch $tmpfile
21  rm $tmpfile
22  sed -e 's/ref="Acrylic"/ref="LAr"/' $filename > $tmpfile
23  mv $tmpfile $filename
24 done
25