Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:56

0001 #ifndef DTGeometryBuilder_DTGeometryBuilderFromDDD_h
0002 #define DTGeometryBuilder_DTGeometryBuilderFromDDD_h
0003 
0004 /** \class DTGeometryBuilderFromDDD
0005  *
0006  *  Build the DTGeometry from the DDD description.  
0007  *
0008  *  \author N. Amapane - CERN. 
0009  *  \author Port of: MuBarDDDGeomBuilder, MuBarDetBuilder (ORCA) by S. Lacaprara, M. Case
0010  */
0011 
0012 #include "DataFormats/GeometrySurface/interface/Plane.h"
0013 #include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
0014 
0015 #include <vector>
0016 
0017 class DTGeometry;
0018 class DDCompactView;
0019 class DDFilteredView;
0020 class DTChamber;
0021 class DTSuperLayer;
0022 class DTLayer;
0023 class Bounds;
0024 class MuonGeometryConstants;
0025 
0026 namespace dtGeometryBuilder {
0027   // Helper function from DTGeometryBuilderFromCondDB.cc
0028   RectangularPlaneBounds* getRecPlaneBounds(const std::vector<double>::const_iterator& shapeStart);
0029 }  // namespace dtGeometryBuilder
0030 
0031 class DTGeometryBuilderFromDDD {
0032 public:
0033   /// Constructor
0034   DTGeometryBuilderFromDDD();
0035 
0036   /// Destructor
0037   virtual ~DTGeometryBuilderFromDDD();
0038 
0039   // Operations
0040   void build(DTGeometry& theGeometry, const DDCompactView* cview, const MuonGeometryConstants& muonConstants);
0041 
0042 private:
0043   /// create the chamber
0044   DTChamber* buildChamber(DDFilteredView& fv,
0045                           const std::string& type,
0046                           const MuonGeometryConstants& muonConstants) const;
0047 
0048   /// create the SL
0049   DTSuperLayer* buildSuperLayer(DDFilteredView& fv,
0050                                 DTChamber* chamber,
0051                                 const std::string& type,
0052                                 const MuonGeometryConstants& muonConstants) const;
0053 
0054   /// create the layer
0055   DTLayer* buildLayer(DDFilteredView& fv,
0056                       DTSuperLayer* sl,
0057                       const std::string& type,
0058                       const MuonGeometryConstants& muonConstants) const;
0059 
0060   /// get parameter also for boolean solid.
0061   std::vector<double> extractParameters(DDFilteredView& fv) const;
0062 
0063   typedef ReferenceCountingPointer<Plane> RCPPlane;
0064 
0065   RCPPlane plane(const DDFilteredView& fv, Bounds* bounds) const;
0066 
0067   void buildGeometry(DTGeometry& theGeometry, DDFilteredView& fv, const MuonGeometryConstants& muonConstants) const;
0068 };
0069 #endif