CMS 3D CMS Logo

DistanceToCell.cc
Go to the documentation of this file.
2 
5 
7 
9 {
10  det_= dist.det_;
12  pivot_= dist.pivot_;
13 }
14 
16 {
18 }
19 
20 bool DistanceToCell::operator() (const DetId & c1, const DetId & c2)
21 {
22  return ((det_->getGeometry(c1)->getPosition()-pivotPosition_).mag2()<
24 }
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
GlobalPoint pivotPosition_
Definition: DetId.h:18
const CaloSubdetectorGeometry * det_
bool operator()(const DetId &c1, const DetId &c2)