ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuonTrackSteeringStrategy Class Reference

#include <MuonTrackSteeringStrategy.h>

Collaboration diagram for Muon::MuonTrackSteeringStrategy:

Public Types

enum  Option {
  CutSeedsOnTracks = 0x0 , CombineSegInStation = 0x1 , DynamicSeeding = 0x2 , PreferOutsideIn = 0x3 ,
  AllowOneSharedHit = 0x4 , DoRefinement = 0x5 , DoAmbiSolving = 0x6 , BarrelEndcapFilter = 0x7 ,
  Last = 0x8
}

Public Member Functions

 MuonTrackSteeringStrategy (const std::string &name, const std::bitset< Last > &bits, std::vector< std::vector< MuonStationIndex::ChIndex > > &path, std::vector< unsigned int > &seedOrder)
 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.
 MuonTrackSteeringStrategy (const std::string &name, std::vector< std::string > &options, std::vector< std::vector< MuonStationIndex::ChIndex > > &path, std::vector< unsigned int > &seedOrder)
void setOption (Option, bool value)
void setOption (const std::string &, bool value)
bool option (Option) const
const std::bitset< Last > & allOptions () const
void setCh (const std::vector< MuonStationIndex::ChIndex > &val, const unsigned int layer)
void setCh (const std::vector< std::vector< MuonStationIndex::ChIndex > > &val)
const std::vector< std::vector< MuonStationIndex::ChIndex > > & getAll () const
const std::vector< MuonStationIndex::ChIndex > & getCh (const unsigned int) const
const std::string & getName () const
void setName (const std::string &name)
const std::vector< unsigned int > & seeds () const
void setSeeds (const std::vector< unsigned int > &val)

Private Attributes

std::string m_name
std::bitset< Lastm_bits
 List of all of the options available.
std::vector< std::vector< MuonStationIndex::ChIndex > > m_path
std::vector< unsigned int > m_seeds

Detailed Description

Definition at line 17 of file MuonTrackSteeringStrategy.h.

Member Enumeration Documentation

◆ Option

Constructor & Destructor Documentation

◆ MuonTrackSteeringStrategy() [1/3]

Muon::MuonTrackSteeringStrategy::MuonTrackSteeringStrategy ( const std::string & name,
const std::bitset< Last > & bits,
std::vector< std::vector< MuonStationIndex::ChIndex > > & path,
std::vector< unsigned int > & seedOrder )
inline

Definition at line 31 of file MuonTrackSteeringStrategy.h.

32 :
33 m_name(name), m_bits(bits), m_path(path), m_seeds(seedOrder) {}
std::vector< std::vector< MuonStationIndex::ChIndex > > m_path
std::bitset< Last > m_bits
List of all of the options available.

◆ MuonTrackSteeringStrategy() [2/3]

Muon::MuonTrackSteeringStrategy::MuonTrackSteeringStrategy ( const std::string & name,
std::vector< std::string > & options,
std::vector< std::vector< MuonStationIndex::ChIndex > > & path )
inline

Constructor that assumes the seed order could come as part of the options.

Definition at line 36 of file MuonTrackSteeringStrategy.h.

37 :
38 m_name(name), m_path(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);
41 }

◆ MuonTrackSteeringStrategy() [3/3]

Muon::MuonTrackSteeringStrategy::MuonTrackSteeringStrategy ( const std::string & name,
std::vector< std::string > & options,
std::vector< std::vector< MuonStationIndex::ChIndex > > & path,
std::vector< unsigned int > & seedOrder )
inline

Definition at line 43 of file MuonTrackSteeringStrategy.h.

44 :
45 m_name(name), m_path(path), m_seeds(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);
48 }

Member Function Documentation

◆ allOptions()

const std::bitset< Last > & Muon::MuonTrackSteeringStrategy::allOptions ( ) const
inline

Definition at line 53 of file MuonTrackSteeringStrategy.h.

53{ return m_bits; }

◆ getAll()

const std::vector< std::vector< MuonStationIndex::ChIndex > > & Muon::MuonTrackSteeringStrategy::getAll ( ) const
inline

Definition at line 60 of file MuonTrackSteeringStrategy.h.

60{ return m_path; }

◆ getCh()

const std::vector< Muon::MuonStationIndex::ChIndex > & Muon::MuonTrackSteeringStrategy::getCh ( const unsigned int layer = 0) const
inline

Definition at line 124 of file MuonTrackSteeringStrategy.h.

124 {
125 if (layer >= m_path.size()) {
126 throw std::range_error("MuonTrackSteering a path beyond the possible paths is chosen");
127 }
128 return m_path[layer];
129}
@ layer
Definition HitInfo.h:79

◆ getName()

const std::string & Muon::MuonTrackSteeringStrategy::getName ( ) const
inline

Definition at line 64 of file MuonTrackSteeringStrategy.h.

64{ return m_name; }

◆ option()

bool Muon::MuonTrackSteeringStrategy::option ( Option ) const
inline

Definition at line 131 of file MuonTrackSteeringStrategy.h.

131 {
132 return m_bits[static_cast<unsigned int>(op)];
133}

◆ seeds()

const std::vector< unsigned int > & Muon::MuonTrackSteeringStrategy::seeds ( ) const
inline

Definition at line 67 of file MuonTrackSteeringStrategy.h.

67{ return m_seeds; }

◆ setCh() [1/2]

void Muon::MuonTrackSteeringStrategy::setCh ( const std::vector< MuonStationIndex::ChIndex > & val,
const unsigned int layer )
inline

Definition at line 115 of file MuonTrackSteeringStrategy.h.

115 {
116 if (layer < m_path.size())
117 m_path[layer] = val;
118 else { // assume the user knows what he or she is doing
119 m_path.resize(layer + 1);
120 m_path[layer] = val;
121 }
122}

◆ setCh() [2/2]

void Muon::MuonTrackSteeringStrategy::setCh ( const std::vector< std::vector< MuonStationIndex::ChIndex > > & val)
inline

Definition at line 57 of file MuonTrackSteeringStrategy.h.

57{ m_path = val; }

◆ setName()

void Muon::MuonTrackSteeringStrategy::setName ( const std::string & name)
inline

Definition at line 65 of file MuonTrackSteeringStrategy.h.

◆ setOption() [1/2]

void Muon::MuonTrackSteeringStrategy::setOption ( const std::string & opt,
bool value )
inline

Definition at line 78 of file MuonTrackSteeringStrategy.h.

78 {
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")
90 setOption(DoRefinement, value);
91 else if (opt == "DoAmbiSolving")
93 else if (opt == "BarrelEndcapFilter")
95 else {
96 // Attempt to interpret the string as a seed sequence
97 std::vector<unsigned int> seeds;
98 bool success = true;
99 for (unsigned int i = 0; i < opt.size() && success; ++i) {
100 int holder = int(opt[i]) - 48;
101 if (holder < 0 || holder > 9)
102 success = false;
103 else
104 seeds.push_back(holder);
105 }
106 if (success) setSeeds(seeds);
107 }
108}
void setSeeds(const std::vector< unsigned int > &val)
const std::vector< unsigned int > & seeds() const

◆ setOption() [2/2]

void Muon::MuonTrackSteeringStrategy::setOption ( Option opt,
bool value )
inline

Definition at line 110 of file MuonTrackSteeringStrategy.h.

110 {
111 if (opt == Last) return;
112 m_bits[opt] = value;
113}

◆ setSeeds()

void Muon::MuonTrackSteeringStrategy::setSeeds ( const std::vector< unsigned int > & val)
inline

Definition at line 68 of file MuonTrackSteeringStrategy.h.

68{ m_seeds = val; }

Member Data Documentation

◆ m_bits

std::bitset<Last> Muon::MuonTrackSteeringStrategy::m_bits
private

List of all of the options available.

Definition at line 72 of file MuonTrackSteeringStrategy.h.

◆ m_name

std::string Muon::MuonTrackSteeringStrategy::m_name
private

Definition at line 71 of file MuonTrackSteeringStrategy.h.

◆ m_path

std::vector<std::vector<MuonStationIndex::ChIndex> > Muon::MuonTrackSteeringStrategy::m_path
private

Definition at line 73 of file MuonTrackSteeringStrategy.h.

◆ m_seeds

std::vector<unsigned int> Muon::MuonTrackSteeringStrategy::m_seeds
private

Definition at line 74 of file MuonTrackSteeringStrategy.h.


The documentation for this class was generated from the following file: