1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef Geometry_TrackerGeometryBuilder_PlaneBuilderForGluedDet_H
#define Geometry_TrackerGeometryBuilder_PlaneBuilderForGluedDet_H
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
#include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
#include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include <utility>
#include <vector>
/** Builds the minimal rectangular box that contains all input GeomDetUnits fully.
*/
class PlaneBuilderForGluedDet {
public:
/// Warning, remember to assign this pointer to a ReferenceCountingPointer!
/// Should be changed to return a ReferenceCountingPointer<BoundPlane>
typedef ReferenceCountingPointer<Plane> ResultType;
ResultType plane(const std::vector<const GeomDetUnit*>& dets) const;
private:
std::pair<RectangularPlaneBounds*, GlobalVector> computeRectBounds(const std::vector<const GeomDetUnit*>& dets,
const Plane& plane) const;
Surface::RotationType computeRotation(const std::vector<const GeomDetUnit*>& dets,
const Surface::PositionType& meanPos) const;
};
#endif
|