Functions | Variables
interactionmap Namespace Reference

Functions

def drawhistos (lists, start, particle, histos)
 
def allparticlehistos (lists, start, histos)
 

Variables

string usage = "usage: %prog[options]"
 
 parser = OptionParser(usage=usage)
 
 dest
 
 help
 
 default
 
 options
 
 args
 
 pathname = options.filename
 
list output_objects = []
 
 f = ROOT.TFile(str(pathname))
 

Function Documentation

def interactionmap.allparticlehistos (   lists,
  start,
  histos 
)

Definition at line 62 of file interactionmap.py.

62 def allparticlehistos(lists,start,histos):
63  xmax=0
64  ymax=0
65  collision=[]
66  histogram=[]
67  histcontainer=[]
68  ROOT.gStyle.SetPaintTextFormat("4.4f")
69  c1=ROOT.TCanvas("c1","c1",750,750)
70  c1.cd()
71  for objects in lists:
72  if objects.GetName()==start:
73  for keys in objects.GetListOfKeys():
74  collision.append(objects.Get(keys.GetName()))
75 
76 
77  for hists in collision:
78  if hists.GetName()==histos:
79  #print 'Yes I got {}'.format(histos)
80  for i in range(1,hists.GetNbinsX()):
81  if(hists.GetXaxis()).GetBinLabel(i)=="":
82  xmax=i-1
83  break
84  for j in range(1,hists.GetNbinsY()):
85  if(hists.GetYaxis()).GetBinLabel(j)=="":
86  ymax=j
87  #print j
88  break
89 
90  c1.cd()
91  (hists.GetXaxis()).SetRangeUser(0,xmax)
92  (hists.GetYaxis()).SetRangeUser(0,ymax)
93  hists.SetMinimum(0.0001)
94  hists.Draw("COLZTEXT")
95  raw_input()
96 
97 
98 
99 #
100 #drawhistos(output_objects,"Produced","Proton","hmatbkgpi+")
101 allparticlehistos(output_objects,"Projectile","h_in_vs_mat")
102 
103 
104 
105 
106 
def allparticlehistos(lists, start, histos)
if(!yymsg) yymsg
def interactionmap.drawhistos (   lists,
  start,
  particle,
  histos 
)

Definition at line 21 of file interactionmap.py.

21 def drawhistos(lists,start,particle,histos):
22  xmax=0
23  ymax=0
24  collision=[]
25  histogram=[]
26  histcontainer=[]
27  ROOT.gStyle.SetPaintTextFormat("4.4f")
28  c1=ROOT.TCanvas("c1","c1",750,750)
29  c1.cd()
30  for objects in lists:
31  if objects.GetName()==start:
32  for keys in objects.GetListOfKeys():
33  collision.append(objects.Get(keys.GetName()))
34 
35  for particles in collision:
36  if particles.GetName()==particle:
37  #print 'Yes i got {}'.format(particle)
38  for keys in particles.GetListOfKeys():
39  histogram.append(particles.Get(keys.GetName()))
40 
41  for hists in histogram:
42  if hists.GetName()==histos:
43  #print 'Yes I got {}'.format(histos)
44  for i in range(1,hists.GetNbinsX()):
45  if(hists.GetXaxis()).GetBinLabel(i)=="":
46  xmax=i-1
47  break
48  for j in range(1,hists.GetNbinsY()):
49  if(hists.GetYaxis()).GetBinLabel(j)=="":
50  ymax=j
51  #print j
52  break
53 
54  c1.cd()
55  (hists.GetXaxis()).SetRangeUser(0,xmax)
56  (hists.GetYaxis()).SetRangeUser(0,ymax)
57  hists.SetMinimum(0.0001)
58  hists.Draw("COLZTEXT")
59  raw_input()
60 
61 
def drawhistos(lists, start, particle, histos)
if(!yymsg) yymsg

Variable Documentation

interactionmap.args

Definition at line 9 of file interactionmap.py.

interactionmap.default

Definition at line 7 of file interactionmap.py.

interactionmap.dest

Definition at line 7 of file interactionmap.py.

interactionmap.f = ROOT.TFile(str(pathname))

Definition at line 16 of file interactionmap.py.

interactionmap.help

Definition at line 7 of file interactionmap.py.

interactionmap.options

Definition at line 9 of file interactionmap.py.

list interactionmap.output_objects = []

Definition at line 12 of file interactionmap.py.

interactionmap.parser = OptionParser(usage=usage)

Definition at line 5 of file interactionmap.py.

interactionmap.pathname = options.filename

Definition at line 10 of file interactionmap.py.

string interactionmap.usage = "usage: %prog[options]"

Definition at line 4 of file interactionmap.py.