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
7d0d69b6
Commit
7d0d69b6
authored
4 years ago
by
Dominik Smith
Browse files
Options
Downloads
Patches
Plain Diff
Started to implment detector types other than STS in CbmBuildEventsQA.
parent
a4734c3f
No related branches found
No related tags found
1 merge request
!222
Event builder new
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/eventbuilder/digis/CbmBuildEventsQA.cxx
+34
-14
34 additions, 14 deletions
reco/eventbuilder/digis/CbmBuildEventsQA.cxx
reco/eventbuilder/digis/CbmBuildEventsQA.h
+7
-4
7 additions, 4 deletions
reco/eventbuilder/digis/CbmBuildEventsQA.h
with
41 additions
and
18 deletions
reco/eventbuilder/digis/CbmBuildEventsQA.cxx
+
34
−
14
View file @
7d0d69b6
...
...
@@ -9,6 +9,7 @@
#include
"CbmEvent.h"
#include
"CbmLink.h"
#include
"CbmMatch.h"
#include
"CbmModuleList.h"
#include
"CbmStsDigi.h"
#include
"FairLogger.h"
#include
"FairRootManager.h"
...
...
@@ -124,17 +125,19 @@ InitStatus CbmBuildEventsQA::Init() {
fDigiMan
=
CbmDigiManager
::
Instance
();
fDigiMan
->
Init
();
//Init STS digis
if
(
fDigiMan
->
IsPresent
(
ECbmModuleId
::
kSts
))
{
LOG
(
info
)
<<
"CbmBuildEventsQA(): Found STS digi input."
;
}
else
{
LOG
(
fatal
)
<<
"CbmBuildEventsQA(): No STS digi input."
;
// --- Check input data
for
(
ECbmModuleId
system
=
ECbmModuleId
::
kMvd
;
system
<
ECbmModuleId
::
kNofSystems
;
++
system
)
{
if
(
fDigiMan
->
IsMatchPresent
(
system
))
{
LOG
(
info
)
<<
GetName
()
<<
": Found match branch for "
<<
CbmModuleList
::
GetModuleNameCaps
(
system
);
fSystems
.
push_back
(
system
);
}
}
if
(
fDigiMan
->
IsMatchPresent
(
ECbmModuleId
::
kSts
))
{
LOG
(
info
)
<<
"CbmBuildEventsQA(): Found STS match branch."
;
}
else
{
LOG
(
fatal
)
<<
"CbmBuildEventsQA(): No STS match branch."
;
if
(
fSystems
.
empty
())
{
LOG
(
fatal
)
<<
GetName
()
<<
": No match branch found!"
;
return
kFATAL
;
}
return
kSUCCESS
;
...
...
@@ -166,12 +169,13 @@ void CbmBuildEventsQA::MatchEvent(CbmEvent* event) {
// << ", STS digis : " << event->GetNofData(ECbmDataType::kStsDigi);
// --- Loop over digis
for
(
Int_t
iDigi
=
0
;
iDigi
<
event
->
GetNofData
(
ECbmDataType
::
kStsDigi
);
for
(
Int_t
iDigi
=
0
;
iDigi
<
event
->
GetNofData
(
GetDigiType
(
ECbmModuleId
::
kSts
));
iDigi
++
)
{
Int_t
index
=
event
->
GetIndex
(
ECbmDataType
::
kSts
Digi
,
iDigi
);
const
CbmStsDigi
*
digi
=
fDigiMan
->
Get
<
CbmStsDigi
>
(
index
);
Int_t
index
=
event
->
GetIndex
(
GetDigiType
(
ECbmModuleId
::
kSts
)
,
iDigi
);
//
const CbmStsDigi* digi = fDigiMan->Get<CbmStsDigi>(index);
not needed ?
const
CbmMatch
*
digiMatch
=
fDigiMan
->
GetMatch
(
ECbmModuleId
::
kSts
,
index
);
assert
(
digi
);
//
assert(digi);
assert
(
digiMatch
);
// --- Update event match with digi links
...
...
@@ -191,4 +195,20 @@ void CbmBuildEventsQA::MatchEvent(CbmEvent* event) {
// ===========================================================================
// ===== Get digi type =====================================================
ECbmDataType
CbmBuildEventsQA
::
GetDigiType
(
ECbmModuleId
system
)
{
switch
(
system
)
{
case
ECbmModuleId
::
kMvd
:
return
ECbmDataType
::
kMvdDigi
;
case
ECbmModuleId
::
kSts
:
return
ECbmDataType
::
kStsDigi
;
case
ECbmModuleId
::
kRich
:
return
ECbmDataType
::
kRichDigi
;
case
ECbmModuleId
::
kMuch
:
return
ECbmDataType
::
kMuchDigi
;
case
ECbmModuleId
::
kTrd
:
return
ECbmDataType
::
kTrdDigi
;
case
ECbmModuleId
::
kTof
:
return
ECbmDataType
::
kTofDigi
;
case
ECbmModuleId
::
kPsd
:
return
ECbmDataType
::
kPsdDigi
;
default:
return
ECbmDataType
::
kUnknown
;
}
}
// ===========================================================================
ClassImp
(
CbmBuildEventsQA
)
This diff is collapsed.
Click to expand it.
reco/eventbuilder/digis/CbmBuildEventsQA.h
+
7
−
4
View file @
7d0d69b6
...
...
@@ -5,7 +5,7 @@
#ifndef CBMBUILDEVENTSQA_H_
#define CBMBUILDEVENTSQA_H 1
#include
"CbmDefs.h"
#include
<FairTask.h>
class
TClonesArray
;
...
...
@@ -36,9 +36,10 @@ public:
private:
CbmDigiManager
*
fDigiMan
=
nullptr
;
//!
TClonesArray
*
fEvents
;
///< Input array (class CbmEvent)
Int_t
fNofEntries
;
///< Number of processed entries
CbmDigiManager
*
fDigiMan
=
nullptr
;
//!
std
::
vector
<
ECbmModuleId
>
fSystems
{};
// List of detector systems
TClonesArray
*
fEvents
;
///< Input array (class CbmEvent)
Int_t
fNofEntries
=
0
;
///< Number of processed entries
/** Task initialisation **/
virtual
InitStatus
Init
();
...
...
@@ -49,6 +50,8 @@ private:
**/
void
MatchEvent
(
CbmEvent
*
event
);
ECbmDataType
GetDigiType
(
ECbmModuleId
system
);
CbmBuildEventsQA
(
const
CbmBuildEventsQA
&
);
CbmBuildEventsQA
&
operator
=
(
const
CbmBuildEventsQA
&
);
...
...
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