Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:13

0001 #ifndef Navigation_MuonForwardNavigableLayer_H
0002 #define Navigation_MuonForwardNavigableLayer_H
0003 
0004 /** \class MuonForwardNavigableLayer
0005  *
0006  *  Navigable layer for Forward Muon
0007  *
0008  *
0009  * \author : Stefano Lacaprara - INFN Padova <stefano.lacaprara@pd.infn.it>
0010  *
0011  * Modification:
0012  * Chang Liu:
0013  *  compatibleLayers(dir) and compatibleLayers(fts, dir) are added,
0014  *  which return ALL DetLayers that are compatible with a given DetLayer.
0015  */
0016 
0017 /* Collaborating Class Declarations */
0018 #include "RecoMuon/Navigation/interface/MuonDetLayerMap.h"
0019 #include "RecoMuon/Navigation/interface/MuonEtaRange.h"
0020 
0021 class DetLayer;
0022 class ForwardDetLayer;
0023 
0024 /* Base Class Headers */
0025 #include "RecoMuon/Navigation/interface/MuonNavigableLayer.h"
0026 
0027 /* C++ Headers */
0028 
0029 /* ====================================================================== */
0030 
0031 /* Class MuonForwardNavigableLayer Interface */
0032 
0033 class MuonForwardNavigableLayer : public MuonNavigableLayer {
0034 public:
0035   MuonForwardNavigableLayer(const ForwardDetLayer* fdl,
0036                             const MapB& innerBarrel,
0037                             const MapE& outerEndcap,
0038                             const MapE& innerEndcap,
0039                             const MapB& allInnerBarrel,
0040                             const MapE& allOuterEndcap,
0041                             const MapE& allInnerEndcap)
0042       : theDetLayer(fdl),
0043         theInnerBarrelLayers(innerBarrel),
0044         theOuterEndcapLayers(outerEndcap),
0045         theInnerEndcapLayers(innerEndcap),
0046         theAllInnerBarrelLayers(allInnerBarrel),
0047         theAllOuterEndcapLayers(allOuterEndcap),
0048         theAllInnerEndcapLayers(allInnerEndcap) {}
0049 
0050   /// Constructor with outer layers only
0051   MuonForwardNavigableLayer(const ForwardDetLayer* fdl, const MapE& outerEndcap)
0052       : theDetLayer(fdl), theOuterEndcapLayers(outerEndcap) {}
0053   /// Constructor with all outer layers only
0054   MuonForwardNavigableLayer(const ForwardDetLayer* fdl, const MapE& outerEndcap, const MapE& allOuterEndcap)
0055       : theDetLayer(fdl), theOuterEndcapLayers(outerEndcap), theAllOuterEndcapLayers(allOuterEndcap) {}
0056 
0057   /// NavigableLayer interface
0058   std::vector<const DetLayer*> nextLayers(NavigationDirection dir) const override;
0059 
0060   /// NavigableLayer interface
0061   std::vector<const DetLayer*> nextLayers(const FreeTrajectoryState& fts, PropagationDirection dir) const override;
0062 
0063   std::vector<const DetLayer*> compatibleLayers(NavigationDirection dir) const override;
0064 
0065   /// NavigableLayer interface
0066   std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0067                                                 PropagationDirection dir) const override;
0068   /// return DetLayer
0069   const DetLayer* detLayer() const override;
0070 
0071   /// set DetLayer
0072   void setDetLayer(const DetLayer*) override;
0073 
0074   /// Operations
0075   MapE getOuterEndcapLayers() const { return theOuterEndcapLayers; }
0076   MapE getInnerEndcapLayers() const { return theInnerEndcapLayers; }
0077   MapB getInnerBarrelLayers() const { return theInnerBarrelLayers; }
0078 
0079   MapE getAllOuterEndcapLayers() const { return theAllOuterEndcapLayers; }
0080   MapE getAllInnerEndcapLayers() const { return theAllInnerEndcapLayers; }
0081   MapB getAllInnerBarrelLayers() const { return theAllInnerBarrelLayers; }
0082 
0083   /// set inward links
0084   void setInwardLinks(const MapB&, const MapE&);
0085   void setInwardCompatibleLinks(const MapB&, const MapE&);
0086 
0087 private:
0088   void pushResult(std::vector<const DetLayer*>& result, const MapB& map) const;
0089 
0090   void pushResult(std::vector<const DetLayer*>& result, const MapE& map) const;
0091 
0092   void pushResult(std::vector<const DetLayer*>& result, const MapB& map, const FreeTrajectoryState& fts) const;
0093 
0094   void pushResult(std::vector<const DetLayer*>& result, const MapE& map, const FreeTrajectoryState& fts) const;
0095 
0096   void pushCompatibleResult(std::vector<const DetLayer*>& result,
0097                             const MapB& map,
0098                             const FreeTrajectoryState& fts) const;
0099 
0100   void pushCompatibleResult(std::vector<const DetLayer*>& result,
0101                             const MapE& map,
0102                             const FreeTrajectoryState& fts) const;
0103 
0104 private:
0105   const ForwardDetLayer* theDetLayer;
0106   MapB theInnerBarrelLayers;
0107   MapE theOuterEndcapLayers;
0108   MapE theInnerEndcapLayers;
0109   MapB theAllInnerBarrelLayers;
0110   MapE theAllOuterEndcapLayers;
0111   MapE theAllInnerEndcapLayers;
0112 };
0113 #endif