6 if not len(sys.argv) > 1:
7 print "Please specify a flux file or directory path" 10 fluxpath = sys.argv[1]
17 if os.path.isdir(fluxpath):
18 print "The path you specified ("+fluxpath+
") appears to be a directory... looking for flux files in that directory." 20 for root,dirs,files
in os.walk(fluxpath):
22 temppath = os.path.join(root,file)
24 if file.startswith(
"g4lbne_")
and file.endswith(
".root"):
25 fluxfiles.append(temppath)
26 print "Found ",len(fluxfiles),
" flux files to consider" 28 print "Drawing fluxes from file:",fluxpath
29 fluxfiles.append(fluxpath)
34 FluxChain = ROOT.TChain(
"nudata")
35 for file
in fluxfiles:
39 canv = ROOT.TCanvas(
"NeutrinoEnergyFar",
"NeutrinoEnergyFar")
41 H_NeutrinoEnergyFar = ROOT.TH1F(
"H_NeutrinoEnergyFar",
"H_NeutrinoEnergyFar",40,0,20);
42 FluxChain.Draw(
"NenergyF[0]>>H_NeutrinoEnergyFar",
"Nimpwt/3.1415*NWtFar[0]")
45 canv.Print(
"NeutrinoEnergyFar.png");
46 canv.Print(
"NeutrinoEnergyFar.eps");