Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Qiunan Zhang
cbmroot
Commits
7d0d69b6
Commit
7d0d69b6
authored
Feb 08, 2021
by
Dominik Smith
Browse files
Started to implment detector types other than STS in CbmBuildEventsQA.
parent
a4734c3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
reco/eventbuilder/digis/CbmBuildEventsQA.cxx
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
)
reco/eventbuilder/digis/CbmBuildEventsQA.h
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
&
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment