ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
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. More...
 
 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. More...
 
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

Enumerator
CutSeedsOnTracks 
CombineSegInStation 
DynamicSeeding 
PreferOutsideIn 
AllowOneSharedHit 
DoRefinement 
DoAmbiSolving 
BarrelEndcapFilter 
Last 

Definition at line 19 of file MuonTrackSteeringStrategy.h.

19  {
20  CutSeedsOnTracks = 0x0,
21  CombineSegInStation = 0x1,
22  DynamicSeeding = 0x2,
23  PreferOutsideIn = 0x3,
24  AllowOneSharedHit = 0x4,
25  DoRefinement = 0x5,
26  DoAmbiSolving = 0x6,
27  BarrelEndcapFilter = 0x7,
28  Last = 0x8
29  };

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  :

◆ 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  :
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 }

◆ 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  op) 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.

65 { m_name = name; }

◆ 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")
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 }

◆ 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:
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
Muon::MuonTrackSteeringStrategy::AllowOneSharedHit
@ AllowOneSharedHit
Definition: MuonTrackSteeringStrategy.h:24
Muon::MuonTrackSteeringStrategy::m_name
std::string m_name
Definition: MuonTrackSteeringStrategy.h:71
Muon::MuonTrackSteeringStrategy::CutSeedsOnTracks
@ CutSeedsOnTracks
Definition: MuonTrackSteeringStrategy.h:20
Muon::MuonTrackSteeringStrategy::m_bits
std::bitset< Last > m_bits
List of all of the options available.
Definition: MuonTrackSteeringStrategy.h:72
athena.value
value
Definition: athena.py:124
Muon::MuonTrackSteeringStrategy::m_path
std::vector< std::vector< MuonStationIndex::ChIndex > > m_path
Definition: MuonTrackSteeringStrategy.h:73
Muon::MuonTrackSteeringStrategy::PreferOutsideIn
@ PreferOutsideIn
Definition: MuonTrackSteeringStrategy.h:23
Muon::MuonTrackSteeringStrategy::BarrelEndcapFilter
@ BarrelEndcapFilter
Definition: MuonTrackSteeringStrategy.h:27
Muon::MuonTrackSteeringStrategy::DoRefinement
@ DoRefinement
Definition: MuonTrackSteeringStrategy.h:25
Muon::MuonTrackSteeringStrategy::DoAmbiSolving
@ DoAmbiSolving
Definition: MuonTrackSteeringStrategy.h:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
ActsTrackFindingConfig.seedOrder
list seedOrder(flags, *list pixel=None, list strip=None)
Definition: ActsTrackFindingConfig.py:25
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonTrackSteeringStrategy::setSeeds
void setSeeds(const std::vector< unsigned int > &val)
Definition: MuonTrackSteeringStrategy.h:68
Muon::MuonTrackSteeringStrategy::Last
@ Last
Definition: MuonTrackSteeringStrategy.h:28
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
Muon::MuonTrackSteeringStrategy::m_seeds
std::vector< unsigned int > m_seeds
Definition: MuonTrackSteeringStrategy.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::MuonTrackSteeringStrategy::seeds
const std::vector< unsigned int > & seeds() const
Definition: MuonTrackSteeringStrategy.h:67
Muon::MuonTrackSteeringStrategy::setOption
void setOption(Option, bool value)
Definition: MuonTrackSteeringStrategy.h:110
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
Muon::MuonTrackSteeringStrategy::DynamicSeeding
@ DynamicSeeding
Definition: MuonTrackSteeringStrategy.h:22
Muon::MuonTrackSteeringStrategy::CombineSegInStation
@ CombineSegInStation
Definition: MuonTrackSteeringStrategy.h:21