#include <ConversionBarrelEstimator.h>
Public Member Functions | |
virtual ConversionBarrelEstimator * | clone () const |
ConversionBarrelEstimator () | |
ConversionBarrelEstimator (float phiRangeMin, float phiRangeMax, float zRangeMin, float zRangeMax, double nSigma=3.) | |
virtual bool | estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const |
virtual Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const |
double | nSigmaCut () const |
Private Attributes | |
double | theNSigma |
float | thePhiRangeMax |
float | thePhiRangeMin |
float | theZRangeMax |
float | theZRangeMin |
Defines the search area in the barrel
Definition at line 21 of file ConversionBarrelEstimator.h.
ConversionBarrelEstimator::ConversionBarrelEstimator | ( | ) | [inline] |
ConversionBarrelEstimator::ConversionBarrelEstimator | ( | float | phiRangeMin, |
float | phiRangeMax, | ||
float | zRangeMin, | ||
float | zRangeMax, | ||
double | nSigma = 3. |
||
) | [inline] |
Definition at line 25 of file ConversionBarrelEstimator.h.
: thePhiRangeMin( phiRangeMin), thePhiRangeMax( phiRangeMax), theZRangeMin( zRangeMin), theZRangeMax( zRangeMax), theNSigma(nSigma) { // std::cout << " ConversionBarrelEstimator CTOR " << std::endl; }
virtual ConversionBarrelEstimator* ConversionBarrelEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 37 of file ConversionBarrelEstimator.h.
References ConversionBarrelEstimator().
{ return new ConversionBarrelEstimator(*this); }
virtual bool ConversionBarrelEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
const Plane & | plane | ||
) | const [virtual] |
Returns true if the TrajectoryStateOnSurface is compatible with the Plane, false otherwise. The TrajectoryStateOnSurface must be on the plane.
Implements MeasurementEstimator.
std::pair< bool, double > ConversionBarrelEstimator::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 ConversionBarrelEstimator.cc.
References TrajectoryStateOnSurface::globalParameters(), TransientTrackingRecHit::globalPosition(), TrackingRecHit::localPositionError(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), query::result, mathSSE::sqrt(), thePhiRangeMin, theZRangeMax, LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
{ std::pair<bool,double> result; //std::cout << " ConversionBarrelEstimator::estimate( const TrajectoryStateOnSurface& ts, const TransientTrackingRecHit& hit) " << std::endl; float tsPhi = ts.globalParameters().position().phi(); GlobalPoint gp = hit.globalPosition(); float rhPhi = gp.phi(); // allow a z fudge of 2 sigma float dz = 2. * sqrt(hit.localPositionError().yy()) ; float zDiff = ts.globalParameters().position().z() - gp.z(); float phiDiff = tsPhi - rhPhi; if (phiDiff > pi) phiDiff -= twopi; if (phiDiff < -pi) phiDiff += twopi; // add the errors on the window and the point in quadrature float zrange = sqrt(theZRangeMax*theZRangeMax + dz*dz); /* std::cout << " BarrelEstimator ts local error " <<ts.localError().positionError() << " hit local error " << hit.localPositionError() << std::endl; std::cout << " BarrelEstimator: RecHit at " << gp << " phi " << rhPhi << " eta " << gp.eta() << std::endl; std::cout << " BarrelEstimator: ts at " << ts.globalParameters().position() << " phi " <<ts.globalParameters().position().phi() << " eta " << ts.globalParameters().position().eta()<< std::endl; std::cout << " zrange = +/-" << zrange << ", zDiff = " << zDiff << std::endl; std::cout << " thePhiRangeMin = " << thePhiRangeMin << ", thePhiRangeMax = " << thePhiRangeMax << ", phiDiff = " << phiDiff << std::endl; */ if ( phiDiff < thePhiRangeMax && phiDiff > thePhiRangeMin && zDiff < zrange && zDiff > -zrange) { // std::cout << " estimator returns 1 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " // << thePhiRangeMax << " and zDiff " << zDiff << " < " << zrange << std::endl; // std::cout << " YES " << phiDiff << " " << zDiff << std::endl; // std::cout << " => RECHIT ACCEPTED " << std::endl; result.first=true; result.second=phiDiff; } else { // std::cout << " estimator returns NOT ACCEPTED with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " //<< thePhiRangeMax << " and zDiff " << zDiff << " < " << theZRangeMax+dz << std::endl; result.first=false; result.second=0; } return result; }
virtual Local2DVector ConversionBarrelEstimator::maximalLocalDisplacement | ( | const TrajectoryStateOnSurface & | ts, |
const Plane & | 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 Plane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().
Reimplemented from MeasurementEstimator.
double ConversionBarrelEstimator::nSigmaCut | ( | ) | const [inline] |
Definition at line 48 of file ConversionBarrelEstimator.h.
References theNSigma.
{return theNSigma;}
double ConversionBarrelEstimator::theNSigma [private] |
Definition at line 56 of file ConversionBarrelEstimator.h.
Referenced by nSigmaCut().
float ConversionBarrelEstimator::thePhiRangeMax [private] |
Definition at line 53 of file ConversionBarrelEstimator.h.
float ConversionBarrelEstimator::thePhiRangeMin [private] |
Definition at line 52 of file ConversionBarrelEstimator.h.
Referenced by estimate().
float ConversionBarrelEstimator::theZRangeMax [private] |
Definition at line 55 of file ConversionBarrelEstimator.h.
Referenced by estimate().
float ConversionBarrelEstimator::theZRangeMin [private] |
Definition at line 54 of file ConversionBarrelEstimator.h.