CMS 3D CMS Logo

EtaPhiEstimator.h
Go to the documentation of this file.
7 
9  public:
10 
16  explicit EtaPhiEstimator(double eta, double phi,
19  estimator->nSigmaCut()),
20  estimator_(estimator),
21  thedEta(eta),
22  thedPhi(phi),
23  thedEta2(eta*eta),
24  thedPhi2(phi*phi)
25  { }
26 
27  std::pair<bool,double> estimate(const TrajectoryStateOnSurface& tsos,
28  const TrackingRecHit& aRecHit) const override{
29 
30  std::pair<bool,double> primaryResult = estimator_->estimate(tsos,aRecHit);
31 
32  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
33  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
34 
35  double check = (dEta*dEta)/(thedEta2) + (dPhi*dPhi)/(thedPhi2);
36 
37  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
38  << " The hit position is:\n" << aRecHit.globalPosition()
39  << " deta: "<< dEta<< " dPhi: "<<dPhi<<" check: "<<check<<" primaryly: "<< primaryResult.second;
40 
41  if (check <= 1)
42  // if (dEta < thedEta && dPhi <thedPhi)
43  return std::make_pair(true, primaryResult.second);
44  else
45  return std::make_pair(false, primaryResult.second);
46  }
47 
48  EtaPhiEstimator* clone() const override {
49  return new EtaPhiEstimator(*this);
50  }
51 
52  private:
55 };
#define LogDebug(id)
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
virtual GlobalPoint globalPosition() const
EtaPhiEstimator * clone() const override
const Chi2MeasurementEstimatorBase * estimator_
T eta() const
Definition: PV3DBase.h:76
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &tsos, const TrackingRecHit &aRecHit) const override
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
def check(config)
Definition: trackerTree.py:14