File indexing completed on 2024-04-06 12:31:32
0001 #include <cmath>
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 #include "TrackingTools/KalmanUpdators/interface/EtaPhiMeasurementEstimator.h"
0004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0005 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0006
0007 #include "DataFormats/Math/interface/deltaPhi.h"
0008
0009 std::pair<bool, double> EtaPhiMeasurementEstimator::estimate(const TrajectoryStateOnSurface& tsos,
0010 const TrackingRecHit& aRecHit) const {
0011
0012 return std::make_pair(true, 1.0);
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 }
0030
0031 bool EtaPhiMeasurementEstimator::estimate(const TrajectoryStateOnSurface& tsos, const Plane& plane) const {
0032 auto dEta = std::abs(tsos.globalPosition().eta() - plane.eta());
0033 auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), plane.phi()));
0034
0035 LogDebug("EtaPhiMeasurementEstimator") << "The state to compare with is \n"
0036 << tsos << "\n"
0037 << "The plane position center is: " << plane.position() << "\n"
0038 << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
0039 << "deta = " << fabs(dEta) << " --- dPhi = " << fabs(dPhi);
0040
0041
0042 return (dEta < thedEta) & (dPhi < thedPhi);
0043 }
0044
0045 MeasurementEstimator::Local2DVector EtaPhiMeasurementEstimator::maximalLocalDisplacement(
0046 const TrajectoryStateOnSurface& tsos, const Plane& plane) const {
0047 return Local2DVector(30., 30.);
0048 }