ATLAS Offline Software
MuonSpectrometer
MuonValidation
MuonDQA
MuonTrackMonitoring
src
RecoMuonSegmentPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonTrackMonitoring/RecoMuonSegmentPlots.h
"
6
7
RecoMuonSegmentPlots::RecoMuonSegmentPlots
(
PlotBase
* pParent,
const
std::string&
sDir
,
bool
detail
):
PlotBase
(pParent,
sDir
)
8
, m_oMuonSegmentPlots(nullptr)
9
, m_oMuonSegmentSlimPlots(nullptr)
10
//declare the histograms
11
{
12
Detail
=
detail
;
13
if
(
Detail
)
m_oMuonSegmentPlots
=
new
Muon::MuonSegmentPlots
(
this
,
"/"
);
14
else
m_oMuonSegmentSlimPlots
=
new
Muon::MuonSegmentSlimPlots
(
this
,
"/"
);
15
}
16
17
//when the plot function called with a Muon Container
18
//loop through each muon, get the corresponding link and fill it
19
void
RecoMuonSegmentPlots::fill
(
const
xAOD::MuonContainer
& muContainer){
20
for
(
const
auto
mu
: muContainer) {
21
fill
(*
mu
);
22
}
23
}
24
25
//when the plot function called with a Muon
26
//get's the corresponding link and fill it
27
//Tony 2015.9.21: fix to go around the segment link problem for now
28
void
RecoMuonSegmentPlots::fill
(
const
xAOD::Muon
&
mu
){
29
const
std::vector<ElementLink<DataVector<xAOD::MuonSegment_v1>>>& Mu_Segments =
mu
.muonSegmentLinks();
30
fill
(Mu_Segments);
31
}
32
33
//use the link to fill
34
void
RecoMuonSegmentPlots::fill
(
const
std::vector<
ElementLink
<
DataVector<xAOD::MuonSegment_v1>
>>& Mu_Segments){
35
36
for
(
const
auto
& Mu_Segment : Mu_Segments){
37
const
ElementLink<DataVector<xAOD::MuonSegment_v1>
> Mu_seg = Mu_Segment;
38
if
(Mu_seg.
isValid
()){
39
const
xAOD::MuonSegment
* seg = *Mu_seg;
40
fill
(*seg);
41
}
42
}
43
}
44
45
46
void
RecoMuonSegmentPlots::fill
(
const
xAOD::MuonSegment
& muonSeg) {
47
//General Plots
48
if
(
Detail
)
m_oMuonSegmentPlots
->
fill
(muonSeg);
49
else
m_oMuonSegmentSlimPlots
->
fill
(muonSeg);
50
}
51
52
void
RecoMuonSegmentPlots::initializePlots
()
53
{
54
//initialize temp plots
55
}
56
RecoMuonSegmentPlots::fill
void fill(const xAOD::MuonContainer &muContainer)
Definition:
RecoMuonSegmentPlots.cxx:19
PlotBase
Definition:
PlotBase.h:34
RecoMuonSegmentPlots::Detail
bool Detail
Definition:
RecoMuonSegmentPlots.h:36
python.copyTCTOutput.sDir
sDir
Definition:
copyTCTOutput.py:60
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition:
MuonSegment_v1.h:33
detail
Definition:
extract_histogram_tag.cxx:14
ElementLink::isValid
bool isValid() const
Test to see if the link can be dereferenced.
xAOD::Muon_v1
Class describing a Muon.
Definition:
Muon_v1.h:38
RecoMuonSegmentPlots::m_oMuonSegmentSlimPlots
Muon::MuonSegmentSlimPlots * m_oMuonSegmentSlimPlots
Definition:
RecoMuonSegmentPlots.h:33
RecoMuonSegmentPlots::m_oMuonSegmentPlots
Muon::MuonSegmentPlots * m_oMuonSegmentPlots
Definition:
RecoMuonSegmentPlots.h:32
RecoMuonSegmentPlots.h
RecoMuonSegmentPlots::initializePlots
void initializePlots()
Definition:
RecoMuonSegmentPlots.cxx:52
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
ElementLink
ElementLink implementation for ROOT usage.
Definition:
AthLinks/ElementLink.h:123
Muon::MuonSegmentSlimPlots
Definition:
MuonSegmentSlimPlots.h:18
Muon::MuonSegmentPlots
Definition:
MuonSegmentPlots.h:18
RecoMuonSegmentPlots::RecoMuonSegmentPlots
RecoMuonSegmentPlots(PlotBase *pParent, const std::string &sDir, bool detail=false)
Definition:
RecoMuonSegmentPlots.cxx:7
Muon::MuonSegmentSlimPlots::fill
void fill(const xAOD::MuonSegment &muonSeg, float weight=1.0)
Definition:
MuonSegmentSlimPlots.cxx:63
Muon::MuonSegmentPlots::fill
void fill(const xAOD::MuonSegment &muonSeg, float weight=1.0)
Definition:
MuonSegmentPlots.cxx:76
CaloNoise_fillDB.mu
mu
Definition:
CaloNoise_fillDB.py:53
Generated on Fri Jan 10 2025 21:16:37 for ATLAS Offline Software by
1.8.18