#include <RecoEgamma/EgammaPhotonAlgos/interface/ConversionForwardEstimator.h>
Public Member Functions | |
virtual ConversionForwardEstimator * | clone () const |
ConversionForwardEstimator (float phiRangeMin, float phiRangeMax, float dr, double nSigma=3.) | |
ConversionForwardEstimator () | |
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, 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. | |
virtual 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. | |
double | nSigmaCut () const |
Private Attributes | |
float | dr_ |
double | theNSigma |
float | thePhiRangeMax |
float | thePhiRangeMin |
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.
00026 : 00027 thePhiRangeMin( phiRangeMin), thePhiRangeMax( phiRangeMax), dr_(dr), theNSigma(nSigma) { 00028 //std::cout << " ConversionForwardEstimator CTOR " << std::endl; 00029 }
virtual ConversionForwardEstimator* ConversionForwardEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 36 of file ConversionForwardEstimator.h.
References ConversionForwardEstimator().
00036 { 00037 return new ConversionForwardEstimator(*this); 00038 }
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 73 of file ConversionForwardEstimator.cc.
References true.
00074 { 00075 00076 // std::cout << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts, const BoundPlane& plane) always TRUE " << "\n"; 00077 // this method should return one if a detector ring is close enough 00078 // to the hit, zero otherwise. 00079 // Now time is wasted looking for hits in the rings which are anyhow 00080 // too far from the prediction 00081 return true ; 00082 00083 }
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 16 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(), HLT_VtxMuL3::result, funct::sqrt(), thePhiRangeMin, and LocalError::yy().
00017 { 00018 LogDebug("ConversionForwardEstimator") << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) " << "\n"; 00019 // std::cout << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) " << "\n"; 00020 00021 std::pair<bool,double> result; 00022 00023 float tsPhi = ts.globalParameters().position().phi(); 00024 GlobalPoint gp = hit.globalPosition(); 00025 float rhPhi = gp.phi(); 00026 float rhR = gp.perp(); 00027 00028 // allow an r fudge of 1.5 * times the sigma 00029 // nodt used float dr = 1.5 * hit.localPositionError().yy(); 00030 //std::cout << " err " << hit.globalPositionError().phierr(gp) 00031 // << " " << hit.globalPositionError().rerr(gp) << std::endl; 00032 00033 // not used float zLayer = ts.globalParameters().position().z(); 00034 float rLayer = ts.globalParameters().position().perp(); 00035 00036 float newdr = sqrt(pow(dr_,2)+4.*hit.localPositionError().yy()); 00037 float rMin = rLayer - newdr; 00038 float rMax = rLayer + newdr; 00039 float phiDiff = tsPhi - rhPhi; 00040 if (phiDiff > pi) phiDiff -= twopi; 00041 if (phiDiff < -pi) phiDiff += twopi; 00042 00043 //std::cout << " ConversionForwardEstimator: RecHit at " << gp << "\n"; 00044 //std::cout << " rMin = " << rMin << ", rMax = " << rMax << ", rHit = " << rhR << "\n"; 00045 //std::cout << " thePhiRangeMin = " << thePhiRangeMin << ", thePhiRangeMax = " << thePhiRangeMax << ", phiDiff = " << phiDiff << "\n"; 00046 00047 00048 if ( phiDiff < thePhiRangeMax && phiDiff > thePhiRangeMin && 00049 rhR < rMax && rhR > rMin) { 00050 00051 00052 // std::cout << " estimator returns 1 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " 00053 // << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << "\n"; 00054 //std::cout << " YES " << phiDiff << " " <<rLayer-rhR << "\n"; 00055 //std::cout << " => RECHIT ACCEPTED " << "\n"; 00056 00057 result.first= true; 00058 result.second=phiDiff; 00059 } else { 00060 /* 00061 cout << " estimator returns 0 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < " 00062 << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << endl; 00063 */ 00064 result.first= false; 00065 result.second=0; 00066 00067 } 00068 00069 return result; 00070 00071 }
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 88 of file ConversionForwardEstimator.cc.
00090 { 00091 00092 /* 00093 if ( ts.hasError() ) { 00094 LocalError le = ts.localError().positionError(); 00095 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; 00096 return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut()); 00097 00098 } 00099 else return Local2DVector(99999,99999); 00100 */ 00101 00102 return Local2DVector(99999,99999); 00103 00104 }
double ConversionForwardEstimator::nSigmaCut | ( | ) | const [inline] |
Definition at line 43 of file ConversionForwardEstimator.h.
References theNSigma.
00043 {return theNSigma;}
float ConversionForwardEstimator::dr_ [private] |
double ConversionForwardEstimator::theNSigma [private] |
float ConversionForwardEstimator::thePhiRangeMax [private] |
Definition at line 48 of file ConversionForwardEstimator.h.
float ConversionForwardEstimator::thePhiRangeMin [private] |