Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-06 04:13:36

0001 #ifndef DTGeometryBuilder_DTGeometryParsFromDD_h
0002 #define DTGeometryBuilder_DTGeometryParsFromDD_h
0003 /** \class DTGeometryParsFromDD
0004  *
0005  *  Build the RPCGeometry from the DDD and DD4hep description
0006  *  
0007  *  DD4hep part added to the original old file (DD version) made by Stefano Lacaprara (INFN LNL)
0008  *  \author:  Sergio Lo Meo (sergio.lo.meo@cern.ch) 
0009  *  Created:  Tue, 26 Jan 2021 
0010  *
0011  */
0012 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
0013 #include <vector>
0014 
0015 class DTGeometry;
0016 class DDCompactView;
0017 class DDFilteredView;
0018 namespace cms {  // DD4hep
0019   class DDFilteredView;
0020   class DDCompactView;
0021 }  // namespace cms
0022 class DTChamber;
0023 class DTSuperLayer;
0024 class DTLayer;
0025 class Bounds;
0026 class MuonGeometryConstants;
0027 class RecoIdealGeometry;
0028 
0029 class DTGeometryParsFromDD {
0030 public:
0031   /// Constructor
0032   DTGeometryParsFromDD();
0033 
0034   /// Destructor
0035   virtual ~DTGeometryParsFromDD();
0036 
0037   // DD
0038   void build(const DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig);
0039 
0040   // DD4hep
0041   void build(const cms::DDCompactView* cview, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rgeo);
0042 
0043   enum DTDetTag { DTChamberTag, DTSuperLayerTag, DTLayerTag };
0044 
0045 private:
0046   // DD
0047   /// create the chamber
0048   void insertChamber(DDFilteredView& fv,
0049                      const std::string& type,
0050                      const MuonGeometryConstants& muonConstants,
0051                      RecoIdealGeometry& rig) const;
0052 
0053   /// create the SL
0054   void insertSuperLayer(DDFilteredView& fv,
0055                         const std::string& type,
0056                         const MuonGeometryConstants& muonConstants,
0057                         RecoIdealGeometry& rig) const;
0058 
0059   /// create the layer
0060   void insertLayer(DDFilteredView& fv,
0061                    const std::string& type,
0062                    const MuonGeometryConstants& muonConstants,
0063                    RecoIdealGeometry& rig) const;
0064 
0065   /// get parameter also for boolean solid.
0066   std::vector<double> extractParameters(DDFilteredView& fv) const;
0067 
0068   typedef std::pair<std::vector<double>, std::vector<double> > PosRotPair;
0069 
0070   PosRotPair plane(const DDFilteredView& fv) const;
0071 
0072   void buildGeometry(DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
0073 
0074   // DD4hep
0075 
0076   void buildGeometry(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
0077 
0078   /// create the chamber
0079   void insertChamber(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
0080 
0081   /// create the SL
0082   void insertSuperLayer(cms::DDFilteredView& fv,
0083                         const MuonGeometryConstants& muonConstants,
0084                         RecoIdealGeometry& rig) const;
0085 
0086   /// create the layer
0087   void insertLayer(cms::DDFilteredView& fv, const MuonGeometryConstants& muonConstants, RecoIdealGeometry& rig) const;
0088 
0089   PosRotPair plane(const cms::DDFilteredView& fv) const;
0090 };
0091 #endif