SND@LHC Software
Loading...
Searching...
No Matches
inspectGeant4Geo.py
Go to the documentation of this file.
1import sys
2import ROOT
3from rootpyPickler import Unpickler
4import shipRoot_conf
6
7fname = 'geofile_full.10.0.Pythia8-TGeant4.root'
8if len(sys.argv) > 1:
9 fname = sys.argv[1]
10
11fgeo = ROOT.TFile(fname)
12sGeo = fgeo.FAIRGeom
13import shipDet_conf
14run = ROOT.FairRunSim()
15upkl = Unpickler(fgeo)
16ShipGeo = upkl.load('ShipGeo')
17modules = shipDet_conf.configure(run, ShipGeo)
18run.SetUserConfig('g4Config.C')
19run.SetName('TGeant4')
20run.SetSink(ROOT.FairRootFileSink(ROOT.TMemFile('output', 'recreate')))
21run.Init()
22run.Run(0)
23import geomGeant4
printWeightsandFields(onlyWithField=True, exclude=[])
configure(run, ship_geo)
configure(darkphoton=None)