Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
a4a65b7d
Commit
a4a65b7d
authored
3 years ago
by
Sergey Gorbunov
Committed by
Florian Uhlig
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove obsolete transport macro
parent
fc7f533a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!722
remove obsolete transport macro
Pipeline
#16079
passed
3 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macro/run/run_transport.C
+0
-128
0 additions, 128 deletions
macro/run/run_transport.C
with
0 additions
and
128 deletions
macro/run/run_transport.C
deleted
100644 → 0
+
0
−
128
View file @
fc7f533a
/* Copyright (C) 2018-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Volker Friese [committer] */
/** @file run_transport.C
** @author Volker Friese <v.friese@gsi.de>
** @since 2 March 2019
**/
// Includes needed for IDE
#if !defined(__CLING__)
#include
"CbmTransport.h"
#include
"FairSystemInfo.h"
#include
"TStopwatch.h"
#endif
/** @brief run_transport
** @author Volker Friese <v.friese@gsi.de>
** @since 2 March 2019
** @param nEvents Number of events from input to transport
** @param setupName Name of predefined geometry setup
** @param output Name of output data set
** @param inputFile Name of input file
**
** Macro for transport simulation with CBM (GEANT3), for regular tests.
**
** For the setup (geometry and field), predefined setups can be chosen
** by the second argument. Available setups are in geometry/setup.
** The input file is in UniGen format and can be specified by the last argument.
** If none is specified, a default input file distributed with the source code
** is selected. The user has to assure the consistency of input file and target,
** the latter being defined in the macro body.
**
** Random event plane rotation of the input events is applied.
**
** The output file will be named [output].tra.root.
** A parameter file [output].par.root will be created.
** The geometry (TGeoManager) will be written into [output].geo.root.
**
** For the options for the transport simulation, see the documentation of
** CbmTransport.
**/
void
run_transport
(
Int_t
nEvents
=
2
,
const
char
*
setupName
=
"sis100_electron"
,
const
char
*
output
=
"test"
,
const
char
*
inputFile
=
""
,
Int_t
randomSeed
=
0
)
{
// --- Logger settings ----------------------------------------------------
FairLogger
::
GetLogger
()
->
SetLogScreenLevel
(
"INFO"
);
FairLogger
::
GetLogger
()
->
SetLogVerbosityLevel
(
"LOW"
);
// ------------------------------------------------------------------------
// ----- Environment --------------------------------------------------
TString
myName
=
"run_transport"
;
// this macro's name for screen output
TString
srcDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
// top source directory
// ------------------------------------------------------------------------
// ----- In- and output file names ------------------------------------
TString
dataset
(
output
);
TString
outFile
=
dataset
+
".tra.root"
;
TString
parFile
=
dataset
+
".par.root"
;
TString
geoFile
=
dataset
+
".geo.root"
;
std
::
cout
<<
std
::
endl
;
TString
defaultInputFile
=
srcDir
+
"/input/urqmd.auau.10gev.centr.root"
;
TString
inFile
;
if
(
strcmp
(
inputFile
,
""
)
==
0
)
inFile
=
defaultInputFile
;
else
inFile
=
inputFile
;
std
::
cout
<<
"-I- "
<<
myName
<<
": Using input file "
<<
inFile
<<
std
::
endl
;
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch
timer
;
timer
.
Start
();
// ------------------------------------------------------------------------
// --- Transport run ----------------------------------------------------
CbmTransport
run
;
run
.
AddInput
(
inFile
);
run
.
SetOutFileName
(
outFile
);
run
.
SetParFileName
(
parFile
);
run
.
SetGeoFileName
(
geoFile
);
run
.
LoadSetup
(
setupName
);
run
.
SetTarget
(
"Gold"
,
0
.
025
,
2
.
5
);
run
.
SetBeamPosition
(
0
.,
0
.,
0
.
1
,
0
.
1
);
run
.
SetRandomEventPlane
();
// run.StoreTrajectories();
run
.
SetRandomSeed
(
randomSeed
);
run
.
Run
(
nEvents
);
// ------------------------------------------------------------------------
// ----- Finish -------------------------------------------------------
timer
.
Stop
();
Double_t
rtime
=
timer
.
RealTime
();
Double_t
ctime
=
timer
.
CpuTime
();
std
::
cout
<<
std
::
endl
<<
std
::
endl
;
std
::
cout
<<
"Macro finished successfully."
<<
std
::
endl
;
std
::
cout
<<
"Output file is "
<<
outFile
<<
std
::
endl
;
std
::
cout
<<
"Parameter file is "
<<
parFile
<<
std
::
endl
;
std
::
cout
<<
"Real time "
<<
rtime
<<
" s, CPU time "
<<
ctime
<<
"s"
<<
std
::
endl
<<
std
::
endl
;
// ------------------------------------------------------------------------
// ----- Resource monitoring ------------------------------------------
FairSystemInfo
sysInfo
;
Float_t
maxMemory
=
sysInfo
.
GetMaxMemory
();
std
::
cout
<<
"<DartMeasurement name=
\"
MaxMemory
\"
type=
\"
numeric/double
\"
>"
;
std
::
cout
<<
maxMemory
;
std
::
cout
<<
"</DartMeasurement>"
<<
std
::
endl
;
Float_t
cpuUsage
=
ctime
/
rtime
;
std
::
cout
<<
"<DartMeasurement name=
\"
CpuLoad
\"
type=
\"
numeric/double
\"
>"
;
std
::
cout
<<
cpuUsage
;
std
::
cout
<<
"</DartMeasurement>"
<<
std
::
endl
;
std
::
cout
<<
" Test passed"
<<
std
::
endl
;
std
::
cout
<<
" All ok "
<<
std
::
endl
;
// ------------------------------------------------------------------------
}
// End of macro
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment