|
ATLAS Offline Software
|
Go to the documentation of this file.
23 unsigned int nbins = 3;
30 for (
unsigned int i = 0;
i <
nbins; ++
i) {
40 return StatusCode::SUCCESS;
49 std::set<const xAOD::MuonSegment*> matchedSegments;
52 bool missedSegment =
false;
53 for (
const auto seg : *truthSegments) {
54 int chIndex = seg->chamberIndex();
59 unsigned int index = 0;
60 if (seg->nPrecisionHits() < 3)
continue;
72 recoSegmentLinkAcc(
"recoSegmentLink");
76 matchedSegments.insert(*recoLink);
80 <<
" eta " << seg->etaIndex() <<
" nprec " << seg->nPrecisionHits() <<
" nphi " << seg->nPhiLayers()
81 <<
" nTrigEta " << seg->nTrigEtaLayers());
87 for (
const auto seg : *segments) {
88 if (matchedSegments.count(seg))
continue;
89 int chIndex = seg->chamberIndex();
95 unsigned int index = 0;
96 if (seg->nPrecisionHits() < 3)
continue;
101 <<
" eta " << seg->etaIndex() <<
" nprec " << seg->nPrecisionHits() <<
" nphi " << seg->nPhiLayers()
102 <<
" nTrigEta " << seg->nTrigEtaLayers());
107 return StatusCode::SUCCESS;
111 const std::vector<int>& truth)
const {
112 std::ostringstream sout;
113 unsigned int width = 9;
114 unsigned int precision = 3;
115 sout << std::endl <<
prefix;
117 sout << std::setw(
width) << std::setprecision(precision);
121 sout << static_cast<double>(
reco[
i]) /
static_cast<double>(truth[
i]);
127 sout << std::setw(
width) << std::setprecision(precision);
131 sout << static_cast<double>(truth[
i]);
136 const std::vector<int>&
reco)
const {
137 std::ostringstream sout;
138 unsigned int width = 9;
139 unsigned int precision = 3;
140 sout << std::endl <<
prefix;
142 sout << std::setw(
width) << std::setprecision(precision);
146 sout << static_cast<double>(
reco[
i]) /
static_cast<double>(
m_nevents);
153 std::string
outfile =
"muonPerformance_segments.txt";
155 std::ostringstream sout;
158 unsigned int width = 9;
159 sout <<
"Segment finding efficiencies barrel" << std::endl;
160 sout <<
" Chambers ";
161 std::string prefix_eff =
" Efficiency ";
162 std::string prefix_fake =
" Fake rate ";
165 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
169 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
174 sout <<
"Segment finding efficiencies endcaps" << std::endl;
175 sout <<
" Chambers ";
178 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
183 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
189 return StatusCode::SUCCESS;
static const std::string & chName(ChIndex index)
convert ChIndex into a string
const_pointer_type cptr()
Dereference the pointer.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Helper class to provide constant type-safe access to aux data.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Property holding a SG store/key/clid from which a ReadHandle is made.
bool isValid() const
Test to see if the link can be dereferenced.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
#define ATH_MSG_WARNING(x)
ChIndex
enum to classify the different chamber layers in the muon spectrometer
bool isPresent() const
Is the referenced object present in SG?
Helper class to provide constant type-safe access to aux data.
size_type size() const noexcept
Returns the number of elements in the collection.