Skip to content
Snippets Groups Projects
Commit eada4d86 authored by adrien-matta's avatar adrien-matta
Browse files

* Adding build_dict script

parent 2c95eed7
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ GPDTrapezoid ...@@ -64,7 +64,7 @@ GPDTrapezoid
VIS= all VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel
GPDRectangle GPDSquare
X1_Y1= -132.251 58.314 53.5 X1_Y1= -132.251 58.314 53.5
X128_Y1= -61.823 128.742 53.5 X128_Y1= -61.823 128.742 53.5
X1_Y128= -132.251 58.314 -58.5 X1_Y128= -132.251 58.314 -58.5
...@@ -74,7 +74,7 @@ GPDRectangle ...@@ -74,7 +74,7 @@ GPDRectangle
THIRDSTAGE= 0 THIRDSTAGE= 0
VIS= all VIS= all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
GPDRectangle GPDSquare
X1_Y1= -134.75 -52.319 53.5 X1_Y1= -134.75 -52.319 53.5
X128_Y1= -134.75 47.281 53.5 X128_Y1= -134.75 47.281 53.5
X1_Y128= -134.75 -52.319 -58.5 X1_Y128= -134.75 -52.319 -58.5
......
...@@ -86,7 +86,9 @@ void GeometricalEfficiency(const char * fname = "myResult"){ ...@@ -86,7 +86,9 @@ void GeometricalEfficiency(const char * fname = "myResult"){
hDetecThetaCM->Fill(initCond->GetThetaCM(0)); hDetecThetaCM->Fill(initCond->GetThetaCM(0));
} }
} }
TCanvas *c0 = new TCanvas("c0", "Distrib",800,800);
hEmittTheta->Draw("");
hDetecTheta->Draw("same");
// efficiency in lab frame in % // efficiency in lab frame in %
TCanvas *c = new TCanvas("c", "efficiency",800,800); TCanvas *c = new TCanvas("c", "efficiency",800,800);
c->SetTopMargin(0.01); c->SetTopMargin(0.01);
...@@ -111,4 +113,5 @@ void GeometricalEfficiency(const char * fname = "myResult"){ ...@@ -111,4 +113,5 @@ void GeometricalEfficiency(const char * fname = "myResult"){
TF1* f = new TF1("f",Form("2 * %f * sin(x*%f/180.) *1*%f/180.",M_PI,M_PI,M_PI),0,180); TF1* f = new TF1("f",Form("2 * %f * sin(x*%f/180.) *1*%f/180.",M_PI,M_PI,M_PI),0,180);
f->Draw("SAME"); f->Draw("SAME");
c4->Update(); c4->Update();
} }
#!/bin/bash
# This script detect the root version and call the command necessary to build
# a Dictionnary, rootmap and pcm file accordingly
# Checking that enought argument are given
if [ "$#" -lt 4 ]
then
echo "Dictionnary Generation in : $PWD"
echo "Incorrect argument number : 1.Header 2.DictName 3.Rootmap 4.LibName (optional)5.LinkDefFile"
echo "Arguments are : $@"
exit 1
fi
# Modify the lib name according to the system
lib_ext=.so
system=$(uname -a)
system="${system/%\ */}"
if [ "$system" == "Darwin" ]
then
lib_ext=.dylib
fi
lib_name=$4
lib_name="${lib_name%.*}"
lib_name="$lib_name$lib_ext"
# Detect the Root
is_root=$(which root-config)
# Detect the version
if [ $is_root != "" ];
then
version=$(root-config --version)
else
echo "root-config not found"
exit 1
fi
# Get the Major version
version_major="${version%.*}"
# if before version 4, exit
if [ $version_major -lt 5 ]
then
echo "Root version too old, min. version 5"
exit 1
fi
# Version 5 : generate the dictionnary then the libmap
if [ $version_major -eq 5 ]
then
rootcint -f $2 -I../Core -c $1
if [ "$#" -eq 4 ]
then
rlibmap -c $1 -o $3 -l $lib_name
fi
if [ "$#" -eq 5 ]
then
rlibmap -o $3 -l $lib_name -c $5
fi
fi
# Version 6 or more : generate both at once
if [ $version_major -gt 5 ]
then
rootcint -f $2 -rmf $3 -rml $lib_name -I../Core $1 $5
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment