Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:40

0001 #ifndef Geometry_GEMGeometry_GEMGeometryParsFromDD_H
0002 #define Geometry_GEMGeometry_GEMGeometryParsFromDD_H
0003 
0004 /* Implementation of the  GEMGeometryParsFromDD Class
0005  *  Build the GEMGeometry from the DDD and DD4hep description
0006  *  
0007  *  DD4hep part added to the original old file (DD version) made by M. Maggi (INFN Bari)
0008  *  Author:  Sergio Lo Meo (sergio.lo.meo@cern.ch) 
0009  *  Created:  Mon, 15 Feb 2021 
0010  *
0011  */
0012 
0013 #include <string>
0014 #include <vector>
0015 #include <map>
0016 #include <list>
0017 
0018 class DDCompactView;
0019 class DDFilteredView;
0020 namespace cms {  // DD4hep
0021   class DDFilteredView;
0022   class DDCompactView;
0023 }  // namespace cms
0024 class MuonGeometryConstants;
0025 class RecoIdealGeometry;
0026 class GEMDetId;
0027 
0028 class GEMGeometryParsFromDD {
0029 public:
0030   GEMGeometryParsFromDD();
0031 
0032   ~GEMGeometryParsFromDD();
0033 
0034   // DD
0035   void build(const DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rgeo);
0036   // DD4hep
0037   void build(const cms::DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rgeo);
0038 
0039 private:
0040   // DD
0041   void buildGeometry(DDFilteredView& fview,
0042                      DDFilteredView& fview2,
0043                      const MuonGeometryConstants& muonConstants,
0044                      RecoIdealGeometry& rgeo);
0045   void buildSuperChamber(DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0046   void buildChamber(DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0047   void buildEtaPartition(DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0048 
0049   std::vector<double> getTranslation(DDFilteredView& fv);
0050   std::vector<double> getRotation(DDFilteredView& fv);
0051 
0052   // DD4hep
0053 
0054   void buildGeometry(cms::DDFilteredView& fview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rgeo);
0055   void buildSuperChamber(cms::DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0056   void buildChamber(cms::DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0057   void buildEtaPartition(cms::DDFilteredView& fv, GEMDetId detId, RecoIdealGeometry& rgeo);
0058 
0059   std::vector<double> getTranslation(cms::DDFilteredView& fv);
0060   std::vector<double> getRotation(cms::DDFilteredView& fv);
0061 };
0062 #endif