5#ifndef MUON_MUONTRACKSTEERINGSTRATEGY_H
6#define MUON_MUONTRACKSTEERINGSTRATEGY_H
13#include "GaudiKernel/MsgStream.h"
32 std::vector<std::vector<MuonStationIndex::ChIndex> >& path, std::vector<unsigned int>& seedOrder) :
37 std::vector<std::vector<MuonStationIndex::ChIndex> >& path) :
39 for (
unsigned int i = 0; i <
Last; ++i)
m_bits.set(i, 0);
40 for (
unsigned int i = 0; i < options.size(); ++i)
setOption(options[i],
true);
44 std::vector<std::vector<MuonStationIndex::ChIndex> >& path, std::vector<unsigned int>& seedOrder) :
46 for (
unsigned int i = 0; i <
Last; ++i)
m_bits.set(i, 0);
47 for (
unsigned int i = 0; i < options.size(); ++i)
setOption(options[i],
true);
51 void setOption(
const std::string&,
bool value);
56 void setCh(
const std::vector<MuonStationIndex::ChIndex>& val,
const unsigned int layer);
57 void setCh(
const std::vector<std::vector<MuonStationIndex::ChIndex> >& val) {
m_path = val; }
60 const std::vector<std::vector<MuonStationIndex::ChIndex> >&
getAll()
const {
return m_path; }
61 const std::vector<MuonStationIndex::ChIndex>&
getCh(
const unsigned int)
const;
73 std::vector<std::vector<MuonStationIndex::ChIndex> >
m_path;
79 if (opt ==
"CutSeedsOnTracks")
81 else if (opt ==
"CombineSegInStation")
83 else if (opt ==
"DynamicSeeding")
85 else if (opt ==
"PreferOutsideIn")
87 else if (opt ==
"AllowOneSharedHit")
89 else if (opt ==
"DoRefinement")
91 else if (opt ==
"DoAmbiSolving")
93 else if (opt ==
"BarrelEndcapFilter")
97 std::vector<unsigned int>
seeds;
99 for (
unsigned int i = 0; i < opt.size() && success; ++i) {
100 int holder = int(opt[i]) - 48;
101 if (holder < 0 || holder > 9)
104 seeds.push_back(holder);
111 if (opt ==
Last)
return;
116 if (layer <
m_path.size())
125 if (layer >=
m_path.size()) {
126 throw std::range_error(
"MuonTrackSteering a path beyond the possible paths is chosen");
132 return m_bits[
static_cast<unsigned int>(op)];
136 sl <<
"MuonTrackSteeringStrategy " << mtss.
getName() <<
" with options: " << mtss.
allOptions() <<
" with seeds";
137 if (mtss.
seeds().size()) {
138 for (
unsigned int i = 0; i < mtss.
seeds().size(); ++i) { sl <<
" " << mtss.
seeds()[i]; }
141 sl <<
" and chambers are: " << std::endl;
142 for (
unsigned int i = 0; i < mtss.
getAll().size(); ++i) {
143 sl <<
"\t Step " << i <<
" : ( ";
144 for (
unsigned int j = 0; j < mtss.
getCh(i).size() - 1; ++j) {
147 if (mtss.
getCh(i).size()) {
150 sl <<
" ) " << std::endl;
156 sl <<
"MuonTrackSteeringStrategy " << mtss.
getName() <<
" with options: " << mtss.
allOptions() <<
" with seeds";
157 if (mtss.
seeds().size()) {
158 for (
unsigned int i = 0; i < mtss.
seeds().size(); ++i) { sl <<
" " << mtss.
seeds()[i]; }
161 sl <<
" and chambers are: " << std::endl;
162 for (
unsigned int i = 0; i < mtss.
getAll().size(); ++i) {
163 sl <<
"\t Step " << i <<
" : ( ";
164 for (
unsigned int j = 0; j < mtss.
getCh(i).size() - 1; ++j) {
167 if (mtss.
getCh(i).size()) {
170 sl <<
" ) " << std::endl;
const std::bitset< Last > & allOptions() const
void setOption(Option, bool value)
MuonTrackSteeringStrategy(const std::string &name, std::vector< std::string > &options, std::vector< std::vector< MuonStationIndex::ChIndex > > &path, std::vector< unsigned int > &seedOrder)
std::vector< unsigned int > m_seeds
std::vector< std::vector< MuonStationIndex::ChIndex > > m_path
std::bitset< Last > m_bits
List of all of the options available.
bool option(Option) const
MuonTrackSteeringStrategy(const std::string &name, std::vector< std::string > &options, std::vector< std::vector< MuonStationIndex::ChIndex > > &path)
Constructor that assumes the seed order could come as part of the options.
const std::vector< MuonStationIndex::ChIndex > & getCh(const unsigned int) const
const std::vector< std::vector< MuonStationIndex::ChIndex > > & getAll() const
MuonTrackSteeringStrategy(const std::string &name, const std::bitset< Last > &bits, std::vector< std::vector< MuonStationIndex::ChIndex > > &path, std::vector< unsigned int > &seedOrder)
void setCh(const std::vector< std::vector< MuonStationIndex::ChIndex > > &val)
const std::string & getName() const
void setName(const std::string &name)
void setCh(const std::vector< MuonStationIndex::ChIndex > &val, const unsigned int layer)
void setSeeds(const std::vector< unsigned int > &val)
const std::vector< unsigned int > & seeds() const
const std::string & chName(ChIndex index)
convert ChIndex into a string
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
std::ostream & operator<<(std::ostream &ostr, const Muon::HedgehogBoard &board)