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>
5 
6 
8 
9 std::pair<bool,double>
11  const TransientTrackingRecHit& 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 BoundPlane& 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 BoundPlane& plane) const {
45 
46  return Local2DVector(30., 30.);
47 }
48 
#define LogDebug(id)
Vector2DBase< float, LocalTag > Local2DVector
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
GlobalPoint globalPosition() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &tsos, const BoundPlane &plane) const
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
T eta() const
Definition: PV3DBase.h:75
virtual GlobalPoint globalPosition() const
const PositionType & position() const