CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DistanceToCell Class Reference

#include <DistanceToCell.h>

Public Member Functions

 DistanceToCell ()
 
 DistanceToCell (const DistanceToCell &)
 
 DistanceToCell (const CaloSubdetectorGeometry *det, const DetId &cell)
 
bool operator() (const DetId &c1, const DetId &c2)
 
 ~DistanceToCell ()
 

Private Attributes

const CaloSubdetectorGeometrydet_
 
DetId pivot_
 
GlobalPoint pivotPosition_
 

Detailed Description

Definition at line 11 of file DistanceToCell.h.

Constructor & Destructor Documentation

DistanceToCell::DistanceToCell ( )

Definition at line 6 of file DistanceToCell.cc.

6 :det_(0) {;}
const CaloSubdetectorGeometry * det_
DistanceToCell::DistanceToCell ( const DistanceToCell dist)

Definition at line 8 of file DistanceToCell.cc.

References det_, pivot_, and pivotPosition_.

9 {
10  det_= dist.det_;
12  pivot_= dist.pivot_;
13 }
GlobalPoint pivotPosition_
const CaloSubdetectorGeometry * det_
DistanceToCell::DistanceToCell ( const CaloSubdetectorGeometry det,
const DetId cell 
)

Definition at line 15 of file DistanceToCell.cc.

References det_, CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), pivot_, and pivotPosition_.

15  :det_(det),pivot_(cell)
16 {
18 }
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.
GlobalPoint pivotPosition_
const CaloSubdetectorGeometry * det_
DistanceToCell::~DistanceToCell ( )
inline

Definition at line 17 of file DistanceToCell.h.

References alignmentValidation::c1, and operator()().

17 {;}

Member Function Documentation

bool DistanceToCell::operator() ( const DetId c1,
const DetId c2 
)

Definition at line 20 of file DistanceToCell.cc.

References det_, CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), mag2(), and pivotPosition_.

Referenced by ~DistanceToCell().

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_
const CaloSubdetectorGeometry * det_

Member Data Documentation

const CaloSubdetectorGeometry* DistanceToCell::det_
private

Definition at line 21 of file DistanceToCell.h.

Referenced by DistanceToCell(), and operator()().

DetId DistanceToCell::pivot_
private

Definition at line 22 of file DistanceToCell.h.

Referenced by DistanceToCell().

GlobalPoint DistanceToCell::pivotPosition_
private

Definition at line 23 of file DistanceToCell.h.

Referenced by DistanceToCell(), and operator()().