CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EtaPhiEstimator.h
Go to the documentation of this file.
7 
9 public:
16  : Chi2MeasurementEstimatorBase(estimator->chiSquaredCut(), estimator->nSigmaCut()),
17  estimator_(estimator),
18  thedEta(eta),
19  thedPhi(phi),
20  thedEta2(eta * eta),
21  thedPhi2(phi * phi) {}
22 
23  std::pair<bool, double> estimate(const TrajectoryStateOnSurface& tsos, const TrackingRecHit& aRecHit) const override {
24  std::pair<bool, double> primaryResult = estimator_->estimate(tsos, aRecHit);
25 
26  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
27  double dPhi = deltaPhi<double>(tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
28 
29  double check = (dEta * dEta) / (thedEta2) + (dPhi * dPhi) / (thedPhi2);
30 
31  LogDebug("EtaPhiMeasurementEstimator") << " The state to compare with is \n"
32  << tsos << " The hit position is:\n"
33  << aRecHit.globalPosition() << " deta: " << dEta << " dPhi: " << dPhi
34  << " check: " << check << " primaryly: " << primaryResult.second;
35 
36  if (check <= 1)
37  // if (dEta < thedEta && dPhi <thedPhi)
38  return std::make_pair(true, primaryResult.second);
39  else
40  return std::make_pair(false, primaryResult.second);
41  }
42 
43  EtaPhiEstimator* clone() const override { return new EtaPhiEstimator(*this); }
44 
45 private:
48 };
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &tsos, const TrackingRecHit &aRecHit) const override
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
GlobalPoint globalPosition() const
virtual GlobalPoint globalPosition() const
const Chi2MeasurementEstimatorBase * estimator_
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
T eta() const
Definition: PV3DBase.h:73
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
EtaPhiEstimator * clone() const override
#define LogDebug(id)