ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkValidation
TrkValHistUtils
Root
MSHitPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkValHistUtils/MSHitPlots.h
"
6
#include "
xAODTracking/TrackingPrimitives.h
"
7
#include "
AthContainers/ConstAccessor.h
"
8
9
namespace
Trk
{
10
MSHitPlots::MSHitPlots
(
PlotBase
*pParent,
const
std::string& sDir) :
11
PlotBase
(pParent, sDir),
12
nprecLayers
(this,
"nprecLayers"
,
"Precision Layers"
, 0, 10),
13
nphiLayers
(this,
"nphiLayers"
,
"Phi Layers"
, 0, 10),
14
ntrigEtaLayers
(this,
"ntrigEtaLayers"
,
"Eta Trigger Layers"
, 0, 10) {
15
}
16
17
void
18
MSHitPlots::fill
(
const
xAOD::TrackParticle
&trkprt,
float
weight) {
19
fillPlot
(
nprecLayers
,
xAOD::numberOfPrecisionLayers
, trkprt, weight);
20
fillPlot
(
nphiLayers
,
xAOD::numberOfPhiLayers
, trkprt, weight);
21
fillPlot
(
ntrigEtaLayers
,
xAOD::numberOfTriggerEtaLayers
, trkprt, weight);
22
}
23
24
void
25
MSHitPlots::fill
(
const
xAOD::TruthParticle
&truthprt,
float
weight) {
26
fillPlot
(
nprecLayers
,
"nprecLayers"
, truthprt, weight);
27
fillPlot
(
nphiLayers
,
"nphiLayers"
, truthprt, weight);
28
fillPlot
(
ntrigEtaLayers
,
"ntrigEtaLayers"
, truthprt, weight);
29
}
30
31
void
32
MSHitPlots::fillPlot
(
HitTypePlots
&hitPlots,
xAOD::SummaryType
info,
const
xAOD::TrackParticle
&trkprt,
float
weight) {
33
uint8_t hitval = 0;
34
35
if
(!trkprt.
summaryValue
(hitval, info)) {
36
return
;
37
}
38
hitPlots.
fill
(hitval, trkprt.
eta
(), trkprt.
phi
(), weight);
39
}
40
41
void
42
MSHitPlots::fillPlot
(
HitTypePlots
&hitPlots,
const
std::string &sInfo,
const
xAOD::TruthParticle
&truthprt,
float
weight) {
43
SG::ConstAccessor<uint8_t>
infoAcc (sInfo);
44
if
(!infoAcc.
isAvailable
(truthprt)) {
45
return
;
46
}
47
hitPlots.
fill
(infoAcc(truthprt), truthprt.
eta
(), truthprt.
phi
(), weight);
48
}
49
}
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
MSHitPlots.h
TrackingPrimitives.h
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Trk::HitTypePlots
Definition
HitTypePlots.h:12
Trk::HitTypePlots::fill
void fill(int iHits, float fEta, float fPhi, float weight=1.0)
Definition
HitTypePlots.cxx:32
Trk::MSHitPlots::nprecLayers
Trk::HitTypePlots nprecLayers
Definition
MSHitPlots.h:24
Trk::MSHitPlots::fillPlot
static void fillPlot(HitTypePlots &hitPlots, const std::string &sInfo, const xAOD::TruthParticle &truthprt, float weight=1.0)
Definition
MSHitPlots.cxx:42
Trk::MSHitPlots::fill
void fill(const xAOD::TrackParticle &trkprt, float weight=1.0)
Definition
MSHitPlots.cxx:18
Trk::MSHitPlots::nphiLayers
Trk::HitTypePlots nphiLayers
Definition
MSHitPlots.h:25
Trk::MSHitPlots::MSHitPlots
MSHitPlots(PlotBase *pParent, const std::string &sDir)
Definition
MSHitPlots.cxx:10
Trk::MSHitPlots::ntrigEtaLayers
Trk::HitTypePlots ntrigEtaLayers
Definition
MSHitPlots.h:26
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition
TrackParticle_v1.cxx:688
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
TrackParticle_v1.cxx:79
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
TruthParticle_v1.cxx:169
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition
TruthParticle_v1.cxx:176
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
xAOD::SummaryType
SummaryType
Enumerates the different types of information stored in Summary.
Definition
TrackingPrimitives.h:229
xAOD::numberOfPrecisionLayers
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
Definition
TrackingPrimitives.h:294
xAOD::numberOfTriggerEtaLayers
@ numberOfTriggerEtaLayers
layers with trigger eta hits [unit8_t].
Definition
TrackingPrimitives.h:298
xAOD::numberOfPhiLayers
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
Definition
TrackingPrimitives.h:296
Generated on
for ATLAS Offline Software by
1.17.0