50 """Initialize the module"""
55 self.rootfile = ROOT.TFile(
'cosmicAnalysis.root',
'recreate')
57 self.tree_track = ROOT.TTree(
'track',
'')
59 self.tree_DEDX = ROOT.TTree(
'dedx',
'')
62 ROOT.gStyle.SetCanvasColor(0)
63 ROOT.gStyle.SetStatBorderSize(1)
64 ROOT.gStyle.SetStatColor(0)
65 ROOT.gStyle.SetTitleColor(1)
66 ROOT.gStyle.SetCanvasColor(0)
67 ROOT.gStyle.SetPadColor(0)
68 ROOT.gStyle.SetPadBorderMode(0)
69 ROOT.gStyle.SetCanvasBorderMode(0)
70 ROOT.gStyle.SetFrameBorderMode(0)
71 ROOT.gStyle.SetOptStat(0)
74 self.trackData = TrackData()
76 for key
in TrackData.__dict__:
79 if isinstance(self.trackData.__getattribute__(key), int):
81 self.tree_track.Branch(key, AddressOf(self.trackData, key), key + formstring)
83 self.dedxData = DEDXData()
85 for key
in DEDXData.__dict__:
88 if isinstance(self.dedxData.__getattribute__(key), int):
90 self.tree_DEDX.Branch(key, AddressOf(self.dedxData, key), key + formstring)
92 self.TotalNumberOfHits = ROOT.TH1F(
'TotalNumberOfHits',
'', 6, 0.5, 6.5)
94 self.HitsVsLayer = ROOT.TH2F(
'HitsVsLayer',
'', 6, 0.5, 6.5, 6, 0.5, 6.5)
96 self.HitsVsSensor = ROOT.TH2F(
'HitsVsSensor',
'', 6, 0.5, 6.5, 5, 0.5, 5.5)
98 self.LayerVsSensor = ROOT.TH2F(
'LayerVsSensor',
'', 6, 0.5, 6.5, 5, 0.5, 5.5)
100 self.PXDClusterSize = ROOT.TH1F(
'PXDClusterSize',
'', 20, 0.5, 20.5)
102 self.Chi2 = ROOT.TH1F(
'Chi2',
'', 300, 0.0, 500)
104 self.NDF = ROOT.TH1F(
'NDF',
'', 200, 0.0, 200)
106 self.Chi2OverNDF = ROOT.TH1F(
'Chi2OverNDF',
'', 300, 0.0, 5)
108 self.Momentum = ROOT.TH1F(
'Momentum',
'', 500, 0.0, 1000)
110 self.ADCCountOverNumberOfHitsInCDC = ROOT.TH1F(
'ADCCountOverNumberOfHitsInCDC',
'', 200, 0.0, 300)
112 self.ADCCountOverNumberOfHitsInCDCVsMomentum = ROOT.TProfile(
113 'ADCCountOverNumberOfHitsInCDCVsMomentum',
'', 200, 0.0, 300, 0.0, 1000)
115 self.MomentumVsADCCountOverNumberOfHitsInCDC = ROOT.TProfile(
116 'MomentumVsADCCountOverNumberOfHitsInCDC',
'', 100, 0.0, 100, 0.0, 1000)