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

Constructor & Destructor Documentation

◆ MatchingCutsV1()

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

Definition at line 375 of file TrajSeedMatcher.cc.

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

References dRZMaxLowEt_, dRZMaxLowEtEtaBins_, and Exception.

Member Function Documentation

◆ getDRZCutValue()

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

Definition at line 398 of file TrajSeedMatcher.cc.

398  {
399  if (scEt >= dRZMaxLowEtThres_)
400  return dRZMax_;
401  else {
402  const float absEta = std::abs(scEta);
403  for (size_t etaNr = 0; etaNr < dRZMaxLowEtEtaBins_.size(); etaNr++) {
404  if (absEta < dRZMaxLowEtEtaBins_[etaNr])
405  return dRZMaxLowEt_[etaNr];
406  }
407  return dRZMaxLowEt_.back();
408  }
409 }

References funct::abs().

◆ operator()()

bool TrajSeedMatcher::MatchingCutsV1::operator() ( const SCHitMatch scHitMatch) const
overridevirtual

Implements TrajSeedMatcher::MatchingCuts.

Definition at line 387 of file TrajSeedMatcher.cc.

387  {
388  if (dPhiMax_ >= 0 && std::abs(scHitMatch.dPhi) > dPhiMax_)
389  return false;
390 
391  const float dRZMax = getDRZCutValue(scHitMatch.et, scHitMatch.eta);
392  if (dRZMax_ >= 0 && std::abs(scHitMatch.dRZ) > dRZMax)
393  return false;
394 
395  return true;
396 }

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

Member Data Documentation

◆ dPhiMax_

const double TrajSeedMatcher::MatchingCutsV1::dPhiMax_
private

Definition at line 99 of file TrajSeedMatcher.h.

◆ dRZMax_

const double TrajSeedMatcher::MatchingCutsV1::dRZMax_
private

Definition at line 100 of file TrajSeedMatcher.h.

◆ dRZMaxLowEt_

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

Definition at line 103 of file TrajSeedMatcher.h.

Referenced by MatchingCutsV1().

◆ dRZMaxLowEtEtaBins_

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

Definition at line 102 of file TrajSeedMatcher.h.

Referenced by MatchingCutsV1().

◆ dRZMaxLowEtThres_

const double TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEtThres_
private

Definition at line 101 of file TrajSeedMatcher.h.

TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEtThres_
const double dRZMaxLowEtThres_
Definition: TrajSeedMatcher.h:101
TrajSeedMatcher::MatchingCutsV1::dRZMax_
const double dRZMax_
Definition: TrajSeedMatcher.h:100
TrajSeedMatcher::MatchingCutsV1::getDRZCutValue
float getDRZCutValue(const float scEt, const float scEta) const
Definition: TrajSeedMatcher.cc:398
TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEtEtaBins_
const std::vector< double > dRZMaxLowEtEtaBins_
Definition: TrajSeedMatcher.h:102
TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEt_
const std::vector< double > dRZMaxLowEt_
Definition: TrajSeedMatcher.h:103
Exception
Definition: hltDiff.cc:245
TrajSeedMatcher::MatchingCutsV1::dPhiMax_
const double dPhiMax_
Definition: TrajSeedMatcher.h:99
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27