#include <RecoEgamma/EgammaElectronAlgos/interface/ForwardMeasurementEstimator.h>
Public Member Functions | |
virtual ForwardMeasurementEstimator * | clone () const |
virtual bool | estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
Returns true if the TrajectoryStateOnSurface is compatible with the BoundPlane, false otherwise. | |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &ts, GlobalPoint &gp) const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const |
Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. | |
ForwardMeasurementEstimator (float phiMin, float phiMax, float rMin, float rMax) | |
ForwardMeasurementEstimator () | |
MeasurementEstimator::Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. | |
void | setPhiRange (float dummyphiMin, float dummyphiMax) |
void | setRRange (float rmin, float rmax) |
void | setRRangeI (float rmin, float rmax) |
Private Attributes | |
float | thePhiMax |
float | thePhiMin |
float | theRMax |
float | theRMaxI |
float | theRMin |
float | theRMinI |
Implementation: <Notes on="" implementation>="">
Definition at line 27 of file ForwardMeasurementEstimator.h.
ForwardMeasurementEstimator::ForwardMeasurementEstimator | ( | ) | [inline] |
ForwardMeasurementEstimator::ForwardMeasurementEstimator | ( | float | phiMin, | |
float | phiMax, | |||
float | rMin, | |||
float | rMax | |||
) | [inline] |
virtual ForwardMeasurementEstimator* ForwardMeasurementEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 59 of file ForwardMeasurementEstimator.h.
References ForwardMeasurementEstimator().
00060 { 00061 return new ForwardMeasurementEstimator(*this); 00062 }
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 69 of file ForwardMeasurementEstimator.cc.
References TrajectoryStateOnSurface::globalParameters(), GlobalTrajectoryParameters::position(), r1, r2, rangesIntersect(), thePhiMax, and thePhiMin.
00070 { 00071 00072 typedef std::pair<float,float> Range; 00073 00074 GlobalPoint trajPos(ts.globalParameters().position()); 00075 GlobalDetRangeRPhi detRange(plane); 00076 00077 float r1 = 0.; 00078 float r2 = 40.; 00079 00080 Range trajRRange(trajPos.perp() - r1, trajPos.perp() + r2); 00081 Range trajPhiRange(trajPos.phi() - fabs(thePhiMin), trajPos.phi() + fabs(thePhiMax)); 00082 00083 if(rangesIntersect(trajRRange, detRange.rRange()) && 00084 rangesIntersect(trajPhiRange, detRange.phiRange(), PhiLess())) { 00085 return true; 00086 } else { 00087 return false; 00088 } 00089 }
std::pair< bool, double > ForwardMeasurementEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, | |
GlobalPoint & | gp | |||
) | const [virtual] |
Definition at line 34 of file ForwardMeasurementEstimator.cc.
References 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().
00034 { 00035 00036 float tsR = ts.globalParameters().position().perp(); 00037 float tsPhi = ts.globalParameters().position().phi(); 00038 00039 float rhPhi = gp.phi(); 00040 float rhR = gp.perp(); 00041 00042 float myZ = gp.z(); 00043 00044 float rMin = theRMin; 00045 float rMax = theRMax; 00046 float myPhimin = thePhiMin; 00047 float myPhimax = thePhiMax; 00048 00049 if(fabs(myZ)> 70. && fabs(myZ)<170.) 00050 { 00051 rMin = theRMinI; 00052 rMax = theRMaxI; 00053 } 00054 00055 float phiDiff = tsPhi - rhPhi; 00056 if (phiDiff > pi) phiDiff -= twopi; 00057 if (phiDiff < -pi) phiDiff += twopi; 00058 00059 float rDiff = tsR - rhR; 00060 00061 if ( phiDiff < myPhimax && phiDiff > myPhimin && 00062 rDiff < rMax && rDiff > rMin) { 00063 return std::pair<bool,double>(true,1.); 00064 } else { 00065 return std::pair<bool,double>(false,0.); 00066 } 00067 }
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(), lp, GeomDet::surface(), and Surface::toGlobal().
Referenced by PixelHitMatcher::compatibleSeeds().
00028 { 00029 LocalPoint lp = hit.localPosition(); 00030 GlobalPoint gp = hit.det()->surface().toGlobal( lp); 00031 return estimate(ts,gp); 00032 }
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 92 of file ForwardMeasurementEstimator.cc.
References TrajectoryStateOnSurface::hasError(), asciidump::le, TrajectoryStateOnSurface::localError(), LocalTrajectoryError::positionError(), funct::sqrt(), LocalError::xx(), and LocalError::yy().
00094 { 00095 float nSigmaCut = 3.; 00096 if ( ts.hasError()) { 00097 LocalError le = ts.localError().positionError(); 00098 return Local2DVector( sqrt(le.xx())*nSigmaCut, sqrt(le.yy())*nSigmaCut); 00099 } 00100 else return Local2DVector(999999,999999); 00101 }
void ForwardMeasurementEstimator::setPhiRange | ( | float | dummyphiMin, | |
float | dummyphiMax | |||
) | [inline] |
Definition at line 33 of file ForwardMeasurementEstimator.h.
References thePhiMax, and thePhiMin.
Referenced by PixelHitMatcher::set1stLayer(), and PixelHitMatcher::set2ndLayer().
void ForwardMeasurementEstimator::setRRange | ( | float | rmin, | |
float | rmax | |||
) | [inline] |
Definition at line 38 of file ForwardMeasurementEstimator.h.
References theRMax, and theRMin.
Referenced by PixelHitMatcher::set1stLayerZRange().
void ForwardMeasurementEstimator::setRRangeI | ( | float | rmin, | |
float | rmax | |||
) | [inline] |
Definition at line 43 of file ForwardMeasurementEstimator.h.
References theRMaxI, and theRMinI.
Referenced by PixelHitMatcher::PixelHitMatcher().
float ForwardMeasurementEstimator::thePhiMax [private] |
Definition at line 71 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setPhiRange().
float ForwardMeasurementEstimator::thePhiMin [private] |
Definition at line 70 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setPhiRange().
float ForwardMeasurementEstimator::theRMax [private] |
Definition at line 73 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setRRange().
float ForwardMeasurementEstimator::theRMaxI [private] |
Definition at line 74 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setRRangeI().
float ForwardMeasurementEstimator::theRMin [private] |
Definition at line 72 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setRRange().
float ForwardMeasurementEstimator::theRMinI [private] |
Definition at line 74 of file ForwardMeasurementEstimator.h.
Referenced by estimate(), and setRRangeI().