CMS 3D CMS Logo

List of all members | Static Public Member Functions
BladeShapeBuilderFromDet Class Reference

#include <BladeShapeBuilderFromDet.h>

Static Public Member Functions

static BoundDiskSectorbuild (const std::vector< const GeomDet *> &dets) __attribute__((cold))
 

Detailed Description

The trapezoid has the minimal size fully containing all Dets.

Definition at line 16 of file BladeShapeBuilderFromDet.h.

Member Function Documentation

◆ build()

BoundDiskSector * BladeShapeBuilderFromDet::build ( const std::vector< const GeomDet *> &  dets)
static

Definition at line 109 of file BladeShapeBuilderFromDet.cc.

References ALCARECOEcalPhiSym_cff::float, mps_fire::i, and idealTransformation::rotation.

Referenced by Phase1PixelBlade::Phase1PixelBlade(), and PixelBlade::PixelBlade().

109  {
110  // find mean position
112  Vector posSum(0, 0, 0);
113  for (vector<const GeomDet*>::const_iterator i = dets.begin(); i != dets.end(); i++) {
114  posSum += (**i).surface().position().basicVector();
115  }
116  Surface::PositionType meanPos(0., 0., posSum.z() / float(dets.size()));
117 
118  // temporary plane - for the computation of bounds
119  Surface::RotationType rotation = computeRotation(dets, meanPos);
120  Plane tmpPlane(meanPos, rotation);
121 
122  auto bo = computeBounds(dets, tmpPlane);
123  GlobalPoint pos = meanPos + bo.second;
124  //edm::LogInfo(TkDetLayers) << "global pos in operator: " << pos ;
125  return new BoundDiskSector(pos, rotation, bo.first);
126 }
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
Definition: Plane.h:16
math::XYZVectorF Vector
Definition: Common.h:42