Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:11

0001 #ifndef Navigation_MuonBarrelNavigableLayer_H
0002 #define Navigation_MuonBarrelNavigableLayer_H
0003 
0004 /** \class MuonBarrelNavigableLayer
0005  *
0006  *  Navigable layer for Barrel Muon 
0007  *
0008  *
0009  * \author : Stefano Lacaprara - INFN Padova <stefano.lacaprara@pd.infn.it>
0010  *
0011  * Modification:
0012  *
0013  * Chang Liu:
0014  * compatibleLayers(dir) and compatibleLayers(fts, dir) are added,
0015  * which returns ALL DetLayers that are compatible with a given DetLayer.
0016  *  
0017  */
0018 
0019 /* Collaborating Class Declarations */
0020 #include "RecoMuon/Navigation/interface/MuonDetLayerMap.h"
0021 #include "RecoMuon/Navigation/interface/MuonEtaRange.h"
0022 
0023 class DetLayer;
0024 class BarrelDetLayer;
0025 
0026 /* Base Class Headers */
0027 #include "RecoMuon/Navigation/interface/MuonNavigableLayer.h"
0028 /* C++ Headers */
0029 
0030 /* ====================================================================== */
0031 
0032 /* Class MuonBarrelNavigableLayer Interface */
0033 
0034 class MuonBarrelNavigableLayer : public MuonNavigableLayer {
0035 public:
0036   /// Constructor
0037   MuonBarrelNavigableLayer(BarrelDetLayer* bdl,
0038                            const MapB& outerBarrel,
0039                            const MapB& innerBarrel,
0040                            const MapE& outerBackward,
0041                            const MapE& outerForward,
0042                            const MapE& innerBackward,
0043                            const MapE& innerForward)
0044       : theDetLayer(bdl),
0045         theOuterBarrelLayers(outerBarrel),
0046         theInnerBarrelLayers(innerBarrel),
0047         theOuterBackwardLayers(outerBackward),
0048         theInnerBackwardLayers(innerBackward),
0049         theOuterForwardLayers(outerForward),
0050         theInnerForwardLayers(innerForward) {}
0051 
0052   MuonBarrelNavigableLayer(BarrelDetLayer* bdl,
0053                            const MapB& outerBarrel,
0054                            const MapB& innerBarrel,
0055                            const MapE& outerBackward,
0056                            const MapE& outerForward,
0057                            const MapE& innerBackward,
0058                            const MapE& innerForward,
0059                            const MapB& allOuterBarrel,
0060                            const MapB& allInnerBarrel,
0061                            const MapE& allOuterBackward,
0062                            const MapE& allOuterForward,
0063                            const MapE& allInnerBackward,
0064                            const MapE& allInnerForward)
0065       : theDetLayer(bdl),
0066         theOuterBarrelLayers(outerBarrel),
0067         theInnerBarrelLayers(innerBarrel),
0068         theOuterBackwardLayers(outerBackward),
0069         theInnerBackwardLayers(innerBackward),
0070         theOuterForwardLayers(outerForward),
0071         theInnerForwardLayers(innerForward),
0072         theAllOuterBarrelLayers(allOuterBarrel),
0073         theAllInnerBarrelLayers(allInnerBarrel),
0074         theAllOuterBackwardLayers(allOuterBackward),
0075         theAllInnerBackwardLayers(allInnerBackward),
0076         theAllOuterForwardLayers(allOuterForward),
0077         theAllInnerForwardLayers(allInnerForward) {}
0078 
0079   /// Constructor with outer layers only
0080   MuonBarrelNavigableLayer(BarrelDetLayer* bdl,
0081                            const MapB& outerBarrel,
0082                            const MapE& outerBackward,
0083                            const MapE& outerForward)
0084       : theDetLayer(bdl),
0085         theOuterBarrelLayers(outerBarrel),
0086         theOuterBackwardLayers(outerBackward),
0087         theOuterForwardLayers(outerForward) {}
0088 
0089   MuonBarrelNavigableLayer(const BarrelDetLayer* bdl,
0090                            const MapB& outerBarrel,
0091                            const MapE& outerBackward,
0092                            const MapE& outerForward,
0093                            const MapB& allOuterBarrel,
0094                            const MapE& allOuterBackward,
0095                            const MapE& allOuterForward)
0096       : theDetLayer(bdl),
0097         theOuterBarrelLayers(outerBarrel),
0098         theOuterBackwardLayers(outerBackward),
0099         theOuterForwardLayers(outerForward),
0100         theAllOuterBarrelLayers(allOuterBarrel),
0101         theAllOuterBackwardLayers(allOuterBackward),
0102         theAllOuterForwardLayers(allOuterForward) {}
0103 
0104   /// NavigableLayer interface
0105   std::vector<const DetLayer*> nextLayers(NavigationDirection dir) const override;
0106 
0107   /// NavigableLayer interface
0108   std::vector<const DetLayer*> nextLayers(const FreeTrajectoryState& fts, PropagationDirection dir) const override;
0109 
0110   std::vector<const DetLayer*> compatibleLayers(NavigationDirection dir) const override;
0111 
0112   /// NavigableLayer interface
0113   std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0114                                                 PropagationDirection dir) const override;
0115 
0116   /// return DetLayer
0117   const DetLayer* detLayer() const override;
0118 
0119   /// set DetLayer
0120   void setDetLayer(const DetLayer*) override;
0121 
0122   MapB getOuterBarrelLayers() const { return theOuterBarrelLayers; }
0123   MapB getInnerBarrelLayers() const { return theInnerBarrelLayers; }
0124   MapE getOuterBackwardLayers() const { return theOuterBackwardLayers; }
0125   MapE getInnerBackwardLayers() const { return theInnerBackwardLayers; }
0126   MapE getOuterForwardLayers() const { return theOuterForwardLayers; }
0127   MapE getInnerForwardLayers() const { return theInnerForwardLayers; }
0128 
0129   MapB getAllOuterBarrelLayers() const { return theAllOuterBarrelLayers; }
0130   MapB getAllInnerBarrelLayers() const { return theAllInnerBarrelLayers; }
0131   MapE getAllOuterBackwardLayers() const { return theAllOuterBackwardLayers; }
0132   MapE getAllInnerBackwardLayers() const { return theAllInnerBackwardLayers; }
0133   MapE getAllOuterForwardLayers() const { return theAllOuterForwardLayers; }
0134   MapE getAllInnerForwardLayers() const { return theAllInnerForwardLayers; }
0135 
0136   /// set inward links
0137   void setInwardLinks(const MapB&);
0138   void setInwardCompatibleLinks(const MapB&);
0139 
0140 private:
0141   void pushResult(std::vector<const DetLayer*>& result, const MapB& map) const;
0142 
0143   void pushResult(std::vector<const DetLayer*>& result, const MapE& map) const;
0144 
0145   void pushResult(std::vector<const DetLayer*>& result, const MapB& map, const FreeTrajectoryState& fts) const;
0146 
0147   void pushResult(std::vector<const DetLayer*>& result, const MapE& map, const FreeTrajectoryState& fts) const;
0148   void pushCompatibleResult(std::vector<const DetLayer*>& result,
0149                             const MapB& map,
0150                             const FreeTrajectoryState& fts) const;
0151 
0152   void pushCompatibleResult(std::vector<const DetLayer*>& result,
0153                             const MapE& map,
0154                             const FreeTrajectoryState& fts) const;
0155 
0156 private:
0157   const BarrelDetLayer* theDetLayer;
0158   MapB theOuterBarrelLayers;
0159   MapB theInnerBarrelLayers;
0160   MapE theOuterBackwardLayers;
0161   MapE theInnerBackwardLayers;
0162   MapE theOuterForwardLayers;
0163   MapE theInnerForwardLayers;
0164   MapB theAllOuterBarrelLayers;
0165   MapB theAllInnerBarrelLayers;
0166   MapE theAllOuterBackwardLayers;
0167   MapE theAllInnerBackwardLayers;
0168   MapE theAllOuterForwardLayers;
0169   MapE theAllInnerForwardLayers;
0170 };
0171 #endif