THESIS

Table Of Contents

Previous topic

Energy Dependence

Next topic

Pull distribution

This Page

Cassandra

Check the you have the right java and python version (Java and Python2.7):

Guillermo-Rangels-MacBook-Pro:~ cubreto$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
Guillermo-Rangels-MacBook-Pro:~ cubreto$ python -v
Python 2.7.2

Start by downloading Cassandra:

curl -OL http://downloads.datastax.com/community/dsc.tar.gz
tar xzf dsc.tar.gz

Then you run Cassandra:

bin cubreto$ sudo ./cassandra
xss =  -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn200M -XX:+HeapDumpOnOutOfMemoryError
Guillermo-Rangels-MacBook-Pro:bin cubreto$  INFO 10:05:09,585 Logging initialized
INFO 10:05:09,591 JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_37
INFO 10:05:09,592 Heap size: 1052770304/1052770304
INFO 10:05:09,592 Classpath:
./../conf:./../build/classes/main:./../build/classes/thrift:./../lib/antlr-3.2.jar:./../lib/apache-cassandra-1.1.6.jar:./../lib/apache-cassandra-clientutil-1.1.6.jar:./../lib/apache-cassandra-t
hrift-1.1.6.jar:./../lib/avro-1.4.0-fixes.jar:./../lib/avro-1.4.0-sources-fixes.jar:./../lib/commons-cli-1.1.jar:./../lib/commons-codec-1.2.jar:./../lib/commons-lang-2.4.jar:./../lib/compress-lzf-0.8.4.jar:./../lib/concu
rrentlinkedhashmap-lru-1.3.jar:./../lib/guava-r08.jar:./../lib/high-scale-lib-1.1.2.jar:./../lib/jackson-core-asl-1.9.2.jar:./../lib/jackson-mapper-asl-1.9.2.jar:./../lib/jamm-0.2.5.jar:./../lib/jline-0.9.94.jar:./../lib/json
-simple-1.1.jar:./../lib/libthrift-0.7.0.jar:./../lib/log4j-1.2.16.jar:./../lib/metrics-core-2.0.3.jar:./../lib/servlet-api-2.5-20081211.jar:./../lib/slf4j-api-1.6.1.jar:./../lib/slf4j-log4j12-1.6.1.jar:./../lib/snakeyaml-1.6.jar
:./../lib/snappy-java-1.0.4.1.jar:./../lib/snaptree-0.1.jar:./../lib/jamm-0.2.5.jar
INFO 10:05:09,594 JNA not found. Native methods will be disabled.
INFO 10:05:09,607 Loading settings from file:/Users/cubreto/Downloads/dsc-cassandra-1.1.6/conf/cassandra.yaml
INFO 10:05:09,775 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap
INFO 10:05:10,016 Global memtable threshold is enabled at 334MB
INFO 10:05:10,273 Initializing key cache with capacity of 50 MBs.
INFO 10:05:10,288 Scheduling key cache save to each 14400 seconds (going to save all keys).
INFO 10:05:10,289 Initializing row cache with capacity of 0 MBs and provider org.apache.cassandra.cache.SerializingCacheProvider
INFO 10:05:10,294 Scheduling row cache save to each 0 seconds (going to save all keys).
INFO 10:05:11,072 Couldn't detect any schema definitions in local storage.
INFO 10:05:11,073 Found table data in data directories. Consider using the CLI to define your schema.
INFO 10:05:11,156 No commitlog files found; skipping replay
INFO 10:05:11,287 Cassandra version: 1.1.6
INFO 10:05:11,290 Thrift API version: 19.32.0
INFO 10:05:11,318 CQL supported versions: 2.0.0,3.0.0-beta1 (default: 2.0.0)
INFO 10:05:11,418 Loading persisted ring state
INFO 10:05:11,431 Starting up server gossip
INFO 10:05:11,478 Enqueuing flush of Memtable-LocationInfo@1321312491(126/157 serialized/live bytes, 3 ops)
INFO 10:05:11,479 Writing Memtable-LocationInfo@1321312491(126/157 serialized/live bytes, 3 ops)
INFO 10:05:11,677 Completed flushing /var/lib/cassandra/data/system/LocationInfo/system-LocationInfo-hf-1-Data.db (234 bytes) for commitlog position ReplayPosition(segmentId=1352052310892, position=586)
INFO 10:05:11,768 Starting Messaging Service on port 7000
WARN 10:05:11,815 Generated random token 25113062564666185856866287474728892865. Random tokens will result in an unbalanced ring; see http://wiki.apache.org/cassandra/Operations
INFO 10:05:11,817 Enqueuing flush of Memtable-LocationInfo@1033806195(53/66 serialized/live bytes, 2 ops)
INFO 10:05:11,818 Writing Memtable-LocationInfo@1033806195(53/66 serialized/live bytes, 2 ops)
INFO 10:05:11,831 Completed flushing /var/lib/cassandra/data/system/LocationInfo/system-LocationInfo-hf-2-Data.db (163 bytes) for commitlog position ReplayPosition(segmentId=1352052310892, position=767)
INFO 10:05:11,836 Node localhost/127.0.0.1 state jump to normal
INFO 10:05:11,838 Bootstrap/Replace/Move completed! Now serving reads.

Datastax

#
#Guillermo Breto Rangel UPC xsection vs root(s)
#
import math
from ROOT import TCanvas, TGraph, TGraphErrors, TF1, TLegend
from ROOT import gROOT
from math import pow
from array import array

gROOT.Reset()

c1 = TCanvas( 'c1', 'A parameter as funtion of \sqrt{s}', 400, 400, 700, 500 )

#c1.SetFillColor( 42 )
#c1.SetGrid()

#n = 3
lumi = 134000
p_T = array( 'd',[0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.5] )
yields_dpT = array( 'd',[3062,2989,6050, 2426, 1687] )
dsigma_dy = array( 'd',[20539./lumi,7251./lumi,3062./lumi,2989./lumi,3191./lumi, 2426./lumi, 1734./lumi] )
err_x = array( 'd',[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3])
err_y = array('d',[167./lumi, 70./lumi, 56./lumi, 56./lumi, 59./lumi, 50./lumi, 42./lumi])

def cross_section(eff, lumi, weighted_jpsi_yield):
    xsection = weighted_jpsi_yield/(eff*lumi)
    return xsection

lumi = 134/math.pow(10,-3)
eff_list = [1, 0.98, 0.95, 0.90, 0.85, 0.80]

weighted_jpsi_yield = round(sum(dsigma_dy),4)*lumi

for i in range(len(eff_list)):
    eff = eff_list[i]
    print "The value of the cross section for "+ eff*100+"% efficiency is "+ str(round(cross_section(eff,lumi,weighted_jpsi_yield),3))+ "mb"



print "the total cross ssection is", round(sum(dsigma_dy),4)
print dsigma_dy
n = len(p_T)
gr_dsigma_pT = TGraphErrors(7)

for i in range(7):
    gr_dsigma_pT.SetPoint(i,p_T[i],dsigma_dy[i]/(2.0*math.pi*0.2*p_T[i]))
    print p_T[i]
    print dsigma_dy[i]/(0.2*p_T[i])
    gr_dsigma_pT.SetPointError(i, 0.1, err_y[i])
    if (i == n - 1):
        gr_dsigma_pT.SetPoint(i,p_T[i],dsigma_dy[i]/(2.0*math.pi*0.6*p_T[i]))
        gr_dsigma_pT.SetPointError(i, 0.3, err_y[i])

gr = TGraphErrors(7)

for i in range(7):
    gr.SetPoint(i,p_T[i],dsigma_dy[i])
    gr.SetPointError(i, 0.1, err_y[i])
    if (i == n - 1):
        gr.SetPoint(i,p_T[i],dsigma_dy[i]/(0.6*p_T[i]))
        gr.SetPointError(i, 0.3, err_y[i])


#gr = TGraphErrors( 7, p_T, dsigma_dy, err_x, err_y )
#gr.SetLineColor( 2 )
gr.SetLineWidth( 1 )
gr_dsigma_pT.SetLineWidth( 1 )
gr_dsigma_pT.SetMarkerColor(6)
gr.SetMarkerColor( 4 )
gr.SetMarkerStyle( 21 )
gr_dsigma_pT.SetMarkerStyle( 24 )

gr.SetTitle( 'p_{T} Spectra' )
gr_dsigma_pT.SetTitle( 'UPC J/#Psi, p_{T} Spectra L = 134 #mub^{-1}' )

gr.GetXaxis().SetTitle( 'p_{T} GeV/c' )
gr_dsigma_pT.GetXaxis().SetTitle( 'p_{T} GeV/c ' )

gr.GetXaxis().SetRangeUser(0, 2)
#c1.SetLogx()
gr.GetYaxis().SetTitle( '#frac{d#sigma}{dy} (#mub)' )
gr_dsigma_pT.GetYaxis().SetTitle( 'mb or mb/(GeVc^{-1})^{2}' )
gr.GetYaxis().SetTitleOffset(1.2)
gr.GetYaxis().SetRangeUser(0, 10)
gr_dsigma_pT.GetYaxis().SetRangeUser(-10, 2)

gr_dsigma_pT.Draw('AP')
gr.Draw("psame")
#gr_dsigma_pT.Draw('same')
c1.SetLogy()

leg = TLegend(0.53,0.63,0.85,0.85)
leg.SetBorderSize(0)
leg.SetFillColor(0)
leg.SetTextSize(0.03)
leg.AddEntry(gr,"#frac{d#sigma}{dy}","P")
leg.AddEntry(gr_dsigma_pT,"#frac{d#sigma}{2#pip_{T}dydp_{T}}","P")
leg.AddEntry(gr, "the total #sigma = "+ str(round(sum(dsigma_dy),4))+" mb")
leg.Draw('same')

# TCanvas.Update() draws the frame, after which one can change it
c1.Update()
#c1.GetFrame().SetFillColor(0)
#c1.GetFrame().SetBorderSize( 12 )
#c1.Modified()
#c1.Update()
c1.Print('UPC_pt_graphlog.png')
c1.Print('UPC_pt_graphlog.pdf')

(Source code)

_images/UPC_pt_graphlog.png