#include <ConversionForwardEstimator.h>
Public Member Functions | |
virtual ConversionForwardEstimator * | clone () const |
ConversionForwardEstimator () | |
ConversionForwardEstimator (float phiRangeMin, float phiRangeMax, float dr, double nSigma=3.) | |
virtual bool | estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const |
virtual Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
double | nSigmaCut () const |
Private Attributes | |
float | dr_ |
double | theNSigma |
float | thePhiRangeMax |
float | thePhiRangeMin |
Defines the search area in the forward
Definition at line 23 of file ConversionForwardEstimator.h.
ConversionForwardEstimator::ConversionForwardEstimator | ( | ) | [inline] |
ConversionForwardEstimator::ConversionForwardEstimator | ( | float | phiRangeMin, |
float | phiRangeMax, | ||
float | dr, | ||
double | nSigma = 3. |
||
) | [inline] |
Definition at line 26 of file ConversionForwardEstimator.h.
: thePhiRangeMin( phiRangeMin), thePhiRangeMax( phiRangeMax), dr_(dr), theNSigma(nSigma) { //std::cout << " ConversionForwardEstimator CTOR " << std::endl; }
virtual ConversionForwardEstimator* ConversionForwardEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 36 of file ConversionForwardEstimator.h.
References ConversionForwardEstimator().
{ return new ConversionForwardEstimator(*this); }
bool ConversionForwardEstimator::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 ConversionForwardEstimator.cc.
References funct::true.
{ // std::cout << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts, const BoundPlane& plane) always TRUE " << "\n"; // this method should return one if a detector ring is close enough // to the hit, zero otherwise. // Now time is wasted looking for hits in the rings which are anyhow // too far from the prediction return true ; }
std::pair< bool, double > ConversionForwardEstimator::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 12 of file ConversionForwardEstimator.cc.
References dr_, TrajectoryStateOnSurface::globalParameters(), TransientTrackingRecHit::globalPosition(), TrackingRecHit::localPositionError(), LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), funct::pow(), query::result, mathSSE::sqrt(), thePhiRangeMin, and LocalError::yy().
{ LogDebug("ConversionForwardEstimator") << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) " << "\n"; // std::cout << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) " << "\n"; std::pair<bool,double> result; float tsPhi = ts.globalParameters().position().phi(); GlobalPoint gp = hit.globalPosition(); float rhPhi = gp.phi(); float rhR = gp.perp(); // allow an r fudge of 1.5 * times the sigma // nodt used float dr = 1.5 * hit.localPositionError().yy(); //std::cout << " err " << hit.globalPositionError().phierr(gp) // << " " << hit.globalPositionError().rerr(gp) << std::endl; // not used float zLayer = ts.globalParameters().position().z(); float rLayer = ts.globalParameters().position().perp(); float newdr = sqrt(pow(dr_,2)+4.*hit.localPositionError().yy()); float rMin = rLayer - newdr; float rMax = rLayer + newdr; float phiDiff = tsPhi - rhPhi; if (phiDiff > pi) phiDiff -= twopi; if (phiDiff < -pi) phiDiff += twopi; //std::cout << " ConversionForwardEstimator: RecHit at " << gp << "\n"; //std::cout << " rMin = " << rMin << ", rMax = " << rMax << ", rHit = " << rhR << "\n"; //std::cout << " thePhiRangeMin = " << thePhiRangeMin << ", thePhiRangeMax = " << thePhiRangeMax << ", phiDiff = " << phiDiff << "\n"; if ( phiDiff < thePhiRangeMax && phiDiff > thePhiRangeMin && rhR < rMax && rhR > rMin) { // std::cout << " estimator returns 1 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " // << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << "\n"; //std::cout << " YES " << phiDiff << " " <<rLayer-rhR << "\n"; //std::cout << " => RECHIT ACCEPTED " << "\n"; result.first= true; result.second=phiDiff; } else { /* cout << " estimator returns 0 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << endl; */ result.first= false; result.second=0; } return result; }
MeasurementEstimator::Local2DVector ConversionForwardEstimator::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 84 of file ConversionForwardEstimator.cc.
{ /* if ( ts.hasError() ) { LocalError le = ts.localError().positionError(); std::cout << " ConversionForwardEstimator::maximalLocalDisplacent local error " << sqrt(le.xx()) << " " << sqrt(le.yy()) << " nSigma " << nSigmaCut() << " sqrt(le.xx())*nSigmaCut() " << sqrt(le.xx())*nSigmaCut() << " sqrt(le.yy())*nSigmaCut() " << sqrt(le.yy())*nSigmaCut() << std::endl; return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut()); } else return Local2DVector(99999,99999); */ return Local2DVector(99999,99999); }
double ConversionForwardEstimator::nSigmaCut | ( | ) | const [inline] |
Definition at line 43 of file ConversionForwardEstimator.h.
References theNSigma.
{return theNSigma;}
float ConversionForwardEstimator::dr_ [private] |
Definition at line 49 of file ConversionForwardEstimator.h.
Referenced by estimate().
double ConversionForwardEstimator::theNSigma [private] |
Definition at line 50 of file ConversionForwardEstimator.h.
Referenced by nSigmaCut().
float ConversionForwardEstimator::thePhiRangeMax [private] |
Definition at line 48 of file ConversionForwardEstimator.h.
float ConversionForwardEstimator::thePhiRangeMin [private] |
Definition at line 47 of file ConversionForwardEstimator.h.
Referenced by estimate().