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
460f26e0
Commit
460f26e0
authored
3 years ago
by
Volker Friese
Committed by
Jan de Cuveland
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Activate Https Server; set histogram limits according to event bguilding windows.
parent
685dcb76
No related branches found
No related tags found
1 merge request
!784
QA for digi events. Checks the digi time distribution within the event.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
reco/tasks/CbmReco.cxx
+15
-0
15 additions, 0 deletions
reco/tasks/CbmReco.cxx
reco/tasks/CbmTaskDigiEventQa.cxx
+25
-7
25 additions, 7 deletions
reco/tasks/CbmTaskDigiEventQa.cxx
reco/tasks/CbmTaskDigiEventQa.h
+15
-2
15 additions, 2 deletions
reco/tasks/CbmTaskDigiEventQa.h
with
55 additions
and
9 deletions
reco/tasks/CbmReco.cxx
+
15
−
0
View file @
460f26e0
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include
"CbmSourceTs.h"
#include
"CbmSourceTs.h"
#include
"CbmTaskBuildEvents.h"
#include
"CbmTaskBuildEvents.h"
#include
"CbmTaskDigiEventQa.h"
#include
"CbmTaskTriggerDigi.h"
#include
"CbmTaskTriggerDigi.h"
#include
"CbmTaskUnpack.h"
#include
"CbmTaskUnpack.h"
#include
"CbmTsEventHeader.h"
#include
"CbmTsEventHeader.h"
...
@@ -14,6 +15,9 @@
...
@@ -14,6 +15,9 @@
#include
<FairRootFileSink.h>
#include
<FairRootFileSink.h>
#include
<FairRunOnline.h>
#include
<FairRunOnline.h>
#include
<THttpServer.h>
#include
<TRootSniffer.h>
#include
<iostream>
#include
<iostream>
#include
<memory>
#include
<memory>
#include
<string>
#include
<string>
...
@@ -102,6 +106,10 @@ int32_t CbmReco::Run()
...
@@ -102,6 +106,10 @@ int32_t CbmReco::Run()
evtBuild
->
SetEventWindow
(
entry
.
first
,
entry
.
second
.
first
,
entry
.
second
.
second
);
evtBuild
->
SetEventWindow
(
entry
.
first
,
entry
.
second
.
first
,
entry
.
second
.
second
);
evtBuild
->
SetOutputBranchPersistent
(
"DigiEvent"
,
fConfig
.
fStoreEvents
);
evtBuild
->
SetOutputBranchPersistent
(
"DigiEvent"
,
fConfig
.
fStoreEvents
);
// --- Event QA
auto
evtQa
=
make_unique
<
CbmTaskDigiEventQa
>
();
evtQa
->
Config
(
fConfig
);
// --- Run configuration
// --- Run configuration
FairRunOnline
run
(
source
.
release
());
FairRunOnline
run
(
source
.
release
());
run
.
SetSink
(
sink
.
release
());
run
.
SetSink
(
sink
.
release
());
...
@@ -109,6 +117,13 @@ int32_t CbmReco::Run()
...
@@ -109,6 +117,13 @@ int32_t CbmReco::Run()
run
.
AddTask
(
unpack
.
release
());
run
.
AddTask
(
unpack
.
release
());
run
.
AddTask
(
trigger
.
release
());
run
.
AddTask
(
trigger
.
release
());
run
.
AddTask
(
evtBuild
.
release
());
run
.
AddTask
(
evtBuild
.
release
());
run
.
AddTask
(
evtQa
.
release
());
// ----- HttpServer for online monitoring
Int_t
serverHttpPort
=
8080
;
Int_t
serverRefreshRate
=
100
;
// timeslices
run
.
ActivateHttpServer
(
serverRefreshRate
,
serverHttpPort
);
run
.
GetHttpServer
()
->
GetSniffer
()
->
SetScanGlobalDir
(
kFALSE
);
// --- Initialise and start run
// --- Initialise and start run
timer
.
Stop
();
timer
.
Stop
();
...
...
This diff is collapsed.
Click to expand it.
reco/tasks/CbmTaskDigiEventQa.cxx
+
25
−
7
View file @
460f26e0
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include
"CbmDigiManager.h"
#include
"CbmDigiManager.h"
#include
"CbmDigiTimeslice.h"
#include
"CbmDigiTimeslice.h"
#include
"CbmModuleList.h"
#include
"CbmModuleList.h"
#include
"CbmReco.h"
// for CbmRecoConfig
#include
<FairLogger.h>
#include
<FairLogger.h>
#include
<FairRunOnline.h>
#include
<FairRunOnline.h>
...
@@ -32,6 +33,19 @@ CbmTaskDigiEventQa::~CbmTaskDigiEventQa() {}
...
@@ -32,6 +33,19 @@ CbmTaskDigiEventQa::~CbmTaskDigiEventQa() {}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----- Configuration ---------------------------------------------------
void
CbmTaskDigiEventQa
::
Config
(
const
CbmRecoConfig
&
config
)
{
auto
limitIt
=
config
.
fEvtbuildWindows
.
find
(
ECbmModuleId
::
kSts
);
if
(
limitIt
!=
config
.
fEvtbuildWindows
.
end
())
{
double
lower
=
limitIt
->
second
.
first
-
10.
;
double
upper
=
limitIt
->
second
.
second
+
10.
;
fHistDigiTimeSts
=
new
TH1F
(
"hDigiTimeSts"
,
"STS digi time in event"
,
100
,
lower
,
upper
);
}
}
// ---------------------------------------------------------------------------
// ----- Execution -------------------------------------------------------
// ----- Execution -------------------------------------------------------
void
CbmTaskDigiEventQa
::
Exec
(
Option_t
*
)
void
CbmTaskDigiEventQa
::
Exec
(
Option_t
*
)
{
{
...
@@ -55,7 +69,7 @@ void CbmTaskDigiEventQa::Exec(Option_t*)
...
@@ -55,7 +69,7 @@ void CbmTaskDigiEventQa::Exec(Option_t*)
for
(
const
auto
&
digi
:
event
.
fData
.
fSts
.
fDigis
)
{
for
(
const
auto
&
digi
:
event
.
fData
.
fSts
.
fDigis
)
{
numDigis
++
;
numDigis
++
;
const
double
tDigi
=
digi
.
GetTime
()
-
event
.
fTime
;
const
double
tDigi
=
digi
.
GetTime
()
-
event
.
fTime
;
fHistDigiTime
->
Fill
(
tDigi
);
if
(
fHistDigiTime
Sts
)
fHistDigiTimeSts
->
Fill
(
tDigi
);
sumT
+=
tDigi
;
sumT
+=
tDigi
;
sumTsq
+=
tDigi
*
tDigi
;
sumTsq
+=
tDigi
*
tDigi
;
}
}
...
@@ -102,10 +116,11 @@ void CbmTaskDigiEventQa::Finish()
...
@@ -102,10 +116,11 @@ void CbmTaskDigiEventQa::Finish()
LOG
(
info
)
<<
"Events : "
<<
fNumEvents
;
LOG
(
info
)
<<
"Events : "
<<
fNumEvents
;
LOG
(
info
)
<<
"Digis : "
<<
fNumDigis
;
LOG
(
info
)
<<
"Digis : "
<<
fNumDigis
;
LOG
(
info
)
<<
"Exec time : "
<<
fixed
<<
setprecision
(
2
)
<<
1000.
*
fExecTime
/
double
(
fNumTs
)
<<
" ms / TS"
;
LOG
(
info
)
<<
"Exec time : "
<<
fixed
<<
setprecision
(
2
)
<<
1000.
*
fExecTime
/
double
(
fNumTs
)
<<
" ms / TS"
;
LOG
(
info
)
<<
"Digi times : entries "
<<
fHistDigiTime
->
GetEntries
()
<<
", mean "
<<
fHistDigiTime
->
GetMean
()
if
(
fHistDigiTimeSts
)
<<
", stddev "
<<
fHistDigiTime
->
GetStdDev
();
LOG
(
info
)
<<
"STS digi times : entries "
<<
fHistDigiTimeSts
->
GetEntries
()
<<
", mean "
<<
fHistDigiTimeSts
->
GetMean
()
<<
", stddev "
<<
fHistDigiTimeSts
->
GetStdDev
();
LOG
(
info
)
<<
"====================================="
;
LOG
(
info
)
<<
"====================================="
;
fHistDigiTime
->
Write
();
if
(
fHistDigiTime
Sts
)
fHistDigiTimeSts
->
Write
();
}
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
...
@@ -129,10 +144,12 @@ InitStatus CbmTaskDigiEventQa::Init()
...
@@ -129,10 +144,12 @@ InitStatus CbmTaskDigiEventQa::Init()
}
}
LOG
(
info
)
<<
"--- Found branch DigiEvent"
;
LOG
(
info
)
<<
"--- Found branch DigiEvent"
;
// --- Histograms
// --- Register histograms
fHistDigiTime
=
new
TH1F
(
"hDigiTime"
,
"Digi time in event"
,
100
,
-
50.
,
50.
);
THttpServer
*
server
=
FairRunOnline
::
Instance
()
->
GetHttpServer
();
THttpServer
*
server
=
FairRunOnline
::
Instance
()
->
GetHttpServer
();
if
(
server
)
server
->
Register
(
"DigiTime"
,
fHistDigiTime
);
if
(
server
)
{
LOG
(
info
)
<<
"--- Http server present; registering histograms"
;
if
(
fHistDigiTimeSts
)
server
->
Register
(
"DigiEvent"
,
fHistDigiTimeSts
);
}
LOG
(
info
)
<<
"=================================================="
;
LOG
(
info
)
<<
"=================================================="
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
...
@@ -141,4 +158,5 @@ InitStatus CbmTaskDigiEventQa::Init()
...
@@ -141,4 +158,5 @@ InitStatus CbmTaskDigiEventQa::Init()
}
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
ClassImp
(
CbmTaskDigiEventQa
)
ClassImp
(
CbmTaskDigiEventQa
)
This diff is collapsed.
Click to expand it.
reco/tasks/CbmTaskDigiEventQa.h
+
15
−
2
View file @
460f26e0
...
@@ -12,15 +12,20 @@
...
@@ -12,15 +12,20 @@
#include
<vector>
#include
<vector>
#include
"EventBuilder.h"
//
#include "EventBuilder.h"
class
CbmDigiManager
;
class
CbmDigiManager
;
class
CbmRecoConfig
;
class
TH1F
;
class
TH1F
;
/** @class CbmTaskDigiEventQa
/** @class CbmTaskDigiEventQa
** @brief QA task class for digi events produced by the event builder
** @brief QA task class for digi events produced by the event builder
** @author Volker Friese <v.friese@gsi.de>
** @author Volker Friese <v.friese@gsi.de>
** @since 15.03.2022
** @since 15.03.2022
**
** Currently implemented functionality: histogram the STS digi time within each event.
** To be expanded for other detector systems and probably more QA figures.
** The histograms are published to the THttpServer.
**/
**/
class
CbmTaskDigiEventQa
:
public
FairTask
{
class
CbmTaskDigiEventQa
:
public
FairTask
{
...
@@ -37,6 +42,14 @@ public:
...
@@ -37,6 +42,14 @@ public:
virtual
~
CbmTaskDigiEventQa
();
virtual
~
CbmTaskDigiEventQa
();
/** @brief Configuration
** @param config Reconstruction configuration
**
** Histograms are created with limits adjusted to the windows use by the event builder.
**/
void
Config
(
const
CbmRecoConfig
&
config
);
/** @brief Task execution **/
/** @brief Task execution **/
virtual
void
Exec
(
Option_t
*
opt
);
virtual
void
Exec
(
Option_t
*
opt
);
...
@@ -60,7 +73,7 @@ private: // members
...
@@ -60,7 +73,7 @@ private: // members
size_t
fNumEvents
=
0
;
///< Number of analysed events
size_t
fNumEvents
=
0
;
///< Number of analysed events
size_t
fNumDigis
=
0
;
///< Number of analysed digis
size_t
fNumDigis
=
0
;
///< Number of analysed digis
double
fExecTime
=
0.
;
///< Execution time [s]
double
fExecTime
=
0.
;
///< Execution time [s]
TH1F
*
fHistDigiTime
=
nullptr
;
//!
TH1F
*
fHistDigiTime
Sts
=
nullptr
;
//!
ClassDef
(
CbmTaskDigiEventQa
,
1
);
ClassDef
(
CbmTaskDigiEventQa
,
1
);
...
...
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