CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EtaPhiMeasurementEstimator.cc
Go to the documentation of this file.
1 #include <cmath>
6 
8 
9 std::pair<bool,double>
11  const TrackingRecHit& aRecHit) const {
12 
13  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
14  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
15 
16  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
17  << " The hit position is:\n" << aRecHit.globalPosition()
18  << " deta: "<< dEta<< " dPhi: "<<dPhi;
19 
20  if (dEta < thedEta && dPhi <thedPhi)
21  return std::make_pair(true, 1.0);
22  else
23  return std::make_pair(false, 0.0);
24 }
25 
27  const Plane& plane) const {
28 
29  double dEta = fabs(tsos.globalPosition().eta() - plane.position().eta());
30  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), plane.position().phi());
31 
32  LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
33  << "The plane position center is: " << plane.position() << "\n"
34  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
35  << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);
36 
37  if (fabs(dEta) < thedEta && fabs(dPhi) <thedPhi)
38  return true;
39  else
40  return false;
41 }
42 
44  const Plane& plane) const {
45 
46  return Local2DVector(30., 30.);
47 }
48 
#define LogDebug(id)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
virtual GlobalPoint globalPosition() const
Definition: Plane.h:17
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
Vector2DBase< float, LocalTag > Local2DVector
T eta() const
Definition: PV3DBase.h:76
const PositionType & position() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &tsos, const Plane &plane) const