File indexing completed on 2024-04-06 12:27:13
0001 #ifndef Navigation_MuonNavigationSchool_H
0002 #define Navigation_MuonNavigationSchool_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #include "RecoMuon/Navigation/interface/MuonDetLayerMap.h"
0027 #include "TrackingTools/DetLayers/interface/NavigationSchool.h"
0028 #include "RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h"
0029 #include <vector>
0030 #include <map>
0031
0032 class MuonBarrelNavigableLayer;
0033 class MuonForwardNavigableLayer;
0034 class MuonEtaRange;
0035 class BarrelDetLayer;
0036 class ForwardDetLayer;
0037
0038 class MuonNavigationSchool : public NavigationSchool {
0039 public:
0040
0041 MuonNavigationSchool(const MuonDetLayerGeometry*,
0042 bool enableRPC = true,
0043 bool enableCSC = true,
0044 bool enableGEM = false,
0045 bool enableME0 = false);
0046
0047 ~MuonNavigationSchool() override;
0048
0049 StateType navigableLayers() override;
0050
0051 private:
0052
0053 void addBarrelLayer(const BarrelDetLayer*);
0054
0055 void addEndcapLayer(const ForwardDetLayer*);
0056
0057 void linkBarrelLayers();
0058
0059 void linkEndcapLayers(const MapE&, std::vector<MuonForwardNavigableLayer*>&);
0060
0061 void createInverseLinks();
0062 float calculateEta(const float&, const float&) const;
0063
0064 private:
0065 struct delete_layer {
0066 template <typename T>
0067 void operator()(T*& p) {
0068 if (p) {
0069 delete p;
0070 p = nullptr;
0071 }
0072 }
0073 };
0074
0075 MapB theBarrelLayers;
0076 MapE theForwardLayers;
0077 MapE theBackwardLayers;
0078
0079 std::vector<MuonBarrelNavigableLayer*> theBarrelNLC;
0080 std::vector<MuonForwardNavigableLayer*> theForwardNLC;
0081 std::vector<MuonForwardNavigableLayer*> theBackwardNLC;
0082
0083 const MuonDetLayerGeometry* theMuonDetLayerGeometry;
0084 };
0085 #endif