Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-06 08:10:20

0001 #!/bin/bash
0002 
0003 #inFile=/sphenix/user/cdean/plots/Lambda0K_S0ratio/Lambda0ToK_S0_ratio.C
0004 inFile=lambdaKsratio_pT.C
0005 
0006 binWidth=0.28
0007 binStart=0.2
0008 halfBinWidth=$(echo ${binWidth}*0.5 | bc)
0009 
0010 for (( i=1;i<=10;i++  ))
0011 do
0012   xHigh=$(echo ${binStart}+$i*${binWidth} | bc)
0013   xValue=$(echo $xHigh-${halfBinWidth} | bc)
0014   xLow=$(echo $xHigh-${binWidth} | bc)
0015   yValue=($(grep SetBinContent\(${i} ${inFile} | awk -F ',' '{print $2}' | awk -F ')' '{print $1}'))
0016   yError=($(grep SetBinError\(${i} ${inFile} | awk -F ',' '{print $2}' | awk -F ')' '{print $1}'))
0017 
0018   echo "  sphenix_3run.push_back({${xValue}, ${xLow}, ${xHigh}, ${yValue}, ${yError}, 0, 0});"
0019 done