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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
c9b14111
Commit
c9b14111
authored
1 year ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
[mcbm 2024] Enable alignment matrices application in chained ana script
parent
22becf29
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1874
CI for mCBM 2024 Ni with temporary example run
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
macro/beamtime/mcbm2024/reco_mcbm.sh
+3
-3
3 additions, 3 deletions
macro/beamtime/mcbm2024/reco_mcbm.sh
macro/mcbm/mcbm_qa.C
+24
-3
24 additions, 3 deletions
macro/mcbm/mcbm_qa.C
macro/qa/run_recoQa.C
+16
-7
16 additions, 7 deletions
macro/qa/run_recoQa.C
with
43 additions
and
13 deletions
macro/beamtime/mcbm2024/reco_mcbm.sh
+
3
−
3
View file @
c9b14111
...
@@ -90,7 +90,7 @@ RECO_PSD=0
...
@@ -90,7 +90,7 @@ RECO_PSD=0
# Algorithm flags
# Algorithm flags
RECO_TOFtr
=
0
RECO_TOFtr
=
0
RECO_ALI
=
0
RECO_ALI
=
1
RECO_EvB
=
1
RECO_EvB
=
1
RECO_CA
=
1
RECO_CA
=
1
RECO_PV
=
1
RECO_PV
=
1
...
@@ -293,7 +293,7 @@ if [[ ${DO_QA_MODULE} -eq 1 ]]; then
...
@@ -293,7 +293,7 @@ if [[ ${DO_QA_MODULE} -eq 1 ]]; then
QA_GEO
=
"
${
DATA_TOP_DIR
}
/
${
SETUP_NAME
}
.geo.root"
QA_GEO
=
"
${
DATA_TOP_DIR
}
/
${
SETUP_NAME
}
.geo.root"
QA_REC
=
"
${
DATA_TOP_DIR
}
/
${
FILE_LABEL
}
.rec.root"
QA_REC
=
"
${
DATA_TOP_DIR
}
/
${
FILE_LABEL
}
.rec.root"
ln
-s
-f
${
QA_GEO
}
"
${
SETUP_NAME
}
.geo.root"
ln
-s
-f
${
QA_GEO
}
"
${
SETUP_NAME
}
.geo.root"
PARS
=
"-1,
\"
${
QA_REC
}
\"
,
\"
${
SETUP_NAME
}
\"
,kFALSE"
PARS
=
"-1,
\"
${
QA_REC
}
\"
,
\"
${
SETUP_NAME
}
\"
,kFALSE
,
${
RECO_ALI
}
"
root
-b
-l
-q
${
MACRO_QA_MODULE
}
"(
${
PARS
}
)"
&>
${
RECO_QA_LOG
}
root
-b
-l
-q
${
MACRO_QA_MODULE
}
"(
${
PARS
}
)"
&>
${
RECO_QA_LOG
}
cat
${
RECO_QA_LOG
}
cat
${
RECO_QA_LOG
}
...
@@ -318,7 +318,7 @@ if [[ ${DO_QA} -eq 1 ]]; then
...
@@ -318,7 +318,7 @@ if [[ ${DO_QA} -eq 1 ]]; then
QA_OUT
=
"
${
DATA_TOP_DIR
}
/
${
FILE_LABEL
}
.qa.root"
QA_OUT
=
"
${
DATA_TOP_DIR
}
/
${
FILE_LABEL
}
.qa.root"
PARS
=
"0,
\"\"
,
\"
${
QA_RAW
}
\"
,
\"
${
QA_REC
}
\"
,
\"
${
QA_PAR
}
\"
,
\"
${
QA_GEO
}
\"
,
\"
${
QA_OUT
}
\"
,
\"
${
SETUP_NAME
}
\"
"
PARS
=
"0,
\"\"
,
\"
${
QA_RAW
}
\"
,
\"
${
QA_REC
}
\"
,
\"
${
QA_PAR
}
\"
,
\"
${
QA_GEO
}
\"
,
\"
${
QA_OUT
}
\"
,
\"
${
SETUP_NAME
}
\"
"
PARS
=
"
${
PARS
}
,
${
USE_MC
}
,
\"
${
CONFIG
}
\"
,
\"
${
BENCHMARK
}
\"
"
PARS
=
"
${
PARS
}
,
${
USE_MC
}
,
\"
${
CONFIG
}
\"
,
\"
${
BENCHMARK
}
\"
,
${
RECO_ALI
}
"
root
-b
-l
-q
${
MACRO_QA
}
"(
${
PARS
}
)"
&>
${
QA_LOG
}
root
-b
-l
-q
${
MACRO_QA
}
"(
${
PARS
}
)"
&>
${
QA_LOG
}
cat
${
QA_LOG
}
cat
${
QA_LOG
}
...
...
This diff is collapsed.
Click to expand it.
macro/mcbm/mcbm_qa.C
+
24
−
3
View file @
c9b14111
...
@@ -76,6 +76,7 @@ void mcbm_qa(Int_t nEvents = 0,
...
@@ -76,6 +76,7 @@ void mcbm_qa(Int_t nEvents = 0,
/// \param bUseMC Flag for MC (simulation) usage
/// \param bUseMC Flag for MC (simulation) usage
/// \param config QA YAML configuraiton file
/// \param config QA YAML configuraiton file
/// \param benchmarkInput Path to a benchmark QA output, obtained for a given setup and given number of events
/// \param benchmarkInput Path to a benchmark QA output, obtained for a given setup and given number of events
/// \param bUseAlignment Flag for enabling alignment matrices usage
void
mcbm_qa
(
Int_t
nEvents
=
0
,
void
mcbm_qa
(
Int_t
nEvents
=
0
,
TString
traColFile
=
"data/mcbm_beam_2022_05_nickel.tra.root"
,
TString
traColFile
=
"data/mcbm_beam_2022_05_nickel.tra.root"
,
TString
rawFile
=
"data/mcbm_beam_2022_05_nickel.event.raw.root"
,
TString
rawFile
=
"data/mcbm_beam_2022_05_nickel.event.raw.root"
,
...
@@ -86,7 +87,8 @@ void mcbm_qa(Int_t nEvents = 0,
...
@@ -86,7 +87,8 @@ void mcbm_qa(Int_t nEvents = 0,
TString
setupName
=
"mcbm_beam_2022_05_nickel"
,
TString
setupName
=
"mcbm_beam_2022_05_nickel"
,
Bool_t
bUseMC
=
kTRUE
,
Bool_t
bUseMC
=
kTRUE
,
TString
config
=
""
,
TString
config
=
""
,
TString
benchmarkInput
=
""
)
TString
benchmarkInput
=
""
,
Bool_t
bUseAlignment
=
kFALSE
)
/* clang-format on */
/* clang-format on */
{
{
...
@@ -228,6 +230,25 @@ void mcbm_qa(Int_t nEvents = 0,
...
@@ -228,6 +230,25 @@ void mcbm_qa(Int_t nEvents = 0,
FairMonitor
::
GetMonitor
()
->
EnableMonitor
(
kTRUE
,
monitorFile
);
FairMonitor
::
GetMonitor
()
->
EnableMonitor
(
kTRUE
,
monitorFile
);
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ----- Alignment matrices -------------------------------------------
if
(
bUseAlignment
)
{
std
::
map
<
std
::
string
,
TGeoHMatrix
>*
matrices
{
nullptr
};
TString
alignmentMatrixFileName
=
srcDir
+
"/parameters/mcbm/AlignmentMatrices_"
+
setupName
+
".root"
;
LOG
(
info
)
<<
"Trying to load alignment matrices from file "
<<
alignmentMatrixFileName
;
TFile
*
misalignmentMatrixRootfile
=
TFile
::
Open
(
alignmentMatrixFileName
,
"READ"
);
if
(
misalignmentMatrixRootfile
&&
misalignmentMatrixRootfile
->
IsOpen
())
{
gDirectory
->
GetObject
(
"MisalignMatrices"
,
matrices
);
misalignmentMatrixRootfile
->
Close
();
LOG
(
info
)
<<
"Read alignment matrices "
;
}
else
{
LOG
(
info
)
<<
"Could not find usable alignment file. Skip alignment matrices."
;
}
if
(
matrices
)
run
->
AddAlignmentMatrices
(
*
matrices
);
}
// ------------------------------------------------------------------------
// ----- QA manager ---------------------------------------------------
// ----- QA manager ---------------------------------------------------
auto
*
qaManager
=
new
CbmQaManager
(
verbose
);
auto
*
qaManager
=
new
CbmQaManager
(
verbose
);
qaManager
->
SetConfigName
(
qaConfig
);
qaManager
->
SetConfigName
(
qaConfig
);
...
...
This diff is collapsed.
Click to expand it.
macro/qa/run_recoQa.C
+
16
−
7
View file @
c9b14111
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
#endif
#endif
void
run_recoQa
(
Int_t
nEvents
=
-
1
,
TString
recFile
=
"2391_node8_0_0000.rec.root"
,
void
run_recoQa
(
Int_t
nEvents
=
-
1
,
TString
recFile
=
"2391_node8_0_0000.rec.root"
,
TString
setupName
=
"mcbm_beam_2022_05_23_nickel"
,
Bool_t
bUseMC
=
kFALSE
)
TString
setupName
=
"mcbm_beam_2022_05_23_nickel"
,
Bool_t
bUseMC
=
kFALSE
,
Bool_t
bUseAlignment
=
kTRUE
)
{
{
// ========================================================================
// ========================================================================
...
@@ -86,13 +86,22 @@ void run_recoQa(Int_t nEvents = -1, TString recFile = "2391_node8_0_0000.rec.roo
...
@@ -86,13 +86,22 @@ void run_recoQa(Int_t nEvents = -1, TString recFile = "2391_node8_0_0000.rec.roo
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
std
::
map
<
std
::
string
,
TGeoHMatrix
>*
matrices
{
nullptr
};
std
::
map
<
std
::
string
,
TGeoHMatrix
>*
matrices
{
nullptr
};
TFile
*
misalignmentMatrixRootfile
=
TFile
::
Open
(
Form
(
"AlignmentMatrices_%s.root"
,
setupName
.
Data
()),
"READ"
);
if
(
bUseAlignment
)
{
TString
alignmentMatrixFileName
=
srcDir
+
"/parameters/mcbm/AlignmentMatrices_"
+
setupName
+
".root"
;
LOG
(
info
)
<<
"Trying to load alignment matrices from file "
<<
alignmentMatrixFileName
;
TFile
*
misalignmentMatrixRootfile
=
TFile
::
Open
(
alignmentMatrixFileName
,
"READ"
);
if
(
misalignmentMatrixRootfile
&&
misalignmentMatrixRootfile
->
IsOpen
())
{
if
(
misalignmentMatrixRootfile
&&
misalignmentMatrixRootfile
->
IsOpen
())
{
gDirectory
->
GetObject
(
"MisalignMatrices"
,
matrices
);
gDirectory
->
GetObject
(
"MisalignMatrices"
,
matrices
);
misalignmentMatrixRootfile
->
Close
();
misalignmentMatrixRootfile
->
Close
();
LOG
(
info
)
<<
"Read alignment matrices "
;
}
else
{
LOG
(
warning
)
<<
"Could not find usable alignment file. Skip alignment matrices."
;
}
}
else
{
LOG
(
warning
)
<<
"Usage of alignment matrices disabled."
;
}
}
else
LOG
(
warning
)
<<
"Could not find usable alignment file. Skip."
;
// ----- FairRunAna ---------------------------------------------------
// ----- FairRunAna ---------------------------------------------------
FairFileSource
*
inputSource
=
new
FairFileSource
(
recFile
);
FairFileSource
*
inputSource
=
new
FairFileSource
(
recFile
);
...
...
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