CMS 3D CMS Logo

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  // As the center of the plane is in the region, no need to waste time to test the hit as well
14  return std::make_pair(true, 1.0);
15 
16  /* HERE AS THE SECOND LINE WAS BUGGY... (AND MAY BE NEEDED IF WE MODIFY THE ESTIMATE WRT PLANE TO ACCOUNT FOR DET SPAN
17 
18  auto dEta = std::abs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
19  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), aRecHit.globalPosition().barePhi()));
20 
21  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
22  << " The hit position is:\n" << aRecHit.globalPosition()
23  << " deta: "<< dEta<< " dPhi: "<<dPhi;
24 
25  if ( (dEta < thedEta) & (dPhi <thedPhi) )
26  return std::make_pair(true, 1.0);
27  else
28  return std::make_pair(false, 0.0);
29 
30  */
31 
32 }
33 
35  const Plane& plane) const {
36 
37  auto dEta = std::abs(tsos.globalPosition().eta() - plane.eta());
38  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), plane.phi()));
39 
40 
41  LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
42  << "The plane position center is: " << plane.position() << "\n"
43  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
44  << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);
45 
46  // does not take into account bounds... (not sure it was intentional)
47  return (dEta < thedEta) & (dPhi <thedPhi);
48 }
49 
51  const Plane& plane) const {
52 
53  return Local2DVector(30., 30.);
54 }
55 
#define LogDebug(id)
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
GlobalPoint globalPosition() const
Definition: Plane.h:17
T barePhi() const
Definition: PV3DBase.h:68
Vector2DBase< float, LocalTag > Local2DVector
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T eta() const
Definition: PV3DBase.h:76
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
const PositionType & position() const