responses to the referees about the TP
1 parent a633ecd commit 30ed53b180a096433d889a4188488b4717b7eb06
@Ubuntu Ubuntu authored on 15 Jun 2015
Showing 7 changed files
View
31
TP_answers_referees/IP_1GeV_100MeV.py 0 → 100644
from os.path import dirname, realpath, sep, pardir
import sys
sys.path.append(dirname(dirname(realpath(__file__))))
import os
os.chdir('../')
print os.getcwd()
from distribsForHNLandBG_byEvent import *
 
tc = cutsWithDraw()
print tc.nu
print tc.noB
tmu = studies['mumunu']['data']
te = studies['tiny']['data']
geomu = studies['mumunu']['geo']
geoe = studies['tiny']['geo']
zminmu = geomu['Veto_5']['z']['pos']+geomu['Veto_5']['z']['dim']
zmaxmu = geomu['Tr1_1']['z']['pos']-geomu['Tr1_1']['z']['dim']
zmine = geoe['Veto_5']['z']['pos']+geoe['Veto_5']['z']['dim']
zmaxe = geoe['Tr1_1']['z']['pos']-geoe['Tr1_1']['z']['dim']
mucuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.fiducial(zminmu, zmaxmu, 250., 500.)[0], tc.goodtracks()[0], tc.muon1(2)[0], tc.muon2(2)[0], tc.doca(30.)[0] ]
ecuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.fiducial(zmine, zmaxe, 250., 500.)[0], tc.goodtracks()[0], tc.ecal()[0], tc.doca(30.)[0] ]
ntotmu = studies['mumunu']['ntot']
ntote = studies['tiny']['ntot']
r.gStyle.SetOptStat(r.kFALSE)
te.Draw('NoB_IP0>>he', "(weight/%s)*("%(ntote)+str("&&".join([c for c in ecuts]))+ ")", "norm")
r.gStyle.SetOptStat(r.kFALSE)
tmu.Draw('NoB_IP0>>hmu', "(weight/%s)*("%(ntotmu)+str("&&".join([c for c in mucuts]))+ ")", "norm same")
hmu = r.gDirectory.Get('hmu')
hmu.SetLineColor(r.kRed)
hmu.SetMarkerColor(r.kRed)
View
TP_answers_referees/IP_nu_bg.pdf 0 → 100644
Not supported
View
0
■■■■■
TP_answers_referees/__init__.py 0 → 100644
View
65
TP_answers_referees/bg_rejection_with_IP.py 0 → 100644
from os.path import dirname, realpath, sep, pardir
import sys
sys.path.append(dirname(dirname(realpath(__file__))))
import os
os.chdir('../')
print os.getcwd()
from distribsForHNLandBG_byEvent import *
 
### NB: anche nei draw ci andrebbe NoB_!!!
 
tc = cutsWithDraw()
study = 'nu'
t = studies[study]['data']
cuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.ip(250.)[0] ]
tc.setNoB('NoB_')
tc.nu = True
print cuts
cuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.ip(250.)[0] ]
print cuts
cuts = [ tc.recoed()[0] ]
t.Draw('IP0>>bgreco', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in cuts])+ ")", "norm")
cuts2 = [ tc.recoed()[0], tc.notVetoed(1000.)[0] ]
t.Draw('IP0>>bgreconv', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in cuts2])+ ")", "normsame")
bgreconv = r.gDirectory.Get('bgreconv')
bgreconv.SetLineColor(r.kRed)
bgreconv.SetMarkerColor(r.kRed)
geo = studies[study]['geo']
ntot = studies[study]['ntot']
zmin = geo['Veto_5']['z']['pos']+geo['Veto_5']['z']['dim']
zmax = geo['Tr1_1']['z']['pos']-geo['Tr1_1']['z']['dim']
cuts3 = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.fiducial(zmin, zmax, 250., 500.)[0], tc.goodtracks()[0], tc.ecal()[0], tc.muon1(1)[0], tc.muon2(1)[0], tc.doca(30.)[0] ]
t.Draw('IP0>>bgreconvcuts', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in cuts3])+ ")", "normsame")
bgreconvcuts = r.gDirectory.Get('bgreconvcuts')
bgreconvcuts.SetMarkerColor(r.kGreen)
bgreconvcuts.SetLineColor(r.kGreen)
bgreconvcuts.SetLineColor(r.kGreen+2)
bgreconvcuts.SetMarkerColor(r.kGreen+2)
c2 = r.TCanvas()
c2.cd()
cuts = [ tc.recoed()[0]]
ntot = t.Draw('IP0>>bgtot', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in cuts])+ ")", "")
print ntot
w = t.GetHistogram().GetSumOfWeights()
print w
ccuts = [ tc.recoed()[0], tc.ip(250.)[0] ]
nc = t.Draw('IP0>>bgtot', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in ccuts])+ ")", "")
print nc
wc = t.GetHistogram().GetSumOfWeights()
print wc
print wc/w
print w
print 1. - wc/w
nvcuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0] ]
nnv = t.Draw('IP0>>bgtot', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in nvcuts])+ ")", "")
print nnv
cnvcuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.ip(250.)[0] ]
nvw = t.GetHistogram().GetSumOfWeights()
print nvw
cnnv = t.Draw('IP0>>bgtot', "(weight*%s/%s)*("%(flux_nu, entries_nu)+"&&".join([c for c in cnvcuts])+ ")", "")
print cnnv
cnvw = t.GetHistogram().GetSumOfWeights()
print cnvw
print 1. - cnvw/nvw
print tc.noB
View
TP_answers_referees/ip_100MeV_1GeV.pdf 0 → 100644
Not supported
View
0
■■■■■
__init__.py 0 → 100644
View
0
■■■■■
distribsForHNLandBG_byEvent_backup.py 0 → 100755
Too large (Show diff)