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
0f1f6eba
Commit
0f1f6eba
authored
1 year ago
by
Administrator
Committed by
Sergey Gorbunov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add macro for event based reconstruction
parent
b981da50
No related branches found
No related tags found
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/mvd_qa4_reco.C
+1
-1
1 addition, 1 deletion
macro/mvd/qa/mvd_qa4_reco.C
macro/mvd/qa/mvd_qa4_reco_event.C
+168
-0
168 additions, 0 deletions
macro/mvd/qa/mvd_qa4_reco_event.C
with
169 additions
and
1 deletion
macro/mvd/qa/mvd_qa4_reco.C
+
1
−
1
View file @
0f1f6eba
...
@@ -43,7 +43,7 @@ void mvd_qa4_reco(const char* setup = "sis100_electron")
...
@@ -43,7 +43,7 @@ void mvd_qa4_reco(const char* setup = "sis100_electron")
Int_t
iVerbose
=
3
;
Int_t
iVerbose
=
3
;
FairLogger
*
logger
=
FairLogger
::
GetLogger
();
FairLogger
*
logger
=
FairLogger
::
GetLogger
();
logger
->
SetLogScreenLevel
(
"
DEBUG4
"
);
logger
->
SetLogScreenLevel
(
"
INFO
"
);
logger
->
SetLogVerbosityLevel
(
"LOW"
);
logger
->
SetLogVerbosityLevel
(
"LOW"
);
...
...
This diff is collapsed.
Click to expand it.
macro/mvd/qa/mvd_qa4_reco_event.C
0 → 100644
+
168
−
0
View file @
0f1f6eba
/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Florian [committer] */
void
mvd_qa4_reco_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.ev.rawQA.root"
;
// Parameter file name
TString
parFile
=
outDir
+
"params.root"
;
// Output file
TString
outFile
=
outDir
+
"mvd.ev.recoQA.root"
;
// MC file
TString
traFile
=
outDir
+
"mvd.mcQA.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
();
// ------------------------------------------------------------------------
// ----- Reconstruction run -------------------------------------------
FairRunAna
*
fRun
=
new
FairRunAna
();
FairFileSource
*
inputSource
=
new
FairFileSource
(
inFile
);
inputSource
->
AddFriend
(
traFile
);
// inputSource->AddFriend(rawFile);
fRun
->
SetSource
(
inputSource
);
fRun
->
SetOutputFile
(
outFile
);
Bool_t
hasFairMonitor
=
Has_Fair_Monitor
();
if
(
hasFairMonitor
)
{
FairMonitor
::
GetMonitor
()
->
EnableMonitor
(
kTRUE
);
}
// ------------------------------------------------------------------------
// ----- Mc Data Manager ------------------------------------------------
CbmMCDataManager
*
mcManager
=
new
CbmMCDataManager
(
"MCManager"
,
1
);
mcManager
->
AddFile
(
traFile
);
fRun
->
AddTask
(
mcManager
);
// ------------------------------------------------------------------------
// ----- Raw event building from digis --------------------------------
FairTask
*
evBuildRaw
=
new
CbmBuildEventsIdeal
();
fRun
->
AddTask
(
evBuildRaw
);
// ----- MVD Clusterfinder ---------------------------------------------
CbmMvdClusterfinder
*
mvdCluster
=
new
CbmMvdClusterfinder
(
"MVD Clusterfinder"
,
0
,
iVerbose
);
mvdCluster
->
SetMode
(
ECbmRecoMode
::
EventByEvent
);
fRun
->
AddTask
(
mvdCluster
);
// -------------------------------------------------------------------------
CbmMvdHitfinder
*
mvd_hit
=
new
CbmMvdHitfinder
(
"MVDFindHits"
,
0
,
iVerbose
);
mvd_hit
->
UseClusterfinder
(
kTRUE
);
mvd_hit
->
SetMode
(
ECbmRecoMode
::
EventByEvent
);
fRun
->
AddTask
(
mvd_hit
);
/*
CbmMatchRecoToMC* match = new CbmMatchRecoToMC();
fRun->AddTask(match);
CbmMvdQa* qaTask = new CbmMvdQa("CbmMvdQa");
qaTask->SetUseHitQa();
fRun->AddTask(qaTask);
*/
//----------------------------------------------------------------------------
// ----- Parameter database -----------------------------------------------
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairParRootFileIo
*
parIo1
=
new
FairParRootFileIo
();
parIo1
->
open
(
parFile
.
Data
());
rtdb
->
setFirstInput
(
parIo1
);
rtdb
->
setOutput
(
parIo1
);
rtdb
->
saveOutput
();
rtdb
->
print
();
// ---------------------------------------------------------------------------
// ----- Run initialisation ----------------------------------------------
fRun
->
Init
();
// ---------------------------------------------------------------------------
// ----- Start run -------------------------------------------------------
fRun
->
Run
(
0
,
nEvents
);
// ---------------------------------------------------------------------------
// ----- 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
<<
"Parameter file is "
<<
parFile
<<
endl
;
cout
<<
"Real time "
<<
rtime
<<
" s, CPU time "
<<
ctime
<<
" s"
<<
endl
;
cout
<<
endl
;
// ---------------------------------------------------------------------------
if
(
hasFairMonitor
)
{
// Extract the maximal used memory an add is as Dart measurement
// This line is filtered by CTest and the value send to CDash
FairSystemInfo
sysInfo
;
Float_t
maxMemory
=
sysInfo
.
GetMaxMemory
();
cout
<<
"<DartMeasurement name=
\"
MaxMemory
\"
type=
\"
numeric/double
\"
>"
;
cout
<<
maxMemory
;
cout
<<
"</DartMeasurement>"
<<
endl
;
Float_t
cpuUsage
=
ctime
/
rtime
;
cout
<<
"<DartMeasurement name=
\"
CpuLoad
\"
type=
\"
numeric/double
\"
>"
;
cout
<<
cpuUsage
;
cout
<<
"</DartMeasurement>"
<<
endl
;
FairMonitor
*
tempMon
=
FairMonitor
::
GetMonitor
();
tempMon
->
Print
();
}
// delete run;
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
endl
;
RemoveGeoManager
();
}
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