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
a837de70
Commit
a837de70
authored
2 years ago
by
Sergey Gorbunov
Committed by
Volker Friese
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
KF: cosmetic changes in CbmKFParticleFinderPID
parent
d404c622
No related branches found
No related tags found
1 merge request
!1066
KF: fixes in KFParticleFinder according to the new TOF geometry
Pipeline
#20883
passed
2 years ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/KF/CbmKFParticleFinderPID.cxx
+11
-15
11 additions, 15 deletions
reco/KF/CbmKFParticleFinderPID.cxx
reco/KF/CbmKFParticleFinderPID.h
+1
-1
1 addition, 1 deletion
reco/KF/CbmKFParticleFinderPID.h
with
12 additions
and
16 deletions
reco/KF/CbmKFParticleFinderPID.cxx
+
11
−
15
View file @
a837de70
...
@@ -79,7 +79,7 @@ CbmKFParticleFinderPID::CbmKFParticleFinderPID(const char* name, Int_t iVerbose)
...
@@ -79,7 +79,7 @@ CbmKFParticleFinderPID::CbmKFParticleFinderPID(const char* name, Int_t iVerbose)
,
fMuchMode
(
0
)
,
fMuchMode
(
0
)
,
fUseSTSdEdX
(
kFALSE
)
,
fUseSTSdEdX
(
kFALSE
)
,
fUseTRDdEdX
(
kFALSE
)
,
fUseTRDdEdX
(
kFALSE
)
,
f
TimeSlice
Mode
(
0
)
,
f
LegacyEvent
Mode
(
0
)
,
fPID
(
0
)
,
fPID
(
0
)
{
{
//MuCh cuts
//MuCh cuts
...
@@ -104,9 +104,9 @@ InitStatus CbmKFParticleFinderPID::Init()
...
@@ -104,9 +104,9 @@ InitStatus CbmKFParticleFinderPID::Init()
}
}
//check the mode
//check the mode
f
TimeSlice
Mode
=
0
;
f
LegacyEvent
Mode
=
1
;
if
(
ioman
->
CheckBranch
(
"CbmEvent"
))
{
if
(
ioman
->
CheckBranch
(
"CbmEvent"
))
{
f
TimeSlice
Mode
=
1
;
f
LegacyEvent
Mode
=
0
;
LOG
(
info
)
<<
GetName
()
<<
": Running in the timeslice mode."
;
LOG
(
info
)
<<
GetName
()
<<
": Running in the timeslice mode."
;
}
}
else
else
...
@@ -122,16 +122,12 @@ InitStatus CbmKFParticleFinderPID::Init()
...
@@ -122,16 +122,12 @@ InitStatus CbmKFParticleFinderPID::Init()
CbmMCDataManager
*
mcManager
=
0
;
CbmMCDataManager
*
mcManager
=
0
;
if
(
fTimeSliceMode
)
mcManager
=
(
CbmMCDataManager
*
)
fManger
->
GetObject
(
"MCDataManager"
);
if
(
!
fLegacyEventMode
)
{
mcManager
=
(
CbmMCDataManager
*
)
fManger
->
GetObject
(
"MCDataManager"
);
if
(
fTimeSliceMode
)
{
if
(
mcManager
==
0
)
{
if
(
mcManager
==
0
)
{
Fatal
(
"CbmKFParticleFinderPID::Init"
,
"MC Data Manager is not found!"
);
Fatal
(
"CbmKFParticleFinderPID::Init"
,
"MC Data Manager is not found!"
);
return
kERROR
;
return
kERROR
;
}
}
}
if
(
fTimeSliceMode
)
{
fMCTracks
=
mcManager
->
InitBranch
(
"MCTrack"
);
fMCTracks
=
mcManager
->
InitBranch
(
"MCTrack"
);
if
(
fMCTracks
==
0
)
{
if
(
fMCTracks
==
0
)
{
Fatal
(
"CbmKFParticleFinderPID::Init"
,
"MC track array not found!"
);
Fatal
(
"CbmKFParticleFinderPID::Init"
,
"MC track array not found!"
);
...
@@ -255,7 +251,7 @@ void CbmKFParticleFinderPID::SetMCPID()
...
@@ -255,7 +251,7 @@ void CbmKFParticleFinderPID::SetMCPID()
{
{
Int_t
nTracks
=
fTrackArray
->
GetEntriesFast
();
Int_t
nTracks
=
fTrackArray
->
GetEntriesFast
();
Int_t
nMCTracks
=
0
;
Int_t
nMCTracks
=
0
;
if
(
!
fTimeSlice
Mode
)
nMCTracks
=
fMCTrackArray
->
GetEntriesFast
();
if
(
fLegacyEvent
Mode
)
nMCTracks
=
fMCTrackArray
->
GetEntriesFast
();
for
(
int
iTr
=
0
;
iTr
<
nTracks
;
iTr
++
)
{
for
(
int
iTr
=
0
;
iTr
<
nTracks
;
iTr
++
)
{
fPID
[
iTr
]
=
-
2
;
fPID
[
iTr
]
=
-
2
;
...
@@ -273,7 +269,7 @@ void CbmKFParticleFinderPID::SetMCPID()
...
@@ -273,7 +269,7 @@ void CbmKFParticleFinderPID::SetMCPID()
if
(
stsTrackMatch
->
GetLink
(
iLink
).
GetWeight
()
>
bestWeight
)
{
if
(
stsTrackMatch
->
GetLink
(
iLink
).
GetWeight
()
>
bestWeight
)
{
bestWeight
=
stsTrackMatch
->
GetLink
(
iLink
).
GetWeight
();
bestWeight
=
stsTrackMatch
->
GetLink
(
iLink
).
GetWeight
();
mcTrackId
=
stsTrackMatch
->
GetLink
(
iLink
).
GetIndex
();
mcTrackId
=
stsTrackMatch
->
GetLink
(
iLink
).
GetIndex
();
if
(
fTimeSlice
Mode
)
{
if
(
!
fLegacyEvent
Mode
)
{
iFile
=
stsTrackMatch
->
GetLink
(
iLink
).
GetFile
();
iFile
=
stsTrackMatch
->
GetLink
(
iLink
).
GetFile
();
iEvent
=
stsTrackMatch
->
GetLink
(
iLink
).
GetEntry
();
iEvent
=
stsTrackMatch
->
GetLink
(
iLink
).
GetEntry
();
}
}
...
@@ -281,7 +277,7 @@ void CbmKFParticleFinderPID::SetMCPID()
...
@@ -281,7 +277,7 @@ void CbmKFParticleFinderPID::SetMCPID()
}
}
if
(
bestWeight
/
totalWeight
<
0.7
)
continue
;
if
(
bestWeight
/
totalWeight
<
0.7
)
continue
;
if
((
!
fTimeSlice
Mode
)
&&
(
mcTrackId
>=
nMCTracks
||
mcTrackId
<
0
))
continue
;
if
((
fLegacyEvent
Mode
)
&&
(
mcTrackId
>=
nMCTracks
||
mcTrackId
<
0
))
continue
;
// if(mcTrackId >= nMCTracks || mcTrackId < 0)
// if(mcTrackId >= nMCTracks || mcTrackId < 0)
// {
// {
// LOG(info) << "Sts Matching is wrong! StsTrackId = " << mcTrackId << " N mc tracks = " << nMCTracks;
// LOG(info) << "Sts Matching is wrong! StsTrackId = " << mcTrackId << " N mc tracks = " << nMCTracks;
...
@@ -293,10 +289,10 @@ void CbmKFParticleFinderPID::SetMCPID()
...
@@ -293,10 +289,10 @@ void CbmKFParticleFinderPID::SetMCPID()
CbmMCTrack
*
cbmMCTrack
=
0
;
CbmMCTrack
*
cbmMCTrack
=
0
;
if
(
fTimeSlice
Mode
)
cbmMCTrack
=
dynamic_cast
<
CbmMCTrack
*>
(
fMCTracks
->
Get
(
iFile
,
iEvent
,
mcTrackId
));
if
(
!
fLegacyEvent
Mode
)
{
cbmMCTrack
=
dynamic_cast
<
CbmMCTrack
*>
(
fMCTracks
->
Get
(
iFile
,
iEvent
,
mcTrackId
));
}
else
else
{
cbmMCTrack
=
(
CbmMCTrack
*
)
fMCTrackArray
->
At
(
mcTrackId
);
cbmMCTrack
=
(
CbmMCTrack
*
)
fMCTrackArray
->
At
(
mcTrackId
);
}
if
(
!
(
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
11
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
13
if
(
!
(
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
11
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
13
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
211
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
321
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
211
||
TMath
::
Abs
(
cbmMCTrack
->
GetPdgCode
())
==
321
...
...
This diff is collapsed.
Click to expand it.
reco/KF/CbmKFParticleFinderPID.h
+
1
−
1
View file @
a837de70
...
@@ -125,7 +125,7 @@ private:
...
@@ -125,7 +125,7 @@ private:
Bool_t
fUseSTSdEdX
;
Bool_t
fUseSTSdEdX
;
Bool_t
fUseTRDdEdX
;
Bool_t
fUseTRDdEdX
;
bool
f
TimeSlice
Mode
;
bool
f
LegacyEvent
Mode
;
//MuCh cuts
//MuCh cuts
float
fMuchCutsFloat
[
2
];
float
fMuchCutsFloat
[
2
];
...
...
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