CMS 3D CMS Logo

MTDNavigationSchool.h
Go to the documentation of this file.
1 #ifndef Navigation_MTDNavigationSchool_H
2 #define Navigation_MTDNavigationSchool_H
3 
22 #include <vector>
23 #include <map>
24 
25 class BTLNavigableLayer;
26 class ETLNavigableLayer;
27 class MTDEtaRange;
28 class BarrelDetLayer;
29 class ForwardDetLayer;
30 
32 public:
34  MTDNavigationSchool(const MTDDetLayerGeometry*, bool enableBTL = true, bool enableETL = true);
36  ~MTDNavigationSchool() override;
38  StateType navigableLayers() override;
39 
40 private:
42  void addBarrelLayer(const BarrelDetLayer*);
44  void addEndcapLayer(const ForwardDetLayer*);
46  void linkBarrelLayers();
48  void linkEndcapLayers(const MapE&, std::vector<ETLNavigableLayer*>&);
50  void createInverseLinks();
51  float calculateEta(const float&, const float&) const;
52 
53 private:
54  struct delete_layer {
55  template <typename T>
56  void operator()(T*& p) {
57  if (p) {
58  delete p;
59  p = nullptr;
60  }
61  }
62  };
63 
67 
68  std::vector<BTLNavigableLayer*> theBarrelNLC;
69  std::vector<ETLNavigableLayer*> theForwardNLC;
70  std::vector<ETLNavigableLayer*> theBackwardNLC;
71 
73 };
74 #endif
MTDNavigationSchool::addBarrelLayer
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
Definition: MTDNavigationSchool.cc:106
MTDNavigationSchool::MTDNavigationSchool
MTDNavigationSchool(const MTDDetLayerGeometry *, bool enableBTL=true, bool enableETL=true)
Constructor.
Definition: MTDNavigationSchool.cc:34
MTDNavigationSchool::theBackwardLayers
MapE theBackwardLayers
+z endcap
Definition: MTDNavigationSchool.h:66
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
MTDNavigationSchool::theBarrelNLC
std::vector< BTLNavigableLayer * > theBarrelNLC
-z endcap
Definition: MTDNavigationSchool.h:68
MTDNavigationSchool::addEndcapLayer
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
Definition: MTDNavigationSchool.cc:118
MTDNavigationSchool::createInverseLinks
void createInverseLinks()
establish inward links
Definition: MTDNavigationSchool.cc:234
NavigationSchool
Definition: NavigationSchool.h:18
MTDEtaRange
Definition: MTDEtaRange.h:15
MTDNavigationSchool::theBarrelLayers
MapB theBarrelLayers
Definition: MTDNavigationSchool.h:64
MTDNavigationSchool::theBackwardNLC
std::vector< ETLNavigableLayer * > theBackwardNLC
Definition: MTDNavigationSchool.h:70
MTDNavigationSchool::linkBarrelLayers
void linkBarrelLayers()
link barrel layers
Definition: MTDNavigationSchool.cc:144
MTDDetLayerMap.h
MTDNavigationSchool::calculateEta
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
Definition: MTDNavigationSchool.cc:137
MTDNavigationSchool
Definition: MTDNavigationSchool.h:31
BTLNavigableLayer
Definition: BTLNavigableLayer.h:29
MTDNavigationSchool::~MTDNavigationSchool
~MTDNavigationSchool() override
Destructor.
Definition: MTDNavigationSchool.cc:77
MTDNavigationSchool::linkEndcapLayers
void linkEndcapLayers(const MapE &, std::vector< ETLNavigableLayer * > &)
link endcap layers
Definition: MTDNavigationSchool.cc:198
NavigationSchool::StateType
std::vector< NavigableLayer * > StateType
Definition: NavigationSchool.h:26
MTDNavigationSchool::delete_layer::operator()
void operator()(T *&p)
Definition: MTDNavigationSchool.h:56
MapB
std::map< const BarrelDetLayer *, MTDEtaRange, MTDDetLayerComp > MapB
Definition: MTDDetLayerMap.h:36
MTDNavigationSchool::delete_layer
Definition: MTDNavigationSchool.h:54
MTDNavigationSchool::navigableLayers
StateType navigableLayers() override
return navigable layers, from base class
Definition: MTDNavigationSchool.cc:84
MTDDetLayerGeometry
Definition: MTDDetLayerGeometry.h:19
BarrelDetLayer
Definition: BarrelDetLayer.h:22
ETLNavigableLayer
Definition: ETLNavigableLayer.h:33
MTDNavigationSchool::theMTDDetLayerGeometry
const MTDDetLayerGeometry * theMTDDetLayerGeometry
Definition: MTDNavigationSchool.h:72
MTDDetLayerGeometry.h
ForwardDetLayer
Definition: ForwardDetLayer.h:22
T
long double T
Definition: Basic3DVectorLD.h:48
MapE
std::map< const ForwardDetLayer *, MTDEtaRange, MTDDetLayerComp > MapE
Definition: MTDDetLayerMap.h:37
MTDNavigationSchool::theForwardLayers
MapE theForwardLayers
barrel
Definition: MTDNavigationSchool.h:65
NavigationSchool.h
MTDNavigationSchool::theForwardNLC
std::vector< ETLNavigableLayer * > theForwardNLC
Definition: MTDNavigationSchool.h:69