CJ-CT L2 sensitivity Viewer
Author
Xiaoxian Jing
Title
CJ-CT L2 sensitivity Viewer
Description
Simple Function for Viewing L2 sensitivity Plots
Category
Working Material
Keywords
URL
http://www.notebookarchive.org/2021-02-3ag7oxb/
DOI
https://notebookarchive.org/2021-02-3ag7oxb
Date Added
2021-02-07
Date Last Modified
2021-02-07
File Size
156.62 kilobytes
Supplements
Rights
Redistribution rights reserved



# fit_name takes str value from list {‘CJ_free_dc’, ‘CJ_no_dc’, ‘CT_fixed_dc’, ‘CT_no_nuA’, ‘CJ_no_WSLAC’, ‘CJ_fixed_dc’, ‘CT_no_dc’}
# Q takes int takes value from list {2, 100}
# flavor takes value from list {-2, -1, 0, 1, 2, 3, 4}, corresponding to [“ub”, “db”, “g”, “d”, “u”, “s”, “c”]
# flavor_comb takes value from list {1, 2, 3, 4, 5, 6, 7}, corresponding to
# [“u_v”, “d_v”, “d/u”, “db/ub”, “2*s/(db+ub)”, “(s+sb)/(2*db)”, “(c+cb)/(ub+db)”]
# expt_group takes value from list {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, corresponding to
# [“gamma jets”, “jets”, “dis proton”, “dis deuterium”, “WZ Tevatron”, “Drell-Yan”, “dis nucleus”, “ttbar production”, “SIDIS nucleus”, “LHC jets”]
# Notice that for CT, the fit only contains [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
# for CJ, it only contains [1, 2, 3, 4, 5, 6, 7]
# There are three types of plots:
# 1. Given flavor, the plot shows the L2 sensitivities of the largest few experiment groups vs the flavor
# 2. Given flavor ratio, the plot shows the L2 sensitivities of the largest few experiment groups vs the flavor ratio
# 3. Given experiment group, two plot each shows the L2 sensitivity vs each flavor and flavor ratio.
# The three arguments flavor, flavor_comb, expt_group can not all be None, and the program will take the value from the first not None argument.
# The program also gives the relative path to the PDF file of the plot shown.
# Q takes int takes value from list {2, 100}
# flavor takes value from list {-2, -1, 0, 1, 2, 3, 4}, corresponding to [“ub”, “db”, “g”, “d”, “u”, “s”, “c”]
# flavor_comb takes value from list {1, 2, 3, 4, 5, 6, 7}, corresponding to
# [“u_v”, “d_v”, “d/u”, “db/ub”, “2*s/(db+ub)”, “(s+sb)/(2*db)”, “(c+cb)/(ub+db)”]
# expt_group takes value from list {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, corresponding to
# [“gamma jets”, “jets”, “dis proton”, “dis deuterium”, “WZ Tevatron”, “Drell-Yan”, “dis nucleus”, “ttbar production”, “SIDIS nucleus”, “LHC jets”]
# Notice that for CT, the fit only contains [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
# for CJ, it only contains [1, 2, 3, 4, 5, 6, 7]
# There are three types of plots:
# 1. Given flavor, the plot shows the L2 sensitivities of the largest few experiment groups vs the flavor
# 2. Given flavor ratio, the plot shows the L2 sensitivities of the largest few experiment groups vs the flavor ratio
# 3. Given experiment group, two plot each shows the L2 sensitivity vs each flavor and flavor ratio.
# The three arguments flavor, flavor_comb, expt_group can not all be None, and the program will take the value from the first not None argument.
# The program also gives the relative path to the PDF file of the plot shown.
In[]:=
GetPlots[fitname0_,q0_,flavor0_,FlavorRatio0_,ExptGroup0_]:=Module[{fitname=fitname0,q=q0,flavor=flavor0,FlavorRatio=FlavorRatio0,ExptGroup=ExptGroup0,FitList={"CJ_free_dc","CJ_no_dc","CT_fixed_dc","CT_no_nuA","CJ_no_WSLAC","CJ_fixed_dc","CT_no_dc"},FlavorList={-2,-1,0,1,2,3,4},FlavorRatioList={1,2,3,4,5,6,7},QList={2,100},ExptGroupList={1,2,3,4,5,6,7,8,9,10,11},here=NotebookDirectory[],FigureNames={}},{If[MemberQ[QList,q],True,{Print["Please input a Q value from {2,100}"],Abort[]}];If[MemberQ[FitList,fitname],True,{Print["Please input a fit name from the following list:"];Print[FitList],Abort[]}];If[MemberQ[FlavorList,flavor],{PlotFiles=FileNames["*",here<>fitname<>"/eps/1/"];For[i=1,i≤Length[PlotFiles],i++,{If[StringContainsQ[PlotFiles[[i]],"q"<>ToString[q]]&&StringContainsQ[PlotFiles[[i]],"ifl"<>ToString[flavor]]&&StringContainsQ[PlotFiles[[i]],"png"],AppendTo[FigureNames,PlotFiles[[i]]],False]}]},False];If[MemberQ[FlavorRatioList,FlavorRatio],{PlotFiles=FileNames["*",here<>fitname<>"/eps/2/"];For[i=1,i≤Length[PlotFiles],i++,{If[StringContainsQ[PlotFiles[[i]],"q"<>ToString[q]]&&StringContainsQ[PlotFiles[[i]],"ifl"<>ToString[FlavorRatio]]&&StringContainsQ[PlotFiles[[i]],"png"],AppendTo[FigureNames,PlotFiles[[i]]],False]}]},False];If[MemberQ[ExptGroupList,ExptGroup],{PlotFiles=Join[FileNames["*",here<>fitname<>"/eps/1/"],FileNames["*",here<>fitname<>"/eps/2/"]];For[i=1,i≤Length[PlotFiles],i++,{If[StringContainsQ[PlotFiles[[i]],"q"<>ToString[q]]&&StringContainsQ[PlotFiles[[i]],"/"<>ToString[ExptGroup]<>"_"]&&StringContainsQ[PlotFiles[[i]],"png"],AppendTo[FigureNames,PlotFiles[[i]]],False]}]},False];For[i=1,i≤Length[FigureNames],i++,Import[FigureNames[[i]]]]};FigureNames];
In[]:=
l=GetPlots[fitname0="CJ_free_dc",q0=2,Flavor0=3,FlavorRatio0=4,ExptGroup0=6];
In[]:=
Import[l[[1]]]
Out[]=


Cite this as: Xiaoxian Jing, "CJ-CT L2 sensitivity Viewer" from the Notebook Archive (2021), https://notebookarchive.org/2021-02-3ag7oxb

Download

