Commit 3329bf18 authored by Sergey Gorbunov's avatar Sergey Gorbunov
Browse files

update of macros

parent 02566c01
......@@ -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 ==
......
......@@ -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);
......
......@@ -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"};
}
......
#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);
......
......@@ -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);
......
......@@ -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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment