CMS 3D CMS Logo

SimpleCylinderBounds.cc
Go to the documentation of this file.
3 
4 
5 SimpleCylinderBounds::SimpleCylinderBounds( float rmin, float rmax, float zmin, float zmax) :
6  theRmin(rmin), theRmax(rmax), theZmin(zmin), theZmax(zmax) {
9 }
10 
12  return p.z() > theZmin && p.z() < theZmax &&
13  p.perp() > theRmin && p.perp() < theRmax;
14 }
15 
16 bool SimpleCylinderBounds::inside( const Local3DPoint& p, const LocalError& err,float scale) const {
17 
19  theZmin - sqrt(err.yy())*scale,
20  theZmax + sqrt(err.yy())*scale);
21 
22  return tmp.inside(p);
23  }
24 
25 bool SimpleCylinderBounds::inside( const Local2DPoint& p, const LocalError& err) const {
26  return Bounds::inside(p,err);
27 }
28 
30  return new SimpleCylinderBounds(*this);
31 }
T perp() const
Definition: PV3DBase.h:72
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
Bounds * clone() const override
float yy() const
Definition: LocalError.h:26
SimpleCylinderBounds(float rmin, float rmax, float zmin, float zmax)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Definition: Bounds.h:22