CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrajSeedMatcher::MatchingCuts Class Reference

#include <TrajSeedMatcher.h>

Public Member Functions

 MatchingCuts (const edm::ParameterSet &pset)
 
bool operator() (const HitInfo &hit, const float scEt, const float scEta) const
 

Private Member Functions

float getDRZCutValue (const float scEt, const float scEta) const
 

Private Attributes

const double dPhiMax_
 
const double dRZMax_
 
const std::vector< double > dRZMaxLowEt_
 
const std::vector< double > dRZMaxLowEtEtaBins_
 
const double dRZMaxLowEtThres_
 

Detailed Description

Definition at line 146 of file TrajSeedMatcher.h.

Constructor & Destructor Documentation

TrajSeedMatcher::MatchingCuts::MatchingCuts ( const edm::ParameterSet pset)
explicit

Definition at line 377 of file TrajSeedMatcher.cc.

References dRZMaxLowEt_, dRZMaxLowEtEtaBins_, and Exception.

377  :
378  dPhiMax_(pset.getParameter<double>("dPhiMax")),
379  dRZMax_(pset.getParameter<double>("dRZMax")),
380  dRZMaxLowEtThres_(pset.getParameter<double>("dRZMaxLowEtThres")),
381  dRZMaxLowEtEtaBins_(pset.getParameter<std::vector<double> >("dRZMaxLowEtEtaBins")),
382  dRZMaxLowEt_(pset.getParameter<std::vector<double> >("dRZMaxLowEt"))
383 {
384  if(dRZMaxLowEtEtaBins_.size()+1!=dRZMaxLowEt_.size()){
385  throw cms::Exception("InvalidConfig")<<" dRZMaxLowEtEtaBins should be 1 less than dRZMaxLowEt when its "<<dRZMaxLowEtEtaBins_.size()<<" vs "<<dRZMaxLowEt_.size();
386  }
387 }
T getParameter(std::string const &) const
const std::vector< double > dRZMaxLowEtEtaBins_
const std::vector< double > dRZMaxLowEt_

Member Function Documentation

float TrajSeedMatcher::MatchingCuts::getDRZCutValue ( const float  scEt,
const float  scEta 
) const
private

Definition at line 399 of file TrajSeedMatcher.cc.

References funct::abs(), dRZMax_, dRZMaxLowEt_, dRZMaxLowEtEtaBins_, and dRZMaxLowEtThres_.

Referenced by operator()().

400 {
401  if(scEt>=dRZMaxLowEtThres_) return dRZMax_;
402  else{
403  const float absEta = std::abs(scEta);
404  for(size_t etaNr=0;etaNr<dRZMaxLowEtEtaBins_.size();etaNr++){
405  if(absEta<dRZMaxLowEtEtaBins_[etaNr]) return dRZMaxLowEt_[etaNr];
406  }
407  return dRZMaxLowEt_.back();
408  }
409 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::vector< double > dRZMaxLowEtEtaBins_
const std::vector< double > dRZMaxLowEt_
bool TrajSeedMatcher::MatchingCuts::operator() ( const HitInfo hit,
const float  scEt,
const float  scEta 
) const

Definition at line 389 of file TrajSeedMatcher.cc.

References funct::abs(), TrajSeedMatcher::HitInfo::dPhi(), dPhiMax_, TrajSeedMatcher::HitInfo::dRZ(), dRZMax_, and getDRZCutValue().

390 {
391  if(dPhiMax_>=0 && std::abs(hit.dPhi()) > dPhiMax_) return false;
392 
393  const float dRZMax = getDRZCutValue(scEt,scEta);
394  if(dRZMax_>=0 && std::abs(hit.dRZ()) > dRZMax) return false;
395 
396  return true;
397 }
float getDRZCutValue(const float scEt, const float scEta) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

const double TrajSeedMatcher::MatchingCuts::dPhiMax_
private

Definition at line 153 of file TrajSeedMatcher.h.

Referenced by operator()().

const double TrajSeedMatcher::MatchingCuts::dRZMax_
private

Definition at line 154 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue(), and operator()().

const std::vector<double> TrajSeedMatcher::MatchingCuts::dRZMaxLowEt_
private

Definition at line 157 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue(), and MatchingCuts().

const std::vector<double> TrajSeedMatcher::MatchingCuts::dRZMaxLowEtEtaBins_
private

Definition at line 156 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue(), and MatchingCuts().

const double TrajSeedMatcher::MatchingCuts::dRZMaxLowEtThres_
private

Definition at line 155 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue().