CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonNavigationSchool.h
Go to the documentation of this file.
1 #ifndef Navigation_MuonNavigationSchool_H
2 #define Navigation_MuonNavigationSchool_H
3 
25 #include <vector>
26 #include <map>
27 
30 class MuonEtaRange;
31 class BarrelDetLayer;
32 class ForwardDetLayer;
33 
35 
36  public:
38  MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC = true);
42  virtual StateType navigableLayers() override;
43  private:
45  void addBarrelLayer(const BarrelDetLayer*);
47  void addEndcapLayer(const ForwardDetLayer*);
49  void linkBarrelLayers();
51  void linkEndcapLayers(const MapE&,std::vector<MuonForwardNavigableLayer*>&);
53  void createInverseLinks();
54  float calculateEta(const float&, const float& ) const;
55 
56  private:
57 
58  struct delete_layer
59  {
60  template <typename T>
61  void operator()(T*& p)
62  {
63  if( p)
64  {
65  delete p;
66  p = 0;
67  }
68  }
69  };
70 
74 
75  std::vector<MuonBarrelNavigableLayer*> theBarrelNLC;
76  std::vector<MuonForwardNavigableLayer*> theForwardNLC;
77  std::vector<MuonForwardNavigableLayer*> theBackwardNLC;
78 
80 
81 };
82 #endif
void createInverseLinks()
establish inward links
virtual 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
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true)
Constructor.
std::vector< MuonForwardNavigableLayer * > theBackwardNLC
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
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
void linkEndcapLayers(const MapE &, std::vector< MuonForwardNavigableLayer * > &)
link endcap layers
~MuonNavigationSchool()
Destructor.
const MuonDetLayerGeometry * theMuonDetLayerGeometry
long double T