CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/TrackingTools/KalmanUpdators/src/EtaPhiMeasurementEstimator.cc

Go to the documentation of this file.
00001 #include <cmath>
00002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00003 #include "TrackingTools/KalmanUpdators/interface/EtaPhiMeasurementEstimator.h"
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 
00006 
00007 #include "DataFormats/Math/interface/deltaPhi.h"
00008 
00009 std::pair<bool,double> 
00010 EtaPhiMeasurementEstimator::estimate(const TrajectoryStateOnSurface& tsos,
00011                                    const TransientTrackingRecHit& aRecHit) const {
00012 
00013   double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
00014   double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
00015 
00016   LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
00017                                         << " The hit position is:\n" << aRecHit.globalPosition()
00018                                         << " deta: "<< dEta<< " dPhi: "<<dPhi;
00019 
00020   if (dEta < thedEta && dPhi <thedPhi)
00021     return std::make_pair(true, 1.0);
00022   else
00023     return std::make_pair(false, 0.0);
00024 }
00025 
00026 bool EtaPhiMeasurementEstimator::estimate(const TrajectoryStateOnSurface& tsos,
00027                                    const BoundPlane& plane) const {
00028 
00029   double dEta = fabs(tsos.globalPosition().eta() - plane.position().eta());
00030   double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), plane.position().phi());
00031 
00032   LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
00033                                         << "The plane position center is: " << plane.position() << "\n"
00034                                         << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
00035                                         << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);
00036 
00037   if (fabs(dEta) < thedEta && fabs(dPhi) <thedPhi)
00038     return true;
00039   else
00040     return false;
00041 }
00042 
00043 MeasurementEstimator::Local2DVector EtaPhiMeasurementEstimator::maximalLocalDisplacement( const TrajectoryStateOnSurface& tsos,
00044                                         const BoundPlane& plane) const {
00045 
00046   return  Local2DVector(30., 30.);
00047 }
00048