 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 unsigned int nbins = 3;
36 return StatusCode::SUCCESS;
40 const EventContext& ctx{Gaudi::Hive::currentContext()};
45 if (!segments || !truthSegments) {
46 return StatusCode::SUCCESS;
48 std::set<const xAOD::MuonSegment*> matchedSegments;
51 bool missedSegment =
false;
52 for (
const auto seg : *truthSegments) {
54 if (
chIndex == ChIndex::ChUnknown ||
chIndex == ChIndex::ChIndexMax) {
57 unsigned int index = 0;
58 if (seg->nPrecisionHits() < 3)
continue;
67 recoSegmentLinkAcc(
"recoSegmentLink");
71 matchedSegments.insert(*recoLink);
75 <<
" eta " << seg->etaIndex() <<
" nprec " << seg->nPrecisionHits() <<
" nphi " << seg->nPhiLayers()
76 <<
" nTrigEta " << seg->nTrigEtaLayers());
82 for (
const auto seg : *segments) {
83 if (matchedSegments.count(seg))
continue;
85 if (
chIndex == ChIndex::ChUnknown ||
chIndex == ChIndex::ChIndexMax) {
90 unsigned int index = 0;
91 if (seg->nPrecisionHits() < 3)
continue;
96 <<
" eta " << seg->etaIndex() <<
" nprec " << seg->nPrecisionHits() <<
" nphi " << seg->nPhiLayers()
97 <<
" nTrigEta " << seg->nTrigEtaLayers());
102 return StatusCode::SUCCESS;
107 std::ostringstream sout;
108 unsigned int width = 9;
109 unsigned int precision = 3;
110 sout << std::endl <<
prefix;
112 sout << std::setw(
width) << std::setprecision(precision);
116 sout << static_cast<double>(
reco[
i]) /
static_cast<double>(truth[
i]);
122 sout << std::setw(
width) << std::setprecision(precision);
126 sout << static_cast<double>(truth[
i]);
132 std::ostringstream sout;
133 unsigned int width = 9;
134 unsigned int precision = 3;
135 sout << std::endl <<
prefix;
137 sout << std::setw(
width) << std::setprecision(precision);
141 sout << static_cast<double>(
reco[
i]) /
static_cast<double>(
m_nevents);
148 std::string
outfile =
"muonPerformance_segments.txt";
150 std::ostringstream sout;
153 unsigned int width = 9;
154 sout <<
"Segment finding efficiencies barrel" << std::endl;
155 sout <<
" Chambers ";
156 std::string prefix_eff =
" Efficiency ";
157 std::string prefix_fake =
" Fake rate ";
163 sout << std::setw(width) << chName(static_cast<ChIndex>(
i));
166 for (
unsigned int j = 0; j <
end; ++j) {
170 for (
unsigned int j = 0; j <
end; ++j) {
175 sout <<
"Segment finding efficiencies endcaps" << std::endl;
176 sout <<
" Chambers ";
179 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
184 for (
unsigned int j = 0; j <
m_nfound.size(); ++j) {
190 return StatusCode::SUCCESS;
Helper class to provide constant type-safe access to aux data.
bool isValid() const
Test to see if the link can be dereferenced.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
::StatusCode StatusCode
StatusCode definition for legacy code.
const std::string & chName(ChIndex index)
convert ChIndex into a string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink implementation for ROOT usage.
constexpr int toInt(const ParamDefs p)
#define ATH_MSG_WARNING(x)
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Helper class to provide constant type-safe access to aux data.