Skip to content

Commit

Permalink
Merge pull request #6 from BillMills/master
Browse files Browse the repository at this point in the history
SCEPTAR Simulation
  • Loading branch information
bkatiemills committed Nov 29, 2013
2 parents 6b680d0 + 32d7cea commit c1460fc
Show file tree
Hide file tree
Showing 7 changed files with 613 additions and 138 deletions.
166 changes: 166 additions & 0 deletions brick-0.9.1.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions brick-0.9.1.js

Large diffs are not rendered by default.

29 changes: 21 additions & 8 deletions efficiencyWidget.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ h1#title{

/*graph///////////////////////////////////////////////////////*/
/*container div*/
#graphDiv{
#graphDiv, #betaGraphDiv{
margin-bottom: 1em;
height: 50em;
width: 70%;
Expand All @@ -136,7 +136,7 @@ h1#title{
/*background-color:#333333 !important;*/
background: transparent !important;
font-size:200% !important;
width: 6.5em !important;
width: 7.5em !important;
left: auto !important;
right: 0px !important;
}
Expand Down Expand Up @@ -193,7 +193,7 @@ h2.widgetTitle{
text-align: center;
}

input.widgetInput, input#filename{
input.widgetInput, input#filename, input#betaFilename{
background-color: #444444;
border-radius: 5px;
color: #CCCCCC;
Expand Down Expand Up @@ -253,7 +253,7 @@ div.leftDiv{
}

/*Control Panel/////////////////////////////////////////////////////*/
div#controlPanel{
div#controlPanel, div#betaControlPanel{
float:right;
width:28%;
min-width:-webkit-max-content;
Expand All @@ -263,7 +263,7 @@ div#controlPanel{
padding: 1em;
}

div.detectorSwitch, a#savePlot{
div.detectorSwitch, a#savePlot, a#saveBetaPlot{
display:inline-block;
padding:1em;
height:3em;
Expand All @@ -274,14 +274,18 @@ div.detectorSwitch, a#savePlot{
-moz-transition: background-color 0.3s;
}

a#savePlot{
a#savePlot, a#saveBetaPlot{
color:#FFFFFF;
text-decoration: none;
font-size: 100%;
padding:1em;
}

input#filename{
a#savePlot:hover, a#saveBetaPlot:hover{
background:#777777;
}

input#filename, input#betaFilename{
width:15em;
text-align: left;
font-size: 100%;
Expand Down Expand Up @@ -315,16 +319,25 @@ select#nHPGeSwitch{
width:3em;
}

div#HPGeControl, div#LaBr3Control{
div#HPGeControl, div#SCEPTARControl{
overflow:hidden;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
padding-bottom: 1em;
}

input#yMin, input#yMax{
width: 3em;
}

div.optionalParameters{
border-top: 1px solid #999999;
}

div#enableSCEPTAR{
background-color: #c0392b;
}

/*img holder for savable data///////////////////////////////////////*/
img#pngDump{
display:none;
Expand Down
20 changes: 19 additions & 1 deletion functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,25 @@ function DESCANTefficiency(logE){
}
}

function SCEPTARefficiency(detector, logE){
//SCEPTAR simulation
function SCEPTAREfficiency(param, loParam, hiParam, logE){
var eff,
Q = Math.exp(logE),
leptonOptions = document.getElementById('lepton'),
lepton = leptonOptions.options[leptonOptions.selectedIndex].value;

if(Q<100)
return '0;0;0';

//Evan & Carl requested the 0.8 hack-in instead of param[6]
eff = 0.8*(1-1/(Math.exp((Q-param[0])/param[1])+1)-1/(Math.exp((Q-param[2])/param[3])+1)-1/(Math.exp((Q-param[4])/param[5])+1));
if(lepton == 1) eff = Math.max(eff, 0.00065); //only for positrons

return eff + ';' + eff + ';' + eff;
}

//SCEPTAR & friends estimates
function SCEPTARauxEfficiency(detector, logE){

if(detector == 'SCEPTAR')
return '0.8;0.8;0.8';
Expand Down
Loading

0 comments on commit c1460fc

Please sign in to comment.