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
std::vector< BTLNavigableLayer * > theBarrelNLC
-z endcap
StateType navigableLayers() override
return navigable layers, from base class
std::map< const BarrelDetLayer *, MTDEtaRange, MTDDetLayerComp > MapB
std::vector< ETLNavigableLayer * > theBackwardNLC
void linkBarrelLayers()
link barrel layers
const MTDDetLayerGeometry * theMTDDetLayerGeometry
void linkEndcapLayers(const MapE &, std::vector< ETLNavigableLayer * > &)
link endcap layers
~MTDNavigationSchool() override
Destructor.
std::vector< ETLNavigableLayer * > theForwardNLC
MTDNavigationSchool(const MTDDetLayerGeometry *, bool enableBTL=true, bool enableETL=true)
Constructor.
void createInverseLinks()
establish inward links
std::vector< NavigableLayer * > StateType
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
MapE theBackwardLayers
+z endcap
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
long double T
std::map< const ForwardDetLayer *, MTDEtaRange, MTDDetLayerComp > MapE