Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergey Gorbunov
CbmTools
Commits
3329bf18
Commit
3329bf18
authored
Jan 30, 2022
by
Sergey Gorbunov
Browse files
update of macros
parent
02566c01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
48 deletions
+54
-48
cbmdock/README.md
cbmdock/README.md
+1
-1
macro/myDigi.C
macro/myDigi.C
+11
-8
macro/myParameters.h
macro/myParameters.h
+1
-2
macro/myQa.C
macro/myQa.C
+15
-1
macro/myReco.C
macro/myReco.C
+9
-16
macro/myTransport.C
macro/myTransport.C
+17
-20
No files found.
cbmdock/README.md
View file @
3329bf18
...
...
@@ -63,7 +63,7 @@ ssh -Y cbmdock@172.17.0.5
sudo apt-get update
sudo apt-get install -y cmake cmake-data g++ gcc gfortran debianutils build-essential make patch sed libx11-dev libxft-dev libxext-dev libxpm-dev libxmu-dev libglu1-mesa-dev libgl1-mesa-dev libncurses5-dev curl libcurl4-openssl-dev bzip2 libbz2-dev gzip unzip tar subversion git xutils-dev flex bison lsb-release python-dev libc6-dev-i386 libxml2-dev wget libssl-dev libkrb5-dev automake autoconf libtool
sudo apt-get install -y cmake cmake-data g++ gcc gfortran debianutils build-essential make patch sed libx11-dev libxft-dev libxext-dev libxpm-dev libxmu-dev libglu1-mesa-dev libgl1-mesa-dev libncurses5-dev curl libcurl4-openssl-dev bzip2 libbz2-dev gzip unzip tar subversion git xutils-dev flex bison lsb-release python-dev libc6-dev-i386 libxml2-dev wget libssl-dev libkrb5-dev automake autoconf libtool
rsync libxerces-c-dev libyaml-cpp-dev libgsl-dev
== External libraries needed to compile FairSoft for CBM ==
...
...
macro/myDigi.C
View file @
3329bf18
...
...
@@ -10,10 +10,10 @@
*/
void
myDigi
(
TString
inpSetup
=
"el"
,
void
myDigi
(
TString
inpSetup
=
"el"
,
TString
inpEnergy
=
"10gev"
,
TString
inpCentr
=
"mbias"
,
TString
type
=
"eb"
)
{
TString
inpCentr
=
"mbias"
,
TString
type
=
"eb"
)
{
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
...
...
@@ -22,20 +22,23 @@ void myDigi(TString inpSetup = "el",
TString
s
;
TString
file
=
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
TString
file
=
myParameters
::
kDATA_DIR
+
"/"
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
TString
rate
;
if
(
type
==
"eb"
)
{
rate
=
"-1"
;
rate
=
"-1
.
"
;
}
else
if
(
type
==
"tb"
)
{
rate
=
"1.e7"
;
}
else
{
cout
<<
"wrong type "
<<
type
<<
endl
;
}
TString
command
=
s
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_digi.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
, -1,
\"\"
, "
+
rate
+
")"
;
Double_t
tsLength
=
-
1
.;
// 1.e4
TString
command
=
s
+
".x $VMCWORKDIR/macro/run/run_digi.C("
+
"
\"
"
+
file
+
"
\"
, -1,
\"\"
, "
+
rate
+
", "
+
tsLength
+
")"
;
//", 1.e4)";
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
...
...
macro/myParameters.h
View file @
3329bf18
...
...
@@ -7,8 +7,7 @@
// NOTE: ROOT does not understand '~' symbol
namespace
myParameters
{
const
TString
kDATA_DIR
{
"/home/sergei/research/CBM/data"
};
const
TString
kCBMROOT_DIR
{
"/home/sergei/research/CBM/cbmroot"
};
const
TString
kDATA_DIR
{
"data"
};
}
...
...
macro/myQa.C
View file @
3329bf18
#include "TROOT.h"
#include "TSystem.h"
<<<<<<<
HEAD
#include "myParameters.h"
=======
#include <FairLogger.h>
>>>>>>>
update
of
macros
/*
Macro to run standard cbmroot qa in a simplified form
Example:
...
...
@@ -16,7 +21,6 @@ void myQa(TString inpSetup = "el", TString inpEnergy = "10gev", TString inpCent
// centr: "mbias" or "centr"
// type: "eb" or "tb"
TString
s
;
TString
setup
;
...
...
@@ -30,9 +34,19 @@ void myQa(TString inpSetup = "el", TString inpEnergy = "10gev", TString inpCent
}
TString
file
=
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
<<<<<<<
HEAD
TString
command
=
s
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_qa.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
, "
+
setup
+
")"
;
=======
file
=
"
\"
data/"
+
file
;
TString
command
=
s
+
".x $CBMSRCDIR/macro/run/run_qa.C("
+
file
+
"
\"
, "
+
file
+
"
\"
, "
+
file
+
"
\"
, "
+
file
+
"
\"
, "
+
file
+
"
\"
, "
+
setup
+
", -1)"
;
>>>>>>>
update
of
macros
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
...
...
macro/myReco.C
View file @
3329bf18
...
...
@@ -9,10 +9,10 @@
root -l -q ~/cbmtools/macro/myReco.C'("mu","10gev","mbias","tb")'
*/
void
myReco
(
TString
inpSetup
=
"el"
,
void
myReco
(
TString
inpSetup
=
"el"
,
TString
inpEnergy
=
"10gev"
,
TString
inpCentr
=
"mbias"
,
TString
type
=
"eb"
)
{
TString
inpCentr
=
"mbias"
,
TString
type
=
"eb"
)
{
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
...
...
@@ -31,21 +31,14 @@ void myReco(TString inpSetup = "el",
return
;
}
TString
file
=
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
TString
file
=
myParameters
::
kDATA_DIR
+
"/"
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
//TString command = s + ".x $CBMSRCDIR/macro/run/run_reco.C(" + "\"data/" + file
// + "\", -1, 0, \"\", \"\", " + setup + ", \"\", true)";
TString
command
=
s
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_reco.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
, -1, 0,
\"\"
,
\"\"
, "
+
setup
+
",
\"\"
, true)"
;
//command = s + ".x $CBMSRCDIR/macro/run/run_reco_event.C(-1," + "\"data/" + file
// + "\"," + setup + ", 1, 1)";
//command = s + ".x $CBMSRCDIR/macro/run/run_reco_tb_track1.C(" + "\"data/" + file
// + "\", -1, " + setup + ")";
TString
eventBuilder
=
"Ideal"
;
TString
command
=
s
+
".x $VMCWORKDIR/macro/run/run_reco.C("
+
"
\"
"
+
file
+
"
\"
, -1, 0,
\"\"
,
\"
+eventBuilder+
\"
, "
+
setup
+
",
\"\"
, true)"
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
...
...
macro/myTransport.C
View file @
3329bf18
...
...
@@ -5,22 +5,24 @@
/*
Macro to run standard cbmroot transport in a simplified form
Example:
mkdir events
cd events
root -l -q ~/cbmtools/macro/myTransport.C'("mu","10gev","mbias")'
*/
void
myTransport
(
TString
inpSetup
=
"el"
,
const
char
*
inpEnergy
=
"10gev"
,
const
char
*
inpCentr
=
"mbias"
)
{
const
char
*
inpCentr
=
"mbias"
,
const
char
*
inpDir
=
"/home/cbmdock/cbmroot/input/"
,
int
nEvents
=
100
)
{
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
// centr: "mbias" or "centr"
gSystem
->
Exec
(
"mkdir "
+
myParameters
::
kDATA_DIR
);
gSystem
->
Exec
(
"cp
"
+
myParameters
::
kCBMROOT_DIR
+
"
/macro/run/.rootrc ."
);
gSystem
->
Exec
(
"cp
$VMCWORKDIR
/macro/run/.rootrc ."
);
TString
s
;
TString
setup
;
...
...
@@ -34,34 +36,29 @@ void myTransport(TString inpSetup = "el",
return
;
}
TString
file
;
file
=
file
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
;
TString
file
=
myParameters
::
kDATA_DIR
+
"/"
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
;
TString
events
;
events
=
events
+
"
\"
"
+
myParameters
::
kCBMROOT_DIR
+
"/input
/urqmd.auau."
+
inpEnergy
events
=
events
+
"
\"
"
+
inpDir
+
"
/urqmd.auau."
+
inpEnergy
+
"."
+
inpCentr
+
".root
\"
"
;
TString
command
;
command
=
command
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_transport.C("
+
"10,"
+
setup
+
",
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
,"
+
events
+
")"
;
command
=
command
+
".x $VMCWORKDIR/macro/run/run_transport.C("
+
nEvents
+
","
+
setup
+
",
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
,"
+
events
+
", 1)"
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".eb.par.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".eb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".eb.geo.root"
);
gSystem
->
Exec
(
s
+
"cp "
+
file
+
".par.root "
+
file
+
".eb.par.root"
);
gSystem
->
Exec
(
s
+
"cp "
+
file
+
".par.root "
+
file
+
".tb.par.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".tb.par.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".tb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root "
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
".tb.geo.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root "
+
file
+
".eb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root "
+
file
+
".tb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root "
+
file
+
".eb.geo.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root "
+
file
+
".tb.geo.root"
);
cout
<<
"processed command "
<<
command
<<
endl
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment