20 MsgStream&
msg)
const {
21 bool debug =
msg.level() <= MSG::DEBUG;
29 <<
" has no known cabling correction" <<
endmsg;
30 return std::make_optional<Identifier>(
id);
35 NswZebraSet::const_iterator zebra_conn = correctionSet.find(channel);
36 if (zebra_conn == correctionSet.end()) {
38 msg << MSG::DEBUG <<
"The zebra connector associated to "
40 <<
" was mounted correctly -> no correction needed " <<
endmsg;
41 return std::make_optional<Identifier>(
id);
43 const int newChannel = channel + zebra_conn->shiftChannel;
44 if (newChannel < zebra_conn->firstChannel ||
45 newChannel > zebra_conn->lastChannel) {
47 msg << MSG::DEBUG <<
"The associated channel "
49 <<
" is shifted outside of the zebra connector range: "
50 << newChannel <<
". Mask the channel." <<
endmsg;
59 msg << MSG::DEBUG <<
"The input identifier "
62 return std::make_optional<Identifier>(std::move(newId));
70 msg << MSG::DEBUG <<
"The input identifier "
74 return std::make_optional<Identifier>(std::move(newId));
81 msg << MSG::ERROR <<
"Invalid zebra definition has been parsed for "
89 <<
" is already partially covered " << connector <<
endmsg;
92 msg << MSG::DEBUG <<
"Add new zebra connector " << connector <<
" to "
94 correctionSet.insert(connector);
std::set< NswZebraData, std::less<> > NswZebraSet
std::ostream & operator<<(std::ostream &ostr, const NswZebraData &connector)
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
int multilayer(const Identifier &id) const
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Nsw_CablingMap(const Muon::IMuonIdHelperSvc *svc)
const Muon::IMuonIdHelperSvc * m_idHelperSvc
bool addConnector(const Identifier &gapID, const NswZebraData &connector, MsgStream &msg)
std::optional< Identifier > correctChannel(const Identifier &id, MsgStream &msg) const
int multilayer(const Identifier &id) const
int channelType(const Identifier &id) const
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const