CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ForwardMeasurementEstimator Class Reference

#include <ForwardMeasurementEstimator.h>

Inheritance diagram for ForwardMeasurementEstimator:
MeasurementEstimator

Public Member Functions

virtual
ForwardMeasurementEstimator
clone () const
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const GlobalPoint &gp) const
 
virtual std::pair< bool, double > estimate (const GlobalPoint &vprim, const TrajectoryStateOnSurface &ts, const GlobalPoint &gp) const
 
virtual bool estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
 
 ForwardMeasurementEstimator ()
 
 ForwardMeasurementEstimator (float phiMin, float phiMax, float rMin, float rMax)
 
MeasurementEstimator::Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
 
void setPhiRange (float dummyphiMin, float dummyphiMax)
 
void setRRange (float rmin, float rmax)
 
void setRRangeI (float rmin, float rmax)
 
- Public Member Functions inherited from MeasurementEstimator
virtual SurfaceReturnType estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

float thePhiMax
 
float thePhiMin
 
float theRMax
 
float theRMaxI
 
float theRMin
 
float theRMinI
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
typedef std::pair< bool, double > HitReturnType
 
typedef Vector2DBase< float,
LocalTag
Local2DVector
 
typedef bool SurfaceReturnType
 

Detailed Description

Description: Class defining the search area in the forward disks in the pixel match, ported from ORCA

Implementation: <Notes on="" implementation>="">

Description: MeasurementEstimator for Pixel Endcap, ported from ORCA

Implementation: <Notes on="" implementation>="">

Definition at line 26 of file ForwardMeasurementEstimator.h.

Constructor & Destructor Documentation

ForwardMeasurementEstimator::ForwardMeasurementEstimator ( )
inline

Definition at line 31 of file ForwardMeasurementEstimator.h.

Referenced by clone().

32  {}
ForwardMeasurementEstimator::ForwardMeasurementEstimator ( float  phiMin,
float  phiMax,
float  rMin,
float  rMax 
)
inline

Member Function Documentation

virtual ForwardMeasurementEstimator* ForwardMeasurementEstimator::clone ( void  ) const
inlinevirtual
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
virtual

Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. The TrajectoryStateOnSurface must be on the same Surface as the RecHit. For an estimator where there is no value computed, e.g. fixed window estimator, only the first(bool) part is of interest.

Implements MeasurementEstimator.

Definition at line 26 of file ForwardMeasurementEstimator.cc.

References TrackingRecHit::det(), TrackingRecHit::localPosition(), GeomDet::surface(), and Surface::toGlobal().

27  {
28  LocalPoint lp = hit.localPosition();
29  GlobalPoint gp = hit.det()->surface().toGlobal( lp);
30  return estimate(ts,gp);
31 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
const GeomDet * det() const
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const
virtual LocalPoint localPosition() const =0
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const GlobalPoint gp 
) const
virtual

Definition at line 33 of file ForwardMeasurementEstimator.cc.

References funct::abs(), TrajectoryStateOnSurface::globalParameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), thePhiMax, thePhiMin, theRMax, theRMaxI, theRMin, theRMinI, and PV3DBase< T, PVType, FrameType >::z().

33  {
34 
35  float tsR = ts.globalParameters().position().perp();
36  float rhR = gp.perp();
37  float rDiff = tsR - rhR;
38  float rMin = theRMin;
39  float rMax = theRMax;
40  float myZ = gp.z();
41  if(std::abs(myZ)> 70. && std::abs(myZ)<170.) {
42  rMin = theRMinI;
43  rMax = theRMaxI;
44  }
45  if( rDiff >= rMax || rDiff <= rMin ) return std::pair<bool,double>(false,0.);
46 
47  float tsPhi = ts.globalParameters().position().phi();
48  float rhPhi = gp.phi();
49 
50  float myPhimin = thePhiMin;
51  float myPhimax = thePhiMax;
52 
53  float phiDiff = tsPhi - rhPhi;
54  if (phiDiff > pi) phiDiff -= twopi;
55  if (phiDiff < -pi) phiDiff += twopi;
56 
57  if ( phiDiff < myPhimax && phiDiff > myPhimin ) {
58  return std::pair<bool,double>(true,1.);
59  } else {
60  return std::pair<bool,double>(false,0.);
61  }
62 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const Double_t pi
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const GlobalTrajectoryParameters & globalParameters() const
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const GlobalPoint vprim,
const TrajectoryStateOnSurface ts,
const GlobalPoint gp 
) const
virtual

Definition at line 65 of file ForwardMeasurementEstimator.cc.

References funct::abs(), TrajectoryStateOnSurface::globalParameters(), normalized_phi(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GlobalTrajectoryParameters::position(), and PV3DBase< T, PVType, FrameType >::z().

68  {
69  GlobalVector ts = absolute_ts.globalParameters().position() - vprim ;
70  GlobalVector gp = absolute_gp - vprim ;
71 
72  float rhR = gp.perp();
73  float tsR = ts.perp();
74  float rDiff = rhR - tsR;
75  float rMin = theRMin;
76  float rMax = theRMax;
77  float myZ = gp.z();
78  if(std::abs(myZ)> 70. && std::abs(myZ)<170.) {
79  rMin = theRMinI;
80  rMax = theRMaxI;
81  }
82 
83  if( rDiff >= rMax || rDiff <= rMin ) return std::pair<bool,double>(false,0.);
84 
85  float tsPhi = ts.phi();
86  float rhPhi = gp.phi();
87 
88  float myPhimin = thePhiMin;
89  float myPhimax = thePhiMax;
90 
91  float phiDiff = normalized_phi(rhPhi - tsPhi) ;
92 
93  if ( phiDiff < myPhimax && phiDiff > myPhimin )
94  { return std::pair<bool,double>(true,1.) ; }
95  else
96  { return std::pair<bool,double>(false,0.) ; }
97 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
RealType normalized_phi(RealType phi)
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const GlobalTrajectoryParameters & globalParameters() const
bool ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const
virtual

Definition at line 100 of file ForwardMeasurementEstimator.cc.

References funct::abs(), edm::false, TrajectoryStateOnSurface::globalParameters(), GlobalTrajectoryParameters::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rangesIntersect(), and funct::true.

102  {
103  typedef std::pair<float,float> Range ;
104 
105  GlobalPoint trajPos(ts.globalParameters().position());
106  GlobalDetRangeRPhi detRange(plane);
107 
108  float r1 = 0.;
109  float r2 = 40.;
110 
111  Range trajRRange(trajPos.perp() - r1, trajPos.perp() + r2);
112  Range trajPhiRange(trajPos.phi() - std::abs(thePhiMin), trajPos.phi() + std::abs(thePhiMax));
113 
114  if(rangesIntersect(trajRRange, detRange.rRange()) &&
115  rangesIntersect(trajPhiRange, detRange.phiRange(), PhiLess()))
116  { return true ; }
117  else
118  { return false ; }
119 }
bool rangesIntersect(const Range &a, const Range &b)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PixelRecoRange< float > Range
const GlobalTrajectoryParameters & globalParameters() const
volatile std::atomic< bool > shutdown_flag false
MeasurementEstimator::Local2DVector ForwardMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const

Definition at line 123 of file ForwardMeasurementEstimator.cc.

References TrajectoryStateOnSurface::hasError(), asciidump::le, TrajectoryStateOnSurface::localError(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

125  {
126  float nSigmaCut = 3.;
127  if ( ts.hasError())
128  {
130  return Local2DVector( sqrt(le.xx())*nSigmaCut, sqrt(le.yy())*nSigmaCut);
131  }
132  else
133  return Local2DVector(999999,999999) ;
134  }
float xx() const
Definition: LocalError.h:24
Vector2DBase< float, LocalTag > Local2DVector
LocalError positionError() const
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:48
const LocalTrajectoryError & localError() const
void ForwardMeasurementEstimator::setPhiRange ( float  dummyphiMin,
float  dummyphiMax 
)
inline

Definition at line 37 of file ForwardMeasurementEstimator.h.

References thePhiMax, and thePhiMin.

void ForwardMeasurementEstimator::setRRange ( float  rmin,
float  rmax 
)
inline

Definition at line 39 of file ForwardMeasurementEstimator.h.

References theRMax, and theRMin.

void ForwardMeasurementEstimator::setRRangeI ( float  rmin,
float  rmax 
)
inline

Member Data Documentation

float ForwardMeasurementEstimator::thePhiMax
private

Definition at line 59 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::thePhiMin
private

Definition at line 58 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::theRMax
private

Definition at line 61 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMaxI
private

Definition at line 63 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().

float ForwardMeasurementEstimator::theRMin
private

Definition at line 60 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMinI
private

Definition at line 62 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().