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  }
const std::vector< const DetLayer * > * theAllDetLayersInSystem

◆ ~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.

References theAllDetLayersInSystem.

64 { return *theAllDetLayersInSystem; }
const std::vector< const DetLayer * > * 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.

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

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

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

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

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().

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  }
assert(be >=bs)
StateType theAllNavigableLayer
int seqNum() const
Definition: DetLayer.h:35

◆ setState()

void NavigationSchool::setState ( const StateType state)
inlineprotected

Definition at line 47 of file NavigationSchool.h.

References theAllNavigableLayer.

Referenced by MuonNavigationSchool::createInverseLinks().

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  }
StateType theAllNavigableLayer

Member Data Documentation

◆ theAllDetLayersInSystem

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

◆ theAllNavigableLayer

StateType NavigationSchool::theAllNavigableLayer
protected