In [1]:
import ROOT
import os
import glob
%jsroot on
Welcome to JupyROOT 6.18/00

Plans for next week

  1. investigate QA for 244456 (and 244453)
    • what to look for in case of unusually large num. jets?
    • check triggers settings
    • plot pT/angular distr. of these jets, compare with rest or per run
  2. study bump at IPd ~ 0.25 cm!!
  3. check track uniformity in phi - validation for “hybrid tracks” usage
  4. rather small stats of pp@5.02TeV -- what with the reference for PbPb? check approaches in PbPb@5.02TeV papers

Check track uniformity in $\phi$ (Ad 3)

whole LHC15n with hybrid tracks

In [2]:
f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/AnalysisResults.root')
t = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
Warning in <TClass::Init>: no dictionary for class AliEmcalList is available
In [3]:
# ROOT.gROOT.Reset()
c1 = ROOT.TCanvas( 'c1', 'Example', 200, 10, 700, 500 )
c1.Draw()
h_jet_phi = ROOT.TH1D('h_jet_phi', 'h_jet_phi', 100, 0, 6.283)
h_jet_phi.GetXaxis().SetTitle('jet phi')
t.Draw('Jet_Phi >> h_jet_phi', '', 'e1x0')
# h_jet_phi.DrawCopy()
Out[3]:
45535223
In [4]:
ROOT.gROOT.Reset()
c1_2 = ROOT.TCanvas( 'c1_2', '', 200, 10, 700, 500 )
c1_2.Draw()
h_track_phi = ROOT.TH1D('h_track_phi', 'h_track_phi', 100, 0, 6.283)
h_track_phi.GetXaxis().SetTitle('track phi')
t.Draw('Jet_Track_Phi >> h_track_phi', '', 'e1x0')
# h_phi.GetYaxis().SetRangeUser(6000,8000)
# c1.Draw()
Out[4]:
64203559

Same but without hybrid tracks(?) -- filterbits(0)

In [5]:
f_old = ROOT.TFile('../../HF-jets/ana_results/iter1/LHC15n_v2/AnalysisResults.root')
t_old = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
In [6]:
c1 = ROOT.TCanvas( 'c1', 'Example', 200, 10, 700, 500 )
c1.Draw()
h_jet_phi = ROOT.TH1D('h_jet_phi', 'h_jet_phi', 100, 0, 6.283)
h_jet_phi.GetXaxis().SetTitle('jet phi')
t_old.Draw('Jet_Phi >> h_jet_phi', '', 'e1x0')

c1_2 = ROOT.TCanvas( 'c1_2', '', 200, 10, 700, 500 )
c1_2.Draw()
h_track_phi = ROOT.TH1D('h_track_phi', 'h_track_phi', 100, 0, 6.283)
h_track_phi.GetXaxis().SetTitle('track phi')
t_old.Draw('Jet_Track_Phi >> h_track_phi','','e1x0')
Out[6]:
66579588
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1_2

Per run

In [7]:
canvases = []
data_files = glob.glob('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/*/AnalysisResults.root')

for i,run_file in enumerate(data_files):
    ROOT.gROOT.Reset()
    print(f'{run_file}, {i+1}/{len(data_files)}')
    run = run_file.split('/')[-2]
    f_run = ROOT.TFile(run_file)
    t_run = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
    
    
    c = ROOT.TCanvas( 'c_'+run, 'c_'+run, 200, 10, 950, 400 )
    c.Draw()
    pad1 = ROOT.TPad("pad1"+run, "pad1"+run, 0, 0, 0.5, 1)
#     pad1.SetGridx()
    pad1.Draw()
    # Lower ratio plot is pad2
    c.cd()  # returns to main canvas before defining pad2
    pad2 = ROOT.TPad("pad2"+run, "pad2"+run, 0.5, 0, 1, 1)
#     pad2.SetBottomMargin(0.2)
#     pad2.SetGridx()
    pad2.Draw()
    
    
    pad1.cd()
    h_jet_phi = ROOT.TH1D('h_jet_phi', 'h_jet_phi', 100, 0, 6.283)
    h_jet_phi.SetTitle(run)
    h_jet_phi.GetXaxis().SetTitle('jet phi')
    t_run.Draw('Jet_Phi >> h_jet_phi', '', 'goff')
    h_jet_phi.DrawCopy('e1x0')

#     c2 = ROOT.TCanvas( 'c_2_'+run, 'c_2_'+run, 200, 10, 700, 500 )
#     c2.Draw()
    pad2.cd()
    h_track_phi = ROOT.TH1D('h_track_phi', 'h_track_phi', 100, 0, 6.283)
    h_track_phi.SetTitle(run)
    h_track_phi.GetXaxis().SetTitle('track phi')
    t_run.Draw('Jet_Track_Phi >> h_track_phi', '', 'goff')
    h_track_phi.DrawCopy('e1x0')
    print('done')
    
#     canvases.append(c)
#     canvases.append(c2)
    
# ROOT.gROOT.GetListOfCanvases().Draw()
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244340/AnalysisResults.root, 1/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244351/AnalysisResults.root, 2/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244355/AnalysisResults.root, 3/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244359/AnalysisResults.root, 4/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244364/AnalysisResults.root, 5/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244377/AnalysisResults.root, 6/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244416/AnalysisResults.root, 7/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244421/AnalysisResults.root, 8/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244453/AnalysisResults.root, 9/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244456/AnalysisResults.root, 10/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244480/AnalysisResults.root, 11/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244481/AnalysisResults.root, 12/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244482/AnalysisResults.root, 13/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244483/AnalysisResults.root, 14/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root, 15/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244531/AnalysisResults.root, 16/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244540/AnalysisResults.root, 17/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244542/AnalysisResults.root, 18/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244617/AnalysisResults.root, 19/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244618/AnalysisResults.root, 20/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244619/AnalysisResults.root, 21/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244626/AnalysisResults.root, 22/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244627/AnalysisResults.root, 23/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244628/AnalysisResults.root, 24/24
done

QA for 244456 and 244453 (Ad 2)

nothing suspicious in $\eta\;\mathrm{vs}\;\phi$ and $p_T$ distributions

In [5]:
canvases = []
data_files = glob.glob('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/*/AnalysisResults.root')

for i,run_file in enumerate(data_files):
#     ROOT.gROOT.Reset()
    print(f'{run_file}, {i+1}/{len(data_files)}')
    run = run_file.split('/')[-2]
    f_run = ROOT.TFile(run_file)
    t_run = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
    
    
    c = ROOT.TCanvas( 'c_'+run, 'c_'+run, 200, 10, 950, 400 )
    c.Draw()
    pad1 = ROOT.TPad("pad1"+run, "pad1"+run, 0, 0, 0.5, 1)
#     pad1.SetGridx()
    pad1.Draw()
    # Lower ratio plot is pad2
    c.cd()  # returns to main canvas before defining pad2
    pad2 = ROOT.TPad("pad2"+run, "pad2"+run, 0.5, 0, 1, 1)
#     pad2.SetBottomMargin(0.2)
#     pad2.SetGridx()
    pad2.Draw()
    
    cut = 'Jet_Pt > 5'
    pad1.cd()
    h_jet_phi_eta = ROOT.TH2D('h_jet_phi_eta', 'h_jet_phi_eta', 12, -0.6, 0.6, 50, 0, 6.283)
    h_jet_phi_eta.SetTitle(run)
    h_jet_phi_eta.GetXaxis().SetTitle('jet eta')
    h_jet_phi_eta.GetYaxis().SetTitle('jet phi')
    
    t_run.Draw('Jet_Phi:Jet_Eta >> h_jet_phi_eta', cut, 'goff')
    h_jet_phi_eta.DrawCopy('colz')

#     c2 = ROOT.TCanvas( 'c_2_'+run, 'c_2_'+run, 200, 10, 700, 500 )
#     c2.Draw()
    pad2.cd()
    pad2.SetLogy(1)
    h_jet_pt = ROOT.TH1D('h_jet_pt', 'h_jet_pt', 100, 0, 100)
    h_jet_pt.SetTitle(run)
    h_jet_pt.GetXaxis().SetTitle('jet pt')
    t_run.Draw('Jet_Pt >> h_jet_pt', cut, 'goff')
    h_jet_pt.DrawCopy()
    
    print('done')
    f_run.Close()
    
#     canvases.append(c)
#     canvases.append(c2)
    
# ROOT.gROOT.GetListOfCanvases().Draw()
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244340/AnalysisResults.root, 1/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244351/AnalysisResults.root, 2/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244355/AnalysisResults.root, 3/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244359/AnalysisResults.root, 4/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244364/AnalysisResults.root, 5/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244377/AnalysisResults.root, 6/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244416/AnalysisResults.root, 7/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244421/AnalysisResults.root, 8/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244453/AnalysisResults.root, 9/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244456/AnalysisResults.root, 10/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244480/AnalysisResults.root, 11/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244481/AnalysisResults.root, 12/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244482/AnalysisResults.root, 13/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244483/AnalysisResults.root, 14/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root, 15/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244531/AnalysisResults.root, 16/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244540/AnalysisResults.root, 17/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244542/AnalysisResults.root, 18/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244617/AnalysisResults.root, 19/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244618/AnalysisResults.root, 20/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244619/AnalysisResults.root, 21/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244626/AnalysisResults.root, 22/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244627/AnalysisResults.root, 23/24
done
../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244628/AnalysisResults.root, 24/24
done
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244340
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244351
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244355
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244359
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244364
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244377
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244416
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244421
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244453
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244456
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244480
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244481
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244482
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244483
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244484
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244531
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244540
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244542
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244617
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244618
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244619
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244626
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244627
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c_000244628

Bump at IPd ~ 0.25

In [14]:
%jsroot off

$\mathrm{IP}_d$ distribution split

In [65]:
# f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root')
f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/AnalysisResults.root')
t = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
In [71]:
c1 = ROOT.TCanvas( 'c1', 'Example', 800,600 )

var = 'Jet_Track_IPd'
args = 100, -1, 1
histtype = ROOT.TH1D

h_bump   = histtype('h_bump'  , 'h_bump'  , *args)
h_center = histtype('h_center', 'h_center', *args)
h_tail   = histtype('h_tail'  , 'h_tail'  , *args)
h_neg    = histtype('h_neg'   , 'h_neg'   , *args)
h_all    = histtype('h_all'   , 'h_all'   , *args)

# h_all.GetYaxis().SetRangeUser(0,1000000)
h_all.SetLineColor(ROOT.kBlack)
h_center.SetLineColor(ROOT.kBlue)
h_tail.SetLineColor(ROOT.kGreen)
h_neg.SetLineColor(ROOT.kMagenta)
h_bump.SetLineColor(ROOT.kRed)
h_bump.SetLineWidth(3)
# h_all.SetFillColor(ROOT.kBlack)
h_center.SetFillColor(ROOT.kBlue)
h_tail.SetFillColor(ROOT.kGreen)
h_neg.SetFillColor(ROOT.kMagenta)
h_bump.SetFillColor(ROOT.kRed)

t.Draw(f'{var} >> h_all'   , 'Jet_Pt > 10 & Jet_Pt < 50'                                              , 'goff')
t.Draw(f'{var} >> h_bump'  , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd > 0.2 & Jet_Track_IPd < 0.3'  , 'goff')
t.Draw(f'{var} >> h_neg'   , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd < -0.2 & Jet_Track_IPd > -0.3', 'goff')
t.Draw(f'{var} >> h_center', 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) < 0.05'                  , 'goff')
t.Draw(f'{var} >> h_tail'  , 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) > 0.4'                   , 'goff')

print(f'num. entries: \n\t all:   \t{h_all.GetEntries()} \n\t center:\t{h_center.GetEntries()}\n\t tail:  \t{h_tail.GetEntries()}\n\t neg:    \t{h_neg.GetEntries()}\n\t bump:  \t{h_bump.GetEntries()}')
num. entries: 
	 all:   	843851.0 
	 center:	741811.0
	 tail:  	22322.0
	 neg:    	6470.0
	 bump:  	15955.0
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Warning in <TFile::Append>: Replacing existing TH1: h_bump (Potential memory leak).
Warning in <TFile::Append>: Replacing existing TH1: h_center (Potential memory leak).
Warning in <TFile::Append>: Replacing existing TH1: h_tail (Potential memory leak).
Warning in <TFile::Append>: Replacing existing TH1: h_neg (Potential memory leak).
Warning in <TFile::Append>: Replacing existing TH1: h_all (Potential memory leak).
In [72]:
%jsroot on
In [73]:
c1 = ROOT.TCanvas( 'c1', 'c1', 600,400 )
c1.Draw()
c1.GetPad(0).SetLogy(1)
h_all.Draw()
# c2 = ROOT.TCanvas( 'c2', 'c2', 600,400 )
h_center.Draw('same')
# c3 = ROOT.TCanvas( 'c3', 'c3', 600,400 )
h_tail.Draw('same')
# c4 = ROOT.TCanvas( 'c4', 'c4', 600,400 )
h_neg.Draw('same')
# c5 = ROOT.TCanvas( 'c5', 'c5', 600,400 )
h_bump.Draw('same')
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1

$\eta \; \mathrm{vs} \;\phi$

In [78]:
# f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root')
f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/AnalysisResults.root')
t = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
In [79]:
c1 = ROOT.TCanvas( 'c1', 'Example', 800,600 )


var = 'Jet_Track_Phi : Jet_Track_Eta'
args = 15, -1, 1, 50, 0, 6.283
histtype=ROOT.TH2D

h_bump   = histtype('h_bump'  , 'h_bump'  , *args)
h_center = histtype('h_center', 'h_center', *args)
h_tail   = histtype('h_tail'  , 'h_tail'  , *args)
h_neg    = histtype('h_neg'   , 'h_neg'   , *args)
h_all    = histtype('h_all'   , 'h_all'   , *args)

# h_all.GetYaxis().SetRangeUser(0,1000000)
h_all.SetLineColor(ROOT.kBlack)
h_center.SetLineColor(ROOT.kBlue)
h_tail.SetLineColor(ROOT.kGreen)
h_neg.SetLineColor(ROOT.kMagenta)
h_bump.SetLineColor(ROOT.kRed)
h_bump.SetLineWidth(3)

t.Draw(f'{var} >> h_all'   , 'Jet_Pt > 10 & Jet_Pt < 50'                                              , 'goff')
t.Draw(f'{var} >> h_bump'  , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd > 0.2 & Jet_Track_IPd < 0.3'  , 'goff')
t.Draw(f'{var} >> h_neg'   , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd < -0.2 & Jet_Track_IPd > -0.3', 'goff')
t.Draw(f'{var} >> h_center', 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) < 0.05'                  , 'goff')
t.Draw(f'{var} >> h_tail'  , 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) > 0.4'                   , 'goff')

print(f'num. entries: \n\t all:   \t{h_all.GetEntries()} \n\t center:\t{h_center.GetEntries()}\n\t tail:  \t{h_tail.GetEntries()}\n\t neg:    \t{h_neg.GetEntries()}\n\t bump:  \t{h_bump.GetEntries()}')
num. entries: 
	 all:   	843851.0 
	 center:	741811.0
	 tail:  	22322.0
	 neg:    	6470.0
	 bump:  	15955.0
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
In [80]:
c1 = ROOT.TCanvas( 'c1', 'c1', 600,400 )
h_all.Draw('colz')
c2 = ROOT.TCanvas( 'c2', 'c2', 600,400 )
h_center.Draw('colz')
c3 = ROOT.TCanvas( 'c3', 'c3', 600,400 )
h_tail.Draw('colz')
c4 = ROOT.TCanvas( 'c4', 'c4', 600,400 )
h_neg.Draw('colz')
c5 = ROOT.TCanvas( 'c5', 'c5', 600,400 )
h_bump.Draw('colz')
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c2
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c3
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c4
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c5
In [81]:
c1.Draw()
c2.Draw()
c3.Draw()
c4.Draw()
c5.Draw()

$\phi$ distribution

In [82]:
# f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root')
f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/AnalysisResults.root')
t = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
In [83]:
c1 = ROOT.TCanvas( 'c1', 'Example', 800,600 )

var = 'Jet_Track_Phi'
args = 100, 0, 6.283
histtype = ROOT.TH1D

h_bump   = histtype('h_bump'  , 'h_bump'  , *args)
h_center = histtype('h_center', 'h_center', *args)
h_tail   = histtype('h_tail'  , 'h_tail'  , *args)
h_neg    = histtype('h_neg'   , 'h_neg'   , *args)
h_all    = histtype('h_all'   , 'h_all'   , *args)

# h_all.GetYaxis().SetRangeUser(0,1000000)
h_all.SetLineColor(ROOT.kBlack)
h_center.SetLineColor(ROOT.kBlue)
h_tail.SetLineColor(ROOT.kGreen)
h_neg.SetLineColor(ROOT.kMagenta)
h_bump.SetLineColor(ROOT.kRed)
h_bump.SetLineWidth(3)

t.Draw(f'{var} >> h_all'   , 'Jet_Pt > 10 & Jet_Pt < 50'                                              , 'goff')
t.Draw(f'{var} >> h_bump'  , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd > 0.2 & Jet_Track_IPd < 0.3'  , 'goff')
t.Draw(f'{var} >> h_neg'   , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd < -0.2 & Jet_Track_IPd > -0.3', 'goff')
t.Draw(f'{var} >> h_center', 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) < 0.05'                  , 'goff')
t.Draw(f'{var} >> h_tail'  , 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) > 0.4'                   , 'goff')

print(f'num. entries: \n\t all:   \t{h_all.GetEntries()} \n\t center:\t{h_center.GetEntries()}\n\t tail:  \t{h_tail.GetEntries()}\n\t neg:    \t{h_neg.GetEntries()}\n\t bump:  \t{h_bump.GetEntries()}')
num. entries: 
	 all:   	843851.0 
	 center:	741811.0
	 tail:  	22322.0
	 neg:    	6470.0
	 bump:  	15955.0
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
In [84]:
c1 = ROOT.TCanvas( 'c1', 'c1', 600,400 )
h_all.Draw('colz')
c2 = ROOT.TCanvas( 'c2', 'c2', 600,400 )
h_center.Draw('colz')
c3 = ROOT.TCanvas( 'c3', 'c3', 600,400 )
h_tail.Draw('colz')
c4 = ROOT.TCanvas( 'c4', 'c4', 600,400 )
h_neg.Draw('colz')
c5 = ROOT.TCanvas( 'c5', 'c5', 600,400 )
h_bump.Draw('colz')

c1.Draw()
c2.Draw()
c3.Draw()
c4.Draw()
c5.Draw()
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c2
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c3
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c4
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c5

$p_T$ distribution

In [74]:
# f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/myOutputDir/000244484/AnalysisResults.root')
f = ROOT.TFile('../../HF-jets/ana_results/iter2/LHC15n/AnalysisResults.root')
t = ROOT.gROOT.FindObject('JetTree_AliAnalysisTaskJetExtractor_Jet_AKTChargedR040_tracks_pT0150_E_scheme_allJets')
In [75]:
c1 = ROOT.TCanvas( 'c1', 'Example', 800,600 )

var = 'Jet_Track_Pt'
args = 50, 0, 25
histtype = ROOT.TH1D

# var = 'Jet_Track_Phi : Jet_Track_Eta'
# args = 25, -1, 1, 25, 0, 6.283
# histtype=ROOT.TH2D

h_bump   = histtype('h_bump'  , 'h_bump'  , *args)
h_center = histtype('h_center', 'h_center', *args)
h_tail   = histtype('h_tail'  , 'h_tail'  , *args)
h_neg    = histtype('h_neg'   , 'h_neg'   , *args)
h_all    = histtype('h_all'   , 'h_all'   , *args)

# h_all.GetYaxis().SetRangeUser(0,1000000)
h_all.SetLineColor(ROOT.kBlack)
h_center.SetLineColor(ROOT.kBlue)
h_tail.SetLineColor(ROOT.kGreen)
h_neg.SetLineColor(ROOT.kMagenta)
h_bump.SetLineColor(ROOT.kRed)
h_bump.SetLineWidth(3)

t.Draw(f'{var} >> h_all'   , 'Jet_Pt > 10 & Jet_Pt < 50'                                              , 'goff')
t.Draw(f'{var} >> h_bump'  , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd > 0.2 & Jet_Track_IPd < 0.3'  , 'goff')
t.Draw(f'{var} >> h_neg'   , 'Jet_Pt > 10 & Jet_Pt < 50 & Jet_Track_IPd < -0.2 & Jet_Track_IPd > -0.3', 'goff')
t.Draw(f'{var} >> h_center', 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) < 0.05'                  , 'goff')
t.Draw(f'{var} >> h_tail'  , 'Jet_Pt > 10 & Jet_Pt < 50 & abs(Jet_Track_IPd) > 0.4'                   , 'goff')

print(f'num. entries: \n\t all:   \t{h_all.GetEntries()} \n\t center:\t{h_center.GetEntries()}\n\t tail:  \t{h_tail.GetEntries()}\n\t neg:    \t{h_neg.GetEntries()}\n\t bump:  \t{h_bump.GetEntries()}')
num. entries: 
	 all:   	843851.0 
	 center:	741811.0
	 tail:  	22322.0
	 neg:    	6470.0
	 bump:  	15955.0
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
In [76]:
c1 = ROOT.TCanvas( 'c1', 'c1', 600,400 )
h_all.Draw('colz')
c2 = ROOT.TCanvas( 'c2', 'c2', 600,400 )
h_center.Draw('colz')
c3 = ROOT.TCanvas( 'c3', 'c3', 600,400 )
h_tail.Draw('colz')
c4 = ROOT.TCanvas( 'c4', 'c4', 600,400 )
h_neg.Draw('colz')
c5 = ROOT.TCanvas( 'c5', 'c5', 600,400 )
h_bump.Draw('colz')
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c2
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c3
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c4
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c5
In [77]:
c1.GetPad(0).SetLogy(1)
c2.GetPad(0).SetLogy(1)
c3.GetPad(0).SetLogy(1)
c4.GetPad(0).SetLogy(1)
c5.GetPad(0).SetLogy(1)

c1.Draw()
c2.Draw()
c3.Draw()
c4.Draw()
c5.Draw()