CMS 3D CMS Logo

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

#include <TrajSeedMatcher.h>

Inheritance diagram for TrajSeedMatcher::MatchingCutsV1:
TrajSeedMatcher::MatchingCuts

Public Member Functions

 MatchingCutsV1 (const edm::ParameterSet &pset)
 
bool operator() (const SCHitMatch &scHitMatch) const override
 
- Public Member Functions inherited from TrajSeedMatcher::MatchingCuts
 MatchingCuts ()
 
virtual ~MatchingCuts ()
 

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 177 of file TrajSeedMatcher.h.

Constructor & Destructor Documentation

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

Definition at line 410 of file TrajSeedMatcher.cc.

References dRZMaxLowEt_, dRZMaxLowEtEtaBins_, and Exception.

410  :
411  dPhiMax_(pset.getParameter<double>("dPhiMax")),
412  dRZMax_(pset.getParameter<double>("dRZMax")),
413  dRZMaxLowEtThres_(pset.getParameter<double>("dRZMaxLowEtThres")),
414  dRZMaxLowEtEtaBins_(pset.getParameter<std::vector<double> >("dRZMaxLowEtEtaBins")),
415  dRZMaxLowEt_(pset.getParameter<std::vector<double> >("dRZMaxLowEt"))
416 {
417  if(dRZMaxLowEtEtaBins_.size()+1!=dRZMaxLowEt_.size()){
418  throw cms::Exception("InvalidConfig")<<" dRZMaxLowEtEtaBins should be 1 less than dRZMaxLowEt when its "<<dRZMaxLowEtEtaBins_.size()<<" vs "<<dRZMaxLowEt_.size();
419  }
420 }
T getParameter(std::string const &) const
const std::vector< double > dRZMaxLowEt_
const std::vector< double > dRZMaxLowEtEtaBins_

Member Function Documentation

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

Definition at line 432 of file TrajSeedMatcher.cc.

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

Referenced by operator()().

433 {
434  if(scEt>=dRZMaxLowEtThres_) return dRZMax_;
435  else{
436  const float absEta = std::abs(scEta);
437  for(size_t etaNr=0;etaNr<dRZMaxLowEtEtaBins_.size();etaNr++){
438  if(absEta<dRZMaxLowEtEtaBins_[etaNr]) return dRZMaxLowEt_[etaNr];
439  }
440  return dRZMaxLowEt_.back();
441  }
442 }
const std::vector< double > dRZMaxLowEt_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::vector< double > dRZMaxLowEtEtaBins_
bool TrajSeedMatcher::MatchingCutsV1::operator() ( const SCHitMatch scHitMatch) const
overridevirtual

Implements TrajSeedMatcher::MatchingCuts.

Definition at line 422 of file TrajSeedMatcher.cc.

References funct::abs(), TrajSeedMatcher::SCHitMatch::dPhi(), dPhiMax_, TrajSeedMatcher::SCHitMatch::dRZ(), dRZMax_, TrajSeedMatcher::SCHitMatch::et(), TrajSeedMatcher::SCHitMatch::eta(), and getDRZCutValue().

423 {
424  if(dPhiMax_>=0 && std::abs(scHitMatch.dPhi()) > dPhiMax_) return false;
425 
426  const float dRZMax = getDRZCutValue(scHitMatch.et(),scHitMatch.eta());
427  if(dRZMax_>=0 && std::abs(scHitMatch.dRZ()) > dRZMax) return false;
428 
429  return true;
430 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float getDRZCutValue(const float scEt, const float scEta) const

Member Data Documentation

const double TrajSeedMatcher::MatchingCutsV1::dPhiMax_
private

Definition at line 184 of file TrajSeedMatcher.h.

Referenced by operator()().

const double TrajSeedMatcher::MatchingCutsV1::dRZMax_
private

Definition at line 185 of file TrajSeedMatcher.h.

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

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

Definition at line 188 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue(), and MatchingCutsV1().

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

Definition at line 187 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue(), and MatchingCutsV1().

const double TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEtThres_
private

Definition at line 186 of file TrajSeedMatcher.h.

Referenced by getDRZCutValue().