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 17 of file BladeShapeBuilderFromDet.h.

Member Function Documentation

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

Definition at line 122 of file BladeShapeBuilderFromDet.cc.

References objects.autophobj::float, mps_fire::i, and idealTransformation::rotation.

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

123 {
124  // find mean position
126  Vector posSum(0,0,0);
127  for (vector<const GeomDet*>::const_iterator i=dets.begin(); i!=dets.end(); i++) {
128  posSum += (**i).surface().position().basicVector();
129  }
130  Surface::PositionType meanPos( 0.,0.,posSum.z()/float(dets.size()) );
131 
132  // temporary plane - for the computation of bounds
133  Surface::RotationType rotation = computeRotation( dets, meanPos);
134  Plane tmpPlane( meanPos, rotation);
135 
136 
137  auto bo =
138  computeBounds( dets,tmpPlane );
139  GlobalPoint pos = meanPos+bo.second;
140  //edm::LogInfo(TkDetLayers) << "global pos in operator: " << pos ;
141  return new BoundDiskSector( pos, rotation, bo.first);
142 }
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
Definition: Plane.h:17