diff --git a/distribsForHNLandBG_byEvent.py b/distribsForHNLandBG_byEvent.py index 8e099fe..72f10c8 100755 --- a/distribsForHNLandBG_byEvent.py +++ b/distribsForHNLandBG_byEvent.py @@ -73,26 +73,18 @@ c1.Print('accPlots/%s.pdf'%key) c1.Print('accPlots/%s.png'%key) - - - -fpimu = r.TFile('../DATA/NewPIMU/ShipAna_newGen.root','read')#r.TFile('../DATA/MUPI/ShipAna.root','read') +datafolder = '/afs/cern.ch/user/e/egrave/private/ShipData/UsedForTP' +fpimu = r.TFile(datafolder + '/pimu/ShipAna_newGen.root', 'read') pimu = fpimu.Get('t') -pimu_geo = tools.searchForNodes3_xyz_dict('../DATA/NewPIMU/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008.root')#'../DATA/MUPI/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-2985556.root') +pimu_geo = tools.searchForNodes3_xyz_dict(datafolder + '/pimu/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008.root')#'../DATA/MUPI/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-2985556.root') -""" -fpimu = r.TFile('../DATA/signalFromThomas/ShipAna_newGen.root','read')#r.TFile('../DATA/MUPI/ShipAna.root','read') -pimu = fpimu.Get('t') -pimu_geo = tools.searchForNodes3_xyz_dict('../DATA/signalFromThomas/geofile_full.10.0.Pythia8-TGeant4_50k.root')#'../DATA/MUPI/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-2985556.root') -""" - -fmumunu = r.TFile('../DATA/NewMUMUNU/ShipAna_newGen.root','read')#r.TFile('../DATA/MUMUNU/ShipAna.root','read') +fmumunu = r.TFile(datafolder + '/mumunu/ShipAna_newGen.root', 'read')#r.TFile('../DATA/MUMUNU/ShipAna.root','read') mumunu = fmumunu.Get('t') -mumunu_geo = tools.searchForNodes3_xyz_dict('../DATA/NewMUMUNU/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-mumunu.root')#'../DATA/MUMUNU/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-TOTAL.root') +mumunu_geo = tools.searchForNodes3_xyz_dict(datafolder + '/mumunu/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-mumunu.root')#'../DATA/MUMUNU/geofile_full.10.0.Pythia8-TGeant4-1.0GeV-008-TOTAL.root') -ftiny = r.TFile('../DATA/SmallHNLs/ShipAna_newGen.root', 'read') +ftiny = r.TFile(datafolder + '/eenu-100MeV/ShipAna_newGen.root', 'read') tiny = ftiny.Get('t') -tiny_geo = tools.searchForNodes3_xyz_dict('../DATA/SmallHNLs/geofile_full.10.0.Pythia8-TGeant4-0.1GeV-011.root') +tiny_geo = tools.searchForNodes3_xyz_dict(datafolder + '/eenu-100MeV/geofile_full.10.0.Pythia8-TGeant4-0.1GeV-011.root') #fcosmics = r.TFile('../DATA/Cosmics/ShipAna.root','read') #cosmics = fcosmics.Get('ShipAna') @@ -107,18 +99,27 @@ #nu_geo = tools.searchForNodes3_xyz_dict('../DATA/NewKLONG/geofile_full.10.0.Genie-TGeant4_nu.root')#neutrino77.root') # Neutrinos from yandex -fnu = r.TFile('../DATA/nuFromYandex/newGen_15340000_nuBg.root') +#fnu = r.TFile('../DATA/nuFromYandex/newGen_15340000_nuBg.root') +fnu = r.TFile.Open('root://eoslhcb.cern.ch//eos/ship/data/neutrinoBackground/Yandex_for_TP/newGen_11560000_nuBg_total.root','read') nu = fnu.Get('t') -nu_geo = tools.searchForNodes3_xyz_dict('../DATA/nuFromYandex/geofile_full.10.0.Genie-TGeant4.root')#neutrino77.root') +nu_geo = tools.searchForNodes3_xyz_dict(datafolder + '/nuBgGeo/geofile_full.10.0.Genie-TGeant4.root')#neutrino77.root') + +fdp = r.TFile(datafolder + '/../HNLasDP/ShipAna_newGen.root') +dp = fdp.Get('t') +dp_geo = tools.searchForNodes3_xyz_dict(datafolder + '/../HNLasDP/geofile_full.10.0.Pythia8-TGeant4.root') # For a correct normalisation, we subtract the events that have an HNL vertex produced outside of the 60m fiducial volume +r.gROOT.SetBatch(r.kTRUE) +ndp = dp.Draw('weight', 'BadTruthVtx==0 && weight>0') +r.gROOT.SetBatch(r.kFALSE) + studies = { 'pimu': {'data':pimu, 'geo':pimu_geo, 'seen':[], 'ntot':20000-125},#136}, - #'pimu': {'data':pimu, 'geo':pimu_geo, 'seen':[], 'ntot':50000-125},#136}, 'mumunu': {'data':mumunu, 'geo':mumunu_geo, 'seen':[], 'ntot':20000-280},#289}, 'tiny': {'data': tiny, 'geo':tiny_geo, 'seen':[], 'ntot':20000-43},#66}, 'nu': {'data': nu, 'geo':nu_geo, 'seen':[], 'ntot':1.534e7}, + 'fakedp': {'data': dp, 'geo':dp_geo, 'seen':[], 'ntot':ndp}, #'cosmics': {'data':cosmics, 'geo':cosmics_geo, 'seen':[], 'ntot':cosmics.GetEntriesFast()}, #'nubar': {'data': nubar, 'geo':nubar_geo, 'seen':[], 'ntot':99999*2},#99999*2}, #'nu': {'data': nu, 'geo':nu_geo, 'seen':[], 'ntot':99999*2}#99999} @@ -602,7 +603,7 @@ tc.nu = True zmin = geo['Veto_5']['z']['pos']+geo['Veto_5']['z']['dim'] zmax = geo['Tr1_1']['z']['pos']-geo['Tr1_1']['z']['dim'] - if (study == 'pimu'): + if (study == 'pimu') or (study == 'fakedp'): cuts = [ 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], tc.ip(250.)[0] ] cutnames = [ tc.recoed()[1], tc.notVetoed(1000.)[1], tc.redChi2(5.)[1], tc.ndf(25)[1], tc.fiducial(zmin, zmax, 250., 500.)[1], tc.goodtracks()[1], @@ -687,7 +688,7 @@ def tableWithDraw(answers=False): results = {} - for study in ['nu', 'pimu', 'mumunu', 'tiny']: + for study in ['nu', 'pimu', 'mumunu', 'tiny', 'fakedp']: results[study] = {} numbers, numbersWithWeights, cuts = countWithDraw(study, answers) results[study]['numbers'] = numbers @@ -885,7 +886,8 @@ header = { 'pimu': ("$HNL \\to \\pi \\mu$", "tab:recpimu"), 'mumunu': ("$HNL \\to \\mu \\mu \\nu$", "tab:recmmnu"), 'tiny': ("$HNL \\to e e \\nu$", "tab:receenu"), - 'nu': ("neutrino-induced background", "tab:recnubkg") + 'nu': ("neutrino-induced background", "tab:recnubkg"), + 'fakedp': ("$\\gamma' \\to \\mu\\mu$", "tab:darkphoton"), } def makeTex(results):