CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual std::pair<bool,double> estimate(const TrajectoryStateOnSurface& tsos,
25  const TrackingRecHit& aRecHit) const{
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  virtual EtaPhiEstimator* clone() const {
46  return new EtaPhiEstimator(*this);
47  }
48 
49  private:
52 };
#define LogDebug(id)
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const =0
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
virtual EtaPhiEstimator * clone() const
T eta() const
virtual GlobalPoint globalPosition() const
const Chi2MeasurementEstimatorBase * estimator_
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
bool check(const std::string &)
T eta() const
Definition: PV3DBase.h:76
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &tsos, const TrackingRecHit &aRecHit) const
Definition: DDAxes.h:10