6 from ROOT
import TFile, TH1D, TH2D, TCanvas, TFile, TChain
20 call constructor of base class, required.
29 'up': self.
f.Get(
'h00;1'),
30 'down': self.
f.Get(
'h01;1')},
31 'pval': {
'all': self.
f.Get(
'h18;1'),
32 'up': self.
f.Get(
'h02;1'),
33 'down': self.
f.Get(
'h03;1')},
34 'd0': {
'all': self.
f.Get(
'h11;1'),
35 'up': self.
f.Get(
'h04;1'),
36 'down': self.
f.Get(
'h05;1')},
37 'phi0': {
'all': self.
f.Get(
'h12;1'),
38 'up': self.
f.Get(
'h06;1'),
39 'down': self.
f.Get(
'h07;1')},
40 'omega': {
'all': self.
f.Get(
'h13;1'),
41 'up': self.
f.Get(
'h08;1'),
42 'down': self.
f.Get(
'h09;1')},
43 'z0': {
'all': self.
f.Get(
'h14;1'),
44 'up': self.
f.Get(
'h0a;1'),
45 'down': self.
f.Get(
'h0b;1')},
46 'tanl': {
'all': self.
f.Get(
'h15;1'),
47 'up': self.
f.Get(
'h0c;1'),
48 'down': self.
f.Get(
'h0d;1')},
49 'pt': {
'all': self.
f.Get(
'h16;1'),
50 'up': self.
f.Get(
'h0e;1'),
51 'down': self.
f.Get(
'h0f;1')}
56 'phi0': self.
f.Get(
'h2;1'),
57 'omega': self.
f.Get(
'h3;1'),
58 'z0': self.
f.Get(
'h4;1'),
59 'tanl': self.
f.Get(
'h5;1'),
60 'pt': self.
f.Get(
'h6;1')}
64 'phi0': self.
f.Get(
'h22;1'),
65 'omega': self.
f.Get(
'h23;1'),
66 'z0': self.
f.Get(
'h24;1'),
67 'tanl': self.
f.Get(
'h25;1')}
71 'phi0': self.
f.Get(
'Graph;3'),
72 'omega': self.
f.Get(
'Graph;4'),
73 'z0': self.
f.Get(
'Graph;5'),
74 'pt': self.
f.Get(
'Graph;1')}
76 self.
canvas = TCanvas(
"canvas",
"canvas", 800, 800)
84 Plot pull distribution
93 Getter for mean of helix parameter.
102 Getter for rms of helix parameter.
111 Plot graph of resolution as a function of Pt.
120 Plot resolution histogram.
127 def draw(self, key='pt', option='all', gopt=''):
129 Plot histogram of helix parameters etc..
138 Print the current plot.
144 Divide Tcanvas by (i,j).
152 if __name__ ==
"__main__":
155 parser = argparse.ArgumentParser()
156 parser.add_argument(
'input', help=
'Input file to be processed (unpacked CDC data).')
157 args = parser.parse_args()
158 qam =
QAM(args.input)