CMS 3D CMS Logo

EtaPhiEstimator.h
Go to the documentation of this file.
4 
6  public:
7 
13  explicit EtaPhiEstimator(double eta, double phi,
16  estimator->nSigmaCut()),
17  estimator_(estimator),
18  thedEta(eta),
19  thedPhi(phi),
20  thedEta2(eta*eta),
21  thedPhi2(phi*phi)
22  { }
23 
24  std::pair<bool,double> estimate(const TrajectoryStateOnSurface& tsos,
25  const TrackingRecHit& aRecHit) const override{
26 
27  std::pair<bool,double> primaryResult = estimator_->estimate(tsos,aRecHit);
28 
29  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
30  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
31 
32  double check = (dEta*dEta)/(thedEta2) + (dPhi*dPhi)/(thedPhi2);
33 
34  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
35  << " The hit position is:\n" << aRecHit.globalPosition()
36  << " deta: "<< dEta<< " dPhi: "<<dPhi<<" check: "<<check<<" primaryly: "<< primaryResult.second;
37 
38  if (check <= 1)
39  // if (dEta < thedEta && dPhi <thedPhi)
40  return std::make_pair(true, primaryResult.second);
41  else
42  return std::make_pair(false, primaryResult.second);
43  }
44 
45  EtaPhiEstimator* clone() const override {
46  return new EtaPhiEstimator(*this);
47  }
48 
49  private:
52 };
#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