Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
bae81989
Commit
bae81989
authored
Nov 02, 2020
by
Christian Grefe
Browse files
Better protection for float types in track summary and fix an issue with number of TRT dEdx hits
parent
329b1c9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h
View file @
bae81989
...
...
@@ -132,6 +132,10 @@ enum SummaryType {
numberOfTrackSummaryTypes
=
76
};
// summary types that are stored as float values
static
const
std
::
vector
<
unsigned
int
>
floatSummaryTypes
=
{
eProbabilityComb_res
,
eProbabilityHT_res
,
eProbabilityToT_res
,
eProbabilityBrem_res
,
pixeldEdx_res
,
eProbabilityNN_res
,
TRTTrackOccupancy_res
,
TRTdEdx_res
};
// Troels.Petersen@cern.ch:
enum
eProbabilityType
{
eProbabilityComb
=
0
,
//!< Electron probability from combining the below probabilities.
...
...
Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
View file @
bae81989
...
...
@@ -1067,9 +1067,8 @@ TrackParticleCreatorTool::TrackParticleCreatorTool(const std::string& t, const s
if
(
i
>=
Trk
::
numberOfMdtHits
&&
i
<=
Trk
::
numberOfRpcEtaHits
)
continue
;
if
(
i
==
Trk
::
numberOfCscUnspoiltEtaHits
)
continue
;
if
(
i
>=
Trk
::
numberOfCscEtaHoles
&&
i
<=
Trk
::
numberOfTgcPhiHoles
)
continue
;
if
(
i
>=
offset
&&
i
<
offset
+
Trk
::
numberOfeProbabilityTypes
+
1
){
continue
;
}
// skip values which are floats
if
(
std
::
find
(
floatSummaryTypes
.
begin
(),
floatSummaryTypes
.
end
(),
i
)
!=
floatSummaryTypes
.
end
()
)
continue
;
if
(
i
>=
Trk
::
numberOfStgcEtaHits
&&
i
<=
Trk
::
numberOfMmHoles
)
continue
;
// coverity[mixed_enums]
if
(
i
==
Trk
::
numberOfTRTHitsUsedFordEdx
)
continue
;
...
...
Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
View file @
bae81989
...
...
@@ -233,9 +233,9 @@ std::vector<float> eProbability = ITRT_ElectronPidTool::defaultElectronProbabili
information
[
numberOfTRTTubeHits
]
=
0
;
information
[
numberOfTRTSharedHits
]
=
0
;
// Troels.Petersen@cern.ch:
if
(
!
m_eProbabilityTool
.
empty
())
{
eProbability
=
m_eProbabilityTool
->
electronProbability
(
track
);
information
[
Trk
::
numberOfTRTHitsUsedFordEdx
]
=
static_cast
<
int
>
(
eProbability
[
Trk
::
eProbabilityNumberOfTRTHitsUsedFordEdx
]);
}
}
...
...
@@ -313,7 +313,6 @@ std::vector<float> eProbability = ITRT_ElectronPidTool::defaultElectronProbabili
searchHolesStepWise
(
track
,
information
,
doHolesInDet
,
doHolesMuon
);
}
information
[
Trk
::
numberOfTRTHitsUsedFordEdx
]
=
eProbability
[
Trk
::
eProbabilityNumberOfTRTHitsUsedFordEdx
];
ts
.
m_eProbability
=
eProbability
;
ts
.
m_idHitPattern
=
hitPattern
.
to_ulong
();
ts
.
m_dedx
=
dedx
;
...
...
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