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 
27 #include <vector>
28 #include <map>
29 
32 class MuonEtaRange;
33 class BarrelDetLayer;
34 class ForwardDetLayer;
35 
37 
38  public:
40  MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC = true, bool enableCSC = true, bool enableGEM = false);
44  virtual StateType navigableLayers() override;
45  private:
47  void addBarrelLayer(const BarrelDetLayer*);
49  void addEndcapLayer(const ForwardDetLayer*);
51  void linkBarrelLayers();
53  void linkEndcapLayers(const MapE&,std::vector<MuonForwardNavigableLayer*>&);
55  void createInverseLinks();
56  float calculateEta(const float&, const float& ) const;
57 
58  private:
59 
60  struct delete_layer
61  {
62  template <typename T>
63  void operator()(T*& p)
64  {
65  if( p)
66  {
67  delete p;
68  p = 0;
69  }
70  }
71  };
72 
76 
77  std::vector<MuonBarrelNavigableLayer*> theBarrelNLC;
78  std::vector<MuonForwardNavigableLayer*> theForwardNLC;
79  std::vector<MuonForwardNavigableLayer*> theBackwardNLC;
80 
82 
83 };
84 #endif
void createInverseLinks()
establish inward links
virtual StateType navigableLayers() override
return navigable layers, from base class
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true, bool enableCSC=true, bool enableGEM=false)
Constructor.
MapE theBackwardLayers
+z endcap
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
std::map< const BarrelDetLayer *, MuonEtaRange, MuonDetLayerComp > MapB
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