Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:17

0001 #ifndef GEOMETRY_MUON_NUMBERING_MUON_NUMBERING_H
0002 #define GEOMETRY_MUON_NUMBERING_MUON_NUMBERING_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    Geometry/MuonNumbering
0007 // Class:      MuonNumbering
0008 //
0009 /**\class MuonNumbering
0010 
0011  Description: MuonNumbering class to handle the conversion
0012  to MuonBaseNumber from the ExpandedNodes history
0013 
0014  Implementation:
0015  in the xml muon constant section one has to define
0016  level, super and base constants (eg. 1000,100,1) and
0017  the start value of the copy numbers (0 or 1)
0018 
0019 */
0020 //
0021 // Original Author:  Ianna Osborne
0022 //         Created:  Thu, 21 Mar 2019 15:32:36 CET
0023 //
0024 
0025 #include "DetectorDescription/DDCMS/interface/ExpandedNodes.h"
0026 #include "Geometry/MuonNumbering/interface/MuonBaseNumber.h"
0027 
0028 #include <string>
0029 #include <unordered_map>
0030 
0031 class MuonBaseNumber;
0032 
0033 namespace cms {
0034 
0035   using MuonConstants = std::unordered_map<std::string_view, int>;
0036 
0037   class MuonNumbering {
0038   public:
0039     const MuonBaseNumber geoHistoryToBaseNumber(const cms::ExpandedNodes&) const;
0040     const int get(const char*) const;
0041     void put(std::string_view, int);
0042     const MuonConstants& values() const { return values_; }
0043 
0044   private:
0045     MuonConstants values_;
0046   };
0047 }  // namespace cms
0048 
0049 #endif