#include <BarrelMeasurementEstimator.h>
Public Member Functions | |
BarrelMeasurementEstimator () | |
BarrelMeasurementEstimator (float phiMin, float phiMax, float zMin, float zMax) | |
virtual BarrelMeasurementEstimator * | clone () const |
virtual bool | estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
virtual std::pair< bool, double > | estimate (const GlobalPoint &vprim, const TrajectoryStateOnSurface &ts, GlobalPoint &gp) 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 |
MeasurementEstimator::Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
void | setPhiRange (float dummyphiMin, float dummyphiMax) |
void | setZRange (float zmin, float zmax) |
Private Attributes | |
float | thePhiMax |
float | thePhiMin |
float | theZMax |
float | theZMin |
Definition at line 32 of file BarrelMeasurementEstimator.h.
BarrelMeasurementEstimator::BarrelMeasurementEstimator | ( | ) | [inline] |
BarrelMeasurementEstimator::BarrelMeasurementEstimator | ( | float | phiMin, |
float | phiMax, | ||
float | zMin, | ||
float | zMax | ||
) | [inline] |
virtual BarrelMeasurementEstimator* BarrelMeasurementEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 53 of file BarrelMeasurementEstimator.h.
References BarrelMeasurementEstimator().
{ return new BarrelMeasurementEstimator(*this) ; }
std::pair< bool, double > BarrelMeasurementEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
GlobalPoint & | gp | ||
) | const [virtual] |
Definition at line 37 of file BarrelMeasurementEstimator.cc.
References abs, TrajectoryStateOnSurface::globalParameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), thePhiMin, theZMax, theZMin, and PV3DBase< T, PVType, FrameType >::z().
{ float tsPhi = ts.globalParameters().position().phi(); float myR = gp.perp(); float myZ = gp.z(); float myZmax = theZMax; float myZmin = theZMin; if(std::abs(myZ)<30. && myR>8.) { myZmax = 0.09; myZmin = -0.09; } float rhPhi = gp.phi(); float zDiff = ts.globalParameters().position().z() - gp.z(); float phiDiff = tsPhi - rhPhi; if (phiDiff > pi) phiDiff -= twopi; if (phiDiff < -pi) phiDiff += twopi; if ( phiDiff < thePhiMax && phiDiff > thePhiMin && zDiff < myZmax && zDiff > myZmin) { return std::pair<bool,double>(true,1.); } else { return std::pair<bool,double>(false,0.); } }
bool BarrelMeasurementEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
const BoundPlane & | plane | ||
) | const [virtual] |
Definition at line 105 of file BarrelMeasurementEstimator.cc.
References abs, funct::false, TrajectoryStateOnSurface::globalParameters(), GlobalTrajectoryParameters::position(), and rangesIntersect().
{ typedef std::pair<float,float> Range; GlobalPoint trajPos(ts.globalParameters().position()); GlobalDetRangeZPhi detRange(plane); Range trajZRange(trajPos.z() - std::abs(theZMin), trajPos.z() + std::abs(theZMax)); Range trajPhiRange(trajPos.phi() - std::abs(thePhiMin), trajPos.phi() + std::abs(thePhiMax)); if(rangesIntersect(trajZRange, detRange.zRange()) && rangesIntersect(trajPhiRange, detRange.phiRange(), PhiLess())) { return true; } else { // cout <<cout<<" barrel boundpl est returns false!!"<<endl; // cout<<"BarrelMeasurementEstimator(estimate) :thePhiMin,thePhiMax, theZMin,theZMax "<<thePhiMin<<" "<<thePhiMax<<" "<< theZMin<<" "<<theZMax<<endl; // cout<<" trajZRange "<<trajZRange.first<<" "<<trajZRange.second<<endl; // cout<<" trajPhiRange "<<trajPhiRange.first<<" "<<trajPhiRange.second<<endl; // cout<<" detZRange "<<detRange.zRange().first<<" "<<detRange.zRange().second<<endl; // cout<<" detPhiRange "<<detRange.phiRange().first<<" "<<detRange.phiRange().second<<endl; // cout<<" intersect z: "<<rangesIntersect(trajZRange, detRange.zRange())<<endl; // cout<<" intersect phi: "<<rangesIntersect(trajPhiRange, detRange.phiRange(), PhiLess())<<endl; return false ; } }
std::pair< bool, double > BarrelMeasurementEstimator::estimate | ( | const GlobalPoint & | vprim, |
const TrajectoryStateOnSurface & | ts, | ||
GlobalPoint & | gp | ||
) | const [virtual] |
Definition at line 74 of file BarrelMeasurementEstimator.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().
{ GlobalVector ts = absolute_ts.globalParameters().position() - vprim ; GlobalVector gp = absolute_gp - vprim ; float tsPhi = ts.phi(); float myR = gp.perp(); float myZ = gp.z(); float myZmax = theZMax; float myZmin = theZMin; if(std::abs(myZ)<30. && myR>8.) { myZmax = 0.09; myZmin = -0.09; } float rhPhi = gp.phi() ; float zDiff = gp.z()-ts.z() ; float phiDiff = normalized_phi(rhPhi-tsPhi) ; if ( phiDiff < thePhiMax && phiDiff > thePhiMin && zDiff < myZmax && zDiff > myZmin) { return std::pair<bool,double>(true,1.) ; } else { return std::pair<bool,double>(false,0.) ; } }
std::pair< bool, double > BarrelMeasurementEstimator::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 29 of file BarrelMeasurementEstimator.cc.
References TransientTrackingRecHit::det(), TrackingRecHit::localPosition(), GeomDet::surface(), and Surface::toGlobal().
{ LocalPoint lp = hit.localPosition(); GlobalPoint gp = hit.det()->surface().toGlobal( lp); return this->estimate(ts,gp); }
MeasurementEstimator::Local2DVector BarrelMeasurementEstimator::maximalLocalDisplacement | ( | const TrajectoryStateOnSurface & | ts, |
const BoundPlane & | plane | ||
) | const |
Definition at line 139 of file BarrelMeasurementEstimator.cc.
References TrajectoryStateOnSurface::hasError(), asciidump::le, TrajectoryStateOnSurface::localError(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().
{ float nSigmaCut = 3. ; if ( ts.hasError()) { LocalError le = ts.localError().positionError() ; return Local2DVector( sqrt(le.xx())*nSigmaCut, sqrt(le.yy())*nSigmaCut) ; } else return Local2DVector(99999,99999) ; }
void BarrelMeasurementEstimator::setPhiRange | ( | float | dummyphiMin, |
float | dummyphiMax | ||
) | [inline] |
void BarrelMeasurementEstimator::setZRange | ( | float | zmin, |
float | zmax | ||
) | [inline] |
Definition at line 44 of file BarrelMeasurementEstimator.h.
References theZMax, theZMin, SiStripMonitorClusterAlca_cfi::zmax, and SiStripMonitorClusterAlca_cfi::zmin.
float BarrelMeasurementEstimator::thePhiMax [private] |
Definition at line 62 of file BarrelMeasurementEstimator.h.
Referenced by setPhiRange().
float BarrelMeasurementEstimator::thePhiMin [private] |
Definition at line 61 of file BarrelMeasurementEstimator.h.
Referenced by estimate(), and setPhiRange().
float BarrelMeasurementEstimator::theZMax [private] |
Definition at line 64 of file BarrelMeasurementEstimator.h.
Referenced by estimate(), and setZRange().
float BarrelMeasurementEstimator::theZMin [private] |
Definition at line 63 of file BarrelMeasurementEstimator.h.
Referenced by estimate(), and setZRange().