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
35b26f82
Commit
35b26f82
authored
2 years ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
In digi evt build task, re-add cleanly digi evt fill loop for TRD
parent
06cc7435
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1090
Enable mCBM 2022 real data L1 reco for CI
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
+27
-9
27 additions, 9 deletions
reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
reco/eventbuilder/digis/CbmTaskBuildRawEvents.h
+2
-0
2 additions, 0 deletions
reco/eventbuilder/digis/CbmTaskBuildRawEvents.h
with
29 additions
and
9 deletions
reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
+
27
−
9
View file @
35b26f82
...
...
@@ -140,11 +140,19 @@ InitStatus CbmTaskBuildRawEvents::Init()
fDigiEvents
=
new
std
::
vector
<
CbmDigiEvent
>
();
ioman
->
RegisterAny
(
"DigiEvent"
,
fDigiEvents
,
kTRUE
);
if
(
!
fDigiEvents
)
LOG
(
fatal
)
<<
"Output branch was not created"
;
LOG
(
info
)
<<
"DigiEvent out instead of CbmEvent, you will need an instance of CbmTaskMakeRecoEvents in reco macro"
;
if
(
fbExclusiveTrdExtraction
)
{
//
LOG
(
info
)
<<
"Exclusive TRD extraction, DigiEvents will be comparable to CbmEvents but slower"
;
}
else
{
LOG
(
info
)
<<
"Inclusive TRD extraction, faster but DigiEvents will noy be comparable to CbmEvents (extra digis)"
;
}
}
else
{
fEvents
=
new
TClonesArray
(
"CbmEvent"
,
100
);
ioman
->
Register
(
"CbmEvent"
,
"Cbm_Event"
,
fEvents
,
IsOutputBranchPersistent
(
"CbmEvent"
));
if
(
!
fEvents
)
LOG
(
fatal
)
<<
"Output branch was not created"
;
LOG
(
info
)
<<
"CbmEvent oupput, you will need an instance of CbmTaskEventsCloneInToOut in reco macro to update them"
;
}
// Set timeslice meta data
...
...
@@ -540,11 +548,6 @@ void CbmTaskBuildRawEvents::ExtractSelectedData(std::vector<CbmEvent*> vEvents)
selEvent
.
fTime
=
event
->
GetStartTime
();
selEvent
.
fNumber
=
event
->
GetNumber
();
/// FIXME: for pure digi based event, we select "continuous slices of digis"
/// => Copy block of [First Digi index, last digi index] with assign(it_start, it_stop)
/// FIXME: Keep TRD1D + TRD2D support, may lead to holes in the digi sequence!
/// => Would need to keep the loop
/// Get the proper order for block selection as TRD1D and TRD2D may insert indices in separate loops
/// => Needed to ensure that the start and stop of the block copy do not trigger a vector size exception
event
->
SortIndices
();
...
...
@@ -581,10 +584,25 @@ void CbmTaskBuildRawEvents::ExtractSelectedData(std::vector<CbmEvent*> vEvents)
/// ==> TRD + TRD2D
uNbDigis
=
(
0
<
event
->
GetNofData
(
ECbmDataType
::
kTrdDigi
)
?
event
->
GetNofData
(
ECbmDataType
::
kTrdDigi
)
:
0
);
if
(
0
<
uNbDigis
)
{
auto
startIt
=
fTrdDigis
->
begin
()
+
event
->
GetIndex
(
ECbmDataType
::
kTrdDigi
,
0
);
auto
stopIt
=
fTrdDigis
->
begin
()
+
event
->
GetIndex
(
ECbmDataType
::
kTrdDigi
,
uNbDigis
-
1
);
++
stopIt
;
selEvent
.
fData
.
fTrd
.
fDigis
.
assign
(
startIt
,
stopIt
);
if
(
fbExclusiveTrdExtraction
)
{
for
(
uint32_t
uDigiInEvt
=
0
;
uDigiInEvt
<
uNbDigis
;
++
uDigiInEvt
)
{
/// Copy each digi in the event by itself to make sure we skip ones outside their own selection window but
/// inside the selection window of the other TRD subsystem, effectively enforcing differetn windows:
/// [t, t+dt](TRD) = [t, t+dt](TRD1D) + [t, t+dt](TRD2D)
/// => Exclusive but slower
selEvent
.
fData
.
fTrd
.
fDigis
.
push_back
(
fTrdDigis
->
at
(
event
->
GetIndex
(
ECbmDataType
::
kTrdDigi
,
uDigiInEvt
)));
}
}
else
{
/// Block copy of all TRD digis, has feature that it may include digis which are not matching the selection
/// window of a given TRD subsystem, effectively making a larger selection window:
/// [t, t+dt](TRD) = [t, t+dt](TRD1D) U [t, t+dt](TRD2D)
/// => Faster but inclusive, will lead to more TRD hits and tracks than expected
auto
startIt
=
fTrdDigis
->
begin
()
+
event
->
GetIndex
(
ECbmDataType
::
kTrdDigi
,
0
);
auto
stopIt
=
fTrdDigis
->
begin
()
+
event
->
GetIndex
(
ECbmDataType
::
kTrdDigi
,
uNbDigis
-
1
);
++
stopIt
;
selEvent
.
fData
.
fTrd
.
fDigis
.
assign
(
startIt
,
stopIt
);
}
}
/// ==> TOF
...
...
This diff is collapsed.
Click to expand it.
reco/eventbuilder/digis/CbmTaskBuildRawEvents.h
+
2
−
0
View file @
35b26f82
...
...
@@ -139,6 +139,7 @@ public:
void
SetSeedTimeWindow
(
Double_t
beg
,
Double_t
end
)
{
fpAlgo
->
SetSeedTimeWindow
(
beg
,
end
);
}
void
SetDigiEventOutput
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbDigiEvtOut
=
bFlagIn
;
}
void
SetDigiEventExclusiveTrdExtraction
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbExclusiveTrdExtraction
=
bFlagIn
;
}
private
:
/** Read digis from input, call seed finder, then build events **/
...
...
@@ -191,6 +192,7 @@ private:
CbmAlgoBuildRawEvents
*
fpAlgo
=
nullptr
;
Bool_t
fbDigiEvtOut
=
kFALSE
;
Bool_t
fbExclusiveTrdExtraction
=
kFALSE
;
//! Enable/disabled loop based extraction of TRD digis due to 1D/2D
TClonesArray
*
fEvents
=
nullptr
;
//! output container of CbmEvents
std
::
vector
<
CbmDigiEvent
>*
fDigiEvents
=
nullptr
;
//! output container of CbmEvents
...
...
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