![]() |
FairShip
|
Functions | |
| float | _fraction_0_1 (str value) |
| useInputFile (paths) | |
| dict | mergeFileSummary (list[str]|str inFiles) |
| None | visualizeMagFields () |
| None | checkOverlapsWithGeant4 () |
Variables | |
| float | theHNLMass = 1.0 * u.GeV |
| theProductionCouplings = None | |
| float | theDPmass = 0.2 * u.GeV |
| str | mcEngine = "TGeant4" |
| str | inclusive = "c" |
| bool | MCTracksWithHitsOnly = False |
| bool | MCTracksWithEnergyCutOnly = True |
| bool | MCTracksWithHitsOrEnergyCut = False |
| bool | charmonly = False |
| bool | HNL = True |
| str | inputFile = "$EOSSHIP/eos/experiment/ship/data/Charm/Cascade-parp16-MSTP82-1-MSEL4-978Bpot.root" |
| bool | defaultInputFile = True |
| list | usedInputFiles = [] |
| parser = ArgumentParser() | |
| help | |
| action | |
| dest | |
| default | |
| type | |
| subparsers = parser.add_subparsers(dest="command", help="Which mode to run") | |
| pg_parser = subparsers.add_parser("PG", help="Use Particle Gun") | |
| int | |
| float | |
| genie_parser = subparsers.add_parser("Genie", help="Genie for reading and processing neutrino interactions") | |
| choices | |
| const | |
| nargs | |
| options = parser.parse_args() | |
| nEvents = 0 | |
| list | available_snd_designs = [1, 2] |
| SND_design | |
| motherMode = None | |
| Opt_high = None | |
| theMass | |
| theCouplings = None | |
| list | theDecayCouplings = [float(c) for c in options.thedeccouplings.split(",")] |
| list | geometry_options = ["dy", "strawDesign", "shieldName", "decayVolMed", "SND", "SND_design", "target_yaml"] |
| probe = parser.parse_args(namespace=Namespace(**dict.fromkeys(geometry_options))) | |
| list | given |
| geofile | |
| seed = options.theSeed | |
| gErrorIgnoreLevel | |
| ship_geo = load_from_root_file(options.geofile, "ShipGeo") | |
| geometryBuiltWithFairShip | |
| pythia8 | |
| tuple | run_identifier |
| str | outFile = f"{options.outputDir}/sim_{run_identifier}.root" |
| str | parFile = f"{options.outputDir}/params_{run_identifier}.root" |
| timer = ROOT.TStopwatch() | |
| run = ROOT.FairRunSim() | |
| sink = ROOT.FairRootFileSink(outFile) | |
| rtdb = run.GetRuntimeDb() | |
| modules = shipDet_conf.configure(run, ship_geo, geofile=options.geofile) | |
| primGen = ROOT.FairPrimaryGenerator() | |
| P8gen = None | |
| passDPconf | |
| int | margin = 10 * u.cm |
| z_end = ship_geo.decayVolume.z0 + ship_geo.decayVolume.length | |
| tuple | max_theta_x = (ship_geo.decayVolume.xEndInner / 2 + margin) / z_end |
| tuple | max_theta_y = (ship_geo.decayVolume.yEndInner / 2 + margin) / z_end |
| test = ROOT.TPythia6() | |
| P6gen = ROOT.tPythia6Generator() | |
| EvtCalcGen = ROOT.EvtCalcGenerator() | |
| zTa | |
| z | |
| zDV | |
| myPgun = ROOT.ParticleGunGenerator(options.pID, options.multiplicity) | |
| list | vertex_pars = [options.Vx * u.cm, options.Dx * u.cm, options.Vy * u.cm, options.Dy * u.cm, options.Vz * u.cm] |
| histo_files = options.histoFile or [] | |
| histo_names = options.histoName or [] | |
| histo_x = options.histoX or [] | |
| histo_y = options.histoY or [] | |
| histo_z = options.histoZ or [] | |
| list | histo_vars = [histo_x[idx]] |
| DISgen = None | |
| mu_start | |
| mu_end | |
| nDIS = DISgen.GetNevents() | |
| Geniegen = ROOT.GenieGenerator() | |
| dict | GenieOptions = {"simple_gevgen": 0, "genie_geometry": 3} |
| dict | genie_option = GenieOptions[options.GenieOption] |
| pdg = ROOT.TDatabasePDG.Instance() | |
| generator = ROOT.SHiP.TTreeGenerator() | |
| available_events = max(0, generator.GetNEvents() - options.firstEvent) | |
| Ntuplegen = ROOT.NtupleGenerator() | |
| isNew | |
| fromStage1 = ut.checkForBranch(inputFile, "MCTrack") | |
| startAtPlane = fromStage1 and not options.muonBackFromOrigin | |
| noSummary | |
| noField | |
| tuple | message |
| MuonBackgen = ROOT.MuonBackGenerator() | |
| fastMuon | |
| Cosmicsgen = ROOT.CosmicsGenerator() | |
| n_EVENTS | |
| gMC = ROOT.TVirtualMC.GetMC() | |
| fStack = gMC.GetStack() | |
| float | EnergyCut = 10.0 * u.MeV if (options.mudis or options.newmudis) else 100.0 * u.MeV |
| trajFilter = ROOT.FairTrajFilter.Instance() | |
| fieldMap | |
| fieldMaker = geomGeant4.addVMCFields(ship_geo, verbose=True) | |
| onlyWithField | |
| exclude | |
| kParameterMerged = ROOT.kTRUE | |
| parOut = ROOT.FairParRootFileIo(kParameterMerged) | |
| str | geofile_name = f"{options.outputDir}/geo_{run_identifier}.root" |
| fGeo = ROOT.gGeoManager | |
| rtime = timer.RealTime() | |
| ctime = timer.CpuTime() | |
| str | tmpFile = outFile + "tmp" |
| target = os.path.normpath(outFile) | |
| ROOT | fin = None |
| ROOT | t = fin["cbmsim"] |
| fout = ROOT.TFile(tmpFile, "recreate") | |
| fSink = ROOT.FairRootFileSink(fout) | |
| ROOT | sTree = t.CloneTree(0) |
| list | pointContainers = [] |
| name = branch.GetName() | |
| bool | empty = True |
| container = getattr(sTree, containerName) | |
| branches = ROOT.TList() | |
| obj = ROOT.TObjString(name) | |
| rc1 = os.system("rm " + outFile) | |
| rc2 = os.system("mv " + tmpFile + " " + outFile) | |
| str | temp_filename = outFile.replace(".root", "_tmp.root") |
| output_tree = f_outputfile["cbmsim"] | |
| muondis_tree = ROOT.TChain("DIS") | |
| new_tree = output_tree.CloneTree(0) | |
| cross_section = array("f", [0.0]) | |
| cross_section_leaf = new_tree.Branch("CrossSection", cross_section, "CrossSection/F") | |
| mu = muondis_event.InMuon[0] | |
| str | input_path = inputFile[0] if isinstance(inputFile, (list, tuple)) else inputFile |
| f_input = ROOT.TFile.Open(input_path, "READ") | |
| gst = f_input["gst"] | |
| str | selection_string = "(Entry$ >= " + str(options.firstEvent) + ")" |
| f_output = ROOT.TFile.Open(outFile, "UPDATE") | |
| gst_copy = gst.CopyTree(selection_string) | |
| file_header = f_output.Get("FileHeader") | |
| dict | newFileSummary = mergeFileSummary(usedInputFiles) |
|
protected |
Definition at line 25 of file run_simScript.py.
| None run_simScript.checkOverlapsWithGeant4 | ( | ) |
Definition at line 1424 of file run_simScript.py.
| dict run_simScript.mergeFileSummary | ( | list[str] | str | inFiles | ) |
Make a file summary for the output. Keeps a list of the input files so that the total provenance of the events can be traced back to the sim files.
Definition at line 1341 of file run_simScript.py.
| run_simScript.useInputFile | ( | paths | ) |
Check that the generator input exists and record it for the FileSummary.
Definition at line 59 of file run_simScript.py.
| None run_simScript.visualizeMagFields | ( | ) |
Definition at line 1420 of file run_simScript.py.
| run_simScript.action |
Definition at line 67 of file run_simScript.py.
| run_simScript.available_events = max(0, generator.GetNEvents() - options.firstEvent) |
Definition at line 952 of file run_simScript.py.
| list run_simScript.available_snd_designs = [1, 2] |
Definition at line 493 of file run_simScript.py.
| run_simScript.branches = ROOT.TList() |
Definition at line 1241 of file run_simScript.py.
| bool run_simScript.charmonly = False |
Definition at line 47 of file run_simScript.py.
| run_simScript.choices |
Definition at line 198 of file run_simScript.py.
| run_simScript.const |
Definition at line 447 of file run_simScript.py.
| run_simScript.container = getattr(sTree, containerName) |
Definition at line 1232 of file run_simScript.py.
| run_simScript.Cosmicsgen = ROOT.CosmicsGenerator() |
Definition at line 1051 of file run_simScript.py.
| run_simScript.cross_section = array("f", [0.0]) |
Definition at line 1293 of file run_simScript.py.
| run_simScript.cross_section_leaf = new_tree.Branch("CrossSection", cross_section, "CrossSection/F") |
Definition at line 1294 of file run_simScript.py.
| run_simScript.ctime = timer.CpuTime() |
Definition at line 1182 of file run_simScript.py.
| run_simScript.default |
Definition at line 77 of file run_simScript.py.
| bool run_simScript.defaultInputFile = True |
Definition at line 51 of file run_simScript.py.
| run_simScript.dest |
Definition at line 68 of file run_simScript.py.
| run_simScript.DISgen = None |
Definition at line 877 of file run_simScript.py.
| bool run_simScript.empty = True |
Definition at line 1230 of file run_simScript.py.
| float run_simScript.EnergyCut = 10.0 * u.MeV if (options.mudis or options.newmudis) else 100.0 * u.MeV |
Definition at line 1096 of file run_simScript.py.
| run_simScript.EvtCalcGen = ROOT.EvtCalcGenerator() |
Definition at line 817 of file run_simScript.py.
| run_simScript.exclude |
Definition at line 1139 of file run_simScript.py.
| run_simScript.f_input = ROOT.TFile.Open(input_path, "READ") |
Definition at line 1310 of file run_simScript.py.
| run_simScript.f_output = ROOT.TFile.Open(outFile, "UPDATE") |
Definition at line 1320 of file run_simScript.py.
| run_simScript.fastMuon |
Definition at line 1040 of file run_simScript.py.
| run_simScript.fGeo = ROOT.gGeoManager |
Definition at line 1171 of file run_simScript.py.
| run_simScript.fieldMaker = geomGeant4.addVMCFields(ship_geo, verbose=True) |
Definition at line 1132 of file run_simScript.py.
| run_simScript.fieldMap |
Definition at line 1131 of file run_simScript.py.
| run_simScript.file_header = f_output.Get("FileHeader") |
Definition at line 1331 of file run_simScript.py.
| run_simScript.fin = None |
Definition at line 1203 of file run_simScript.py.
| run_simScript.float |
Definition at line 88 of file run_simScript.py.
| run_simScript.fout = ROOT.TFile(tmpFile, "recreate") |
Definition at line 1211 of file run_simScript.py.
| run_simScript.fromStage1 = ut.checkForBranch(inputFile, "MCTrack") |
Definition at line 981 of file run_simScript.py.
| run_simScript.fSink = ROOT.FairRootFileSink(fout) |
Definition at line 1212 of file run_simScript.py.
| run_simScript.fStack = gMC.GetStack() |
Definition at line 1092 of file run_simScript.py.
| run_simScript.generator = ROOT.SHiP.TTreeGenerator() |
Definition at line 946 of file run_simScript.py.
| dict run_simScript.genie_option = GenieOptions[options.GenieOption] |
Definition at line 912 of file run_simScript.py.
| run_simScript.genie_parser = subparsers.add_parser("Genie", help="Genie for reading and processing neutrino interactions") |
Definition at line 193 of file run_simScript.py.
| run_simScript.Geniegen = ROOT.GenieGenerator() |
Definition at line 909 of file run_simScript.py.
| dict run_simScript.GenieOptions = {"simple_gevgen": 0, "genie_geometry": 3} |
Definition at line 911 of file run_simScript.py.
| run_simScript.geofile |
Definition at line 571 of file run_simScript.py.
| str run_simScript.geofile_name = f"{options.outputDir}/geo_{run_identifier}.root" |
Definition at line 1160 of file run_simScript.py.
| list run_simScript.geometry_options = ["dy", "strawDesign", "shieldName", "decayVolMed", "SND", "SND_design", "target_yaml"] |
Definition at line 562 of file run_simScript.py.
| run_simScript.geometryBuiltWithFairShip |
Definition at line 623 of file run_simScript.py.
| run_simScript.gErrorIgnoreLevel |
Definition at line 606 of file run_simScript.py.
| list run_simScript.given |
Definition at line 564 of file run_simScript.py.
| run_simScript.gMC = ROOT.TVirtualMC.GetMC() |
Definition at line 1091 of file run_simScript.py.
| run_simScript.gst = f_input["gst"] |
Definition at line 1311 of file run_simScript.py.
| run_simScript.gst_copy = gst.CopyTree(selection_string) |
Definition at line 1323 of file run_simScript.py.
| run_simScript.help |
Definition at line 67 of file run_simScript.py.
| run_simScript.histo_files = options.histoFile or [] |
Definition at line 855 of file run_simScript.py.
| run_simScript.histo_names = options.histoName or [] |
Definition at line 856 of file run_simScript.py.
| list run_simScript.histo_vars = [histo_x[idx]] |
Definition at line 867 of file run_simScript.py.
| run_simScript.histo_x = options.histoX or [] |
Definition at line 857 of file run_simScript.py.
| run_simScript.histo_y = options.histoY or [] |
Definition at line 858 of file run_simScript.py.
| run_simScript.histo_z = options.histoZ or [] |
Definition at line 859 of file run_simScript.py.
| bool run_simScript.HNL = True |
Definition at line 48 of file run_simScript.py.
| bool run_simScript.inclusive = "c" |
Definition at line 41 of file run_simScript.py.
Definition at line 1309 of file run_simScript.py.
| str run_simScript.inputFile = "$EOSSHIP/eos/experiment/ship/data/Charm/Cascade-parp16-MSTP82-1-MSEL4-978Bpot.root" |
Definition at line 50 of file run_simScript.py.
| run_simScript.int |
Definition at line 86 of file run_simScript.py.
| run_simScript.isNew |
Definition at line 970 of file run_simScript.py.
| run_simScript.kParameterMerged = ROOT.kTRUE |
Definition at line 1148 of file run_simScript.py.
| int run_simScript.margin = 10 * u.cm |
Definition at line 759 of file run_simScript.py.
Definition at line 764 of file run_simScript.py.
Definition at line 765 of file run_simScript.py.
| str run_simScript.mcEngine = "TGeant4" |
Definition at line 39 of file run_simScript.py.
| bool run_simScript.MCTracksWithEnergyCutOnly = True |
Definition at line 44 of file run_simScript.py.
| bool run_simScript.MCTracksWithHitsOnly = False |
Definition at line 43 of file run_simScript.py.
| bool run_simScript.MCTracksWithHitsOrEnergyCut = False |
Definition at line 45 of file run_simScript.py.
| tuple run_simScript.message |
Definition at line 997 of file run_simScript.py.
| run_simScript.modules = shipDet_conf.configure(run, ship_geo, geofile=options.geofile) |
Definition at line 697 of file run_simScript.py.
| run_simScript.motherMode = None |
Definition at line 512 of file run_simScript.py.
| run_simScript.mu = muondis_event.InMuon[0] |
Definition at line 1297 of file run_simScript.py.
| run_simScript.mu_end |
Definition at line 891 of file run_simScript.py.
| run_simScript.mu_start |
Definition at line 891 of file run_simScript.py.
| run_simScript.MuonBackgen = ROOT.MuonBackGenerator() |
Definition at line 1004 of file run_simScript.py.
| run_simScript.muondis_tree = ROOT.TChain("DIS") |
Definition at line 1287 of file run_simScript.py.
| run_simScript.myPgun = ROOT.ParticleGunGenerator(options.pID, options.multiplicity) |
Definition at line 830 of file run_simScript.py.
| run_simScript.n_EVENTS |
Definition at line 1058 of file run_simScript.py.
| run_simScript.name = branch.GetName() |
Definition at line 1220 of file run_simScript.py.
| run_simScript.nargs |
Definition at line 463 of file run_simScript.py.
| run_simScript.nDIS = DISgen.GetNevents() |
Definition at line 899 of file run_simScript.py.
| int run_simScript.nEvents = 0 |
Definition at line 488 of file run_simScript.py.
| run_simScript.new_tree = output_tree.CloneTree(0) |
Definition at line 1291 of file run_simScript.py.
| dict run_simScript.newFileSummary = mergeFileSummary(usedInputFiles) |
Definition at line 1393 of file run_simScript.py.
| run_simScript.noField |
Definition at line 993 of file run_simScript.py.
| run_simScript.noSummary |
Definition at line 993 of file run_simScript.py.
| run_simScript.Ntuplegen = ROOT.NtupleGenerator() |
Definition at line 959 of file run_simScript.py.
| run_simScript.obj = ROOT.TObjString(name) |
Definition at line 1261 of file run_simScript.py.
| run_simScript.onlyWithField |
Definition at line 1138 of file run_simScript.py.
| run_simScript.Opt_high = None |
Definition at line 515 of file run_simScript.py.
| run_simScript.options = parser.parse_args() |
Definition at line 485 of file run_simScript.py.
| str run_simScript.outFile = f"{options.outputDir}/sim_{run_identifier}.root" |
Definition at line 664 of file run_simScript.py.
| run_simScript.output_tree = f_outputfile["cbmsim"] |
Definition at line 1286 of file run_simScript.py.
| run_simScript.P6gen = ROOT.tPythia6Generator() |
Definition at line 806 of file run_simScript.py.
| run_simScript.P8gen = None |
Definition at line 700 of file run_simScript.py.
| str run_simScript.parFile = f"{options.outputDir}/params_{run_identifier}.root" |
Definition at line 673 of file run_simScript.py.
| run_simScript.parOut = ROOT.FairParRootFileIo(kParameterMerged) |
Definition at line 1149 of file run_simScript.py.
| run_simScript.parser = ArgumentParser() |
Definition at line 65 of file run_simScript.py.
| run_simScript.passDPconf |
Definition at line 748 of file run_simScript.py.
| run_simScript.pdg = ROOT.TDatabasePDG.Instance() |
Definition at line 936 of file run_simScript.py.
| run_simScript.pg_parser = subparsers.add_parser("PG", help="Use Particle Gun") |
Definition at line 81 of file run_simScript.py.
| list run_simScript.pointContainers = [] |
Definition at line 1218 of file run_simScript.py.
| run_simScript.primGen = ROOT.FairPrimaryGenerator() |
Definition at line 699 of file run_simScript.py.
| run_simScript.probe = parser.parse_args(namespace=Namespace(**dict.fromkeys(geometry_options))) |
Definition at line 563 of file run_simScript.py.
| run_simScript.pythia8 |
Definition at line 653 of file run_simScript.py.
| run_simScript.rc1 = os.system("rm " + outFile) |
Definition at line 1271 of file run_simScript.py.
| run_simScript.rc2 = os.system("mv " + tmpFile + " " + outFile) |
Definition at line 1272 of file run_simScript.py.
| run_simScript.rtdb = run.GetRuntimeDb() |
Definition at line 691 of file run_simScript.py.
| run_simScript.rtime = timer.RealTime() |
Definition at line 1181 of file run_simScript.py.
| run_simScript.run = ROOT.FairRunSim() |
Definition at line 683 of file run_simScript.py.
| tuple run_simScript.run_identifier |
Definition at line 657 of file run_simScript.py.
| int run_simScript.seed = options.theSeed |
Definition at line 596 of file run_simScript.py.
| str run_simScript.selection_string = "(Entry$ >= " + str(options.firstEvent) + ")" |
Definition at line 1315 of file run_simScript.py.
| run_simScript.ship_geo = load_from_root_file(options.geofile, "ShipGeo") |
Definition at line 619 of file run_simScript.py.
| run_simScript.sink = ROOT.FairRootFileSink(outFile) |
Definition at line 687 of file run_simScript.py.
| run_simScript.SND_design |
Definition at line 495 of file run_simScript.py.
| run_simScript.startAtPlane = fromStage1 and not options.muonBackFromOrigin |
Definition at line 982 of file run_simScript.py.
| ROOT run_simScript.sTree = t.CloneTree(0) |
Definition at line 1215 of file run_simScript.py.
Definition at line 79 of file run_simScript.py.
| ROOT run_simScript.t = fin["cbmsim"] |
Definition at line 1210 of file run_simScript.py.
| run_simScript.target = os.path.normpath(outFile) |
Definition at line 1202 of file run_simScript.py.
| str run_simScript.temp_filename = outFile.replace(".root", "_tmp.root") |
Definition at line 1280 of file run_simScript.py.
| run_simScript.test = ROOT.TPythia6() |
Definition at line 805 of file run_simScript.py.
| list run_simScript.theCouplings = None |
Definition at line 549 of file run_simScript.py.
| list run_simScript.theDecayCouplings = [float(c) for c in options.thedeccouplings.split(",")] |
Definition at line 555 of file run_simScript.py.
| float run_simScript.theDPmass = 0.2 * u.GeV |
Definition at line 37 of file run_simScript.py.
| float run_simScript.theHNLMass = 1.0 * u.GeV |
Definition at line 33 of file run_simScript.py.
| run_simScript.theMass |
Definition at line 546 of file run_simScript.py.
| list run_simScript.theProductionCouplings = None |
Definition at line 34 of file run_simScript.py.
| run_simScript.timer = ROOT.TStopwatch() |
Definition at line 679 of file run_simScript.py.
| str run_simScript.tmpFile = outFile + "tmp" |
Definition at line 1201 of file run_simScript.py.
| run_simScript.trajFilter = ROOT.FairTrajFilter.Instance() |
Definition at line 1113 of file run_simScript.py.
| run_simScript.type |
Definition at line 77 of file run_simScript.py.
| list run_simScript.usedInputFiles = [] |
Definition at line 56 of file run_simScript.py.
| list run_simScript.vertex_pars = [options.Vx * u.cm, options.Dx * u.cm, options.Vy * u.cm, options.Dy * u.cm, options.Vz * u.cm] |
Definition at line 844 of file run_simScript.py.
| run_simScript.z |
Definition at line 820 of file run_simScript.py.
| run_simScript.z_end = ship_geo.decayVolume.z0 + ship_geo.decayVolume.length |
Definition at line 760 of file run_simScript.py.
| run_simScript.zDV |
Definition at line 820 of file run_simScript.py.
| run_simScript.zTa |
Definition at line 820 of file run_simScript.py.