CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
NavigationSchool Class Referenceabstract

#include <NavigationSchool.h>

Inheritance diagram for NavigationSchool:
MuonNavigationSchool TkNavigationSchool SimpleNavigationSchool BeamHaloNavigationSchool CosmicNavigationSchool SkippingLayerCosmicNavigationSchool

Public Types

typedef std::vector< NavigableLayer * > StateType
 

Public Member Functions

const std::vector< const DetLayer * > & allLayersInSystem () const
 
template<typename... Args>
std::vector< const DetLayer * > compatibleLayers (const DetLayer &detLayer, Args &&... args) const
 Returns all layers compatible. More...
 
virtual StateType navigableLayers ()=0
 
 NavigationSchool ()
 
template<typename... Args>
std::vector< const DetLayer * > nextLayers (const DetLayer &detLayer, Args &&... args) const
 
virtual ~NavigationSchool ()
 

Protected Member Functions

void setState (const StateType &state)
 

Protected Attributes

const std::vector< const DetLayer * > * theAllDetLayersInSystem
 
StateType theAllNavigableLayer
 

Detailed Description

A base class for NavigationSchools. The links between layers are computed or loaded from persistent store by a NavigationSchool. The result is a container of NavigableLayers.

Definition at line 18 of file NavigationSchool.h.

Member Typedef Documentation

◆ StateType

Definition at line 26 of file NavigationSchool.h.

Constructor & Destructor Documentation

◆ NavigationSchool()

NavigationSchool::NavigationSchool ( )
inline

Definition at line 20 of file NavigationSchool.h.

20  : theAllDetLayersInSystem(nullptr) {
21  // std::cout << "NVSH: C "<< this << std::endl;
22  }

◆ ~NavigationSchool()

virtual NavigationSchool::~NavigationSchool ( )
inlinevirtual

Definition at line 24 of file NavigationSchool.h.

24 {}

Member Function Documentation

◆ allLayersInSystem()

const std::vector<const DetLayer*>& NavigationSchool::allLayersInSystem ( ) const
inline

Definition at line 64 of file NavigationSchool.h.

64 { return *theAllDetLayersInSystem; }

References theAllDetLayersInSystem.

◆ compatibleLayers()

template<typename... Args>
std::vector<const DetLayer*> NavigationSchool::compatibleLayers ( const DetLayer detLayer,
Args &&...  args 
) const
inline

Returns all layers compatible.

Definition at line 41 of file NavigationSchool.h.

41  {
42  auto nl = theAllNavigableLayer[detLayer.seqNum()];
43  return nl ? nl->compatibleLayers(std::forward<Args>(args)...) : std::vector<const DetLayer*>();
44  }

References writedatasetfile::args, DetLayer::seqNum(), and theAllNavigableLayer.

Referenced by DTChamberEfficiency::compatibleLayers(), TrajSeedMatcher::getNrValidLayersAlongTraj(), and MuonNavigationPrinter::printLayer().

◆ navigableLayers()

virtual StateType NavigationSchool::navigableLayers ( )
pure virtual

◆ nextLayers()

template<typename... Args>
std::vector<const DetLayer*> NavigationSchool::nextLayers ( const DetLayer detLayer,
Args &&...  args 
) const
inline

Return the next (closest) layer(s) that can be reached in the specified NavigationDirection

Definition at line 33 of file NavigationSchool.h.

33  {
34  assert(detLayer.seqNum() >= 0);
35  auto nl = theAllNavigableLayer[detLayer.seqNum()];
36  return nl ? nl->nextLayers(std::forward<Args>(args)...) : std::vector<const DetLayer*>();
37  }

References writedatasetfile::args, cms::cuda::assert(), DetLayer::seqNum(), and theAllNavigableLayer.

Referenced by CkfDebugger::analyseRecHitNotFound(), TrackEfficiencyMonitor::compatibleLayers(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), NuclearInteractionFinder::findMeasurementsFromTSOS(), BaseCkfTrajectoryBuilder::findStateAndLayers(), and MuonNavigationPrinter::printLayer().

◆ setState()

void NavigationSchool::setState ( const StateType state)
inlineprotected

Definition at line 47 of file NavigationSchool.h.

47  {
48  // std::cout << "NVSH: set "<< this << ' ' << typeid(*this).name()
49  // << ' ' << state.size() << ' ' << theAllNavigableLayer.size() << std::endl;
50 
51  for (auto nl : state) {
52  if (!nl)
53  continue;
54  theAllNavigableLayer[nl->detLayer()->seqNum()] = nl;
55  nl->setSchool(this);
56  }
57  }

References theAllNavigableLayer.

Referenced by MuonNavigationSchool::createInverseLinks().

Member Data Documentation

◆ theAllDetLayersInSystem

const std::vector<const DetLayer*>* NavigationSchool::theAllDetLayersInSystem
protected

◆ theAllNavigableLayer

StateType NavigationSchool::theAllNavigableLayer
protected
writedatasetfile.args
args
Definition: writedatasetfile.py:18
cms::cuda::assert
assert(be >=bs)
NavigationSchool::theAllNavigableLayer
StateType theAllNavigableLayer
Definition: NavigationSchool.h:60
DetLayer::seqNum
int seqNum() const
Definition: DetLayer.h:35
NavigationSchool::theAllDetLayersInSystem
const std::vector< const DetLayer * > * theAllDetLayersInSystem
Definition: NavigationSchool.h:67
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16