CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EtaPhiMeasurementEstimator.cc
Go to the documentation of this file.
1 #include <cmath>
6 
8 
10  const TrackingRecHit& aRecHit) const {
11  // As the center of the plane is in the region, no need to waste time to test the hit as well
12  return std::make_pair(true, 1.0);
13 
14  /* HERE AS THE SECOND LINE WAS BUGGY... (AND MAY BE NEEDED IF WE MODIFY THE ESTIMATE WRT PLANE TO ACCOUNT FOR DET SPAN
15 
16  auto dEta = std::abs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
17  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), aRecHit.globalPosition().barePhi()));
18 
19  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
20  << " The hit position is:\n" << aRecHit.globalPosition()
21  << " deta: "<< dEta<< " dPhi: "<<dPhi;
22 
23  if ( (dEta < thedEta) & (dPhi <thedPhi) )
24  return std::make_pair(true, 1.0);
25  else
26  return std::make_pair(false, 0.0);
27 
28  */
29 }
30 
32  auto dEta = std::abs(tsos.globalPosition().eta() - plane.eta());
33  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), plane.phi()));
34 
35  LogDebug("EtaPhiMeasurementEstimator") << "The state to compare with is \n"
36  << tsos << "\n"
37  << "The plane position center is: " << plane.position() << "\n"
38  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
39  << "deta = " << fabs(dEta) << " --- dPhi = " << fabs(dPhi);
40 
41  // does not take into account bounds... (not sure it was intentional)
42  return (dEta < thedEta) & (dPhi < thedPhi);
43 }
44 
46  const TrajectoryStateOnSurface& tsos, const Plane& plane) const {
47  return Local2DVector(30., 30.);
48 }
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
GlobalPoint globalPosition() const
Definition: Plane.h:16
T barePhi() const
Definition: PV3DBase.h:65
Vector2DBase< float, LocalTag > Local2DVector
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T eta() const
Definition: PV3DBase.h:73
const PositionType & position() const
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
#define LogDebug(id)