Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:08

0001 #ifndef Geometry_TrackerNumberingBuilder_CmsTrackerDetIdBuilder_H
0002 #define Geometry_TrackerNumberingBuilder_CmsTrackerDetIdBuilder_H
0003 
0004 #include "FWCore/ParameterSet/interface/types.h"
0005 #include <ostream>
0006 #include <vector>
0007 #include <array>
0008 
0009 class GeometricDet;
0010 
0011 /**
0012  * Class to build a geographicalId.
0013  */
0014 
0015 class CmsTrackerDetIdBuilder {
0016 public:
0017   CmsTrackerDetIdBuilder(const std::vector<int> &detidShifts);
0018   void buildId(GeometricDet &det);
0019 
0020 private:
0021   void iterate(GeometricDet &det, int level, unsigned int ID);
0022   static const unsigned int nSubDet = 6;
0023   static const int maxLevels = 6;
0024 
0025   // This is the map between detid and navtype to restore backward compatibility between 12* and 13* series
0026   std::map<std::string, uint32_t> m_mapNavTypeToDetId;
0027   std::array<int, nSubDet * maxLevels> m_detidshifts;
0028 };
0029 
0030 #endif