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
a174d25e
Commit
a174d25e
authored
Nov 03, 2020
by
Christian Grefe
Browse files
Avoid circular package dependencies
parent
0e813ec8
Changes
6
Hide whitespace changes
Inline
Side-by-side
InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
View file @
a174d25e
...
...
@@ -135,7 +135,7 @@ StatusCode InDet::TRT_ElectronPidToolRun2::finalize()
std
::
vector
<
float
>
InDet
::
TRT_ElectronPidToolRun2
::
electronProbability_old
(
const
Trk
::
Track
&
track
)
{
// Simply return values without calculation
std
::
vector
<
float
>
PIDvalues
=
defaultElectron
Probability
()
;
std
::
vector
<
float
>
PIDvalues
=
Trk
::
e
Probability
Default
;
const
Trk
::
TrackParameters
*
perigee
=
track
.
perigeeParameters
();
if
(
!
perigee
)
{
return
PIDvalues
;
}
return
PIDvalues
;
...
...
@@ -167,7 +167,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con
}
// Initialize the vector with default PID values
std
::
vector
<
float
>
PIDvalues
=
defaultElectron
Probability
()
;
std
::
vector
<
float
>
PIDvalues
=
Trk
::
e
Probability
Default
;
// Check for perigee:
const
Trk
::
TrackParameters
*
perigee
=
track
.
perigeeParameters
();
...
...
Tracking/TrkEvent/TrkTrackSummary/CMakeLists.txt
View file @
a174d25e
...
...
@@ -7,7 +7,7 @@ atlas_subdir( TrkTrackSummary )
atlas_add_library
(
TrkTrackSummary
src/*.cxx
PUBLIC_HEADERS TrkTrackSummary
LINK_LIBRARIES Identifier
TrkToolInterfaces
LINK_LIBRARIES Identifier
PRIVATE_LINK_LIBRARIES GaudiKernel
)
atlas_add_dictionary
(
TrkTrackSummaryDict
...
...
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h
View file @
a174d25e
...
...
@@ -149,6 +149,8 @@ static const std::vector<unsigned int> floatSummaryTypes = {eProbabilityComb_res
numberOfeProbabilityTypes
=
8
};
static
const
std
::
vector
<
float
>
eProbabilityDefault
(
numberOfeProbabilityTypes
,
0.5
);
/** enumerates the various detector types currently accessible from the isHit() method.
\todo work out how to add muons to this*/
enum
DetectorType
{
...
...
Tracking/TrkEvent/TrkTrackSummary/src/TrackSummary.cxx
View file @
a174d25e
...
...
@@ -11,7 +11,6 @@
#include "TrkTrackSummary/TrackSummary.h"
#include "TrkTrackSummary/InDetTrackSummary.h"
#include "TrkTrackSummary/MuonTrackSummary.h"
#include "TrkToolInterfaces/ITRT_ElectronPidTool.h"
#include "GaudiKernel/MsgStream.h"
std
::
atomic
<
unsigned
int
>
Trk
::
TrackSummary
::
s_numberOfInstantiations
{
0
};
...
...
@@ -20,7 +19,7 @@ const int Trk::TrackSummary::SummaryTypeNotSet=-1;
Trk
::
TrackSummary
::
TrackSummary
()
:
m_information
(
numberOfTrackSummaryTypes
,
SummaryTypeNotSet
),
m_eProbability
(
ITRT_ElectronPidTool
::
defaultElectron
Probability
()
),
m_eProbability
(
Trk
::
e
Probability
Default
),
m_dedx
(
-
1
),
m_nhitsdedx
(
-
1
),
m_nhitsoverflowdedx
(
-
1
),
...
...
@@ -106,7 +105,7 @@ Trk::TrackSummary& Trk::TrackSummary::operator+=(const TrackSummary& ts)
}
m_information
[
i
]
+=
ts
.
m_information
[
i
];
}
if
(
ts
.
m_eProbability
!=
ITRT_ElectronPidTool
::
defaultElectron
Probability
()
)
{
if
(
ts
.
m_eProbability
!=
Trk
::
e
Probability
Default
)
{
m_eProbability
=
ts
.
m_eProbability
;
}
if
(
m_dedx
<
0
&&
ts
.
m_dedx
>=
0
)
{
...
...
Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITRT_ElectronPidTool.h
View file @
a174d25e
...
...
@@ -45,19 +45,6 @@ namespace Trk {
virtual
double
probHT
(
const
double
p
,
const
Trk
::
ParticleHypothesis
hypothesis
,
const
int
HitPart
,
const
int
Layer
,
const
int
Strawlayer
)
const
=
0
;
virtual
double
probHTRun2
(
float
pTrk
,
Trk
::
ParticleHypothesis
hypothesis
,
int
TrtPart
,
int
GasType
,
int
StrawLayer
,
float
ZR
,
float
rTrkWire
,
float
Occupancy
)
const
=
0
;
static
std
::
vector
<
float
>
defaultElectronProbability
()
{
std
::
vector
<
float
>
PIDvalues
(
Trk
::
numberOfeProbabilityTypes
);
PIDvalues
[
Trk
::
eProbabilityComb
]
=
0.5
;
PIDvalues
[
Trk
::
eProbabilityHT
]
=
0.5
;
PIDvalues
[
Trk
::
eProbabilityToT
]
=
0.5
;
PIDvalues
[
Trk
::
eProbabilityBrem
]
=
0.5
;
PIDvalues
[
Trk
::
eProbabilityNN
]
=
0.5
;
PIDvalues
[
Trk
::
TRTTrackOccupancy
]
=
0.0
;
PIDvalues
[
Trk
::
TRTdEdx
]
=
0.0
;
PIDvalues
[
Trk
::
eProbabilityNumberOfTRTHitsUsedFordEdx
]
=
0.0
;
return
PIDvalues
;
}
};
inline
const
InterfaceID
&
Trk
::
ITRT_ElectronPidTool
::
interfaceID
()
...
...
Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
View file @
a174d25e
...
...
@@ -192,7 +192,7 @@ information.resize(std::min(information.size(),
static_cast
<
size_t
>
(
numberOfTrackSummaryTypes
)));
// Troels.Petersen@cern.ch:
std
::
vector
<
float
>
eProbability
=
ITRT_ElectronPidTool
::
defaultElectron
Probability
()
;
std
::
vector
<
float
>
eProbability
=
Trk
::
e
Probability
Default
;
float
dedx
=
-
1
;
int
nhitsuseddedx
=
-
1
;
...
...
@@ -339,7 +339,7 @@ void Trk::TrackSummaryTool::updateSharedHitCount(const Track& track, const Trk::
void
Trk
::
TrackSummaryTool
::
updateAdditionalInfo
(
const
Track
&
track
,
TrackSummary
&
summary
,
bool
initialise_to_zero
)
const
{
std
::
vector
<
float
>
eProbability
=
ITRT_ElectronPidTool
::
defaultElectron
Probability
()
;
std
::
vector
<
float
>
eProbability
=
Trk
::
e
Probability
Default
;
if
(
!
m_eProbabilityTool
.
empty
())
{
eProbability
=
m_eProbabilityTool
->
electronProbability
(
track
);
int
nHits
=
eProbability
[
Trk
::
eProbabilityNumberOfTRTHitsUsedFordEdx
];
...
...
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