2 from optparse
import OptionParser
11 from plotUtil
import *
13 gROOT.LoadMacro(
'./sPHENIXStyle/sPhenixStyle.C')
14 gROOT.ProcessLine(
'SetsPhenixStyle()')
17 if __name__ ==
'__main__':
18 parser = OptionParser(usage=
"usage: %prog ver [options -n]")
19 parser.add_option(
"-f",
"--histfile", dest=
"histfname", type=
"string", default=
'/sphenix/user/hjheng/TrackletAna/analysis_INTT/plot/hists/HIJING_ana398_xvtx-0p04cm_yvtx0p24cm_zvtx-20cm_dummyAlignParams/dRcut0p5/hists_merged.root', help=
"Input file name")
20 parser.add_option(
"-d",
"--plotdir", dest=
"plotdir", type=
"string", default=
'./RecoTracklet/HIJING_ana398_xvtx-0p04cm_yvtx0p24cm_zvtx-20cm_dummyAlignParams/dRcut0p5/', help=
"Plot directory")
21 parser.add_option(
"-s",
"--isdata", dest=
"isdata", action=
"store_true", default=
False, help=
"Is data")
23 (opt, args) = parser.parse_args()
25 histfname = opt.histfname
29 os.makedirs(plotdir, exist_ok=
True)
31 print(
'Plotting: [Histogram file, plot directory]=[{}, {}]'.
format(histfname, plotdir))
39 hM_dPhi_proto_altrange =
GetHistogram(histfname,
'hM_dPhi_proto_altrange')
41 hM_dR_proto_altrange =
GetHistogram(histfname,
'hM_dR_proto_altrange')
47 hM_dEta_reco_altrange =
GetHistogram(histfname,
'hM_dEta_reco_altrange')
49 hM_dPhi_reco_altrange =
GetHistogram(histfname,
'hM_dPhi_reco_altrange')
51 hM_dR_reco_altrange =
GetHistogram(histfname,
'hM_dR_reco_altrange')
56 hM_Eta_vtxZ_proto_incl =
GetHistogram(histfname,
'hM_Eta_vtxZ_proto_incl')
57 hM_Eta_vtxZ_reco_incl =
GetHistogram(histfname,
'hM_Eta_vtxZ_reco_incl')
59 hM_clusphi_clusphisize =
GetHistogram(histfname,
'hM_clusphi_clusphisize')
60 hM_cluseta_clusphisize =
GetHistogram(histfname,
'hM_cluseta_clusphisize')
64 Draw_1Dhist(hM_NClusLayer1, isdata,
False,
True, 1.3,
'Number of clusters (Layer 3+4)',
'', plotdir+
'NClusLayer1')
65 Draw_1Dhist(hM_NPrototkl, isdata,
False,
True, 1.3,
'Number of proto-tracklets',
'', plotdir+
'NProtoTracklets')
66 Draw_1Dhist(hM_NRecotkl_Raw, isdata,
False,
True, 1.3,
'Number of reco-tracklets',
'', plotdir+
'NRecoTracklets_Raw')
68 Draw_1Dhist(hM_dEta_proto, isdata,
False,
False, 1.3,
'Proto-tracklet #Delta#eta',
'', plotdir+
'ProtoTracklet_dEta')
69 Draw_1Dhist(hM_dPhi_proto, isdata,
False,
False, 1.3,
'Proto-tracklet #Delta#phi',
'', plotdir+
'ProtoTracklet_dPhi')
70 Draw_1Dhist(hM_dPhi_proto_altrange, isdata,
False,
False, 1.3,
'Proto-tracklet #Delta#phi',
'', plotdir+
'ProtoTracklet_dPhi_altrange')
71 Draw_1Dhist(hM_Eta_proto, isdata,
False,
False, 1.3,
'Proto-tracklet #eta',
'', plotdir+
'ProtoTracklet_Eta')
72 Draw_1Dhist(hM_Phi_proto, isdata,
False,
False, 1.3,
'Proto-tracklet #phi',
'', plotdir+
'ProtoTracklet_Phi')
73 Draw_1Dhist(hM_dR_proto, isdata,
False,
True, 1.3,
'Proto-tracklet #DeltaR',
'', plotdir+
'ProtoTracklet_dR')
74 Draw_1Dhist(hM_dR_proto_altrange, isdata,
False,
True, 1.3,
'Proto-tracklet #DeltaR',
'', plotdir+
'ProtoTracklet_dR_altrange')
75 Draw_1Dhist(hM_dR_proto_LogX, isdata,
True,
True, 1.3,
'Proto-tracklet #DeltaR',
'', plotdir+
'ProtoTracklet_dR_logX')
77 Draw_1Dhist(hM_dEta_reco, isdata,
False,
True, 5,
'Reco-tracklet #Delta#eta',
'', plotdir+
'RecoTracklet_dEta')
78 Draw_1Dhist(hM_dEta_reco_altrange, isdata,
False,
True, 5,
'Reco-tracklet #Delta#eta',
'', plotdir+
'RecoTracklet_dEta_altrange')
79 Draw_1Dhist(hM_dPhi_reco, isdata,
False,
True, 10,
'Reco-tracklet #Delta#phi',
'', plotdir+
'RecoTracklet_dPhi')
80 Draw_1Dhist(hM_dPhi_reco_altrange, isdata,
False,
True, 5,
'Reco-tracklet #Delta#phi',
'', plotdir+
'RecoTracklet_dPhi_altrange')
81 Draw_1Dhist(hM_Eta_reco, isdata,
False,
False, 1.3,
'Reco-tracklet #eta',
'', plotdir+
'RecoTracklet_Eta')
82 Draw_1Dhist(hM_Phi_reco, isdata,
False,
False, 1.3,
'Reco-tracklet #phi',
'', plotdir+
'RecoTracklet_Phi')
83 Draw_1Dhist(hM_dR_reco, isdata,
False,
True, 1.3,
'Reco-tracklet #DeltaR',
'', plotdir+
'RecoTracklet_dR')
84 Draw_1Dhist(hM_dR_reco_altrange, isdata,
False,
True, 10,
'Reco-tracklet #DeltaR',
'', plotdir+
'RecoTracklet_dR_altrange')
85 Draw_1Dhist(hM_dR_reco_LogX, isdata,
True,
True, 1.3,
'Reco-tracklet #DeltaR',
'', plotdir+
'RecoTracklet_dR_logX')
88 Draw_2Dhist(hM_Eta_vtxZ_proto_incl, isdata,
False,
False, 0.16,
'Proto-tracklet #eta',
'Primary vertex V_{z} [cm]',
'colz', plotdir+
'ProtoTracklet_Eta_vtxZ')
89 Draw_2Dhist(hM_Eta_vtxZ_reco_incl, isdata,
False,
False, 0.14,
'Reco-tracklet #eta',
'Primary vertex V_{z} [cm]',
'colz', plotdir+
'RecoTracklet_Eta_vtxZ')
90 Draw_2Dhist(hM_clusphi_clusphisize, isdata,
True,
False, 0.16,
'Cluster #phi',
'Cluster #phi size',
'colz', plotdir+
'Cluster_Phi_ClusSize')
91 Draw_2Dhist(hM_cluseta_clusphisize, isdata,
True,
False, 0.14,
'Cluster #eta',
'Cluster #phi size',
'colz', plotdir+
'Cluster_Eta_ClusSize')