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
b480f28c
Commit
b480f28c
authored
1 year ago
by
Administrator
Committed by
Sergey Gorbunov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add new test for event based mvd digitizer
parent
867e53ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1557
Fix MVD digitization and reconstruction
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
macro/mvd/qa/CMakeLists.txt
+18
-0
18 additions, 0 deletions
macro/mvd/qa/CMakeLists.txt
macro/mvd/qa/mvd_qa3_digitize_event.C
+113
-0
113 additions, 0 deletions
macro/mvd/qa/mvd_qa3_digitize_event.C
with
131 additions
and
0 deletions
macro/mvd/qa/CMakeLists.txt
+
18
−
0
View file @
b480f28c
...
...
@@ -44,8 +44,26 @@ SET_TESTS_PROPERTIES(mvd_qa4_reco PROPERTIES
TIMEOUT
"300"
PASS_REGULAR_EXPRESSION
"Test Passed;All ok"
FIXTURES_REQUIRED fixture_mvd_qa4_reco
FIXTURES_SETUP fixture_mvd_qa3_digitize_event
)
GENERATE_ROOT_TEST_SCRIPT
(
${
CBMROOT_SOURCE_DIR
}
/macro/mvd/qa/mvd_qa3_digitize_event.C
)
add_test
(
mvd_qa3_digitize_event
${
CBMROOT_BINARY_DIR
}
/macro/mvd/qa/mvd_qa3_digitize_event.sh
)
SET_TESTS_PROPERTIES
(
mvd_qa3_digitize_event PROPERTIES
TIMEOUT
"300"
PASS_REGULAR_EXPRESSION
"Test Passed;All ok"
FIXTURES_REQUIRED fixture_mvd_qa3_digitize_event
FIXTURES_SETUP fixture_mvd_qa4_reco_event
)
#GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mvd/qa/mvd_qa4_reco_event.C)
#add_test(mvd_qa4_reco_event ${CBMROOT_BINARY_DIR}/macro/mvd/qa/mvd_qa4_reco_event.sh)
#SET_TESTS_PROPERTIES(mvd_qa4_reco_event PROPERTIES
# TIMEOUT "300"
# PASS_REGULAR_EXPRESSION "Test Passed;All ok"
# FIXTURES_REQUIRED fixture_mvd_qa4_reco_event
#)
Install
(
FILES mvd_qa1_transUrqmd.C mvd_qa2_transDelta.C mvd_qa3_digitize.C mvd_qa4_reco.C
DESTINATION share/cbmroot/macro/mvd
)
...
...
This diff is collapsed.
Click to expand it.
macro/mvd/qa/mvd_qa3_digitize_event.C
0 → 100644
+
113
−
0
View file @
b480f28c
/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Florian Uhlig [committer], Volker Friese */
// --------------------------------------------------------------------------
//
// Macro for local MVD reconstruction from MC data
//
// Tasks: CbmMvdHitProducer
//
//
// V. Friese 06/02/2007
//
// --------------------------------------------------------------------------
void
mvd_qa3_digitize_event
(
const
char
*
setup
=
"sis100_electron"
)
{
// ========================================================================
// Adjust this part according to your requirements
TString
inDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
TString
outDir
=
"data/"
;
// Input file (MC events)
TString
inFile
=
outDir
+
"mvd.mcQA.root"
;
// Parameter file name
TString
parFile
=
outDir
+
"params.root"
;
// Output file
TString
outFile
=
outDir
+
"mvd.ev.rawQA.root"
;
// Background file (MC events, for pile-up)
TString
bgFile
=
inFile
;
// Delta file (Au Ions)
TString
deltaFile
=
outDir
+
"mvd.mcDelta.root"
;
// Number of events to process
Int_t
nEvents
=
5
;
// Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
Int_t
iVerbose
=
3
;
FairLogger
*
logger
=
FairLogger
::
GetLogger
();
logger
->
SetLogScreenLevel
(
"INFO"
);
logger
->
SetLogVerbosityLevel
(
"LOW"
);
TString
setupFile
=
inDir
+
"/geometry/setup/setup_"
+
setup
+
".C"
;
TString
setupFunct
=
"setup_"
;
setupFunct
=
setupFunct
+
setup
+
"()"
;
gROOT
->
LoadMacro
(
setupFile
);
gInterpreter
->
ProcessLine
(
setupFunct
);
// In general, the following parts need not be touched
// ========================================================================
// ---- Debug option -------------------------------------------------
gDebug
=
0
;
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch
timer
;
timer
.
Start
();
// ------------------------------------------------------------------------
// ------- MVD Digitiser ----------------------------------------------
CbmMvdDigitizer
*
digi
=
new
CbmMvdDigitizer
(
"MVDDigitiser"
,
0
,
iVerbose
);
std
::
cout
<<
"Adding Task: CbmMvdDigitiser... "
<<
std
::
endl
;
// digi->ShowDebugHistograms();
// ----- Digitization run ---------------------------------------------
CbmDigitization
run
;
run
.
SetOutputFile
(
outFile
,
kTRUE
);
run
.
SetParameterRootFile
(
parFile
);
run
.
SetMode
(
cbm
::
sim
::
Mode
::
EventByEvent
);
cbm
::
sim
::
TimeDist
timeDist
=
cbm
::
sim
::
TimeDist
::
Uniform
;
run
.
SetDigitizer
(
ECbmModuleId
::
kMvd
,
digi
);
run
.
AddInput
(
0
,
inFile
,
timeDist
,
-
1
);
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
::
cout
<<
std
::
endl
;
// ---------------------------------------------------------------------------
std
::
cout
<<
" Test passed"
<<
std
::
endl
;
std
::
cout
<<
" All ok "
<<
std
::
endl
;
//digi->Finish();
/*digi->CollectHistograms();
TObjArray* digiHisto=digi->GetHistograms();
std::cout << "Received HistoArray with Address " << digiHisto << std::endl;
std::cout << "The number of entries is " << digiHisto->GetEntriesFast() << std::endl;
((TH1*)digiHisto->At(0))->Draw();*/
}
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