Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Geometry_TrackerGeometryBuilder_PlaneBuilderForGluedDet_H
0002 #define Geometry_TrackerGeometryBuilder_PlaneBuilderForGluedDet_H
0003 
0004 #include "DataFormats/GeometrySurface/interface/Plane.h"
0005 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0006 #include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
0007 #include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
0008 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0009 #include <utility>
0010 #include <vector>
0011 
0012 /** Builds the minimal rectangular box that contains all input GeomDetUnits fully.
0013  */
0014 
0015 class PlaneBuilderForGluedDet {
0016 public:
0017   /// Warning, remember to assign this pointer to a ReferenceCountingPointer!
0018   /// Should be changed to return a ReferenceCountingPointer<BoundPlane>
0019   typedef ReferenceCountingPointer<Plane> ResultType;
0020 
0021   ResultType plane(const std::vector<const GeomDetUnit*>& dets) const;
0022 
0023 private:
0024   std::pair<RectangularPlaneBounds*, GlobalVector> computeRectBounds(const std::vector<const GeomDetUnit*>& dets,
0025                                                                      const Plane& plane) const;
0026 
0027   Surface::RotationType computeRotation(const std::vector<const GeomDetUnit*>& dets,
0028                                         const Surface::PositionType& meanPos) const;
0029 };
0030 
0031 #endif