Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan de Cuveland
cbmroot
Commits
2d11c5b0
Commit
2d11c5b0
authored
Apr 29, 2021
by
Volker Friese
Browse files
Restored primary vertex branch in event-based reconstruction. Refs #2096.
parent
5a3d5bfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
reco/global/CbmFindPrimaryVertex.cxx
reco/global/CbmFindPrimaryVertex.cxx
+12
-4
No files found.
reco/global/CbmFindPrimaryVertex.cxx
View file @
2d11c5b0
...
...
@@ -107,10 +107,14 @@ InitStatus CbmFindPrimaryVertex::Init()
}
// Create and register CbmVertex object
if
(
!
fEvents
)
{
fPrimVert
=
new
CbmVertex
(
"Primary Vertex"
,
"Global"
);
ioman
->
Register
(
"PrimaryVertex."
,
"Global"
,
fPrimVert
,
IsOutputBranchPersistent
(
"PrimaryVertex"
));
}
// if (!fEvents) {
// TODO: This is here for legacy, since many analysis tasks use the vertex branch instead
// of retrieving the vertex from the event object. It shall be removed after the all analysis tasks
// are adjusted. Neither in event-based nor in time-based reconstruction a branch with a single
// vertex object makes sense.
fPrimVert
=
new
CbmVertex
(
"Primary Vertex"
,
"Global"
);
ioman
->
Register
(
"PrimaryVertex."
,
"Global"
,
fPrimVert
,
IsOutputBranchPersistent
(
"PrimaryVertex"
));
// }
// Call the Init method of the vertex finder
fFinder
->
Init
();
...
...
@@ -142,6 +146,7 @@ void CbmFindPrimaryVertex::Exec(Option_t*)
// Event-based mode
else
{
fPrimVert
->
Reset
();
// TODO: Legacy
nEvents
=
fEvents
->
GetEntriesFast
();
for
(
Int_t
iEvent
=
0
;
iEvent
<
nEvents
;
iEvent
++
)
{
CbmEvent
*
event
=
dynamic_cast
<
CbmEvent
*>
(
fEvents
->
At
(
iEvent
));
...
...
@@ -149,6 +154,9 @@ void CbmFindPrimaryVertex::Exec(Option_t*)
result
=
fFinder
->
FindEventVertex
(
event
,
fTracks
);
LOG
(
debug
)
<<
GetName
()
<<
": Event "
<<
iEvent
<<
" "
<<
event
->
GetVertex
()
->
ToString
();
nTracksUsed
+=
result
;
// Legacy: copy event vertex object to event branch
if
(
iEvent
==
0
)
*
fPrimVert
=
*
(
event
->
GetVertex
());
}
}
...
...
Write
Preview
Markdown
is supported
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