Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:51

0001 #ifndef TkNavigation_SymmetricLayerFinder_H
0002 #define TkNavigation_SymmetricLayerFinder_H
0003 #include "FWCore/Utilities/interface/Visibility.h"
0004 
0005 #include <vector>
0006 #include <map>
0007 
0008 class DetLayer;
0009 class BarrelDetLayer;
0010 class ForwardDetLayer;
0011 
0012 /** A symmetrisation algorithm for layer navigation.
0013  *  For every ForwardDetLayer returns a pointer to the symmetric one
0014  *  with respect to origin.
0015  */
0016 
0017 class dso_hidden SymmetricLayerFinder {
0018   typedef std::vector<const ForwardDetLayer*> FDLC;
0019   typedef FDLC::iterator FDLI;
0020   typedef FDLC::const_iterator ConstFDLI;
0021   typedef std::pair<const ForwardDetLayer*, const ForwardDetLayer*> PairType;
0022 
0023 public:
0024   SymmetricLayerFinder(const FDLC&);
0025 
0026   const ForwardDetLayer* mirror(const ForwardDetLayer* layer) { return theForwardMap[layer]; }
0027 
0028   FDLC mirror(const FDLC& input);
0029 
0030 private:
0031   //  typedef map< const ForwardDetLayer*, const ForwardDetLayer*, less<const ForwardDetLayer*> >
0032   typedef std::map<const ForwardDetLayer*, const ForwardDetLayer*, std::less<const ForwardDetLayer*> > ForwardMapType;
0033 
0034   ForwardMapType theForwardMap;
0035 
0036   const ForwardDetLayer* mirrorPartner(const ForwardDetLayer* layer, const FDLC& rightLayers);
0037 };
0038 #endif  // SymmetricLayerFinder_H