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
8034e539
Commit
8034e539
authored
1 year ago
by
Alexandru Bercuci
Committed by
Sergey Gorbunov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
add the basic functionality of track fitting for each measured point
parent
18b04a0f
Loading
Loading
1 merge request
!1702
reco QA task to monitor reconstruction using tracks.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/qa/CbmRecoQaTask.cxx
+64
-2
64 additions, 2 deletions
reco/qa/CbmRecoQaTask.cxx
reco/qa/CbmRecoQaTask.h
+5
-1
5 additions, 1 deletion
reco/qa/CbmRecoQaTask.h
with
69 additions
and
3 deletions
reco/qa/CbmRecoQaTask.cxx
+
64
−
2
View file @
8034e539
...
...
@@ -2,9 +2,14 @@
SPDX-License-Identifier: GPL-3.0-only
Authors: Alexandru Bercuci [committer] */
// CBM headers
#include
"CbmGlobalTrack.h"
#include
"CbmRecoQaTask.h"
// FAIR headers
#include
"FairRootManager.h"
// ROOT headers
#include
"TClonesArray.h"
//#include "TObject.h"
//_____________________________________________________________________
CbmRecoQaTask
::
CbmRecoQaTask
()
:
FairTask
(
"RecoQA"
,
0
)
...
...
@@ -30,12 +35,69 @@ InitStatus CbmRecoQaTask::Init()
return
kERROR
;
}
return
kSUCCESS
;
fGlobalTracks
=
static_cast
<
TClonesArray
*>
(
ioman
->
GetObject
(
"GlobalTrack"
));
if
(
!
fGlobalTracks
)
{
LOG
(
error
)
<<
"CbmRecoQaTask::Init: Global track array not found!"
;
return
kERROR
;
}
fGlobalTrackMatches
=
static_cast
<
TClonesArray
*>
(
ioman
->
GetObject
(
"GlobalTrackMatch"
));
if
(
!
fGlobalTrackMatches
)
{
LOG
(
warn
)
<<
"CbmRecoQaTask::Init: MC info for Global track not available !"
;
}
return
kSUCCESS
;
}
//_____________________________________________________________________
void
CbmRecoQaTask
::
Exec
(
Option_t
*
)
{
for
(
int
iTr
=
0
;
iTr
<
fGlobalTracks
->
GetEntriesFast
();
iTr
++
)
{
// if (static_cast<int>(fTracks.size()) >= fMaxNtracks) {
// break;
// }
const
CbmGlobalTrack
*
globalTrack
=
dynamic_cast
<
const
CbmGlobalTrack
*>
(
fGlobalTracks
->
At
(
iTr
));
if
(
!
globalTrack
)
{
LOG
(
fatal
)
<<
"RecoQA: null pointer to the global track!"
;
break
;
}
CbmKfTrackFitter
::
Track
trk
;
if
(
!
fFitter
.
CreateGlobalTrack
(
trk
,
*
globalTrack
))
{
LOG
(
fatal
)
<<
"RecoQA: can not create the global track for the fit! "
;
break
;
}
trk
.
fNodes
.
insert
(
trk
.
fNodes
.
begin
(),
CbmKfTrackFitter
::
FitNode
());
trk
.
fMsQp0
=
1.
/
0.5
;
trk
.
fIsMsQp0Set
=
true
;
// try first fit with all hits ON
trk
.
MakeConsistent
();
fFitter
.
FitTrack
(
trk
);
CbmKfTrackFitter
::
FitNode
&
node
=
trk
.
fNodes
.
front
();
printf
(
"val @ vx %f fit %f
\n
"
,
node
.
fMxy
.
X
()[
0
],
node
.
fTrack
.
X
()[
0
]);
for
(
auto
&
n
:
trk
.
fNodes
)
{
n
.
fIsTimeSet
=
false
;
n
.
fIsXySet
=
false
;
trk
.
MakeConsistent
();
fFitter
.
FitTrack
(
trk
);
double
dx
=
n
.
fMxy
.
X
()[
0
]
-
n
.
fTrack
.
X
()[
0
],
dy
=
n
.
fMxy
.
Y
()[
0
]
-
n
.
fTrack
.
Y
()[
0
],
pullx
=
dx
/
sqrt
(
n
.
fMxy
.
Dx2
()[
0
]
+
n
.
fTrack
.
GetCovariance
(
0
,
0
)[
0
]),
pully
=
dy
/
sqrt
(
n
.
fMxy
.
Dy2
()[
0
]
+
n
.
fTrack
.
GetCovariance
(
1
,
1
)[
0
]);
}
// //if (t.fNstsHits < 1) continue;
// //if (t.fNtrdHits < 2) continue;
// if (t.fNstsHits + t.fNmuchHits + t.fNtrd1dHits + t.fNtrd2dHits + t.fNtofHits < fNtrackingStations - 1) continue;
// //if (t.fNtrdHits < 3) continue;
// if (t.fNstsHits < 2) continue;
// if (t.fNtofHits < 2) continue;
//
fFitter
.
FitTrack
(
trk
);
fTracks
.
push_back
(
trk
);
}
}
//_____________________________________________________________________
...
...
This diff is collapsed.
Click to expand it.
reco/qa/CbmRecoQaTask.h
+
5
−
1
View file @
8034e539
...
...
@@ -8,8 +8,9 @@
#include
"FairTask.h"
#include
"CbmKfTrackFitter.h"
#include
<vector>
class
TClonesArray
;
class
CbmRecoQaTask
:
public
FairTask
{
public:
CbmRecoQaTask
();
...
...
@@ -27,7 +28,10 @@ private:
CbmRecoQaTask
&
operator
=
(
const
CbmRecoQaTask
&
);
CbmKfTrackFitter
fFitter
;
TClonesArray
*
fGlobalTracks
=
nullptr
;
//! reconstructed global tracks / event
TClonesArray
*
fGlobalTrackMatches
=
nullptr
;
//! MC info for the global tracks
std
::
vector
<
CbmKfTrackFitter
::
Track
>
fTracks
;
ClassDef
(
CbmRecoQaTask
,
1
);
};
...
...
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