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 TransientTrackingRecHit &hit) const
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, GlobalPoint &gp) const
 
virtual std::pair< bool, double > estimate (const GlobalPoint &vprim, const TrajectoryStateOnSurface &ts, 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 ~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 27 of file ForwardMeasurementEstimator.h.

Constructor & Destructor Documentation

ForwardMeasurementEstimator::ForwardMeasurementEstimator ( )
inline

Definition at line 32 of file ForwardMeasurementEstimator.h.

Referenced by clone().

33  {}
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 TransientTrackingRecHit 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 27 of file ForwardMeasurementEstimator.cc.

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

28  {
29  LocalPoint lp = hit.localPosition();
30  GlobalPoint gp = hit.det()->surface().toGlobal( lp);
31  return estimate(ts,gp);
32 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual LocalPoint localPosition() const =0
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
GlobalPoint gp 
) const
virtual

Definition at line 34 of file ForwardMeasurementEstimator.cc.

References 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().

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

Definition at line 70 of file ForwardMeasurementEstimator.cc.

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

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

Returns true if the TrajectoryStateOnSurface is compatible with the BoundPlane, false otherwise. The TrajectoryStateOnSurface must be on the plane.

Implements MeasurementEstimator.

Definition at line 106 of file ForwardMeasurementEstimator.cc.

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

108  {
109  typedef std::pair<float,float> Range ;
110 
111  GlobalPoint trajPos(ts.globalParameters().position());
112  GlobalDetRangeRPhi detRange(plane);
113 
114  float r1 = 0.;
115  float r2 = 40.;
116 
117  Range trajRRange(trajPos.perp() - r1, trajPos.perp() + r2);
118  Range trajPhiRange(trajPos.phi() - std::abs(thePhiMin), trajPos.phi() + std::abs(thePhiMax));
119 
120  if(rangesIntersect(trajRRange, detRange.rRange()) &&
121  rangesIntersect(trajPhiRange, detRange.phiRange(), PhiLess()))
122  { return true ; }
123  else
124  { return false ; }
125 }
#define abs(x)
Definition: mlp_lapack.h:159
bool rangesIntersect(const Range &a, const Range &b)
PixelRecoRange< float > Range
const GlobalTrajectoryParameters & globalParameters() const
MeasurementEstimator::Local2DVector ForwardMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const
virtual

Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. The TrajectoryStateOnSurface must be on the plane. This method allows to limit the search for compatible detectors or RecHits. The MeasurementEstimator should not return "true" for any RecHit or BoundPlane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().

Reimplemented from MeasurementEstimator.

Definition at line 129 of file ForwardMeasurementEstimator.cc.

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

131  {
132  float nSigmaCut = 3.;
133  if ( ts.hasError())
134  {
136  return Local2DVector( sqrt(le.xx())*nSigmaCut, sqrt(le.yy())*nSigmaCut);
137  }
138  else
139  return Local2DVector(999999,999999) ;
140  }
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:46
const LocalTrajectoryError & localError() const
unsigned long long le
Definition: VDTMath.h:202
void ForwardMeasurementEstimator::setPhiRange ( float  dummyphiMin,
float  dummyphiMax 
)
inline

Definition at line 38 of file ForwardMeasurementEstimator.h.

References thePhiMax, and thePhiMin.

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

Definition at line 40 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 60 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::thePhiMin
private

Definition at line 59 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::theRMax
private

Definition at line 62 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMaxI
private

Definition at line 64 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().

float ForwardMeasurementEstimator::theRMin
private

Definition at line 61 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMinI
private

Definition at line 63 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().