Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot_parameter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Monitor
Incidents
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
CbmSoft
cbmroot_parameter
Merge requests
!127
provides tof_v21d digi file
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
provides tof_v21d digi file
e.clerkin/cbmroot_parameter:tof_v21d_mcbm
into
master
Overview
4
Commits
1
Pipelines
1
Changes
6
Closed
Eoin Clerkin
requested to merge
e.clerkin/cbmroot_parameter:tof_v21d_mcbm
into
master
2 years ago
Overview
4
Commits
1
Pipelines
1
Changes
6
Expand
Provides the .digi file generated from the attached macros.
0
0
Merge request reports
Compare
master
version 6
11baa4ee
2 years ago
version 5
11baa4ee
2 years ago
version 4
11baa4ee
2 years ago
version 3
11baa4ee
2 years ago
version 2
11baa4ee
2 years ago
version 1
11baa4ee
2 years ago
master (base)
and
version 6
latest version
11baa4ee
1 commit,
2 years ago
version 6
11baa4ee
2 commits,
2 years ago
version 5
11baa4ee
3 commits,
2 years ago
version 4
11baa4ee
4 commits,
2 years ago
version 3
11baa4ee
5 commits,
2 years ago
version 2
11baa4ee
6 commits,
2 years ago
version 1
11baa4ee
7 commits,
2 years ago
6 files
+
1529
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
macro/create_digipar.C
0 → 100644
+
116
−
0
Options
/* Copyright (C) 2013-2017 Facility for Antiproton and Ion Research in Europe, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Florian Uhlig, Pierre-Alain Loizeau [committer] */
// --------------------------------------------------------------------------
//
// Macro to create digi parameters for the TOF
//
// The way how the pad layout looks like has to be
// implemented in a task called in this macro.
// CbmTofCreateDigiPar is the implementation used
// here.
//
// F.Uhlig 07.05.2010
//
// --------------------------------------------------------------------------
void
create_digipar
(
TString
fileName
=
"tof_v16a_1e"
,
Int_t
nEvents
=
0
)
{
cout
<<
"fileName: "
<<
fileName
<<
endl
;
// ========================================================================
// Adjust this part according to your requirements
// Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
Int_t
iVerbose
=
0
;
// Input file (MC events)
TString
inFile
=
"auaumbias."
+
fileName
+
".mc.root"
;
// Geometry File
TString
geoFile
=
"geofile_"
+
fileName
+
".root"
;
// Output file
TString
outFile
=
"test.esd."
+
fileName
+
".root"
;
// Digi Parameter Output File
// TString digiFile = fileName + ".digi.par.long";
TString
digiFile
=
fileName
+
".digi.par"
;
// In general, the following parts need not be touched
// ========================================================================
// ---- Debug option -------------------------------------------------
gDebug
=
0
;
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch
timer
;
timer
.
Start
();
// ------------------------------------------------------------------------
// ----- Reconstruction run -------------------------------------------
FairRunAna
*
run
=
new
FairRunAna
();
run
->
SetOutputFile
(
outFile
);
run
->
SetGeomFile
(
geoFile
);
FairFileSource
*
inFileSource
=
new
FairFileSource
(
inFile
);
// run->SetInputFile(inFile);
run
->
SetSource
(
inFileSource
);
FairLogger
::
GetLogger
()
->
SetLogScreenLevel
(
"INFO"
);
// FairLogger::GetLogger()->SetLogScreenLevel("DEBUG2");
// ------------------------------------------------------------------------
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
FairParAsciiFileIo
*
parIo2
=
new
FairParAsciiFileIo
();
parIo2
->
open
(
digiFile
,
"out"
);
rtdb
->
setOutput
(
parIo2
);
CbmTofCreateDigiPar
*
tofDigiProducer
=
new
CbmTofCreateDigiPar
(
"TOF Digi Producer"
,
"TOF task"
);
run
->
AddTask
(
tofDigiProducer
);
// -------------------------------------------------------------------------
rtdb
->
saveOutput
();
// ----- Intialise and run --------------------------------------------
// run->LoadGeometry();
run
->
Init
();
rtdb
->
print
();
CbmTofDigiPar
*
DigiPar
=
(
CbmTofDigiPar
*
)
rtdb
->
getContainer
(
"CbmTofDigiPar"
);
DigiPar
->
setChanged
();
DigiPar
->
setInputVersion
(
run
->
GetRunId
(),
1
);
rtdb
->
print
();
rtdb
->
saveOutput
();
// ----- Finish -------------------------------------------------------
timer
.
Stop
();
Double_t
rtime
=
timer
.
RealTime
();
Double_t
ctime
=
timer
.
CpuTime
();
cout
<<
endl
<<
endl
;
cout
<<
"Macro finished succesfully."
<<
endl
;
cout
<<
"Output file is "
<<
outFile
<<
endl
;
cout
<<
"Real time "
<<
rtime
<<
" s, CPU time "
<<
ctime
<<
" s"
<<
endl
;
cout
<<
endl
;
// ------------------------------------------------------------------------
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
endl
;
exit
(
0
);
}
Loading