Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

(function(b){if(typeof define==="function"&&define.amd){var e=b({});var c=e.source_dir+"scripts/",f=e.source_min?".min":"";var g={d3:c+"d3.v3.min",jquery:c+"jquery.min","jquery-ui":c+"jquery-ui.min","jqueryui-mousewheel":c+"jquery.mousewheel.min","jqueryui-touch-punch":c+"touch-punch.min",rawinflate:c+"rawinflate.min",MathJax:"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG&amp;delayStartupUntil=configured",saveSvgAsPng:c+"saveSvgAsPng.min","dat.gui":c+"dat.gui.min",threejs:c+"three.min",threejs_all:c+"three.extra.min",JSRootCore:c+"JSRootCore"+f,JSRootMath:c+"JSRootMath"+f,JSRootInterface:c+"JSRootInterface"+f,JSRootIOEvolution:c+"JSRootIOEvolution"+f,JSRootPainter:c+"JSRootPainter"+f,"JSRootPainter.more":c+"JSRootPainter.more"+f,"JSRootPainter.jquery":c+"JSRootPainter.jquery"+f,JSRoot3DPainter:c+"JSRoot3DPainter"+f,ThreeCSG:c+"ThreeCSG"+f,JSRootGeoBase:c+"JSRootGeoBase"+f,JSRootGeoPainter:c+"JSRootGeoPainter"+f};var a;if((requirejs.s!==undefined)&&(requirejs.s.contexts!==undefined)&&((requirejs.s.contexts._!==undefined)&&requirejs.s.contexts._.config!==undefined)){a=requirejs.s.contexts._.config.paths}else{console.warn("Require.js paths changed - please contact JSROOT developers")}for(var d in g){if(requirejs.defined(d)||(a&&(d in a))){delete g[d]}}requirejs.config({paths:g,shim:{"jqueryui-mousewheel":{deps:["jquery-ui"]},"jqueryui-touch-punch":{deps:["jquery-ui"]},threejs_all:{deps:["threejs"]},ThreeCSG:{deps:["threejs"]},MathJax:{exports:"MathJax",init:function(){MathJax.Hub.Config({TeX:{extensions:["color.js"]},SVG:{mtextFontInherit:true}});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var h=MathJax.OutputJax.SVG.FONTDATA.VARIANT;h.normal.fonts.unshift("MathJax_SansSerif");h.bold.fonts.unshift("MathJax_SansSerif-bold");h.italic.fonts.unshift("MathJax_SansSerif");h["-tex-mathit"].fonts.unshift("MathJax_SansSerif")});MathJax.Hub.Startup.onload();return MathJax}}}});define(e);if(!require.specified("JSRootCore")){define("JSRootCore",[],e)}if(!require.specified("jsroot")){define("jsroot",[],e)}}else{if(typeof JSROOT!="undefined"){throw new Error("JSROOT is already defined","JSRootCore.js")}JSROOT={};b(JSROOT)}}(function(b){b.version="4.8.0 2/12/2016";b.source_dir="";b.source_min=false;b.source_fullpath="";b.bower_dir="";b.id_counter=0;b.touches=false;b.browser={isOpera:false,isFirefox:true,isSafari:false,isChrome:false,isIE:false,isWin:false};if((typeof document!=="undefined")&&(typeof window!=="undefined")){var a=document.getElementsByTagName("script");for(var e=0;e<a.length;++e){var c=a[e].src;if((c===undefined)||(typeof c!=="string")){continue}var d=c.indexOf("scripts/JSRootCore.");if(d<0){continue}b.source_dir=c.substr(0,d);b.source_min=c.indexOf("scripts/JSRootCore.min.js")>=0;b.source_fullpath=c;if((console!==undefined)&&(typeof console.log=="function")){console.log("Set JSROOT.source_dir to "+b.source_dir+", "+b.version)}break}b.touches=("ontouchend" in document);b.browser.isOpera=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0;b.browser.isFirefox=typeof InstallTrigger!=="undefined";b.browser.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0;b.browser.isChrome=!!window.chrome&&!b.browser.isOpera;b.browser.isIE=false||!!document.documentMode;b.browser.isWin=navigator.platform.indexOf("Win")>=0}b.browser.isWebKit=b.browser.isChrome||b.browser.isSafari;b.gStyle={Tooltip:1,ContextMenu:true,Zooming:true,ZoomMouse:true,ZoomWheel:true,ZoomTouch:true,MoveResize:true,DragAndDrop:true,ToolBar:true,OptimizeDraw:1,AutoStat:true,FrameNDC:{fX1NDC:0.07,fY1NDC:0.12,fX2NDC:0.95,fY2NDC:0.88},Palette:57,MathJax:0,ProgressBox:true,Embed3DinSVG:2,NoWebGL:false,GeoGradPerSegm:6,GeoCompressComp:true,IgnoreUrlOptions:false,fPadBottomMargin:0.1,fPadTopMargin:0.1,fPadLeftMargin:0.1,fPadRightMargin:0.1,fPadGridX:false,fPadGridY:false,fPadTickX:0,fPadTickY:0,fStatColor:0,fStatTextColor:1,fStatBorderSize:1,fStatFont:42,fStatFontSize:0,fStatStyle:1001,fStatFormat:"6.4g",fStatX:0.98,fStatY:0.935,fStatW:0.2,fStatH:0.16,fTitleAlign:23,fTitleColor:0,fTitleTextColor:1,fTitleBorderSize:0,fTitleFont:42,fTitleFontSize:0.05,fTitleStyle:0,fTitleX:0.5,fTitleY:0.995,fTitleW:0,fTitleH:0,fFitFormat:"5.4g",fOptStat:1111,fOptFit:0,fNumberContours:20,fGridColor:0,fGridStyle:11,fGridWidth:1,fFrameFillColor:0,fFrameLineColor:1,fFrameFillStyle:1001,fFrameLineStyle:1,fFrameLineWidth:1,fFrameBorderSize:1,fFrameBorderMode:0,fEndErrorSize:2,fErrorX:0.5,fHistMinimumZero:false,fPaintTextFormat:"g",fTimeOffset:788918400};b.BIT=function(f){return 1<<(f)};b.TH1StatusBits={kNoStats:b.BIT(9),kUserContour:b.BIT(10),kCanRebin:b.BIT(11),kLogX:b.BIT(15),kIsZoomed:b.BIT(16),kNoTitle:b.BIT(17),kIsAverage:b.BIT(18)};b.EAxisBits={kTickPlus:b.BIT(9),kTickMinus:b.BIT(10),kAxisRange:b.BIT(11),kCenterTitle:b.BIT(12),kCenterLabels:b.BIT(14),kRotateTitle:b.BIT(15),kPalette:b.BIT(16),kNoExponent:b.BIT(17),kLabelsHori:b.BIT(18),kLabelsVert:b.BIT(19),kLabelsDown:b.BIT(20),kLabelsUp:b.BIT(21),kIsInteger:b.BIT(22),kMoreLogLabels:b.BIT(23),kDecimals:b.BIT(11)};b.console=function(f,g){if((g!=null)&&(typeof g=="string")&&((typeof document.getElementById(g))!="undefined")){document.getElementById(g).innerHTML=f}else{if((typeof console!="undefined")&&(typeof console.log=="function")){console.log(f)}}};b.JSONR_unref=function(h){var g=[],i=undefined;function f(q){if(q===null){return}if(typeof q==="string"){if(i||(q.length<6)||(q.indexOf("$ref:")!==0)){return}var p=parseInt(q.substr(5));if(isNaN(p)||(p<0)||(p>=g.length)){return}i=false;return g[p]}if(typeof q!=="object"){return}var n,l,m,o=Object.prototype.toString.apply(q);if((o.indexOf("[object")==0)&&(o.indexOf("Array]")>0)){for(n=0;n<q.length;++n){m=f(q[n]);if(m){q[n]=m}}return}var r=Object.keys(q),j=r.length;if((i!==false)&&(j===1)&&(r[0]==="$ref")){var p=parseInt(q["$ref"]);if(isNaN(p)||(p<0)||(p>=g.length)){return}i=true;return g[p]}if(g.indexOf(q)>=0){b.console("should never happen - object already in the map");return}g.push(q);if("_typename" in q){b.addMethods(q)}for(l=0;l<j;++l){n=r[l];m=f(q[n]);if(m){q[n]=m}}}f(h);return h};b.debug=0;b.extend=function(h,g){if((g===null)||(typeof g!=="object")){return g}if((h===null)||(typeof h!=="object")){h={}}for(var f in g){h[f]=g[f]}return h};b.clone=function(m,l,g){if(m===null){return null}if(!l){l={obj:[],clones:[],nofunc:g}}else{var h=l.obj.indexOf(m);if(h>=0){return l.clones[h]}}var j=Object.prototype.toString.apply(m);if(j==="[object Array]"){var n=[];l.obj.push(m);l.clones.push(n);for(var h=0;h<m.length;++h){if(typeof m[h]==="object"){n.push(b.clone(m[h],l))}else{n.push(m[h])}}return n}if((j.indexOf("[object ")==0)&&(j.indexOf("Array]")==j.length-6)){var n=[];l.obj.push(m);l.clones.push(n);for(var h=0;h<m.length;++h){n.push(m[h])}return n}var n={};l.obj.push(m);l.clones.push(n);for(var f in m){if(typeof m[f]==="object"){n[f]=b.clone(m[f],l)}else{if(!l.nofunc||(typeof m[f]!=="function")){n[f]=m[f]}}}return n};b.clear_func=function(j,i){if(j===null){return j}var h=Object.prototype.toString.apply(j);if(h==="[object Array]"){for(var l=0;l<j.length;l++){if(typeof j[l]==="object"){b.clear_func(j[l],i)}}return j}if((h.indexOf("[object ")==0)&&(h.indexOf("Array]")==h.length-6)){return j}if(!i){i=[]}var g=(i.length==0);if("__clean_func__" in j){return j}i.push(j);j.__clean_func__=true;for(var f in j){if(typeof j[f]==="object"){b.clear_func(j[f],i)}else{if(typeof j[f]==="function"){delete j[f]}}}if(g){for(var l=0;l<i.length;++l){delete i[l]["__clean_func__"]}}return j};b.parse=function(f){if((f==null)||(f=="")){return null}var g=JSON.parse(f);if(g!=null){g=this.JSONR_unref(g)}return g};b.GetUrlOption=function(g,f,h){if(h===undefined){h=null}if((g===null)||(typeof g!="string")||(g.length==0)){return h}if(!f){if(b.gStyle.IgnoreUrlOptions||(typeof document==="undefined")){return h}f=document.URL}var i=f.indexOf("?");if(i<0){return h}f=f.slice(i+1);while(f.length>0){if(f==g){return""}i=f.indexOf("&");if(i<0){i=f.length}if(f.indexOf(g)==0){if(f.charAt(g.length)=="&"){return""}if(f.charAt(g.length)=="="){return f.slice(g.length+1,i).replace(/%27/g,"'").replace(/%22/g,'"').replace(/%20/g," ").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%5B/g,"[").replace(/%5D/g,"]")}}f=f.slice(i+1)}return h};b.ParseAsArray=function(m){var g=[];if(typeof m!="string"){return g}m=m.trim();if(m==""){return g}if((m.length<2)||(m[0]!="[")||(m[m.length-1]!="]")){g.push(m);return g}var f=0,i=0,l=0,k=1;for(var j=1;j<m.length;++j){if(i>0){if(m[j]==="'"){i--}continue}if(l>0){if(m[j]==='"'){l--}continue}switch(m[j]){case"'":i++;break;case'"':l++;break;case"[":f++;break;case"]":if(j<m.length-1){f--;break}case",":if(f===0){var h=m.substring(k,j).trim();if((h.length>1)&&(h[0]==h[h.length-1])&&((h[0]=='"')||(h[0]=="'"))){h=h.substr(1,h.length-2)}g.push(h);k=j+1}break}}if(g.length===0){g.push(m.substr(1,m.length-2).trim())}return g};b.GetUrlOptionAsArray=function(i,g){var h=[];while(i.length>0){var k=i.indexOf(";");var f=(k>0)?i.substr(0,k):i;if(k>0){i=i.substr(k+1)}else{i=""}var j=true;if(f[0]=="#"){f=f.substr(1);j=false}var l=this.GetUrlOption(f,g,null);if(j){h=h.concat(b.ParseAsArray(l))}else{if(l!==null){h.push(l)}}}return h};b.findFunction=function(f){if(typeof f==="function"){return f}if(typeof window[f]=="function"){return window[f]}if((typeof f!=="string")||(f.indexOf(".")<0)){return null}var h=f.split("."),g=window;for(var i=0;i<h.length;++i){if((i==0)&&(h[0]==="JSROOT")){g=this}else{g=g[h[i]]}if(!g){return null}}return(typeof g=="function")?g:null};b.CallBack=function(h,g,f){if(typeof h=="string"){h=b.findFunction(h)}if(h==null){return}if(typeof h=="function"){return h(g,f)}if(typeof h!="object"){return}if(("obj" in h)&&("func" in h)&&(typeof h.obj=="object")&&(typeof h.func=="string")&&(typeof h.obj[h.func]=="function")){alert("Old-style call-back, change code for "+h.func);return h.obj[h.func](g,f)}};b.NewHttpRequest=function(g,i,h){var j=new XMLHttpRequest();function k(l){if(typeof h=="function"){h.call(j,l)}}var f=this;if(window.ActiveXObject){j.onreadystatechange=function(){if(j.readyState!=4){return}if(j.status!=200&&j.status!=206){return k(null)}if(i=="xml"){return k(j.responseXML)}if(i=="text"){return k(j.responseText)}if(i=="object"){return k(f.parse(j.responseText))}if(i=="head"){return k(j)}if((i=="buf")&&("responseType" in j)&&(j.responseType=="arraybuffer")&&("response" in j)){return k(j.response)}var l=new String("");var n=new VBArray(j.responseBody).toArray();for(var m=0;m<n.length;++m){l=l+String.fromCharCode(n[m])}delete n;k(l)};j.open(i=="head"?"HEAD":"GET",g,true);if(i=="buf"){if(("Uint8Array" in window)&&("responseType" in j)){j.responseType="arraybuffer"}}}else{j.onreadystatechange=function(){if(j.readyState!=4){return}if((j.status!=200)&&(j.status!=206)&&((j.status!==0)||(g.indexOf("file://")!==0))){return k(null)}if(i=="xml"){return k(j.responseXML)}if(i=="text"){return k(j.responseText)}if(i=="object"){return k(f.parse(j.responseText))}if(i=="head"){return k(j)}if(!("responseType" in j)){return k(j.responseText)}if((i=="bin")&&("Uint8Array" in window)&&("byteLength" in j.response)){var l="",m=new Uint8Array(j.response);for(var n=0;n<m.length;++n){l+=String.fromCharCode(m[n])}delete m;return k(l)}k(j.response)};j.open(i=="head"?"HEAD":"GET",g,true);if((i=="bin")||(i=="buf")){if(("Uint8Array" in window)&&("responseType" in j)){j.responseType="arraybuffer"}else{j.overrideMimeType("text/plain; charset=x-user-defined")}}}return j};b.loadScript=function(x,j,i){function m(){if(i){document.getElementById(i).innerHTML=""}else{b.progress()}if((x!=null)&&(x.length>0)){return b.loadScript(x,j,i)}b.CallBack(j)}if((x==null)||(x.length==0)){return m()}var u=x;var q=u.indexOf(";");if(q>0){u=u.substr(0,q);x=x.slice(q+1)}else{x=""}var w=false,r=false;if(u.indexOf("$$$")===0){w=true;u=u.slice(3);if((u.indexOf("style/")==0)&&b.source_min&&(u.lastIndexOf(".css")==u.length-3)&&(u.indexOf(".min.css")<0)){u=u.slice(0,u.length-4)+".min.css"}}else{if(u.indexOf("###")===0){r=true;u=u.slice(3)}}var o=u.indexOf(".typeface.json");if(o>0){var g="threejs_font_"+u.slice(u.lastIndexOf("/")+1,o);if(typeof b[g]!=="undefined"){return m()}if((typeof THREE==="undefined")||(typeof THREE.FontLoader==="undefined")){console.log("fail to load",u,"no (proper) three.js found");return m()}b.progress("loading "+u+" ...");var p=new THREE.FontLoader();p.load(u,function(n){b[g]=n;m()});return}var s=u.indexOf(".css")>0;if(s){var l=document.getElementsByTagName("link");for(var t=0;t<l.length;++t){if((l[t].type!="text/css")||(l[t].rel!=="stylesheet")){continue}var v=l[t].href;if((v==null)||(v.length==0)){continue}if(v.indexOf(u)>=0){return m()}}}else{var h=document.getElementsByTagName("script");for(var t=0;t<h.length;++t){var k=h[t].src;if((k==null)||(k.length==0)){continue}if((k.indexOf(u)>=0)&&(k.indexOf("load=")<0)){return m()}}}if(w&&(b.source_dir!=null)){u=b.source_dir+u}else{if(r&&(b.bower_dir.length>0)){u=b.bower_dir+u}}var f=null;if(i){document.getElementById(i).innerHTML="loading "+u+" ..."}else{b.progress("loading "+u+" ...")}if(s){f=document.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("type","text/css");f.setAttribute("href",u)}else{f=document.createElement("script");f.setAttribute("type","text/javascript");f.setAttribute("src",u)}if(f.readyState){f.onreadystatechange=function(){if(f.readyState=="loaded"||f.readyState=="complete"){f.onreadystatechange=null;m()}}}else{f.onload=function(){f.onload=null;m()}}document.getElementsByTagName("head")[0].appendChild(f)};b.AssertPrerequisites=function(o,v,m){var j=b;if(j.doing_assert===undefined){j.doing_assert=[]}if(j.ready_modules===undefined){j.ready_modules=[]}if((typeof o!=="string")||(o=="")){return j.CallBack(v)}if(o==="__next__"){if(j.doing_assert.length==0){return}var t=j.doing_assert[0];if(t.running){return}o=t._kind;v=t._callback;m=t._debug}else{j.doing_assert.push({_kind:o,_callback:v,_debug:m});if(j.doing_assert.length>1){return}}j.doing_assert[0].running=true;if(o.charAt(o.length-1)!=";"){o+=";"}var h=j.source_min?".min":"",g=false,f=(j.bower_dir.length>0),q="",l="",k=[];if(o.indexOf("io;")>=0){q+="$$$scripts/rawinflate.min.js;$$$scripts/JSRootIOEvolution"+h+".js;";k.push("JSRootIOEvolution")}if(o.indexOf("2d;")>=0){if(j._test_d3_===undefined){if(typeof d3!="undefined"){j.console("Reuse existing d3.js "+d3.version+", required 3.5.9",m);j._test_d3_=1}else{q+=f?"###d3/d3.min.js;":"$$$scripts/d3.v3.min.js;";j._test_d3_=2}}k.push("JSRootPainter");q+="$$$scripts/JSRootPainter"+h+".js;";l+="$$$style/JSRootPainter"+h+".css;"}if(o.indexOf("savepng;")>=0){k.push("saveSvgAsPng");q+="$$$scripts/saveSvgAsPng.min.js;"}if(o.indexOf("jq;")>=0){g=true}if(o.indexOf("math;")>=0){q+="$$$scripts/JSRootMath"+h+".js;";k.push("JSRootMath")}if(o.indexOf("more2d;")>=0){q+="$$$scripts/JSRootPainter.more"+h+".js;";k.push("JSRootPainter.more")}if(o.indexOf("jq2d;")>=0){q+="$$$scripts/JSRootPainter.jquery"+h+".js;";k.push("JSRootPainter.jquery");g=true}if((o.indexOf("3d;")>=0)||(o.indexOf("geom;")>=0)){if(f){q+="###threejs/build/three.min.js;###threejs/examples/js/renderers/Projector.js;###threejs/examples/js/renderers/CanvasRenderer.js;###threejs/examples/js/controls/OrbitControls.js;###threejs/examples/js/controls/TransformControls.js;###threejs/examples/js/shaders/CopyShader.js;###threejs/examples/js/postprocessing/EffectComposer.js;###threejs/examples/js/postprocessing/MaskPass.js;###threejs/examples/js/postprocessing/RenderPass.js;###threejs/examples/js/postprocessing/ShaderPass.js;###threejs/examples/js/shaders/SSAOShader.js;";l+="###threejs/examples/fonts/helvetiker_regular.typeface.json;"}else{q+="$$$scripts/three.min.js;$$$scripts/three.extra.min.js;"}k.push("threejs","threejs_all");q+="$$$scripts/JSRoot3DPainter"+h+".js;";k.push("JSRoot3DPainter")}if(o.indexOf("geom;")>=0){q+="$$$scripts/ThreeCSG"+h+".js;$$$scripts/JSRootGeoBase"+h+".js;$$$scripts/JSRootGeoPainter"+h+".js;$$$scripts/dat.gui.min.js;";l+="$$$style/JSRootGeoPainter"+h+".css;";k.push("ThreeCSG","JSRootGeoBase","JSRootGeoPainter","dat.gui")}if(o.indexOf("mathjax;")>=0){if(typeof MathJax=="undefined"){q+=(f?"###MathJax/MathJax.js":"https://cdn.mathjax.org/mathjax/latest/MathJax.js")+"?config=TeX-AMS-MML_SVG,"+j.source_dir+"scripts/mathjax_config.js;"}if(j.gStyle.MathJax==0){j.gStyle.MathJax=1}k.push("MathJax")}if(o.indexOf("simple;")>=0){g=true;q+="$$$scripts/JSRootInterface"+h+".js;";l+="$$$style/JSRootInterface"+h+".css;";k.push("JSRootInterface")}if(g&&!j.load_jquery){var p=(typeof jQuery!="undefined"),s="";if(p){j.console("Reuse existing jQuery "+jQuery.fn.jquery+", required 2.1.4",m)}else{s+=(f?"###jquery/dist":"$$$scripts")+"/jquery.min.js;"}if(p&&typeof $.ui!="undefined"){j.console("Reuse existing jQuery-ui "+$.ui.version+", required 1.11.4",m)}else{s+=(f?"###jquery-ui":"$$$scripts")+"/jquery-ui.min.js;";l+="$$$style/jquery-ui"+h+".css;"}if(j.touches){s+=f?"###jqueryui-touch-punch/jquery.ui.touch-punch.min.js;":"$$$scripts/touch-punch.min.js;";k.push("jqueryui-touch-punch")}k.splice(0,0,"jquery","jquery-ui","jqueryui-mousewheel");q=s+q;j.load_jquery=true}var r=o.indexOf("user:");if(r<0){r=o.indexOf("load:")}if(r>=0){l+=o.slice(r+5)}function u(){var w=j.doing_assert.shift();for(var x=0;x<w.modules.length;++x){j.ready_modules.push(w.modules[x])}j.CallBack(w._callback);j.AssertPrerequisites("__next__")}for(var i=k.length-1;i>=0;--i){if(j.ready_modules.indexOf(k[i])>=0){k.splice(i,1)}}if(k.length===0){q=""}j.doing_assert[0].modules=k;if((k.length>0)&&(typeof define==="function")&&define.amd){j.console("loading "+JSON.stringify(k)+" with require.js",m);require(k,function(){j.loadScript(l,u,m)})}else{j.loadScript(q+l,u,m)}};b.OpenFile=function(f,g){b.AssertPrerequisites("io",function(){new b.TFile(f,g)})};b.draw=function(h,g,f){b.AssertPrerequisites("2d",function(){b.draw(h,g,f)})};b.redraw=function(h,g,f){b.AssertPrerequisites("2d",function(){b.redraw(h,g,f)})};b.BuildSimpleGUI=function(j,f){if(typeof j=="function"){f=j;j=null}var i=null,h=b.GetUrlOption("nobrowser")!=null,g="io;2d;",k=document.getElementById("simpleGUI");if(k){i="simpleGUI";if((b.GetUrlOption("json")!=null)&&(b.GetUrlOption("file")==null)&&(b.GetUrlOption("files")==null)){g="2d;"}if(k.getAttribute("nobrowser")&&(k.getAttribute("nobrowser")!="false")){h=true}}else{if(document.getElementById("onlineGUI")){i="onlineGUI";g="2d;"}else{if(document.getElementById("drawGUI")){i="drawGUI";g="2d;";h=true}}}if(j=="check_existing_elements"){j=null;if(i==null){return}}if(!h){g+="jq2d;simple;"}if(j==null){j=b.GetUrlOption("autoload")}if(j==null){j=b.GetUrlOption("load")}if(j!=null){g+="load:"+j+";"}b.AssertPrerequisites(g,function(){b.CallBack(b.findFunction(h?"JSROOT.BuildNobrowserGUI":"BuildSimpleGUI"));b.CallBack(f)},i)};b.Create=function(f,h){var g=h;if(g==null){g={_typename:f}}switch(f){case"TObject":b.extend(g,{fUniqueID:0,fBits:50331656});break;case"TNamed":b.extend(g,{fUniqueID:0,fBits:50331656,fName:"",fTitle:""});break;case"TList":case"THashList":b.extend(g,{name:f,arr:[],opt:[]});break;case"TAttAxis":b.extend(g,{fNdivisions:510,fAxisColor:1,fLabelColor:1,fLabelFont:42,fLabelOffset:0.005,fLabelSize:0.035,fTickLength:0.03,fTitleOffset:1,fTitleSize:0.035,fTitleColor:1,fTitleFont:42});break;case"TAxis":b.Create("TNamed",g);b.Create("TAttAxis",g);b.extend(g,{fNbins:0,fXmin:0,fXmax:0,fXbins:[],fFirst:0,fLast:0,fBits2:0,fTimeDisplay:false,fTimeFormat:"",fLabels:null});break;case"TAttLine":b.extend(g,{fLineColor:1,fLineStyle:1,fLineWidth:1});break;case"TAttFill":b.extend(g,{fFillColor:0,fFillStyle:0});break;case"TAttMarker":b.extend(g,{fMarkerColor:1,fMarkerStyle:1,fMarkerSize:1});break;case"TLine":b.Create("TObject",g);b.Create("TAttLine",g);b.extend(g,{fX1:0,fX2:1,fY1:0,fY2:1});break;case"TBox":b.Create("TObject",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.extend(g,{fX1:0,fX2:1,fY1:0,fY2:1});break;case"TPave":b.Create("TBox",g);b.extend(g,{fX1NDC:0,fY1NDC:0,fX2NDC:1,fY2NDC:1,fBorderSize:0,fInit:1,fShadowColor:1,fCornerRadius:0,fOption:"blNDC",fName:"title"});break;case"TAttText":b.extend(g,{fTextAngle:0,fTextSize:0,fTextAlign:22,fTextColor:1,fTextFont:42});break;case"TPaveText":b.Create("TPave",g);b.Create("TAttText",g);b.extend(g,{fLabel:"",fLongest:27,fMargin:0.05,fLines:b.Create("TList")});break;case"TPaveStats":b.Create("TPaveText",g);b.extend(g,{fOptFit:0,fOptStat:0,fFitFormat:"",fStatFormat:"",fParent:null});break;case"TLegend":b.Create("TPave",g);b.Create("TAttText",g);b.extend(g,{fColumnSeparation:0,fEntrySeparation:0.1,fMargin:0.25,fNColumns:1,fPrimitives:b.Create("TList")});break;case"TLegendEntry":b.Create("TObject",g);b.Create("TAttText",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.Create("TAttMarker",g);b.extend(g,{fLabel:"",fObject:null,fOption:""});break;case"TObjString":b.Create("TObject",g);b.extend(g,{fString:""});break;case"TH1":b.Create("TNamed",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.Create("TAttMarker",g);b.extend(g,{fNcells:0,fXaxis:b.Create("TAxis"),fYaxis:b.Create("TAxis"),fZaxis:b.Create("TAxis"),fBarOffset:0,fBarWidth:1000,fEntries:0,fTsumw:0,fTsumw2:0,fTsumwx:0,fTsumwx2:0,fMaximum:-1111,fMinimum:-1111,fNormFactor:0,fContour:[],fSumw2:[],fOption:"",fFunctions:b.Create("TList"),fBufferSize:0,fBuffer:[],fBinStatErrOpt:0});break;case"TH1I":case"TH1F":case"TH1D":case"TH1S":case"TH1C":b.Create("TH1",g);g.fArray=[];break;case"TH2":b.Create("TH1",g);b.extend(g,{fScalefactor:1,fTsumwy:0,fTsumwy2:0,fTsumwxy:0});break;case"TH2I":case"TH2F":case"TH2D":case"TH2S":case"TH2C":b.Create("TH2",g);g.fArray=[];break;case"TGraph":b.Create("TNamed",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.Create("TAttMarker",g);b.extend(g,{fFunctions:b.Create("TList"),fHistogram:null,fMaxSize:0,fMaximum:-1111,fMinimum:-1111,fNpoints:0,fX:[],fY:[]});break;case"TMultiGraph":b.Create("TNamed",g);b.extend(g,{fFunctions:b.Create("TList"),fGraphs:b.Create("TList"),fHistogram:null,fMaximum:-1111,fMinimum:-1111});break;case"TPolyLine":b.Create("TObject",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.extend(g,{fLastPoint:-1,fN:0,fOption:"",fX:null,fY:null});break;case"TGaxis":b.Create("TLine",g);b.Create("TAttText",g);b.extend(g,{_fChopt:"",fFunctionName:"",fGridLength:0,fLabelColor:1,fLabelFont:42,fLabelOffset:0.005,fLabelSize:0.035,fName:"",fNdiv:12,fTickSize:0.02,fTimeFormat:"",fTitle:"",fTitleOffset:1,fTitleSize:0.035,fWmax:100,fWmin:0});break;case"TAttPad":b.extend(g,{fLeftMargin:b.gStyle.fPadLeftMargin,fRightMargin:b.gStyle.fPadRightMargin,fBottomMargin:b.gStyle.fPadBottomMargin,fTopMargin:b.gStyle.fPadTopMargin,fXfile:2,fYfile:2,fAfile:1,fXstat:0.99,fYstat:0.99,fAstat:2,fFrameFillColor:b.gStyle.fFrameFillColor,fFrameLineColor:b.gStyle.fFrameLineColor,fFrameFillStyle:b.gStyle.fFrameFillStyle,fFrameLineStyle:b.gStyle.fFrameLineStyle,fFrameLineWidth:b.gStyle.fFrameLineWidth,fFrameBorderSize:b.gStyle.fFrameBorderSize,fFrameBorderMode:b.gStyle.fFrameBorderMode});break;case"TPad":b.Create("TObject",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.Create("TAttPad",g);b.extend(g,{fX1:0,fY1:0,fX2:1,fY2:1,fXtoAbsPixelk:1,fXtoPixelk:1,fXtoPixel:1,fYtoAbsPixelk:1,fYtoPixelk:1,fYtoPixel:1,fUtoAbsPixelk:1,fUtoPixelk:1,fUtoPixel:1,fVtoAbsPixelk:1,fVtoPixelk:1,fVtoPixel:1,fAbsPixeltoXk:1,fPixeltoXk:1,fPixeltoX:1,fAbsPixeltoYk:1,fPixeltoYk:1,fPixeltoY:1,fXlowNDC:0,fYlowNDC:0,fXUpNDC:0,fYUpNDC:0,fWNDC:1,fHNDC:1,fAbsXlowNDC:0,fAbsYlowNDC:0,fAbsWNDC:1,fAbsHNDC:1,fUxmin:0,fUymin:0,fUxmax:0,fUymax:0,fTheta:30,fPhi:30,fAspectRatio:0,fNumber:0,fLogx:0,fLogy:0,fLogz:0,fTickx:b.gStyle.fPadTickX,fTicky:b.gStyle.fPadTickY,fPadPaint:0,fCrosshair:0,fCrosshairPos:0,fBorderSize:2,fBorderMode:0,fModified:false,fGridx:b.gStyle.fPadGridX,fGridy:b.gStyle.fPadGridY,fAbsCoord:false,fEditable:true,fFixedAspectRatio:false,fPrimitives:b.Create("TList"),fExecs:null,fName:"pad",fTitle:"canvas"});break;case"TAttCanvas":b.extend(g,{fXBetween:2,fYBetween:2,fTitleFromTop:1.2,fXdate:0.2,fYdate:0.3,fAdate:1});break;case"TCanvas":b.Create("TPad",g);b.extend(g,{fDoubleBuffer:0,fRetained:true,fXsizeUser:0,fYsizeUser:0,fXsizeReal:20,fYsizeReal:10,fWindowTopX:0,fWindowTopY:0,fWindowWidth:0,fWindowHeight:0,fCw:800,fCh:500,fCatt:b.Create("TAttCanvas"),kMoveOpaque:true,kResizeOpaque:true,fHighLightColor:5,fBatch:true,kShowEventStatus:false,kAutoExec:true,kMenuBar:true});break;case"TGeoVolume":b.Create("TNamed",g);b.Create("TAttLine",g);b.Create("TAttFill",g);b.extend(g,{fGeoAtt:0,fFinder:null,fMedium:null,fNodes:null,fNtotal:0,fNumber:0,fRefCount:0,fShape:null,fVoxels:null});break;case"TGeoNode":b.Create("TNamed",g);b.extend(g,{fGeoAtt:0,fMother:null,fNovlp:0,fNumber:0,fOverlaps:null,fVolume:null});break;case"TGeoNodeMatrix":b.Create("TGeoNode",g);b.extend(g,{fMatrix:null});break}g._typename=f;this.addMethods(g);return g};b.CreateTList=function(){return b.Create("TList")};b.CreateTAxis=function(){return b.Create("TAxis")};b.CreateTH1=function(h){var f=b.extend(b.Create("TH1I"),{fName:"dummy_histo_"+this.id_counter++,fTitle:"dummytitle"});if(h!==undefined){f.fNcells=h+2;for(var g=0;g<f.fNcells;++g){f.fArray.push(0)}b.extend(f.fXaxis,{fNbins:h,fXmin:0,fXmax:h})}return f};b.CreateTH2=function(j,h){var f=b.extend(b.Create("TH2I"),{fName:"dummy_histo_"+this.id_counter++,fTitle:"dummytitle"});if((j!==undefined)&&(h!==undefined)){f.fNcells=(j+2)*(h+2);for(var g=0;g<f.fNcells;++g){f.fArray.push(0)}b.extend(f.fXaxis,{fNbins:j,fXmin:0,fXmax:j});b.extend(f.fYaxis,{fNbins:h,fXmin:0,fXmax:h})}return f};b.CreateTPolyLine=function(g,h){var f=b.Create("TPolyLine");if(g){f.fN=g;if(h){f.fX=new Int32Array(g);f.fY=new Int32Array(g)}else{f.fX=new Float32Array(g);f.fY=new Float32Array(g)}}return f};b.CreateTGraph=function(m,f,l){var k=b.extend(b.Create("TGraph"),{fBits:50332680,fName:"dummy_graph_"+this.id_counter++,fTitle:"dummytitle"});if(m>0){k.fMaxSize=k.fNpoints=m;var j=(typeof f=="object")&&(f.length===m);var h=(typeof l=="object")&&(l.length===m);for(var g=0;g<m;++g){k.fX.push(j?f[g]:g/m);k.fY.push(h?l[g]:g/m)}}return k};b.CreateTMultiGraph=function(){var g=b.Create("TMultiGraph");for(var f=0;f<arguments.length;++f){g.fGraphs.Add(arguments[f],"")}return g};b.methodsCache={};b.getMethods=function(h,i){var f=b.methodsCache[h];var g=(f!==undefined);if(!g){f={}}if((h=="TObject")||(h=="TNamed")||(i&&(i.fBits!==undefined))){if(f.TestBit===undefined){f.TestBit=function(j){return(this.fBits&j)!=0};f.InvertBit=function(j){this.fBits=this.fBits^(j&16777215)}}}if(g){return f}if((h==="TList")||(h==="THashList")){f.Clear=function(){this.arr=[];this.opt=[]};f.Add=function(k,j){this.arr.push(k);this.opt.push((j&&typeof j=="string")?j:"")};f.AddFirst=function(k,j){this.arr.unshift(k);this.opt.unshift((j&&typeof j=="string")?j:"")};f.RemoveAt=function(j){this.arr.splice(j,1);this.opt.splice(j,1)}}if((h==="TPaveText")||(h==="TPaveStats")){f.AddText=function(j){this.fLines.Add({_typename:"TText",fTitle:j,fTextColor:1})};f.Clear=function(){this.fLines.Clear()}}if((h.indexOf("TF1")==0)||(h==="TF2")){f.addFormula=function(j){if(!j){return}if(this.formulas===undefined){this.formulas=[]}this.formulas.push(j)};f.evalPar=function(j,o){if(!("_func" in this)||(this._title!==this.fTitle)){var l=this.fTitle;if(l==="gaus"){l="gaus(0)"}if("formulas" in this){for(var k=0;k<this.formulas.length;++k){while(l.indexOf(this.formulas[k].fName)>=0){l=l.replace(this.formulas[k].fName,this.formulas[k].fTitle)}}}l=l.replace(/\b(abs)\b/g,"TMath::Abs");l=l.replace("TMath::Exp(","Math.exp(");l=l.replace("TMath::Abs(","Math.abs(");if(typeof b.Math=="object"){this._math=b.Math;l=l.replace("TMath::Prob(","this._math.Prob(");l=l.replace("TMath::Gaus(","this._math.Gaus(");l=l.replace("gaus(","this._math.gaus(this, x, ");l=l.replace("gausn(","this._math.gausn(this, x, ");l=l.replace("expo(","this._math.expo(this, x, ");l=l.replace("landau(","this._math.landau(this, x, ");l=l.replace("landaun(","this._math.landaun(this, x, ")}l=l.replace("pi","Math.PI");for(var k=0;k<this.fNpar;++k){while(l.indexOf("["+k+"]")!=-1){l=l.replace("["+k+"]","("+this.GetParValue(k)+")")}}l=l.replace(/\b(sin)\b/gi,"Math.sin");l=l.replace(/\b(cos)\b/gi,"Math.cos");l=l.replace(/\b(tan)\b/gi,"Math.tan");l=l.replace(/\b(exp)\b/gi,"Math.exp");for(var m=2;m<10;++m){l=l.replace("x^"+m,"Math.pow(x,"+m+")")}if(this._typename==="TF2"){this._func=new Function("x","y","return "+l).bind(this)}else{this._func=new Function("x","return "+l).bind(this)}this._title=this.fTitle}return this._func(j,o)};f.GetParName=function(j){if(("fFormula" in this)&&("fParams" in this.fFormula)){return this.fFormula.fParams[j].first}if("fNames" in this){return this.fNames[j]}return"Par"+j};f.GetParValue=function(j){if(("fFormula" in this)&&("fClingParameters" in this.fFormula)){return this.fFormula.fClingParameters[j]}if(("fParams" in this)&&(this.fParams!=null)){return this.fParams[j]}return null}}if((h.indexOf("TGraph")==0)||(h=="TCutG")){f.IsInside=function(n,p){var m,l=this.fNpoints-1,k=this.fX,q=this.fY,o=false;for(m=0;m<this.fNpoints;++m){if((q[m]<p&&q[l]>=p)||(q[l]<p&&q[m]>=p)){if(k[m]+(p-q[m])/(q[l]-q[m])*(k[l]-k[m])<n){o=!o}}l=m}return o}}if(h.indexOf("TH1")==0||h.indexOf("TH2")==0||h.indexOf("TH3")==0){f.getBinError=function(j){if(j>=this.fNcells){j=this.fNcells-1}if(j<0){j=0}if(j<this.fSumw2.length){return Math.sqrt(this.fSumw2[j])}return Math.sqrt(Math.abs(this.fArray[j]))};f.setBinContent=function(j,k){this.fEntries++;this.fTsumw=0;if((j>=0)&&(j<this.fArray.length)){this.fArray[j]=k}}}if(h.indexOf("TH1")==0){f.getBin=function(j){return j};f.getBinContent=function(j){return this.fArray[j]};f.Fill=function(j,m){var l=this.fXaxis,k=1+Math.round((j-l.fXmin)/(l.fXmax-l.fXmin)*l.fNbins);if(k<0){k=0}else{if(k>l.fNbins+1){k=l.fNbins+1}}this.fArray[k]+=((m===undefined)?1:m)}}if(h.indexOf("TH2")==0){f.getBin=function(j,k){return(j+(this.fXaxis.fNbins+2)*k)};f.getBinContent=function(j,k){return this.fArray[this.getBin(j,k)]}}if(h.indexOf("TH3")==0){f.getBin=function(j,l,k){return(j+(this.fXaxis.fNbins+2)*(l+(this.fYaxis.fNbins+2)*k))};f.getBinContent=function(j,l,k){return this.fArray[this.getBin(j,l,k)]}}if(h.indexOf("TProfile")==0){if(h.indexOf("TProfile2D")==0){f.getBin=function(j,k){return(j+(this.fXaxis.fNbins+2)*k)};f.getBinContent=function(j,l){var k=this.getBin(j,l);if(k<0||k>=this.fNcells){return 0}if(this.fBinEntries[k]<1e-300){return 0}if(!this.fArray){return 0}return this.fArray[k]/this.fBinEntries[k]};f.getBinEntries=function(j,l){var k=this.getBin(j,l);if(k<0||k>=this.fNcells){return 0}return this.fBinEntries[k]}}else{f.getBin=function(j){return j};f.getBinContent=function(j){if(j<0||j>=this.fNcells){return 0}if(this.fBinEntries[j]<1e-300){return 0}if(!this.fArray){return 0}return this.fArray[j]/this.fBinEntries[j]}}f.getBinEffectiveEntries=function(l){if(l<0||l>=this.fNcells){return 0}var k=this.fBinEntries[l];if(this.fBinSumw2==null||this.fBinSumw2.length!=this.fNcells){return k}var j=this.fSumw2[l];return(j>0?k*k/j:0)};f.getBinError=function(q){if(q<0||q>=this.fNcells){return 0}var r=this.fArray[q],n=this.fBinEntries[q],o=this.fSumw2[q],k=this.getBinEffectiveEntries(q);if(n<1e-300){return 0}var p={kERRORMEAN:0,kERRORSPREAD:1,kERRORSPREADI:2,kERRORSPREADG:3};if(this.fErrorMode===p.kERRORSPREADG){return 1/Math.sqrt(n)}var m=r/n;var j=Math.abs(o/n-m*m);var l=Math.sqrt(j);if(this.fErrorMode===p.kERRORSPREADI){if(l!=0){return l/Math.sqrt(k)}return 1/Math.sqrt(12*k)}if(this.fErrorMode===p.kERRORSPREAD){return l}return(l/Math.sqrt(k))}}if(h=="TAxis"){f.GetBinLowEdge=function(j){if(this.fNbins<=0){return 0}if((this.fXbins.length>0)&&(j>0)&&(j<=this.fNbins)){return this.fXbins[j-1]}return this.fXmin+(j-1)*(this.fXmax-this.fXmin)/this.fNbins}}b.methodsCache[h]=f;return f};b.addMethods=function(f){this.extend(f,b.getMethods(f._typename,f))};b.lastFFormat="";b.FFormat=function(p,h){if(!h){h="6.4g"}b.lastFFormat="";h=h.trim();var m=h.length;if(m<2){return p.toFixed(4)}var q=h.charAt(m-1);h=h.slice(0,m-1);var g=null;var f=h.indexOf(".");if(f<0){f=4}else{f=Number(h.slice(f+1))}if(isNaN(f)||(f<0)||(f==null)){f=4}var r=false;if((q=="e")||(q=="E")){g=true}else{if(q=="Q"){g=true;r=true}else{if((q=="f")||(q=="F")){g=false}else{if(q=="W"){g=false;r=true}else{if((q=="g")||(q=="G")){var n=b.FFormat(p,h+"Q");var j=b.lastFFormat;var k=b.FFormat(p,h+"W");if(n.length<k.length){b.lastFFormat=j;return n}return k}else{g=false;f=4}}}}}if(g){if(r){f--}if(f<0){f=0}b.lastFFormat="5."+f+"e";return p.toExponential(f)}var k=p.toFixed(f);if(r){if((p!=0)&&(Number(k)==0)&&(f>0)){f=20;k=p.toFixed(f)}var i=0;while((i<k.length)&&(k.charAt(i)=="0"||k.charAt(i)=="-"||k.charAt(i)==".")){i++}var o=k.length-i-f;if(k.indexOf(".")>i){o--}if(o!=0){f-=o;if(f<0){f=0}else{if(f>20){f=20}}k=p.toFixed(f)}}b.lastFFormat="5."+f+"f";return k};b.log10=function(f){return Math.log(f)/Math.log(10)};b.progress=function(f){if((f!==undefined)&&(typeof f=="string")){b.console(f)}};b.Initialize=function(){if(b.source_fullpath.length===0){return this}function h(l){if(l!=null){if(document.attachEvent?document.readyState==="complete":document.readyState!=="loading"){l()}else{window.onload=l}}return b}var k=b.source_fullpath;if(b.GetUrlOption("gui",k)!==null){return h(function(){b.BuildSimpleGUI()})}if(typeof define==="function"&&define.amd){return h(function(){b.BuildSimpleGUI("check_existing_elements")})}var g="";if(b.GetUrlOption("io",k)!=null){g+="io;"}if(b.GetUrlOption("2d",k)!=null){g+="2d;"}if(b.GetUrlOption("jq2d",k)!=null){g+="jq2d;"}if(b.GetUrlOption("more2d",k)!=null){g+="more2d;"}if(b.GetUrlOption("geo",k)!=null){g+="geo;"}if(b.GetUrlOption("3d",k)!=null){g+="3d;"}if(b.GetUrlOption("math",k)!=null){g+="math;"}if(b.GetUrlOption("mathjax",k)!=null){g+="mathjax;"}var f=b.GetUrlOption("load",k);if((f!=null)&&(f.length>0)){g+="load:"+f}var i=b.GetUrlOption("onload",k);var j=b.GetUrlOption("bower",k);if(j!==null){if(j.length>0){b.bower_dir=j}else{if(b.source_dir.indexOf("jsroot/")==b.source_dir.length-7){b.bower_dir=b.source_dir.substr(0,b.source_dir.length-7)}}if(b.bower_dir.length>0){console.log("Set JSROOT.bower_dir to "+b.bower_dir)}}if((g.length>0)||(i!=null)){h(function(){if(g.length>0){b.AssertPrerequisites(g,i)}else{if(i!=null){i=b.findFunction(i);if(typeof i=="function"){i()}}}})}return this};return b.Initialize()}));