CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MuonNavigationSchool.h
Go to the documentation of this file.
1 #ifndef Navigation_MuonNavigationSchool_H
2 #define Navigation_MuonNavigationSchool_H
3 
29 #include <vector>
30 #include <map>
31 
34 class MuonEtaRange;
35 class BarrelDetLayer;
36 class ForwardDetLayer;
37 
39 public:
42  bool enableRPC = true,
43  bool enableCSC = true,
44  bool enableGEM = false,
45  bool enableME0 = false);
47  ~MuonNavigationSchool() override;
49  StateType navigableLayers() override;
50 
51 private:
53  void addBarrelLayer(const BarrelDetLayer*);
55  void addEndcapLayer(const ForwardDetLayer*);
57  void linkBarrelLayers();
59  void linkEndcapLayers(const MapE&, std::vector<MuonForwardNavigableLayer*>&);
61  void createInverseLinks();
62  float calculateEta(const float&, const float&) const;
63 
64 private:
65  struct delete_layer {
66  template <typename T>
67  void operator()(T*& p) {
68  if (p) {
69  delete p;
70  p = nullptr;
71  }
72  }
73  };
74 
78 
79  std::vector<MuonBarrelNavigableLayer*> theBarrelNLC;
80  std::vector<MuonForwardNavigableLayer*> theForwardNLC;
81  std::vector<MuonForwardNavigableLayer*> theBackwardNLC;
82 
84 };
85 #endif
void createInverseLinks()
establish inward links
StateType navigableLayers() override
return navigable layers, from base class
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MapE theBackwardLayers
+z endcap
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
std::map< const BarrelDetLayer *, MuonEtaRange, MuonDetLayerComp > MapB
void linkEndcapLayers(const MapE &, std::vector< MuonForwardNavigableLayer *> &)
link endcap layers
std::vector< MuonForwardNavigableLayer * > theBackwardNLC
std::vector< MuonBarrelNavigableLayer * > theBarrelNLC
-z endcap
void linkBarrelLayers()
link barrel layers
std::vector< NavigableLayer * > StateType
std::map< const ForwardDetLayer *, MuonEtaRange, MuonDetLayerComp > MapE
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
~MuonNavigationSchool() override
Destructor.
const MuonDetLayerGeometry * theMuonDetLayerGeometry
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true, bool enableCSC=true, bool enableGEM=false, bool enableME0=false)
Constructor.
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
long double T