CMS 3D CMS Logo

Classes | Functions

details Namespace Reference

Classes

struct  Mean
struct  PhiSortElement

Functions

void fillBoundaries (std::vector< const GeometricSearchDet * > const &dets, std::vector< float > &boundaries)
int findBin (std::vector< float > const &boundaries, float r)

Function Documentation

void details::fillBoundaries ( std::vector< const GeometricSearchDet * > const &  dets,
std::vector< float > &  boundaries 
)

Definition at line 39 of file CompositeTECPetal.cc.

References Mean, PV3DBase< float, PointTag, GlobalTag >::perp(), and GeometricSearchDet::position().

Referenced by CompositeTECPetal::CompositeTECPetal().

                                                     {
    boundaries.resize(dets.size());
    std::transform(dets.begin(), dets.end(),  boundaries.begin(),
                   boost::bind(&GlobalPoint::perp,boost::bind(&GeometricSearchDet::position,_1))
                   );
    std::adjacent_difference(boundaries.begin(),boundaries.end(),  boundaries.begin(), Mean());
  }
int details::findBin ( std::vector< float > const &  boundaries,
float  r 
)

Definition at line 48 of file CompositeTECPetal.cc.

References csvReporter::r.

                                                            {
    return  
      std::lower_bound(boundaries.begin()+1,boundaries.end(),r)
      -boundaries.begin()-1;
  }