Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Om
cbmroot
Commits
2d11c5b0
Commit
2d11c5b0
authored
4 years ago
by
Volker Friese
Browse files
Options
Downloads
Patches
Plain Diff
Restored primary vertex branch in event-based reconstruction. Refs #2096.
parent
5a3d5bfd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reco/global/CbmFindPrimaryVertex.cxx
+12
-4
12 additions, 4 deletions
reco/global/CbmFindPrimaryVertex.cxx
with
12 additions
and
4 deletions
reco/global/CbmFindPrimaryVertex.cxx
+
12
−
4
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
());
}
}
...
...
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